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

surfine/WindowShade

Measured 17 November 2026, 08:47 UTC, at code version 63bc4a1

First survey, so nothing to compare with yet
CAI score 64.3out of 100 Adequate
CriticalWeakAdequateStrongExemplary

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A large codebase: 186,136 lines of product code, tests not counted · Estimated rebuild effort: about 1.9 person-years · Weakest lens: Production Readiness, 57.4

Findings by how serious they are

48 critical 1765 serious 53 minor

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

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
17 November 2026, 08:47 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that implements it, and today the Canine Code Analyzer is the only one that does.

The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

42of 42 dimensions measured by tools.
1859of 1866 findings point to an exact file and line, so you can open each one in the code. The other 7 concern the repository as a whole, such as missing documentation.
42dimensions across 8 lenses, read from 186,136 lines of product code.
Chapters

Executive summary

surfine/WindowShade falls short of our standard for production because we found no automated security scanning of the code, its secrets or its dependencies. It scores 64.3 out of 100 and is rated Adequate, and seven of its 48 critical findings are security problems.

Production Readiness, at 57.4, is the weakest lens and counts most in the score. The best first step is adding logging, tracing and health checks, worth about 2.3 points. Handling the errors the code catches and ignores comes next, worth about 1.5 points. Raising Production Readiness to 70 would lift the score to about 69.3.

Two known security holes in the packages the code depends on can be used by attackers. One pipeline tool is referenced by a changeable name, so the build pipeline can be tampered with. Updating the vulnerable packages and pinning the tool to an exact version would close both risks. Keeping the personal data out of the places it leaks to is also needed. Giving each kind of identifier a type of its own would take care of the 40 identifiers passed around as plain numbers or text.

The product code is 186,136 lines, about €280,000 to rebuild.

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

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Production Readiness 57.4 · counts for 45%Code Health 66.3 · counts for 25%Maturity 69.8 · counts for 14%Performance 70.0 · counts for 8%Security and Compliance 75.0 · counts for 4%Event-Driven 79.8 · counts for 2%Domain Modelling 95.7 · counts for 1%Architecture 98.9 · counts for 1%

If Production Readiness rose from 57.4 to 70, the lowest score rated Strong, the score would rise from 64.3 to about 69.3.

Code composition: what the lines of code are
Product code 78%Tests 22%
Rebuild cost: about €280,000 · Estimate
Cost to rebuild€92,000 to €460,000, for 1,536 to 4,872 hours of work, about 1.9 person-years for 1 to 4 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.9 at a score of 64. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 186,136 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Add a health-check endpoint (a /health route on your Vapor/Hummingbird router) so orchestrators and load balancers can probe liveness/readiness.
Raises the score by about 2.3 points · Medium effort · Observability
2
Swallowed exception (caught, then discarded)
Raises the score by about 1.5 points · Medium effort · Exception handling
3
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
Raises the score by about 1.3 points · Medium effort · Deployment & Rollback

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €280,000 to build again, about 1.9 person-years of work. Its weakest lens is Production Readiness, at 57.4 (Adequate). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Add a health-check endpoint (a /health route on your Vapor/Hummingbird router) so orchestrators and load balancers can probe liveness/readiness. Of all the actions in this report, it raises the score most for the work it takes: about 2.3 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.4 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 4% to 9% on every change. The history of the code shows how much it changes: about 353,928 lines over the last 90 days, which is about 1,435,375 lines a year. At that pace, the extra work comes to an estimated 142.9 to 857.4 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

At a glance — Code Health · 66.3 · Adequate · gated by D2 ·

At a glance — Architecture · 98.9 · Exemplary ·

At a glance — Maturity · 69.8 · Adequate · gated by M2 ·

At a glance — Readiness · 57.4 · Adequate · gated by P3 ·

At a glance — Security · 75.0 · Adequate · gated by D32, D36 ·

At a glance — Domain Modelling · 95.7 · Exemplary ·

At a glance — Event-Driven · 79.8 · Strong ·

At a glance — Performance · 70.0 · Strong ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A03:2025 — Software Supply Chain Failures7High / Critical
A01:2025 — Broken Access Control4High / Critical
A05:2025 — Injection1High / Critical

Roadmap

Top priorities: Add a health-check endpoint (a /health route on your Vapor/Hummingbird router) so orchestrators and load balancers can probe liveness/readiness; Swallowed exception (caught, then discarded); Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.

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

Do thisHelpsEffortDimension
Add a health-check endpoint (a /health route on your Vapor/Hummingbird router) so orchestrators and load balancers can probe liveness/readiness.+2.3 ptsMediumObservability
Swallowed exception (caught, then discarded)+1.5 ptsMediumException handling
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.+1.3 ptsMediumDeployment & Rollback
Swift: await instead of blocking — `try await Task.sleep(for:)` for Thread.sleep/sleep, a checked continuation instead of a DispatchSemaphore or DispatchGroup wait, the async Process and URLSession APIs; never park a thread waiting on a Task — the cooperative pool cannot guarantee it progress.+1.0 ptsMediumAsync & latency hygiene
Bring the 33 bodies over 60 down to 60 or less in Cognitive Complexity — start with GlanceProbe.exerciseLaunchpadKeys (cognitive 149), GlanceProbe.exercise (cognitive 144), GlanceProbe.exerciseFullScreenDesktops (cognitive 141).+1.0 ptsHighCognitive Complexity
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.+0.9 ptsMediumArchitecture documentation
Run the test suite in CI via an explicit runner step (`xcodebuild test` for the toolchain this pipeline already uses) and gate merges on it.+0.9 ptsMediumCI/CD gates
Bring the 19 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with GlanceProbe.exercise (cyclomatic 127), GlanceProbe.exerciseLaunchpadKeys (cyclomatic 125), ConductorSession.receive (cyclomatic 125).+0.7 ptsHighCyclomatic Complexity

File quality

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

FileScoreBandWorst signal
REDACTED3.6SlopData Compliance (PII/GDPR): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
prototype/App/Notch/NotchController.swift5.5MixedCyclomatic Complexity: NotchController.wirePanelCallbacks (cyclomatic 35)
prototype/WindowBrowser/WindowBrowserController.swift5.5MixedCyclomatic Complexity: WindowBrowserController.refreshPanel (cyclomatic 30)
prototype/App/ScrollStripRun.swift5.5MixedCyclomatic Complexity: ScrollStripController.evaluateColumns (cyclomatic 27)
prototype/App/EventTap.swift5.5MixedCyclomatic Complexity: AppDelegate.handleHotKey (cyclomatic 26)
prototype/Effects/DuoSettingsWindow.swift5.5MixedCyclomatic Complexity: DuoSettingsWindow.liveChanged (cyclomatic 22)
prototype/App/Preferences.swift5.5MixedCyclomatic Complexity: AppDelegate.applyFeature (cyclomatic 18)
prototype/App/FileShelfView.swift5.5MixedCyclomatic Complexity: FileShelfNameLayout.lines (cyclomatic 16)
prototype/PinnedPreview.swift5.5MixedCyclomatic Complexity: PinnedPreviewController.beginInteraction (cyclomatic 21)
prototype/App/Welcome.swift5.5MixedCyclomatic Complexity: WelcomeView.show (cyclomatic 18)
prototype/WindowShade.swift5.6MixedCyclomatic Complexity: AppDelegate.applicationDidFinishLaunching (cyclomatic 19)
prototype/App/Carry.swift5.6MixedCyclomatic Complexity: CarryController.layout (cyclomatic 18)
prototype/App/PictureInPictureViews.swift5.7MixedCode Duplication: Edited copy of a member (17 corresponding lines)
prototype/App/NotchLevelControl.swift5.7MixedCode Duplication: Edited copy of a member (10 corresponding lines)
REDACTED5.8MixedDependency Vulnerabilities: High CVE: REDACTED
prototype/App/NotchCoach.swift5.9MixedCyclomatic Complexity: NotchDemoView.build (cyclomatic 24)
prototype/App/WS2PrivacyPane.swift5.9MixedCyclomatic Complexity: WS2PrivacyValues.value (cyclomatic 24)
prototype/App/WS2RemoteEffects.swift5.9MixedCyclomatic Complexity: WS2RemoteEffects.execute (cyclomatic 24)
prototype/App/WS2ConductorSettings.swift5.9MixedCode Duplication: Edited copy of a member (6 corresponding lines)

How the grades work

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

Critical — 48

A definite problem that already costs you something and drags the score down: a missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here tends to cause failures elsewhere.

Serious — 1765

Likely wrong, but not failing yet. It degrades the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to carry for two years either.

Minor — 53

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

Could not be resolved — 31

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 42 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.8, the weighted average across measured dimensions.

Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.

What we checked — 42 dimensions across the health lenses
D1D2D3D4D6D13D15D17D19D21D24D27D28D29D30D31D32D34D35D36D37D43AX10AX6AX9DM2DM4DM5ED4M1M2M3M4P1P2P3P4P6PF3X26X28X3

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

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

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a1e8b0-6168-7ab8-81c7-1f28689c002a.

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

Run transparency — what happened this run

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

  • D5 Coupling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.swift, .py) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.swift, .py) but the built-in reliability runner does not support this repository's ecosystem, so flakiness couldn't be assessed. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • D12 Dependency Hygiene — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. This repository's 1 package.json manifest(s) and its 1 committed lockfile(s) WERE read; what went unanswered is the currency half, because it grades the production `dependencies` a lockfile resolves and these manifests declare none — only 2 devDependencies, which D12 does not grade. So registry.npmjs.org was never asked, and there was nothing here for it to grade. This is a true statement about the repository and NOT a gap on our side: the lockfile was resolved, and no reader we could write would find a production dependency in it.
  • D14 License Compliance — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — this repository's committed lockfile was read and it resolves no production dependency: everything it installs is declared under `devDependencies`, or is a workspace-internal package with no registry release behind it. Licences are resolved from registry.npmjs.org, because an npm checkout does not contain its dependencies' licences. NOT a finding that this repository's licences are compliant: this dimension asserts nothing about its licensing in either direction.
  • D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-contributor repository — bus factor is not applicable (1 contributor(s) across 982 commit(s) sampled, automation and bot accounts excluded). Concentration needs a team to concentrate: with one contributor there is nobody to spread the knowledge to, so there is nothing here for the owner to act on.
  • D20 ADR Quality — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The ADR expectation is gated on whether a repository ships a deployable product. Our repo-kind classifier reads .NET project files and the host and package markers of the other ecosystems it knows (a Go `package main`, a Cargo binary, a package.json `bin`, `start` script or application dev server such as Vite or Next, Python console scripts or a Django/WSGI entry point, a Spring Boot / WAR / Gradle application build, a Rack or Rails app, a Composer project, an OTP release or escript, a Dockerfile, a Procfile, a Platform.sh `.platform/routes.yaml`, and the corresponding published-package manifests, including an OTP `*.app.src`, a Drupal module's `*.info` and a Claude Code `.claude-plugin/plugin.json`), and found none here, so we could not tell what kind of repository this is and did not assess its ADR log. This is a gap in our analyzer, not a finding about this repository. No manifest, project file or entry point of any ecosystem it reads exists in this tree.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
  • D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D24 compares a comment's words with the identifiers, literals and constructs of the code it annotates, using English function-word and rationale lexicons. Comments in another script or language were left unread rather than counted as clean.
  • D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D26 Project Cohesion — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Project size and spread are measured over build units (a .NET project, a Maven or Gradle module, an npm, Deno or JSR package, a Go module, a Cargo crate, a Python, Composer, Bundler, RubyGems, Mix, rebar3, sbt, SwiftPM or pub package, an OTP application, an Xcode project or XcodeGen spec, or a checkout that declares no build at all) whose source a code model reads. This repository's production source is in a language no model reads, or in units whose build tool D26 does not recognise. That is a gap in this analyzer's language reach — not a finding that the repository's projects are cohesive.
  • D32 Data Compliance (PII/GDPR) — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. `prototype/App/BystanderTuck.swift`, `prototype/App/CalendarPresenter.swift`, `prototype/App/CountdownTimerCard.swift`, `prototype/App/CountdownTimerHost.swift`, `prototype/App/DirectionKeyPresets.swift`, … (+50 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • D44 Platform End-of-Life — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a Dockerfile) is simply not read here yet.
  • AX3 Project dependency cycles — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over which project references which. That is a language-neutral question, but the project-reference graph is collected from MSBuild .csproj/.fsproj/.vbproj, Gradle, Maven, Cargo, npm/pnpm/yarn, Go module (and dep/glide/godep), Python pyproject.toml/setup.cfg/setup.py, SwiftPM, sbt, Mill, RubyGems, Composer, Mix/rebar3, pub, Unity assembly-definition, Deno/JSR, Tuist, CMake, Bazel, Xcode and XcodeGen builds and uni-app uni_modules plugins, or — when none declares a module — from the imports between a JavaScript/TypeScript, Python, Ruby, loose Rust, build-less C# or manifest-less Go tree's top-level directories, or as one module when all of a tree's source is one directory, and this repository offers none of them — so there was no graph to read, and re-running the same commit reads the same nothing. No module manifest of any ecosystem this engine recognises was found either, and the source's own imports could not stand in: they are read for JavaScript/TypeScript, Python and Ruby only, and only when those languages are the product — in any other language a tree is read only when its whole source is one directory, which this one's is not. The collector owed is an import reader for this repository's languages. That is a COLLECTOR gap in this analyzer — no change to the scan image closes it — and not a finding that the repository is free of what this check looks for.
  • AX4 Dependency direction — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the direction each project reference points. That is a language-neutral question, but the project-reference graph is collected from MSBuild .csproj/.fsproj/.vbproj, Gradle, Maven, Cargo, npm/pnpm/yarn, Go module (and dep/glide/godep), Python pyproject.toml/setup.cfg/setup.py, SwiftPM, sbt, Mill, RubyGems, Composer, Mix/rebar3, pub, Unity assembly-definition, Deno/JSR, Tuist, CMake, Bazel, Xcode and XcodeGen builds and uni-app uni_modules plugins, or — when none declares a module — from the imports between a JavaScript/TypeScript, Python, Ruby, loose Rust, build-less C# or manifest-less Go tree's top-level directories, or as one module when all of a tree's source is one directory, and this repository offers none of them — so there was no graph to read, and re-running the same commit reads the same nothing. No module manifest of any ecosystem this engine recognises was found either, and the source's own imports could not stand in: they are read for JavaScript/TypeScript, Python and Ruby only, and only when those languages are the product — in any other language a tree is read only when its whole source is one directory, which this one's is not. The collector owed is an import reader for this repository's languages. That is a COLLECTOR gap in this analyzer — no change to the scan image closes it — and not a finding that the repository is free of what this check looks for.
  • AX8 Test isolation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over which projects are test projects, and what they reference. That is a language-neutral question, but the project-reference graph is collected from MSBuild .csproj/.fsproj/.vbproj, Gradle, Maven, Cargo, npm/pnpm/yarn, Go module (and dep/glide/godep), Python pyproject.toml/setup.cfg/setup.py, SwiftPM, sbt, Mill, RubyGems, Composer, Mix/rebar3, pub, Unity assembly-definition, Deno/JSR, Tuist, CMake, Bazel, Xcode and XcodeGen builds and uni-app uni_modules plugins, or — when none declares a module — from the imports between a JavaScript/TypeScript, Python, Ruby, loose Rust, build-less C# or manifest-less Go tree's top-level directories, or as one module when all of a tree's source is one directory, and this repository offers none of them — so there was no graph to read, and re-running the same commit reads the same nothing. No module manifest of any ecosystem this engine recognises was found either, and the source's own imports could not stand in: they are read for JavaScript/TypeScript, Python and Ruby only, and only when those languages are the product — in any other language a tree is read only when its whole source is one directory, which this one's is not. The collector owed is an import reader for this repository's languages. That is a COLLECTOR gap in this analyzer — no change to the scan image closes it — and not a finding that the repository is free of what this check looks for.
  • AXB2 Runtime readiness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The dev server exited, and its output does not match a cause we recognise. (rule: unrecognised-exit). The renderer reported: the dev server (`npm run dev` in site/) exited before it served a page. Likely cause (not identified): the dev server exited, and its output does not match a cause we recognise. Last output: "> dev / > node scripts/serve.mjs / WindowShade: http://127.0.0.1:4318 / node:internal/fs/promises:638 / return new FileHandle(await PromisePrototypeThen( / ^ / Error: ENOENT: no such file or directory, open '<repo>/site/dist/404.html' / at async open (node:internal/fs/promises:638:25) / at async readFile (node:internal/fs/promises:1242:14) / at async Server.<anonymous> (file://<repo>/site/scripts/serve.mjs:17:83) { / errno: -2, / code: 'ENOENT', / syscall: 'open', / path: '<repo>/site/dist/404.html' / } / Node.js v22.13.0" No runtime evidence was gathered.
  • AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (dev). the dev server (`npm run dev` in site/) exited before it served a page. Likely cause (not identified): the dev server exited, and its output does not match a cause we recognise. Last output: "> dev / > node scripts/serve.mjs / WindowShade: http://127.0.0.1:4318 / node:internal/fs/promises:638 / return new FileHandle(await PromisePrototypeThen( / ^ / Error: ENOENT: no such file or directory, open '<repo>/site/dist/404.html' / at async open (node:internal/fs/promises:638:25) / at async readFile (node:internal/fs/promises:1242:14) / at async Server.<anonymous> (file://<repo>/site/scripts/serve.mjs:17:83) { / errno: -2, / code: 'ENOENT', / syscall: 'open', / path: '<repo>/site/dist/404.html' / } / Node.js v22.13.0" No runtime evidence was gathered.
  • C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • DM2 Strongly-typed ids — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 199 further occurrence(s) are not listed individually; the score already reflects all 239.
  • GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java source only, and this repository's Swift, c is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby, Scala and Rust source only, and this repository's Swift, c is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • P1 CI/CD gates — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. A CI pipeline exists and the word "test" appears, but no explicit test-runner invocation (your stack's test command, or a test job) was matched — so either the gate runs tests through a step this pass could not recognise, or "test" is incidental here (a path, "latest", a reporter). Which of the two it is cannot be settled from this dimension's evidence; the coverage dimensions report whether a suite exists at all. You can widen what we reach: name the test runner explicitly in the pipeline step (your stack's test command, or a job named for the suite) so the gate is unambiguous to a reader and to this pass.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X1 Async correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 5 further occurrence(s) are not listed individually; the score already reflects all 45.
  • X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X15 Unvalidated length from an untrusted reader — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Ruby, Python, Go, Rust, Dart, F# and Elixir source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Ruby, Python, Go, Rust, Dart, F# or Elixir was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X17 Uncapped recursion over a caller-supplied document — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Python, Dart, Ruby, Scala, Kotlin and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Java, Python, Dart, Ruby, Scala, Kotlin or Rust was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X2 Cancellation propagation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded, and no named async function in this repository's JavaScript/TypeScript, nor any Go, PHP or Dart function or Kotlin suspend function, makes a request that can be cancelled (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial; amphp; Dio; Ktor, OkHttp), so there is nothing to judge, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Scala, Ruby and Python source only, and no C# was loaded and no JavaScript/TypeScript, Java, Scala, Ruby or Python was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X25 Inert configuration knob — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X27 Collection changed while being enumerated — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala, Kotlin, PHP and Go source only, and no C# was loaded, no Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala, Kotlin, PHP or Go was found, and this repository's C, Swift (Foundation mutable collections) is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X29 Per-element action decided by a fixed element — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X5 Nullable reference types — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, Kotlin source, and Rust source only, and no C# was loaded, no TypeScript was found, and this repository's C, Swift is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D32 Data Compliance (PII/GDPR): PII/GDPR signals are heuristic pattern matches in code — they flag likely handling concerns, not legal compliance, and cannot trace where data actually flows at runtime.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • DM4 Rich vs anemic domain model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity4.8 / 10Weak✓ Tool-verified

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

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

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

405 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was GlanceProbe.exercise at 127. A further 20 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being GestureAction.hudTitle at 46 — they are counted neither in the figure above nor in this dimension's score. 4 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: prototype/Overlay/GestureHUD.swift (GestureAction.hudTitle at 46), prototype/Core/RectangleKeymap.swift (RectangleCommand.raycastName at 22), prototype/App/RectangleImport.swift (GlobalShortcut.placement at 18), prototype/Core/DirectionKeys.swift (DirectionKeySet.keyCode at 17). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

GlanceProbe.exercise (cyclomatic 127)prototype/App/GlanceProbe.swift:117
GlanceProbe.exerciseLaunchpadKeys (cyclomatic 125)prototype/App/LaunchpadKeysProbe.swift:27
ConductorSession.receive (cyclomatic 125)prototype/Core/ConductorSession.swift:223
GlanceProbe.exerciseNotch (cyclomatic 121)prototype/App/GestureProbe.swift:1906
PresenceLock.handle (cyclomatic 113)prototype/Core/PresenceLock.swift:112

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

What to do

  1. Bring the 19 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with GlanceProbe.exercise (cyclomatic 127), GlanceProbe.exerciseLaunchpadKeys (cyclomatic 125), ConductorSession.receive (cyclomatic 125). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 19 together lifts Cyclomatic Complexity from 4.8 to about 5.9/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

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

D2 · Cognitive Complexity3.5 / 10Weak✓ Tool-verified

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

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

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

528 method(s) exceeded the cognitive complexity threshold of 15; the worst was GlanceProbe.exerciseLaunchpadKeys at 149.

GlanceProbe.exerciseLaunchpadKeys (cognitive 149)prototype/App/LaunchpadKeysProbe.swift:27
GlanceProbe.exercise (cognitive 144)prototype/App/GlanceProbe.swift:117
GlanceProbe.exerciseFullScreenDesktops (cognitive 141)prototype/App/FullScreenProbe.swift:11
ConductorSession.receive (cognitive 140)prototype/Core/ConductorSession.swift:223
REDACTED.top-level code (cognitive 136)prototype/main.swift:4

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

What to do

  1. Bring the 33 bodies over 60 down to 60 or less in Cognitive Complexity — start with GlanceProbe.exerciseLaunchpadKeys (cognitive 149), GlanceProbe.exercise (cognitive 144), GlanceProbe.exerciseFullScreenDesktops (cognitive 141). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 33 together lifts Cognitive Complexity from 3.5 to about 5.3/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

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

D3 · God Classes7.9 / 10Strong✓ Tool-verified

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

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

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

166 god class(es) detected.

FileTooLong: WindowBrowser/WindowBrowserController.swift · ×51prototype/WindowBrowser/WindowBrowserController.swift
MethodTooLong: WS2PrivacyData.rows · ×40prototype/App/WS2PrivacyData.swift:48
TooManyMethods: AppDelegate · ×39prototype/WindowShade.swift:86
ClassTooLong: WindowBrowserController · ×34prototype/WindowBrowser/WindowBrowserController.swift:16
FunctionTooLong: REDACTED.top-level code · ×2prototype/main.swift:4

What to do

  1. Resolve the 51 FileTooLong finding(s) in God Classes — start with WindowBrowserController.swift, GestureProbe.swift, NotchController.swift. — One of this dimension's main actionable groups (51 warning-level).
  2. Resolve the 40 MethodTooLong finding(s) in God Classes — start with GestureProbe.swift (4), SilentMilestoneProbe.swift (2), WindowBrowserShotProbe.swift (2). — One of this dimension's main actionable groups (40 warning-level).
  3. Resolve the 39 TooManyMethods finding(s) in God Classes — start with HabitContext.swift (2), FileShelfView.swift (2), WindowShade.swift. — One of this dimension's main actionable groups (39 warning-level).

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

D4 · Code Duplication7.9 / 10Strong✓ Tool-verified

What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.

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

244 duplicated block group(s) detected. 5.2 % of the production lines (9,731 of 186,136) are in a reported copy. A further 252 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 90 of the 496 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.

Duplicated block (5 lines × 2) · ×49prototype/App/CheckProbes1031.swift:255
Edited copy of a member (4 corresponding lines) · ×30prototype/Core/ExplainerScenes+Privacy.swift:45
Duplicated block (6 lines × 2) · ×28prototype/App/CollapseAppearanceSettings.swift:87
Duplicated block (7 lines × 2) · ×24prototype/App/AudioLevelTap.swift:97
Edited copy of a member (7 corresponding lines) · ×19prototype/Core/ExplainerScenes+Browser.swift:69

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

What to do

  1. Resolve the 49 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with GlanceProbe.swift (3), GapProbesFoldDesktops.swift (2), Preferences.swift (2). — One of this dimension's main actionable groups (49 warning-level).
  2. Resolve the 30 Edited copy of a member (4 corresponding lines) finding(s) in Code Duplication — start with Preferences.swift (3), DockScenariosProbe.swift (2), MiddleTitlebarTap.swift (2). — One of this dimension's main actionable groups (30 warning-level).
  3. Resolve the 28 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with Preferences.swift (3), GestureProbe.swift (3), CollapseAppearanceSettings.swift. — One of this dimension's main actionable groups (28 warning-level).

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

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

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

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

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

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

20 of 444 classes have LCOM4 above 3.

Low cohesion: AppDelegate (LCOM4 28) · ×20prototype/WindowShade.swift:86

What to do

  1. Resolve the 20 Low cohesion finding(s) in Cohesion (LCOM4) — start with WindowShade.swift, UpdaterSparkle.swift, DuoSettingsWindow.swift. — One of this dimension's main actionable groups (20 warning-level).

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

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

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

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

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

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

Top hotspots: prototype/App/ShadeController.swift (54×132=7128); prototype/App/GlanceProbe.swift (48×127=6096); prototype/App/GestureProbe.swift (24×121=2904) Repeated repair below the complexity floor: prototype/App/OverlayPresentation.swift (4 of 6 changes were fixes); prototype/Core/FoldVerifier.swift (4 of 6 changes were fixes); prototype/App/PrivateAppListSettings.swift (3 of 5 changes were fixes)

Hotspot: prototype/App/ShadeController.swift · ×102prototype/App/ShadeController.swift:176
Repeated repair: prototype/App/OverlayPresentation.swift · ×3prototype/App/OverlayPresentation.swift:163

What to do

  1. Resolve the 102 Hotspot finding(s) in Churn × Complexity Hotspots — start with REDACTED (2), ShadeController.swift, GlanceProbe.swift. — One of this dimension's main actionable groups (102 warning-level).
  2. Resolve the 3 Repeated repair finding(s) in Churn × Complexity Hotspots — start with OverlayPresentation.swift, FoldVerifier.swift, PrivateAppListSettings.swift. — One of this dimension's main actionable groups (3 warning-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D21 · Naming Consistency9.4 / 10Exemplary✓ Tool-verified

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.

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

3 naming inconsistencies among 507 declarations measured against a convention their peers follow.

`messageId` spells `Id` where 506 names in the project spell it `ID` · ×2tools/carplay/iap2/Iap2Csm.swift:17
`controlSessionId` spells `Id` where 506 names in the project spell it `ID`tools/carplay/iap2/Iap2Link.swift:13

✓ On the Gold path — maintain.

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

D24 · Comment Value10.0 4.2 / 10Weak○ Nothing flagged

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

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

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

0 of 56 judged comments only repeat the code they sit on (0.0 %). 81 comment(s) in another language or script were not judged.

Detailed fixes: d24_recommendation.md.

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

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

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

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

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

0 % of calls cross a namespace and 0 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)10.0 / 10Adequategated by 1 critical finding○ Nothing flagged

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

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

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

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

1 finding(s): 0 critical, 1 high, 0 medium, 0 low. 1 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 39 file(s) — `prototype/App/CountdownTimerHost.swift` (lines 82–85), `prototype/App/FaceScanExperiment.swift` (line 228), `prototype/App/Glance.swift` (line 166), `prototype/App/NotchActivitySources.swift` (line 336, line 350), `prototype/App/NotchLevelObserver.swift` (line 83), … (+34 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them.

REDACTED

What to do

  1. No action in Static Analysis (SAST) — all 1 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (1 issue-level, 0 of them charged here).

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

D30 · Dependency Vulnerabilities8.8 / 10Adequategated by 2 critical findings✓ Tool-verified

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

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

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

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

REDACTED

What to do

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

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

D31 · IaC & Container Security10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (Dockerfile/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

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

trivy and checkov found no infrastructure-as-code or container misconfigurations.

✓ On the Gold path — maintain.

Detailed fixes: d31_recommendation.md.

D32 · Data Compliance (PII/GDPR)2.5 / 10Weak✓ Tool-verified

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

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

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

4 finding(s): 0 critical, 4 high, 0 medium, 0 low. semgrep could not parse 55 file(s) — `prototype/App/BystanderTuck.swift`, `prototype/App/CalendarPresenter.swift`, `prototype/App/CountdownTimerCard.swift`, `prototype/App/CountdownTimerHost.swift`, `prototype/App/DirectionKeyPresets.swift`, … (+50 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.

REDACTED

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md.

D35 · Change Coupling9.9 / 10Stronggated by 5 serious findings✓ Tool-verified

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

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

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

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

Strongest change-coupling: WindowBrowserController.swift↔WindowBrowserViews.swift 60%; WS2InputSettingsPane.swift↔DuoSettingsWindow.swift 60%; EventTap.swift↔Preferences.swift 56%

Change coupling: WindowBrowserController.swift ↔ WindowBrowserViews.swift · ×5prototype/WindowBrowser/WindowBrowserController.swift:1

What to do

  1. Resolve the 5 Change coupling finding(s) in Change Coupling — start with WindowBrowserController.swift, WS2InputSettingsPane.swift, EventTap.swift. — One of this dimension's main actionable groups (5 warning-level).

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

D36 · Supply-chain Provenance & Signing2.5 / 10Weak✓ Tool-verified

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

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

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

D37 · Vulnerability-disclosure Policy10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.

Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.

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

A vulnerability-disclosure policy (.github/SECURITY.md) is published with a reporting contact.

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

Frontend & cross-cutting dimensions

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

AX10 · Code composition10.0 / 10Exemplary✓ Tool-verified

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

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

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

AX6 · Interface segregation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').

Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.

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

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

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

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

DM2 · Strongly-typed ids9.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether domain identifiers are strongly typed (a typed-id struct) rather than raw primitives — consistency once an idiom exists.

Method: Roslyn (DDD-gated): strongly-typed id adoption on domain entities/events; raw Guid/int/string ids counted versus wrapped types. An id wrapper is recognised by VALUE SEMANTICS, not by being a struct — a record struct, a record class (`record ApartmentId(Guid Value)`) or a class declared by a typed-id base (`class MemberId : TypedIdValueBase`) all count, while a plain mutable class (reference equality) and a verb-phrase query record (`GetCustomerById`) do not. Deterministic, adoption percentage.

Coverage: Population: id-like members by *Id/*Key NAME suffix; strongly-typed-ID shape then checked semantically — non-suffixed identifiers are not seen.

  • `PinnedPreviewController.menuMirrorOwnerID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/PinnedPreview.swift:126
  • `PinnedPreviewSession.sourceSpaceID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/PinnedPreviewSession.swift:79
  • `AppDelegate.foldPresentationID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/WindowShade.swift:241
  • `PendingTitlebarTripleClick.foldTransactionID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/WindowShade.swift:94
  • `PendingSpaceReturn.sourceSpaceID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/WindowShade.swift:105
  • `PendingSpaceReturn.returnSpaceID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/WindowShade.swift:108
  • `Context.bundleID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/AudioLevelTap.swift:323
  • `Carried.bundleID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/Carry.swift:172
  • `ClaudeConductor.sessionID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/ClaudeConductor.swift:17
  • `CopyProgressSource.nextID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/CopyProgressSource.swift:24
  • `DockScenarioItem.bundleID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/DockScenariosProbe.swift:261
  • `FaceCameraDescriptor.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/FaceObservationSource.swift:8
  • `FaceObservation.cameraID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/FaceObservationSource.swift:75
  • `FaceObservationSubscription.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/FaceObservationSource.swift:268
  • `FaceObservationHub.deviceID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/FaceObservationSource.swift:306
  • `FaceObservationWorker.deviceID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/FaceObservationSource.swift:558
  • `FaceScanExperiment.scanID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/FaceScanExperiment.swift:187
  • `GlanceTarget.bundleID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/Glance.swift:32
  • `GlanceSession.bundleID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/Glance.swift:113
  • `HabitAppFacts.bundleID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/HabitContext.swift:148
  • `HabitDecision.bundleID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/HabitContext.swift:218
  • `LaunchpadActivityCards.idleTimerID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/LaunchpadActivities.swift:21
  • `Hit.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/LaunchpadActivities.swift:6
  • `LaunchpadFolderOverlay.folderID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/LaunchpadFolders.swift:23
  • `NotchActivityController.timerActivityID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/NotchActivityController.swift:70
  • `NotchActivityController.calendarActivityID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/NotchActivityController.swift:78
  • `NotchActivityView.selectedID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/NotchActivityView.swift:15
  • `NotchActivityView.animationID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/NotchActivityView.swift:18
  • `NotchActivityView.selectedActivityID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/NotchActivityView.swift:23
  • `NotchFocusController.focusedID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/NotchFocusController.swift:69
  • `NotchFocusController.visibleFocusID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/NotchFocusController.swift:184
  • `Cell.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/NotchFocusController.swift:15
  • `NotchLeaseHub.bootID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/NotchLeases.swift:69
  • `Peripheral.registryID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/PeripheralBatterySource.swift:14
  • `Item.bundleID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/PrivateAppListSettings.swift:7
  • `ScrollTap.frontmostBundleID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/ScrollTap.swift:15
  • `UpdateBundleInfo.bundleID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/UpdaterSystem.swift:17
  • `Found.windowID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/WS2AgentSessionWindowFinder.swift:58
  • `WS2CodexApprovalHost.connectionID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/WS2CodexApprovalHost.swift:15
  • `WS2ConductorPageView.pageID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — prototype/App/WS2ConductorPage.swift:9

What to do

  • Adopt the repo's typed-id idiom consistently — wrap every entity identity in its own typed id.
DM4 · Rich vs anemic domain model10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether domain entities own their behaviour — a data-only reference entity whose logic lives in a foreign service is anemic. Rich models enforce their own invariants.

Method: Roslyn (DDD-gated): entity method BODIES classified mutator-vs-query — only methods that mutate the entity's own declared state count as invariant-protecting behaviour, so a getter/passthrough doesn't rescue an anemic class. Deterministic, exhaustive over domain-layer entities.

Coverage: Population: entities by name/base convention; rich-vs-anemic judged by classifying each method body mutator-vs-query — logic-bearing domain types outside the convention are invisible.

DM5 · Encapsulated state10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether a reference entity protects its own invariants — a class whose identity is a computed content hash but whose hashed fields are publicly mutable bypasses that invariant. Encapsulated state keeps identity-bearing fields immutable.

Method: Roslyn (DDD-gated): entities scanned for publicly writable state — public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.

Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.

ED4 · Outbox / dual-write8.0 / 10Strong✓ Tool-verified

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

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

  • `FaceScanExperiment.refresh` performs two independent DURABLE writes — `store` (a persistence store) via `delete` and `calibrationStore` (a persistence store) via `delete` — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox). — prototype/App/FaceScanExperiment.swift:299

What to do

  • Adopt the transactional outbox pattern so DB writes and message publishes commit atomically — no lost or phantom events on a crash.
M1 · Documentation (README)8.7 / 10Strong✓ Tool-verified

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

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

What to do

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
M2 · Architecture documentation2.0 / 10Critical✓ Tool-verified

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

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

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

P1 · CI/CD gates8.5 / 10Strong✓ Tool-verified

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

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

What to do

  • Run the test suite in CI via an explicit runner step (`xcodebuild test` for the toolchain this pipeline already uses) and gate merges on it.
P2 · Observability7.0 / 10Strong✓ Tool-verified

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

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

What to do

  • Add a health-check endpoint (a /health route on your Vapor/Hummingbird router) so orchestrators and load balancers can probe liveness/readiness.
P3 · Security & performance tooling0.0 / 10Critical✓ Tool-verified

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

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

  • No static application security testing detected. For this repository's stack, add CodeQL's Swift pack (Swift/Xcode) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 1 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
  • `site/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — site/package.json:11

What to do

  • Add a SAST step to CI running what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback8.0 / 10Strong✓ Tool-verified

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

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

What to do

  • Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

PF3 · Async & latency hygiene7.0 / 10Strong✓ Tool-verified

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

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

  • `run` is async and calls sleep — a blocking call inside async code stalls the cooperative pool's thread — one per core — and every task scheduled on it for as long as it runs. (×2) — tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:176, tools/archive/design-qa-batch23-29/NotchRetargetPreview.swift:76

What to do

  • Swift: await instead of blocking — `try await Task.sleep(for:)` for Thread.sleep/sleep, a checked continuation instead of a DispatchSemaphore or DispatchGroup wait, the async Process and URLSession APIs; never park a thread waiting on a Task — the cooperative pool cannot guarantee it progress.
X26 · Unsynchronised callback handoff10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.

Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.

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

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

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

X3 · Exception handling5.2 / 10Adequate✓ Tool-verified

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

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

  • `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×36) — prototype/Window/AXHelpers.swift:111, prototype/Window/AXStallBreaker.swift:126, prototype/Support/WS2CompanionTCPTransport.swift:240, …

What to do

  • Swallowed exception (caught, then discarded)

Reference — by lens

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

LensScoreRatingImpact
Code Health66.3Adequate — gated by D2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture98.9ExemplaryStrongest area.
Maturity69.8Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness57.4Adequate — gated by P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security75.0Adequate — gated by D32, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling95.7ExemplarySolid.
Event-Driven79.8StrongSolid.
Performance70.0StrongSolid.
Unscored — 2 check(s) recorded observations but carry no score

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

  • X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 78 check(s) not relevant to this codebase

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

  • AC1 Text alternatives — Frontend below the scale floor (2 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC2 Forms & labels — Frontend below the scale floor (2 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC3 Page structure — Frontend below the scale floor (2 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC4 Keyboard semantics — Frontend below the scale floor (2 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC5 ARIA correctness — Frontend below the scale floor (2 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC6 Visual & motion safety — Frontend below the scale floor (2 DOM element(s) < 25) — too little surface to assess accessibility.
  • AX1 Captive dependencies — Not applicable: this repository's Swift imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. No Swift request handler (a Vapor, Hummingbird, Kitura, Swifter or Perfect route handler, as a method or a registered closure) is declared, so no state is shared between request threads. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX3 Project dependency cycles — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository commits no project file of a kind this check models. This is a gap in the analyzer, not a finding about this repository
  • AX4 Dependency direction — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository commits no project file of a kind this check models. This is a gap in the analyzer, not a finding about this repository
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — not assessed — test isolation is computed from a project graph (which projects are test projects, and what they reference) that was not loaded for this repository, because the repository commits no project file of a kind this check models. This is a gap in the analyzer, not a finding about this repository
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — the dev server (`npm run dev` in site/) exited before it served a page. Likely cause (not identified): the dev server exited, and its output does not match a cause we recognise. Last output: "> dev / > node scripts/serve.mjs / WindowShade: http://127.0.0.1:4318 / node:internal/fs/promises:638 / return new FileHandle(await PromisePrototypeThen( / ^ / Error: ENOENT: no such file or directory, open '<repo>/site/dist/404.html' / at async open (node:internal/fs/promises:638:25) / at async readFile (node:internal/fs/promises:1242:14) / at async Server.<anonymous> (file://<repo>/site/scripts/serve.mjs:17:83) { / errno: -2, / code: 'ENOENT', / syscall: 'open', / path: '<repo>/site/dist/404.html' / } / Node.js v22.13.0" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named property (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a SwiftData @Model, a Core Data, Realm, GRDB or Fluent type, a GRDB or SQLite.swift column, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (CoreData, SwiftData, GRDB, RealmSwift, SQLite, Firebase, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named property (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a SwiftData @Model, a Core Data, Realm, GRDB or Fluent type, a GRDB or SQLite.swift column, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (CoreData, SwiftData, GRDB, RealmSwift, SQLite, Firebase, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D10 Test Quality — ~52947 lines of test source are present (.swift, .py) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included — no .swift test runner
  • D12 Dependency Hygiene — Dependency currency not established — this repository declares no production dependency to grade
  • D14 License Compliance — npm licences not graded — this repository's lockfile resolves no production dependency
  • D16 Bus Factor — single-contributor repository — bus factor is not applicable
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D20 ADR Quality — Repository kind not determined
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — D26 measured no build unit over this repository's .c, .swift source. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
  • D5 Coupling — D5 reads a .NET project-reference graph only — this repository's production source is .swift, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • DM1 Aggregate boundaries — not scored for Swift: the sidecar flattens array/collection types (a child COLLECTION = legitimate membership vs a single embedded aggregate is indistinguishable), and aggregate-vs-value-object classification cannot be told apart in source (every struct-holding-struct reads alike) — reported as guidance rather than measured
  • DM3 Integration-event coupling — not scored for Swift: a cross-SwiftPM-target domain leak cannot be told apart in source from a legitimate shared-kernel/contracts module, and most repositories ship a single module — reported as guidance rather than measured
  • DM6 Domain ↔ infrastructure boundary — this Swift package maps no type to a persistence framework and declares no domain-model type carrying a method of its own, so DM6's domain↔infrastructure boundary read has no population to be taken over
  • DM7 Repository granularity — not scored for Swift: 'a repository per CHILD entity' needs the aggregate-root structure, which is not source-resolvable — reported as guidance rather than measured
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P7 Outbound HTTP resilience — no outbound HTTP usage detected — no HTTP client call or construction in the JavaScript/TypeScript, Swift source (service entry point: site/scripts/serve.mjs:8 (http.createServer())
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `Benchmark("…")` in a file importing package-benchmark, or package-benchmark in Package.swift, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X1 Async correctness — X1 reached only 5% of this repository's production lines — swift (178,797 lines), c (554 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X12 Unreachable branch — X12 reached only 5% of this repository's production lines — swift (178,797 lines), c (554 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X16 Unfloored truncation loop — X16 reached only 1% of this repository's production lines — swift (178,797 lines), python (7,339 lines), c (554 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X17 Uncapped recursion over a caller-supplied document — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X21 Side-effecting pattern guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X25 Inert configuration knob — X25 reached only 5% of this repository's production lines — swift (178,797 lines), c (554 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X27 Collection changed while being enumerated — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X29 Per-element action decided by a fixed element — X29 reached only 1% of this repository's production lines — swift (178,797 lines), python (7,339 lines), c (554 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Swift was read, and it logs through none: `print` and `NSLog` take one finished line, and os's `Logger` keeps each interpolated value as its own argument, so an assembled message there loses nothing the API could have kept (as with log4net in C#). Calls through swift-log (`import Logging`) and `os_log` calls would be judged.
  • X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 48 finding(s)
DM2 · Strongly-typed ids · Raw-primitive id despite a typed-id idiom · ×40
  • Raw-primitive id despite a typed-id idiom: PinnedPreviewController.menuMirrorOwnerID prototype/PinnedPreview.swift:126 — `PinnedPreviewController.menuMirrorOwnerID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: PinnedPreviewSession.sourceSpaceID prototype/PinnedPreviewSession.swift:79 — `PinnedPreviewSession.sourceSpaceID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: AppDelegate.foldPresentationID prototype/WindowShade.swift:241 — `AppDelegate.foldPresentationID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: PendingTitlebarTripleClick.foldTransactionID prototype/WindowShade.swift:94 — `PendingTitlebarTripleClick.foldTransactionID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: PendingSpaceReturn.sourceSpaceID prototype/WindowShade.swift:105 — `PendingSpaceReturn.sourceSpaceID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: PendingSpaceReturn.returnSpaceID prototype/WindowShade.swift:108 — `PendingSpaceReturn.returnSpaceID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: Context.bundleID prototype/App/AudioLevelTap.swift:323 — `Context.bundleID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: Carried.bundleID prototype/App/Carry.swift:172 — `Carried.bundleID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: ClaudeConductor.sessionID prototype/App/ClaudeConductor.swift:17 — `ClaudeConductor.sessionID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: CopyProgressSource.nextID prototype/App/CopyProgressSource.swift:24 — `CopyProgressSource.nextID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: DockScenarioItem.bundleID prototype/App/DockScenariosProbe.swift:261 — `DockScenarioItem.bundleID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: FaceCameraDescriptor.id prototype/App/FaceObservationSource.swift:8 — `FaceCameraDescriptor.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: FaceObservation.cameraID prototype/App/FaceObservationSource.swift:75 — `FaceObservation.cameraID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: FaceObservationSubscription.id prototype/App/FaceObservationSource.swift:268 — `FaceObservationSubscription.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: FaceObservationHub.deviceID prototype/App/FaceObservationSource.swift:306 — `FaceObservationHub.deviceID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: FaceObservationWorker.deviceID prototype/App/FaceObservationSource.swift:558 — `FaceObservationWorker.deviceID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: FaceScanExperiment.scanID prototype/App/FaceScanExperiment.swift:187 — `FaceScanExperiment.scanID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: GlanceTarget.bundleID prototype/App/Glance.swift:32 — `GlanceTarget.bundleID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: GlanceSession.bundleID prototype/App/Glance.swift:113 — `GlanceSession.bundleID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: HabitAppFacts.bundleID prototype/App/HabitContext.swift:148 — `HabitAppFacts.bundleID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: HabitDecision.bundleID prototype/App/HabitContext.swift:218 — `HabitDecision.bundleID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: LaunchpadActivityCards.idleTimerID prototype/App/LaunchpadActivities.swift:21 — `LaunchpadActivityCards.idleTimerID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: Hit.id prototype/App/LaunchpadActivities.swift:6 — `Hit.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: LaunchpadFolderOverlay.folderID prototype/App/LaunchpadFolders.swift:23 — `LaunchpadFolderOverlay.folderID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: NotchActivityController.timerActivityID prototype/App/NotchActivityController.swift:70 — `NotchActivityController.timerActivityID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • + 15 more in this group — see findings.md.
D32 · Data Compliance (PII/GDPR) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · High CVE · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
ED4 · Outbox / dual-write · Dual write (no outbox) · ×1
  • Dual write (no outbox): FaceScanExperiment.refresh prototype/App/FaceScanExperiment.swift:299 — `FaceScanExperiment.refresh` performs two independent DURABLE writes — `store` (a persistence store) via `delete` and `calibrationStore` (a persistence store) via `delete` — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox).
Serious — 1765 finding(s)
D15 · Churn × Complexity Hotspots · Hotspot · ×102
  • Hotspot: prototype/App/ShadeController.swift prototype/App/ShadeController.swift:176 — prototype/App/ShadeController.swift changed 54 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 132 in AppDelegate.shade at line 176. 9 of those changes were fix/bug commits, and the other 45 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:16:35 +08:00' --until='2026-11-16 19:16:35 +08:00' --full-history --no-merges -- prototype/App/ShadeController.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: prototype/App/GlanceProbe.swift prototype/App/GlanceProbe.swift:117 — prototype/App/GlanceProbe.swift changed 48 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 127 in GlanceProbe.exercise at line 117. 8 of those changes were fix/bug commits, and the other 40 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:16:35 +08:00' --until='2026-11-16 19:16:35 +08:00' --full-history --no-merges -- prototype/App/GlanceProbe.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: prototype/App/GestureProbe.swift prototype/App/GestureProbe.swift:1906 — prototype/App/GestureProbe.swift changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 121 in GlanceProbe.exerciseNotch at line 1906. 6 of those changes were fix/bug commits, and the other 18 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:16:35 +08:00' --until='2026-11-16 19:16:35 +08:00' --full-history --no-merges -- prototype/App/GestureProbe.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: prototype/main.swift prototype/main.swift:4 — prototype/main.swift changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 87 in REDACTED.top-level code at line 4. 1 of those changes was a fix/bug commit, and the other 28 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:16:35 +08:00' --until='2026-11-16 19:16:35 +08:00' --full-history --no-merges -- prototype/main.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: prototype/WindowShade.swift prototype/WindowShade.swift:362 — prototype/WindowShade.swift changed 88 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in AppDelegate.applicationDidFinishLaunching at line 362. 11 of those changes were fix/bug commits, and the other 77 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:16:35 +08:00' --until='2026-11-16 19:16:35 +08:00' --full-history --no-merges -- prototype/WindowShade.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: prototype/App/TrackpadGestures.swift prototype/App/TrackpadGestures.swift:1302 — prototype/App/TrackpadGestures.swift changed 33 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in TrackpadGestureController.handleFlick at line 1302. 8 of those changes were fix/bug commits, and the other 25 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:16:35 +08:00' --until='2026-11-16 19:16:35 +08:00' --full-history --no-merges -- prototype/App/TrackpadGestures.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: prototype/App/Preferences.swift prototype/App/Preferences.swift:234 — prototype/App/Preferences.swift changed 88 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in AppDelegate.applyFeature at line 234. 11 of those changes were fix/bug commits, and the other 77 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:16:35 +08:00' --until='2026-11-16 19:16:35 +08:00' --full-history --no-merges -- prototype/App/Preferences.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: prototype/App/Notch/NotchPanel.swift prototype/App/Notch/NotchPanel.swift:2110 — prototype/App/Notch/NotchPanel.swift changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 92 in NotchPanel.apply at line 2110. 10 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 — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:16:35 +08:00' --until='2026-11-16 19:16:35 +08:00' --full-history --no-merges -- prototype/App/Notch/NotchPanel.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: prototype/App/MenuBarController.swift prototype/App/MenuBarController.swift:72 — prototype/App/MenuBarController.swift changed 35 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in AppDelegate.buildStatusMenuItems at line 72. 3 of those changes were fix/bug commits, and the other 32 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:16:35 +08:00' --until='2026-11-16 19:16:35 +08:00' --full-history --no-merges -- prototype/App/MenuBarController.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: prototype/Effects/DuoSettingsWindow.swift prototype/Effects/DuoSettingsWindow.swift:1234 — prototype/Effects/DuoSettingsWindow.swift changed 55 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in DuoSettingsWindow.liveChanged at line 1234. 7 of those changes were fix/bug commits, and the other 48 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:16:35 +08:00' --until='2026-11-16 19:16:35 +08:00' --full-history --no-merges -- prototype/Effects/DuoSettingsWindow.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: prototype/App/WS2AppRuntime.swift prototype/App/WS2AppRuntime.swift:62 — prototype/App/WS2AppRuntime.swift changed 39 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in WS2AppRuntime.init at line 62. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:16:35 +08:00' --until='2026-11-16 19:16:35 +08:00' --full-history --no-merges -- prototype/App/WS2AppRuntime.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: prototype/WindowBrowser/WindowBrowserController.swift prototype/WindowBrowser/WindowBrowserController.swift:1463 — prototype/WindowBrowser/WindowBrowserController.swift changed 36 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in WindowBrowserController.refreshPanel at line 1463. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:16:35 +08:00' --until='2026-11-16 19:16:35 +08:00' --full-history --no-merges -- prototype/WindowBrowser/WindowBrowserController.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: prototype/App/FoldTransaction.swift prototype/App/FoldTransaction.swift:108 — prototype/App/FoldTransaction.swift changed 38 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in AppDelegate.scheduleFoldVerification at line 108. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:16:35 +08:00' --until='2026-11-16 19:16:35 +08:00' --full-history --no-merges -- prototype/App/FoldTransaction.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: prototype/App/WS2SilentApply.swift prototype/App/WS2SilentApply.swift:34 — prototype/App/WS2SilentApply.swift changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 109 in WS2SilentApply.perform at line 34. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:16:35 +08:00' --until='2026-11-16 19:16:35 +08:00' --full-history --no-merges -- prototype/App/WS2SilentApply.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: prototype/Effects/FoldRenderer.swift prototype/Effects/FoldRenderer.swift:357 — prototype/Effects/FoldRenderer.swift changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in FoldRenderer.draw at line 357. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:16:35 +08:00' --until='2026-11-16 19:16:35 +08:00' --full-history --no-merges -- prototype/Effects/FoldRenderer.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: prototype/App/WS2OwnedLaunchController.swift prototype/App/WS2OwnedLaunchController.swift:354 — prototype/App/WS2OwnedLaunchController.swift changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 63 in WS2OwnedLaunchController.receive at line 354. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:16:35 +08:00' --until='2026-11-16 19:16:35 +08:00' --full-history --no-merges -- prototype/App/WS2OwnedLaunchController.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: prototype/App/EventTap.swift prototype/App/EventTap.swift:147 — prototype/App/EventTap.swift changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in AppDelegate.handleHotKey at line 147. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:16:35 +08:00' --until='2026-11-16 19:16:35 +08:00' --full-history --no-merges -- prototype/App/EventTap.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: prototype/App/NotchActivityController.swift prototype/App/NotchActivityController.swift:535 — prototype/App/NotchActivityController.swift changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in NotchActivityController.perform at line 535. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:16:35 +08:00' --until='2026-11-16 19:16:35 +08:00' --full-history --no-merges -- prototype/App/NotchActivityController.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: prototype/Core/WS2SilentGates.swift prototype/Core/WS2SilentGates.swift:432 — prototype/Core/WS2SilentGates.swift changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 83 in WS2SilentReadout.sentence at line 432. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:16:35 +08:00' --until='2026-11-16 19:16:35 +08:00' --full-history --no-merges -- prototype/Core/WS2SilentGates.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: prototype/Effects/WindowFoldEffects.swift prototype/Effects/WindowFoldEffects.swift:72 — prototype/Effects/WindowFoldEffects.swift changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in WindowFoldEffects.prepareFold at line 72. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:16:35 +08:00' --until='2026-11-16 19:16:35 +08:00' --full-history --no-merges -- prototype/Effects/WindowFoldEffects.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: prototype/Core/CodexWire.swift prototype/Core/CodexWire.swift:135 — prototype/Core/CodexWire.swift changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 78 in CodexWire.receive at line 135. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:16:35 +08:00' --until='2026-11-16 19:16:35 +08:00' --full-history --no-merges -- prototype/Core/CodexWire.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: prototype/Effects/DuoController.swift prototype/Effects/DuoController.swift:421 — prototype/Effects/DuoController.swift changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in DuoController.tickDesktop at line 421. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:16:35 +08:00' --until='2026-11-16 19:16:35 +08:00' --full-history --no-merges -- prototype/Effects/DuoController.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: prototype/Core/ConductorSession.swift prototype/Core/ConductorSession.swift:223 — prototype/Core/ConductorSession.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 125 in ConductorSession.receive at line 223. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:16:35 +08:00' --until='2026-11-16 19:16:35 +08:00' --full-history --no-merges -- prototype/Core/ConductorSession.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: prototype/App/FocusSession.swift prototype/App/FocusSession.swift:361 — prototype/App/FocusSession.swift changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in AppDelegate.startFocusCurrentAppSession at line 361. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:16:35 +08:00' --until='2026-11-16 19:16:35 +08:00' --full-history --no-merges -- prototype/App/FocusSession.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: prototype/App/NotchShapeProbe.swift prototype/App/NotchShapeProbe.swift:12 — prototype/App/NotchShapeProbe.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 79 in GlanceProbe.exerciseNotchShape at line 12. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:16:35 +08:00' --until='2026-11-16 19:16:35 +08:00' --full-history --no-merges -- prototype/App/NotchShapeProbe.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 77 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×51
  • FileTooLong: WindowBrowser/WindowBrowserController.swift prototype/WindowBrowser/WindowBrowserController.swift — FileTooLong — 2492 significant lines (blank, comment-only and punctuation-only lines excluded), about 81% of them inside a single declaration: WindowBrowserController (17-2778). The bar is 500 significant lines; this is 1992 over it, 4.98× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: App/GestureProbe.swift prototype/App/GestureProbe.swift — FileTooLong — 1949 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1449 over it, 3.90× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Notch/NotchController.swift prototype/App/Notch/NotchController.swift — FileTooLong — 1866 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: NotchController (8-2707). The bar is 500 significant lines; this is 1366 over it, 3.73× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: App/TrackpadGestures.swift prototype/App/TrackpadGestures.swift — FileTooLong — 1653 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: TrackpadGestureController (11-2363). The bar is 500 significant lines; this is 1153 over it, 3.31× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Notch/NotchPanel.swift prototype/App/Notch/NotchPanel.swift — FileTooLong — 1624 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: NotchPanel (10-2439). The bar is 500 significant lines; this is 1124 over it, 3.25× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: App/Preferences.swift prototype/App/Preferences.swift — FileTooLong — 1605 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1105 over it, 3.21× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: App/LaunchpadView.swift prototype/App/LaunchpadView.swift — FileTooLong — 1564 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: LaunchpadView (7-2012). The bar is 500 significant lines; this is 1064 over it, 3.13× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: App/HabitContext.swift prototype/App/HabitContext.swift — FileTooLong — 1222 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 722 over it, 2.44× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: App/GlanceProbe.swift prototype/App/GlanceProbe.swift — FileTooLong — 1205 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: GlanceProbe (17-1570). The bar is 500 significant lines; this is 705 over it, 2.41× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: App/Welcome.swift prototype/App/Welcome.swift — FileTooLong — 1204 significant lines (blank, comment-only and punctuation-only lines excluded), about 60% of them inside a single declaration: WelcomeView (42-982). The bar is 500 significant lines; this is 704 over it, 2.41× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: App/ScrollStripRun.swift prototype/App/ScrollStripRun.swift — FileTooLong — 1168 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: ScrollStripController (46-1630). The bar is 500 significant lines; this is 668 over it, 2.34× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: App/SlideOver.swift prototype/App/SlideOver.swift — FileTooLong — 1145 significant lines (blank, comment-only and punctuation-only lines excluded), about 71% of them inside a single declaration: SlideOverController (18-1154). The bar is 500 significant lines; this is 645 over it, 2.29× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: prototype/PinnedPreview.swift prototype/PinnedPreview.swift — FileTooLong — 1121 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: PinnedPreviewController (66-1658). The bar is 500 significant lines; this is 621 over it, 2.24× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: App/WS2PrivacyData.swift prototype/App/WS2PrivacyData.swift — FileTooLong — 1040 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: WS2PrivacyData (38-1131). The bar is 500 significant lines; this is 540 over it, 2.08× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Effects/DuoSettingsWindow.swift prototype/Effects/DuoSettingsWindow.swift — FileTooLong — 1029 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: DuoSettingsWindow (49-1366). The bar is 500 significant lines; this is 529 over it, 2.06× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: WindowBrowser/WindowBrowserContentView.swift prototype/WindowBrowser/WindowBrowserContentView.swift — FileTooLong — 974 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: WindowBrowserContentView (7-1344). The bar is 500 significant lines; this is 474 over it, 1.95× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: App/FileShelfView.swift prototype/App/FileShelfView.swift — FileTooLong — 958 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 458 over it, 1.92× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: App/NowPlayingCard.swift prototype/App/NowPlayingCard.swift — FileTooLong — 955 significant lines (blank, comment-only and punctuation-only lines excluded), about 67% of them inside a single declaration: NowPlayingCard (177-1019). The bar is 500 significant lines; this is 455 over it, 1.91× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: WindowBrowser/DockHoverProbe.swift prototype/WindowBrowser/DockHoverProbe.swift — FileTooLong — 950 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 450 over it, 1.90× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: App/FoldTransaction.swift prototype/App/FoldTransaction.swift — FileTooLong — 941 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 441 over it, 1.88× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: App/WS2RemoteHost.swift prototype/App/WS2RemoteHost.swift — FileTooLong — 936 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 436 over it, 1.87× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Notch/NotchCanvas.swift prototype/App/Notch/NotchCanvas.swift — FileTooLong — 931 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: NotchCanvasView (25-1271). The bar is 500 significant lines; this is 431 over it, 1.86× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Core/NotchActivities.swift prototype/Core/NotchActivities.swift — FileTooLong — 880 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 380 over it, 1.76× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Core/HabitRules.swift prototype/Core/HabitRules.swift — FileTooLong — 857 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 357 over it, 1.71× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: App/WS2ConductorPage.swift prototype/App/WS2ConductorPage.swift — FileTooLong — 815 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 315 over it, 1.63× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • + 26 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×49
  • Duplicated block (5 lines × 2) prototype/App/CheckProbes1031.swift:255 — prototype/App/CheckProbes1031.swift:255-259 | prototype/App/CheckProbes1031.swift:286-290 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/CheckProbes1031.swift:255` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) prototype/App/ConductorClaudeProbe.swift:84 — prototype/App/ConductorClaudeProbe.swift:84-88 | prototype/App/ConductorClaudeProbe.swift:98-102 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) prototype/App/FaceEnrollmentProbe.swift:171 — prototype/App/FaceEnrollmentProbe.swift:171-175 | prototype/App/FaceEnrollmentProbe.swift:188-192 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) prototype/App/GapProbesFoldDesktops.swift:38 — prototype/App/GapProbesFoldDesktops.swift:38-42 | prototype/App/GapProbesSecondDisplayDesktops.swift:69-73 — before extracting anything, compare `prototype/App/GapProbesFoldDesktops.swift` and `prototype/App/GapProbesSecondDisplayDesktops.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/GapProbesFoldDesktops.swift:38` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) prototype/App/GapProbesSlideOver.swift:90 — prototype/App/GapProbesSlideOver.swift:90-94 | prototype/App/GapProbesSlideOver.swift:114-118 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) prototype/App/GlanceProbe.swift:792 — prototype/App/GlanceProbe.swift:792-796 | prototype/App/GlanceProbe.swift:949-953 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) prototype/App/GlanceProbe.swift:809 — prototype/App/GlanceProbe.swift:809-813 | prototype/App/GlanceProbe.swift:1148-1152 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) prototype/App/GlanceProbe.swift:809 — prototype/App/GlanceProbe.swift:809-813 | prototype/App/GlanceProbe.swift:1276-1280 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) prototype/App/LaunchpadKeysProbe.swift:86 — prototype/App/LaunchpadKeysProbe.swift:86-90 | prototype/App/LaunchpadTilingProbe.swift:120-124 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) prototype/App/MacVoiceTranscriber.swift:149 — prototype/App/MacVoiceTranscriber.swift:149-155 | prototype/App/SpeechVoiceprintCapture.swift:149-153 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/MacVoiceTranscriber.swift:149` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) prototype/App/Notch/NotchRowViews.swift:605 — prototype/App/Notch/NotchRowViews.swift:605-609 | prototype/App/Notch/NotchRowViews.swift:649-654 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/Notch/NotchRowViews.swift:605` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) prototype/App/NotchActivityController.swift:374 — prototype/App/NotchActivityController.swift:374-379 | prototype/App/NotchActivityController.swift:403-407 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/NotchActivityController.swift:374` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (5 lines × 2) prototype/App/Preferences.swift:968 — prototype/App/Preferences.swift:968-972 | prototype/App/Preferences.swift:1200-1204 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) prototype/App/Thumbnail.swift:132 — prototype/App/Thumbnail.swift:132-136 | prototype/Overlay/PaperSurfaceStyle.swift:110-114 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/Thumbnail.swift:132` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `parent` to `ShadeThumbnailWindow` in one and `NSWindow` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (5 lines × 2) prototype/App/WS2AppRuntime.swift:343 — prototype/App/WS2AppRuntime.swift:343-347 | prototype/App/WS2AppRuntime.swift:476-480 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/WS2AppRuntime.swift:343` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (5 lines × 2) prototype/App/WS2ConductorPage.swift:468 — prototype/App/WS2ConductorPage.swift:468-472 | prototype/App/WS2ModelPickerView.swift:144-148 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/WS2ConductorPage.swift:468` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) prototype/App/WindowProxy.swift:76 — prototype/App/WindowProxy.swift:76-80 | prototype/App/WindowProxyStage.swift:34-38 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) prototype/Core/ExplainerScenes+Common.swift:59 — prototype/Core/ExplainerScenes+Common.swift:59-63 | prototype/Core/ExplainerScenes+Common.swift:221-225 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/Core/ExplainerScenes+Common.swift:59` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) prototype/Core/FaceScanScreening.swift:66 — prototype/Core/FaceScanScreening.swift:66-70 | prototype/Core/FaceScanScreening.swift:91-95 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) prototype/Effects/WindowFoldEffects.swift:98 — prototype/Effects/WindowFoldEffects.swift:98-102 | prototype/Effects/WindowFoldEffects.swift:292-296 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/Effects/WindowFoldEffects.swift:98` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) prototype/WindowBrowser/DockHoverProbe.swift:470 — prototype/WindowBrowser/DockHoverProbe.swift:470-474 | prototype/WindowBrowser/DockHoverProbe.swift:693-697 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) prototype/WindowBrowser/WindowBrowserActionPresentation.swift:157 — prototype/WindowBrowser/WindowBrowserActionPresentation.swift:157-164 | prototype/WindowBrowser/WindowBrowserActionPresentation.swift:318-322 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/WindowBrowser/WindowBrowserActionPresentation.swift:157` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) prototype/WindowBrowser/WindowBrowserController.swift:2517 — prototype/WindowBrowser/WindowBrowserController.swift:2517-2521 | prototype/WindowBrowser/WindowBrowserController.swift:2592-2596 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) prototype/WindowBrowser/WindowBrowserShotProbe.swift:334 — prototype/WindowBrowser/WindowBrowserShotProbe.swift:334-338 | prototype/WindowBrowser/WindowBrowserShotProbe.swift:452-456 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) prototype/WindowBrowser/WindowBrowserCardView.swift:428 — prototype/WindowBrowser/WindowBrowserCardView.swift:428-432 | prototype/WindowBrowser/WindowBrowserListRowView.swift:274-278 — before extracting anything, compare `prototype/WindowBrowser/WindowBrowserCardView.swift` and `prototype/WindowBrowser/WindowBrowserListRowView.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • + 24 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×40
  • MethodTooLong: WS2PrivacyData.rows prototype/App/WS2PrivacyData.swift:48 — MethodTooLong — rows runs 1012 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 912 over it, 10.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GlanceProbe.exercise prototype/App/GlanceProbe.swift:117 — MethodTooLong — exercise runs 444 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 344 over it, 4.44× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppDelegate.shade prototype/App/ShadeController.swift:176 — MethodTooLong — shade runs 438 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 338 over it, 4.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GlanceProbe.exerciseGestures prototype/App/GestureProbe.swift:73 — MethodTooLong — exerciseGestures runs 316 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 216 over it, 3.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GlanceProbe.exerciseLaunchpadKeys prototype/App/LaunchpadKeysProbe.swift:27 — MethodTooLong — exerciseLaunchpadKeys runs 284 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 184 over it, 2.84× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GlanceProbe.exerciseNotch prototype/App/GestureProbe.swift:1906 — MethodTooLong — exerciseNotch runs 276 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 176 over it, 2.76× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: WS2ConductorPageView.init prototype/App/WS2ConductorPage.swift:98 — MethodTooLong — init runs 210 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 110 over it, 2.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GlanceProbe.exerciseSlideOver prototype/App/GestureProbe.swift:489 — MethodTooLong — exerciseSlideOver runs 196 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 96 over it, 1.96× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GlanceProbe.exerciseThumbnail prototype/App/ThumbnailProbe.swift:11 — MethodTooLong — exerciseThumbnail runs 190 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 90 over it, 1.90× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GlanceProbe.exerciseDockScenarios prototype/App/DockScenariosProbe.swift:10 — MethodTooLong — exerciseDockScenarios runs 189 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 89 over it, 1.89× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: WS2SilentApply.perform prototype/App/WS2SilentApply.swift:34 — MethodTooLong — perform 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× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: FoldRenderer.draw prototype/Effects/FoldRenderer.swift:357 — MethodTooLong — draw runs 178 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 78 over it, 1.78× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SilentMilestoneProbe.exercise prototype/App/SilentMilestoneProbe.swift:21 — MethodTooLong — exercise runs 173 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 73 over it, 1.73× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GlanceProbe.exerciseFullScreenDesktops prototype/App/FullScreenProbe.swift:11 — MethodTooLong — exerciseFullScreenDesktops runs 171 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 71 over it, 1.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: NotchDemoView.build prototype/App/NotchCoach.swift:164 — MethodTooLong — build runs 171 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 71 over it, 1.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GlanceProbe.exerciseStripPeek prototype/App/StripPeekProbe.swift:12 — MethodTooLong — exerciseStripPeek runs 171 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 71 over it, 1.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: NotchContentView.place prototype/App/Notch/NotchContentView.swift:308 — MethodTooLong — place runs 159 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 59 over it, 1.59× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppDelegate.buildStatusMenuItems prototype/App/MenuBarController.swift:72 — MethodTooLong — buildStatusMenuItems 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× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GlanceProbe.holdSetUp prototype/App/HubHoldProbe.swift:41 — MethodTooLong — holdSetUp 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× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: WindowBrowserShotProbe.run prototype/WindowBrowser/WindowBrowserShotProbe.swift:41 — MethodTooLong — run runs 142 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 42 over it, 1.42× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GlanceProbe.hitch prototype/App/HitchProbe.swift:67 — MethodTooLong — hitch 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× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: WS2SilentReadout.sentence prototype/Core/WS2SilentGates.swift:432 — MethodTooLong — sentence runs 137 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 37 over it, 1.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GlanceProbe.exerciseLaunchpad prototype/App/GestureProbe.swift:1735 — MethodTooLong — exerciseLaunchpad runs 132 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 32 over it, 1.32× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ConductorSession.receive prototype/Core/ConductorSession.swift:223 — MethodTooLong — receive runs 127 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 27 over it, 1.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GlanceProbe.exerciseNotchShape prototype/App/NotchShapeProbe.swift:12 — MethodTooLong — exerciseNotchShape 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× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 15 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×39
  • TooManyMethods: AppDelegate prototype/WindowShade.swift:86 — TooManyMethods — 559 methods, declared across 32 files: App/Preferences.swift (164), App/FoldTransaction.swift (51), prototype/WindowShade.swift (45), App/EventTap.swift (30), +28 more file(s). The bar is 30 methods; this is 529 over it, 18.63× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: NotchController prototype/App/Notch/NotchController.swift:7 — TooManyMethods — 150 methods, declared across 2 files: Notch/NotchController.swift (147), App/Notch+Habit.swift (3). The bar is 30 methods; this is 120 over it, 5.00× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: LaunchpadView prototype/App/LaunchpadView.swift:6 — TooManyMethods — 149 methods, declared across 4 files: App/LaunchpadView.swift (101), App/LaunchpadFolders.swift (21), App/LaunchpadOpenWith.swift (19), App/LaunchpadLibrary.swift (8). The bar is 30 methods; this is 119 over it, 4.97× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: WindowBrowserController prototype/WindowBrowser/WindowBrowserController.swift:16 — TooManyMethods — 145 methods. The bar is 30 methods; this is 115 over it, 4.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: GlanceProbe prototype/App/GlanceProbe.swift:16 — TooManyMethods — 136 methods, declared across 31 files: App/GestureProbe.swift (41), App/GlanceProbe.swift (27), App/HabitProbe.swift (7), App/SoakLedger.swift (6), +27 more file(s). The bar is 30 methods; this is 106 over it, 4.53× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: TrackpadGestureController prototype/App/TrackpadGestures.swift:10 — TooManyMethods — 108 methods, declared across 3 files: App/TrackpadGestures.swift (97), App/MagicTilingRun.swift (8), App/DropSplitRun.swift (3). The bar is 30 methods; this is 78 over it, 3.60× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: NotchPanel prototype/App/Notch/NotchPanel.swift:9 — TooManyMethods — 106 methods. The bar is 30 methods; this is 76 over it, 3.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ScrollStripController prototype/App/ScrollStripRun.swift:45 — TooManyMethods — 88 methods. The bar is 30 methods; this is 58 over it, 2.93× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PinnedPreviewController prototype/PinnedPreview.swift:65 — TooManyMethods — 85 methods. The bar is 30 methods; this is 55 over it, 2.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: DuoSettingsWindow prototype/Effects/DuoSettingsWindow.swift:49 — TooManyMethods — 77 methods. The bar is 30 methods; this is 47 over it, 2.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: WindowBrowserContentView prototype/WindowBrowser/WindowBrowserContentView.swift:7 — TooManyMethods — 70 methods. The bar is 30 methods; this is 40 over it, 2.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: NotchCanvasView prototype/App/Notch/NotchCanvas.swift:25 — TooManyMethods — 60 methods. The bar is 30 methods; this is 30 over it, 2.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: WS2ConductorPageView prototype/App/WS2ConductorPage.swift:4 — TooManyMethods — 59 methods. The bar is 30 methods; this is 29 over it, 1.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: NowPlayingCard prototype/App/NowPlayingCard.swift:176 — TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: UpdaterController prototype/App/Updater.swift:50 — TooManyMethods — 57 methods, declared across 2 files: App/Updater.swift (51), App/UpdaterSettings.swift (6). The bar is 30 methods; this is 27 over it, 1.90× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: HabitWorker prototype/App/HabitContext.swift:239 — TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SlideOverController prototype/App/SlideOver.swift:17 — TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: GlanceController prototype/App/Glance.swift:150 — TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: WS2RemoteHost prototype/App/WS2RemoteHost.swift:100 — TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: NotchActivityController prototype/App/NotchActivityController.swift:5 — TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PictureInPictureController prototype/App/PictureInPicture.swift:12 — TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ScrollStrip prototype/Core/ScrollStrip.swift:11 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: HabitCenter prototype/App/HabitContext.swift:1085 — TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: WelcomeView prototype/App/Welcome.swift:41 — TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SplitViewController prototype/App/SplitView.swift:12 — TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • + 14 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×36
  • Swallowed exception (caught, then discarded) prototype/Window/AXHelpers.swift:111 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) prototype/Window/AXStallBreaker.swift:126 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) prototype/Support/WS2CompanionTCPTransport.swift:240 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) prototype/Support/WS2DuplexProcess.swift:171 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) prototype/Support/WS2VersionProbe.swift:38 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) prototype/Effects/FoldGPU.swift:405 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) prototype/App/AirPodsBatterySource.swift:205 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) prototype/App/ConductorSoundPlayer.swift:157 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) prototype/App/CountdownTimerCard.swift:349 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) prototype/App/CountdownTimerHost.swift:249 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) prototype/App/EntitlementProbe.swift:57 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) prototype/App/FaceAutofillController.swift:173 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) prototype/App/FaceObservationSource.swift:432 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) prototype/App/FaceObservationSource.swift:623 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) prototype/App/FocusTimerHost.swift:33 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) prototype/App/NotchActivitySources.swift:360 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) prototype/App/NotchLeases.swift:166 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) prototype/App/NowPlayingArtwork.swift:180 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) prototype/App/NowPlayingStream.swift:247 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) prototype/App/NowPlayingStream.swift:268 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) prototype/App/PictureInPicture.swift:170 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) prototype/App/PresenceLockDriver.swift:220 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) prototype/App/ThumbnailProbe.swift:169 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) prototype/App/UnlockPasswordKeychainStore.swift:130 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) prototype/App/VisionFaceEmbedder.swift:104 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • + 11 more in this group — see findings.md.
D3 · God Classes · ClassTooLong · ×34
  • ClassTooLong: WindowBrowserController prototype/WindowBrowser/WindowBrowserController.swift:16 — ClassTooLong — 2018 significant lines (blank, comment-only and punctuation-only lines excluded), 145 methods. The bar is 400 significant lines; this is 1618 over it, 5.05× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: NotchController prototype/App/Notch/NotchController.swift:7 — ClassTooLong — 1817 significant lines (blank, comment-only and punctuation-only lines excluded), 150 methods. The bar is 400 significant lines; this is 1417 over it, 4.54× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: TrackpadGestureController prototype/App/TrackpadGestures.swift:10 — ClassTooLong — 1651 significant lines (blank, comment-only and punctuation-only lines excluded), 108 methods. The bar is 400 significant lines; this is 1251 over it, 4.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: NotchPanel prototype/App/Notch/NotchPanel.swift:9 — ClassTooLong — 1621 significant lines (blank, comment-only and punctuation-only lines excluded), 106 methods. The bar is 400 significant lines; this is 1221 over it, 4.05× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: LaunchpadView prototype/App/LaunchpadView.swift:6 — ClassTooLong — 1531 significant lines (blank, comment-only and punctuation-only lines excluded), 149 methods. The bar is 400 significant lines; this is 1131 over it, 3.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: GlanceProbe prototype/App/GlanceProbe.swift:16 — ClassTooLong — 1197 significant lines (blank, comment-only and punctuation-only lines excluded), 136 methods. The bar is 400 significant lines; this is 797 over it, 2.99× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ScrollStripController prototype/App/ScrollStripRun.swift:45 — ClassTooLong — 1089 significant lines (blank, comment-only and punctuation-only lines excluded), 88 methods. The bar is 400 significant lines; this is 689 over it, 2.72× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PinnedPreviewController prototype/PinnedPreview.swift:65 — ClassTooLong — 1069 significant lines (blank, comment-only and punctuation-only lines excluded), 85 methods. The bar is 400 significant lines; this is 669 over it, 2.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: WS2PrivacyData prototype/App/WS2PrivacyData.swift:38 — ClassTooLong — 1019 significant lines (blank, comment-only and punctuation-only lines excluded), 0 methods. The bar is 400 significant lines; this is 619 over it, 2.55× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: DuoSettingsWindow prototype/Effects/DuoSettingsWindow.swift:49 — ClassTooLong — 982 significant lines (blank, comment-only and punctuation-only lines excluded), 77 methods. The bar is 400 significant lines; this is 582 over it, 2.46× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: WindowBrowserContentView prototype/WindowBrowser/WindowBrowserContentView.swift:7 — ClassTooLong — 961 significant lines (blank, comment-only and punctuation-only lines excluded), 70 methods. The bar is 400 significant lines; this is 561 over it, 2.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: NotchCanvasView prototype/App/Notch/NotchCanvas.swift:25 — ClassTooLong — 916 significant lines (blank, comment-only and punctuation-only lines excluded), 60 methods. The bar is 400 significant lines; this is 516 over it, 2.29× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SlideOverController prototype/App/SlideOver.swift:17 — ClassTooLong — 814 significant lines (blank, comment-only and punctuation-only lines excluded), 53 methods. The bar is 400 significant lines; this is 414 over it, 2.04× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: WelcomeView prototype/App/Welcome.swift:41 — ClassTooLong — 724 significant lines (blank, comment-only and punctuation-only lines excluded), 43 methods. The bar is 400 significant lines; this is 324 over it, 1.81× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: AppDelegate prototype/WindowShade.swift:86 — ClassTooLong — 702 significant lines (blank, comment-only and punctuation-only lines excluded), 559 methods. The bar is 400 significant lines; this is 302 over it, 1.76× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: NowPlayingCard prototype/App/NowPlayingCard.swift:176 — ClassTooLong — 642 significant lines (blank, comment-only and punctuation-only lines excluded), 57 methods. The bar is 400 significant lines; this is 242 over it, 1.61× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: UpdaterController prototype/App/Updater.swift:50 — ClassTooLong — 614 significant lines (blank, comment-only and punctuation-only lines excluded), 57 methods. The bar is 400 significant lines; this is 214 over it, 1.54× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: NotchCompactView prototype/App/Notch/NotchCompactViews.swift:36 — ClassTooLong — 598 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods. The bar is 400 significant lines; this is 198 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: HabitWorker prototype/App/HabitContext.swift:239 — ClassTooLong — 596 significant lines (blank, comment-only and punctuation-only lines excluded), 53 methods. The bar is 400 significant lines; this is 196 over it, 1.49× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: GlanceController prototype/App/Glance.swift:150 — ClassTooLong — 588 significant lines (blank, comment-only and punctuation-only lines excluded), 50 methods. The bar is 400 significant lines; this is 188 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: WindowBrowserShotProbe prototype/WindowBrowser/WindowBrowserShotProbe.swift:13 — ClassTooLong — 584 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. The bar is 400 significant lines; this is 184 over it, 1.46× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ConductorSession prototype/Core/ConductorSession.swift:77 — ClassTooLong — 539 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods. The bar is 400 significant lines; this is 139 over it, 1.35× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: NotchActivityController prototype/App/NotchActivityController.swift:5 — ClassTooLong — 515 significant lines (blank, comment-only and punctuation-only lines excluded), 47 methods. The bar is 400 significant lines; this is 115 over it, 1.29× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: WindowFoldEffects prototype/Effects/WindowFoldEffects.swift:5 — ClassTooLong — 503 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods. The bar is 400 significant lines; this is 103 over it, 1.26× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SilentMilestoneProbe prototype/App/SilentMilestoneProbe.swift:8 — ClassTooLong — 495 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 95 over it, 1.24× 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.
  • + 9 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×30
  • Edited copy of a member (4 corresponding lines) prototype/Core/ExplainerScenes+Privacy.swift:45 — prototype/Core/ExplainerScenes+Privacy.swift:45-50 | prototype/Core/ExplainerScenes+Shortcuts.swift:156-159 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) prototype/App/WS2CodexApprovalHost.swift:487 — prototype/App/WS2CodexApprovalHost.swift:487-490 | prototype/App/WS2HookApprovalHost.swift:417-420 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) prototype/Core/NowPlayingCardLogic.swift:321 — prototype/Core/NowPlayingCardLogic.swift:321-325 | prototype/Core/NowPlayingCardLogic.swift:328-331 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) prototype/App/WS2RemoteHost.swift:987 — prototype/App/WS2RemoteHost.swift:987-990 | tools/probes/remote-device/Handshake.swift:192-195 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) prototype/App/Preferences.swift:978 — prototype/App/Preferences.swift:978-981 | prototype/App/Preferences.swift:984-987 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) prototype/App/DockScenariosProbe.swift:308 — prototype/App/DockScenariosProbe.swift:308-312 | prototype/App/LockScreenPasswordEntry.swift:87-90 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) prototype/App/MacVoiceTranscriber.swift:170 — prototype/App/MacVoiceTranscriber.swift:170-175 | prototype/App/SpeechVoiceprintCapture.swift:218-221 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) prototype/App/PictureInPicture.swift:730 — prototype/App/PictureInPicture.swift:730-733 | prototype/App/PictureInPicture.swift:735-738 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) prototype/Support/WS2CompanionCrypto.swift:160 — prototype/Support/WS2CompanionCrypto.swift:160-163 | prototype/Support/WS2PairSetupCrypto.swift:39-42 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) prototype/App/CalendarPresenter.swift:44 — prototype/App/CalendarPresenter.swift:44-48 | prototype/App/SettingsExplainerView.swift:483-486 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) prototype/Core/CountdownTimer.swift:56 — prototype/Core/CountdownTimer.swift:56-60 | prototype/Core/FocusTimer.swift:87-90 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) prototype/App/MiddleTitlebarTap.swift:257 — prototype/App/MiddleTitlebarTap.swift:257-260 | prototype/App/TrackpadGestures.swift:1849-1852 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) prototype/Window/Coordinates.swift:12 — prototype/Window/Coordinates.swift:12-15 | prototype/WindowBrowser/WindowBrowserGeometry.swift:344-348 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) prototype/Core/BystanderPolicy.swift:148 — prototype/Core/BystanderPolicy.swift:148-151 | prototype/Core/FaceGestureTracker.swift:337-340 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) prototype/App/DockScenariosProbe.swift:297 — prototype/App/DockScenariosProbe.swift:297-300 | prototype/WindowBrowser/DockHoverProbe.swift:1224-1230 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) prototype/App/FaceTemplateKeychainStore.swift:75 — prototype/App/FaceTemplateKeychainStore.swift:75-78 | prototype/App/FaceThresholdCalibrationStore.swift:53-56 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) prototype/Core/UpdateModels.swift:117 — prototype/Core/UpdateModels.swift:117-120 | prototype/Recovery/DurableShadeJournal.swift:6-10 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) prototype/App/MiddleTitlebarTap.swift:262 — prototype/App/MiddleTitlebarTap.swift:262-265 | prototype/App/ScrollTap.swift:319-323 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) prototype/App/NotchFocusController.swift:130 — prototype/App/NotchFocusController.swift:130-133 | prototype/Core/NotchRow.swift:317-320 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) prototype/App/Preferences.swift:1578 — prototype/App/Preferences.swift:1578-1581 | prototype/App/WS2AppRuntime.swift:736-739 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) prototype/Core/UpdateVersion.swift:37 — prototype/Core/UpdateVersion.swift:37-40 | REDACTED:131-134 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) prototype/WindowBrowser/WindowBrowserCardView.swift:420 — prototype/WindowBrowser/WindowBrowserCardView.swift:420-423 | prototype/WindowBrowser/WindowBrowserListRowView.swift:266-269 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) prototype/App/PictureInPictureViews.swift:267 — prototype/App/PictureInPictureViews.swift:267-270 | prototype/App/SlideOver.swift:1563-1566 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) prototype/App/Preferences.swift:54 — prototype/App/Preferences.swift:54-58 | prototype/WindowShade.swift:993-996 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) prototype/Core/NotchActivities.swift:1177 — prototype/Core/NotchActivities.swift:1177-1180 | prototype/Window/AppWindows.swift:159-162 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 5 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×28
  • Duplicated block (6 lines × 2) prototype/App/CollapseAppearanceSettings.swift:87 — prototype/App/CollapseAppearanceSettings.swift:87-92 | prototype/App/UpdaterSettings.swift:103-108 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `control` to `NSView` in one and `NSControl` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (6 lines × 2) prototype/App/NotchActivitySources.swift:325 — prototype/App/NotchActivitySources.swift:325-330 | prototype/App/PresenceLockDriver.swift:184-189 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. 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. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (6 lines × 2) prototype/App/Preferences.swift:967 — prototype/App/Preferences.swift:967-972 | prototype/Effects/DuoSettingsWindow.swift:806-811 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) prototype/App/Preferences.swift:1203 — prototype/App/Preferences.swift:1203-1208 | prototype/Effects/DuoSettingsWindow.swift:690-695 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/Preferences.swift:1203` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) prototype/Capture/WindowSnapshot.swift:70 — prototype/Capture/WindowSnapshot.swift:70-75 | prototype/WindowBrowser/WindowBrowserShotProbe.swift:613-619 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/Capture/WindowSnapshot.swift:70` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) prototype/Effects/SettingsShotProbe.swift:164 — prototype/Effects/SettingsShotProbe.swift:164-169 | prototype/WindowBrowser/WindowBrowserShotProbe.swift:345-350 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (6 lines × 2) prototype/Overlay/ShadeStrip.swift:566 — prototype/Overlay/ShadeStrip.swift:566-571 | prototype/Overlay/ShadeStrip.swift:578-583 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/Overlay/ShadeStrip.swift:566` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (6 lines × 2) prototype/WindowBrowser/DockHoverProbe.swift:228 — prototype/WindowBrowser/DockHoverProbe.swift:228-233 | prototype/WindowBrowser/DockHoverProbe.swift:524-529 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/WindowBrowser/DockHoverProbe.swift:228` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) prototype/WindowBrowser/WindowBrowserController.swift:3176 — prototype/WindowBrowser/WindowBrowserController.swift:3176-3181 | prototype/WindowBrowser/WindowBrowserController.swift:3200-3205 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/WindowBrowser/WindowBrowserController.swift:3176` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (6 lines × 2) prototype/main.swift:325 — prototype/main.swift:325-330 | prototype/main.swift:347-352 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/main.swift:325` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) prototype/App/GestureProbe.swift:2442 — prototype/App/GestureProbe.swift:2442-2447 | prototype/App/GestureProbe.swift:2493-2498 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/GestureProbe.swift:2442` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) prototype/App/GlanceProbe.swift:861 — prototype/App/GlanceProbe.swift:861-866 | prototype/App/GlanceProbe.swift:1345-1350 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `prototype/App/GlanceProbe.swift:860` calls `sleep`, `milliseconds` and `prototype/App/GlanceProbe.swift:1344` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) prototype/App/LaunchpadController.swift:376 — prototype/App/LaunchpadController.swift:376-381 | prototype/Private/DockBridge.swift:70-75 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/LaunchpadController.swift:376` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) prototype/App/Preferences.swift:971 — prototype/App/Preferences.swift:971-976 | prototype/App/Preferences.swift:993-998 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/Preferences.swift:971` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) prototype/App/UnlockPasswordKeychainStore.swift:23 — prototype/App/UnlockPasswordKeychainStore.swift:23-28 | prototype/Core/FaceAutofill.swift:234-239 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) prototype/Overlay/PreviewSurfaces.swift:54 — prototype/Overlay/PreviewSurfaces.swift:54-59 | prototype/PinnedPreviewPanel.swift:208-213 — before extracting anything, compare `prototype/Overlay/PreviewSurfaces.swift` and `prototype/PinnedPreviewPanel.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) prototype/WindowBrowser/WindowBrowserCardView.swift:451 — prototype/WindowBrowser/WindowBrowserCardView.swift:451-456 | prototype/WindowBrowser/WindowBrowserListRowView.swift:291-296 — before extracting anything, compare `prototype/WindowBrowser/WindowBrowserCardView.swift` and `prototype/WindowBrowser/WindowBrowserListRowView.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) prototype/App/GestureProbe.swift:1327 — prototype/App/GestureProbe.swift:1327-1332 | prototype/App/GestureProbe.swift:2137-2142 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) prototype/App/GestureProbe.swift:1463 — prototype/App/GestureProbe.swift:1463-1468 | prototype/App/StripPeekProbe.swift:63-68 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) prototype/App/HitchProbe.swift:168 — prototype/App/HitchProbe.swift:168-173 | prototype/App/SoakLedger.swift:148-153 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) prototype/App/LaunchpadView.swift:1023 — prototype/App/LaunchpadView.swift:1023-1028 | prototype/App/LaunchpadView.swift:1036-1041 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/LaunchpadView.swift:1023` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) prototype/App/Notch/NotchCanvas.swift:699 — prototype/App/Notch/NotchCanvas.swift:699-704 | prototype/App/Notch/NotchRowViews.swift:43-48 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) prototype/App/TrackpadGestures.swift:1217 — prototype/App/TrackpadGestures.swift:1217-1222 | prototype/App/TrackpadGestures.swift:1712-1717 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/TrackpadGestures.swift:1217` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) tools/archive/design-qa-batch23-29/ConductorSurfacePreview.swift:5 — tools/archive/design-qa-batch23-29/ConductorSurfacePreview.swift:5-10 | tools/archive/design-qa-batch23-29/HostSurfacePreview.swift:5-10 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `tools/archive/design-qa-batch23-29/ConductorSurfacePreview.swift:5` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) tools/archive/design-qa-batch23-29/BrowserSettingsPreview.swift:54 — tools/archive/design-qa-batch23-29/BrowserSettingsPreview.swift:54-59 | tools/archive/design-qa-batch23-29/SilentPageLanguagePreview.swift:42-47 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • + 3 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×24
  • Duplicated block (7 lines × 2) prototype/App/AudioLevelTap.swift:97 — prototype/App/AudioLevelTap.swift:97-103 | prototype/App/AudioOutputRoutes.swift:105-111 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (7 lines × 2) prototype/App/FaceEnrollmentProbe.swift:152 — prototype/App/FaceEnrollmentProbe.swift:152-158 | prototype/App/HookApprovalProbe.swift:68-74 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/FaceEnrollmentProbe.swift:152` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) prototype/App/FoldTransaction.swift:306 — prototype/App/FoldTransaction.swift:306-312 | prototype/App/FoldTransaction.swift:1025-1033 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/FoldTransaction.swift:306` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) prototype/App/NotchLevelControl.swift:350 — prototype/App/NotchLevelControl.swift:350-356 | prototype/App/WS2RemoteEffects.swift:387-393 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) prototype/App/PictureInPicture.swift:64 — prototype/App/PictureInPicture.swift:64-70 | prototype/App/SlideOver.swift:141-147 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/PictureInPicture.swift:64` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) prototype/App/SilentCoverProbe.swift:19 — prototype/App/SilentCoverProbe.swift:19-25 | prototype/App/SilentMilestoneProbe.swift:34-40 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) prototype/App/StatusBarIcon.swift:27 — prototype/App/StatusBarIcon.swift:27-34 | prototype/Watchdog/GuardIcon.swift:21-27 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/StatusBarIcon.swift:27` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) prototype/Core/FaceGestureTracker.swift:19 — prototype/Core/FaceGestureTracker.swift:19-25 | tools/liveness-lab/LivenessChallenge.swift:8-14 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) prototype/WindowBrowser/WindowBrowserContentView.swift:943 — prototype/WindowBrowser/WindowBrowserContentView.swift:943-949 | prototype/WindowBrowser/WindowBrowserContentView.swift:980-986 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) prototype/App/LaunchpadController.swift:358 — prototype/App/LaunchpadController.swift:358-364 | prototype/Private/DockBridge.swift:76-82 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) prototype/App/Preferences.swift:2161 — prototype/App/Preferences.swift:2161-2167 | prototype/App/WS2InputSettingsPane.swift:198-204 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) prototype/App/AudioLevelTap.swift:106 — prototype/App/AudioLevelTap.swift:106-112 | prototype/App/AudioOutputRoutes.swift:114-120 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (7 lines × 2) prototype/App/CountdownTimerHost.swift:247 — prototype/App/CountdownTimerHost.swift:247-253 | prototype/App/FocusTimerHost.swift:31-37 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/CountdownTimerHost.swift:247` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) prototype/App/HitchProbe.swift:198 — prototype/App/HitchProbe.swift:198-204 | prototype/App/SoakLedger.swift:179-185 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/HitchProbe.swift:198` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) prototype/App/SilentMilestoneProbe.swift:130 — prototype/App/SilentMilestoneProbe.swift:130-136 | prototype/App/SilentMilestoneProbe.swift:155-161 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) prototype/WindowBrowser/WindowBrowserIdentityProbe.swift:399 — prototype/WindowBrowser/WindowBrowserIdentityProbe.swift:399-405 | prototype/WindowBrowser/WindowBrowserLiveAppProbe.swift:358-364 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) prototype/App/CountdownTimerCard.swift:315 — prototype/App/CountdownTimerCard.swift:315-321 | prototype/App/CountdownTimerCard.swift:337-343 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/CountdownTimerCard.swift:315` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) prototype/App/ScrollStripRun.swift:1227 — prototype/App/ScrollStripRun.swift:1227-1233 | prototype/App/ScrollStripRun.swift:1302-1308 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/ScrollStripRun.swift:1227` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) prototype/App/WS2CodexApprovalHost.swift:466 — prototype/App/WS2CodexApprovalHost.swift:466-472 | prototype/Core/WS2OwnedProtocolHost.swift:52-58 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) REDACTED:178 — REDACTED:178-184 | REDACTED:202-208 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) tools/archive/design-qa-batch23-29/FeedbackPreview.swift:390 — tools/archive/design-qa-batch23-29/FeedbackPreview.swift:390-396 | tools/archive/design-qa-batch23-29/OwnedPhasePreview.swift:391-397 — before extracting anything, compare `tools/archive/design-qa-batch23-29/FeedbackPreview.swift` and `tools/archive/design-qa-batch23-29/OwnedPhasePreview.swift` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 464 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) tools/archive/design-qa-batch23-29/FeedbackPreview.swift:381 — tools/archive/design-qa-batch23-29/FeedbackPreview.swift:381-387 | tools/archive/design-qa-batch23-29/OwnedPhasePreview.swift:382-388 — before extracting anything, compare `tools/archive/design-qa-batch23-29/FeedbackPreview.swift` and `tools/archive/design-qa-batch23-29/OwnedPhasePreview.swift` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 464 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:129 — tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:129-135 | tools/archive/design-qa-batch23-29/NotchRetargetPreview.swift:29-35 — before extracting anything, compare `tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift` and `tools/archive/design-qa-batch23-29/NotchRetargetPreview.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 219 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:129` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) tools/archive/design-qa-batch23-29/FileShelfStatePreview.swift:28 — tools/archive/design-qa-batch23-29/FileShelfStatePreview.swift:28-34 | tools/archive/design-qa-batch23-29/FileShelfSurfacePreview.swift:28-34 — before extracting anything, compare `tools/archive/design-qa-batch23-29/FileShelfStatePreview.swift` and `tools/archive/design-qa-batch23-29/FileShelfSurfacePreview.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D6 · Cohesion (LCOM4) · Low cohesion · ×20
  • Low cohesion: AppDelegate (LCOM4 28) prototype/WindowShade.swift:86 — AppDelegate's methods fall into 28 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 28 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: SparkleUpdaterBridge (LCOM4 9) prototype/App/UpdaterSparkle.swift:17 — SparkleUpdaterBridge's methods fall into 9 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 9 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: DuoSettingsWindow (LCOM4 9) prototype/Effects/DuoSettingsWindow.swift:49 — DuoSettingsWindow's methods fall into 9 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 9 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: WS2RemoteSystemPort (LCOM4 7) prototype/App/WS2RemoteEffects.swift:283 — WS2RemoteSystemPort's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: PrivateSLSWindowMover (LCOM4 7) prototype/Private/SkyLightBridge.swift:23 — PrivateSLSWindowMover's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: NotchController (LCOM4 6) prototype/App/Notch/NotchController.swift:7 — NotchController's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: CarPlaySurfaceView (LCOM4 5) prototype/App/CarPlaySurface.swift:464 — CarPlaySurfaceView's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: FileShelfTileView (LCOM4 5) prototype/App/FileShelfView.swift:610 — FileShelfTileView's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: WS2PrivacyPane (LCOM4 5) prototype/App/WS2PrivacyPane.swift:13 — WS2PrivacyPane's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: PinnedPreviewController (LCOM4 4) prototype/PinnedPreview.swift:65 — PinnedPreviewController's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: PinnedPreviewContentView (LCOM4 4) prototype/PinnedPreviewPanel.swift:36 — PinnedPreviewContentView's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: CarryStripView (LCOM4 4) prototype/App/Carry.swift:33 — CarryStripView's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: HabitCloseButton (LCOM4 4) prototype/App/NotchCoach.swift:567 — HabitCloseButton's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: NotchLevelSystemPort (LCOM4 4) prototype/App/NotchLevelControl.swift:192 — NotchLevelSystemPort's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: PiPView (LCOM4 4) prototype/App/PictureInPictureViews.swift:10 — PiPView's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: PinchEventTap (LCOM4 4) prototype/App/PinchEventTap.swift:8 — PinchEventTap's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: StripOverviewTile (LCOM4 4) prototype/App/ScrollStripOverview.swift:623 — StripOverviewTile's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ScrollStripController (LCOM4 4) prototype/App/ScrollStripRun.swift:45 — ScrollStripController's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: WelcomeHero (LCOM4 4) prototype/App/Welcome.swift:1025 — WelcomeHero's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: WhatsNew1018Window (LCOM4 4) prototype/App/WhatsNew1018.swift:9 — WhatsNew1018Window's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×19
  • Edited copy of a member (7 corresponding lines) prototype/Core/ExplainerScenes+Browser.swift:69 — prototype/Core/ExplainerScenes+Browser.swift:69-79 | prototype/Core/ExplainerScenes+Shortcuts.swift:179-185 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) prototype/App/NotchAuthentication.swift:255 — prototype/App/NotchAuthentication.swift:255-261 | prototype/App/NotchFaceObservations.swift:124-130 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) prototype/Core/DiagnosticsBundle.swift:22 — prototype/Core/DiagnosticsBundle.swift:22-28 | prototype/Core/DiagnosticsBundle.swift:31-37 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) prototype/Core/WindowToolConflict.swift:39 — prototype/Core/WindowToolConflict.swift:39-45 | prototype/Core/WindowToolConflict.swift:60-66 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) prototype/App/HabitContext.swift:1030 — prototype/App/HabitContext.swift:1030-1036 | prototype/App/NotchLevelControl.swift:341-347 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) prototype/App/MacVoiceTranscriber.swift:160 — prototype/App/MacVoiceTranscriber.swift:160-168 | prototype/App/SpeechVoiceprintCapture.swift:210-216 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) prototype/App/NotchLeases.swift:344 — prototype/App/NotchLeases.swift:344-350 | prototype/App/NotchLeases.swift:353-359 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) prototype/Window/AXHelpers.swift:116 — prototype/Window/AXHelpers.swift:116-122 | prototype/Window/AXWindow.swift:153-162 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) prototype/Core/FaceScanGuard.swift:217 — prototype/Core/FaceScanGuard.swift:217-223 | prototype/Core/FaceScanGuard.swift:227-233 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) prototype/Window/AppWindows.swift:143 — prototype/Window/AppWindows.swift:143-149 | prototype/Window/AppWindows.swift:151-157 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) prototype/App/NotchLevelObserver.swift:510 — prototype/App/NotchLevelObserver.swift:510-517 | prototype/App/WS2RemoteEffects.swift:399-405 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) prototype/Overlay/SystemAppearance.swift:440 — prototype/Overlay/SystemAppearance.swift:440-446 | prototype/PinnedPreview.swift:56-62 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) prototype/Effects/SettingsShotProbe.swift:163 — prototype/Effects/SettingsShotProbe.swift:163-169 | prototype/WindowBrowser/WindowBrowserShotProbe.swift:344-350 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) prototype/App/FileShelfView.swift:795 — prototype/App/FileShelfView.swift:795-801 | prototype/App/LaunchpadOpenWith.swift:117-124 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) prototype/App/PictureInPictureViews.swift:351 — prototype/App/PictureInPictureViews.swift:351-357 | prototype/App/SlideOverDropHint.swift:60-68 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) prototype/App/UnlockPasswordKeychainStore.swift:11 — prototype/App/UnlockPasswordKeychainStore.swift:11-17 | prototype/Core/FaceAutofill.swift:217-223 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) prototype/App/Notch/NotchCompactViews.swift:487 — prototype/App/Notch/NotchCompactViews.swift:487-494 | prototype/App/FileShelfView.swift:820-826 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) prototype/Effects/SettingsSearchSidebar.swift:157 — prototype/Effects/SettingsSearchSidebar.swift:157-164 | prototype/Effects/DuoSettingsWindow.swift:702-708 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) prototype/App/WS2GestureRows.swift:211 — prototype/App/WS2GestureRows.swift:211-217 | prototype/App/WS2InputSettingsPane.swift:287-293 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×19
  • Edited copy of a member (5 corresponding lines) prototype/App/Preferences.swift:1001 — prototype/App/Preferences.swift:1001-1005 | prototype/App/Preferences.swift:1007-1011 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) prototype/App/WS2BluetoothPresenceSource.swift:127 — prototype/App/WS2BluetoothPresenceSource.swift:127-131 | prototype/App/WS2BluetoothPresenceSource.swift:142-148 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) prototype/Core/DownloadActivity.swift:148 — prototype/Core/DownloadActivity.swift:148-152 | prototype/Core/DownloadActivity.swift:306-310 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) prototype/Effects/EffectWindowProbe.swift:122 — prototype/Effects/EffectWindowProbe.swift:122-126 | prototype/WindowBrowser/WindowPlacement.swift:205-212 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) prototype/Effects/DuoSettingsWindow.swift:673 — prototype/Effects/DuoSettingsWindow.swift:673-677 | prototype/Effects/DuoSettingsWindow.swift:679-683 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) prototype/Core/HitchMeter.swift:38 — prototype/Core/HitchMeter.swift:38-43 | tools/probes/FaceFeaturePrintProbe.swift:15-19 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) prototype/Core/ScrollStrip.swift:437 — prototype/Core/ScrollStrip.swift:437-441 | prototype/Core/ScrollStrip.swift:444-448 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) prototype/App/WS2ConductorView.swift:13 — prototype/App/WS2ConductorView.swift:13-18 | prototype/App/WS2ModelPickerView.swift:9-13 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) prototype/Core/DownloadActivity.swift:294 — prototype/Core/DownloadActivity.swift:294-298 | prototype/Core/DownloadActivity.swift:300-304 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) prototype/App/SlideOverDropHint.swift:53 — prototype/App/SlideOverDropHint.swift:53-58 | prototype/App/PictureInPictureViews.swift:345-349 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) prototype/Window/AXWindow.swift:141 — prototype/Window/AXWindow.swift:141-145 | prototype/Window/AXWindow.swift:651-656 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) prototype/Window/AXWindow.swift:403 — prototype/Window/AXWindow.swift:403-409 | prototype/Core/MissionControlPick.swift:116-120 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) prototype/App/LaunchpadLibrary.swift:438 — prototype/App/LaunchpadLibrary.swift:438-442 | prototype/App/LaunchpadView.swift:262-267 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) tools/probes/WheelAssociationProbe.swift:52 — tools/probes/WheelAssociationProbe.swift:52-58 | prototype/App/PeripheralBatterySource.swift:150-154 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) prototype/App/FileShelfView.swift:337 — prototype/App/FileShelfView.swift:337-341 | prototype/App/NotchActivityController.swift:647-651 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) prototype/App/WS2FoldCallbackGuard.swift:122 — prototype/App/WS2FoldCallbackGuard.swift:122-126 | prototype/Window/AXWindow.swift:90-95 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) prototype/Overlay/ShadeStrip.swift:599 — prototype/Overlay/ShadeStrip.swift:599-603 | prototype/PinnedPreviewPanel.swift:161-166 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) prototype/App/Carry.swift:80 — prototype/App/Carry.swift:80-84 | prototype/App/MenuBarController.swift:307-313 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:22 — tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:22-26 | tools/archive/design-qa-batch23-29/PrivacyPageCompositionPreview.swift:22-26 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×17
  • Duplicated block (9 lines × 2) prototype/App/EventTap.swift:265 — prototype/App/EventTap.swift:265-273 | prototype/App/EventTap.swift:363-371 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (9 lines × 2) prototype/App/EventTap.swift:348 — prototype/App/EventTap.swift:348-356 | prototype/App/EventTapCallback.swift:123-131 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) prototype/App/FaceCalibrationRecorder.swift:44 — prototype/App/FaceCalibrationRecorder.swift:44-52 | tools/probes/FaceFeaturePrintProbe.swift:111-119 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) prototype/App/FaceTemplateKeychainStore.swift:65 — prototype/App/FaceTemplateKeychainStore.swift:65-73 | prototype/App/FaceThresholdCalibrationStore.swift:43-51 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/FaceTemplateKeychainStore.swift:65` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) prototype/App/GapProbesSupport.swift:81 — prototype/App/GapProbesSupport.swift:81-89 | prototype/App/GestureProbe.swift:1048-1056 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `prototype/App/GapProbesSupport.swift:90` calls `isActive`, `onScreenWindows` and `prototype/App/GestureProbe.swift:1057` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) prototype/App/GestureProbe.swift:1736 — prototype/App/GestureProbe.swift:1736-1744 | prototype/App/LaunchpadKeysProbe.swift:28-36 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (9 lines × 2) prototype/App/LaunchpadFolders.swift:834 — prototype/App/LaunchpadFolders.swift:834-842 | prototype/App/LaunchpadView.swift:1344-1352 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/LaunchpadFolders.swift:834` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) prototype/App/WS2ConductorPage.swift:114 — prototype/App/WS2ConductorPage.swift:114-122 | prototype/App/WS2SilentHost.swift:604-612 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/WS2ConductorPage.swift:114` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) prototype/Overlay/PreviewSurfaces.swift:68 — prototype/Overlay/PreviewSurfaces.swift:68-76 | prototype/PinnedPreviewPanel.swift:222-230 — before extracting anything, compare `prototype/Overlay/PreviewSurfaces.swift` and `prototype/PinnedPreviewPanel.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `prototype/PinnedPreviewPanel.swift:233` calls `fatalError` and `prototype/Overlay/PreviewSurfaces.swift:78` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) prototype/WindowBrowser/DockHoverProbe.swift:403 — prototype/WindowBrowser/DockHoverProbe.swift:403-411 | prototype/WindowBrowser/DockHoverProbe.swift:712-720 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/WindowBrowser/DockHoverProbe.swift:403` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) prototype/App/SoakLedger.swift:156 — prototype/App/SoakLedger.swift:156-164 | prototype/App/SoakLedger.swift:196-204 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/SoakLedger.swift:156` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `prototype/App/SoakLedger.swift:205` calls `onscreen`, `unavailable` and `prototype/App/SoakLedger.swift:165` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) prototype/WindowBrowser/WindowBrowserCardView.swift:127 — prototype/WindowBrowser/WindowBrowserCardView.swift:127-135 | prototype/WindowBrowser/WindowBrowserListRowView.swift:126-134 — before extracting anything, compare `prototype/WindowBrowser/WindowBrowserCardView.swift` and `prototype/WindowBrowser/WindowBrowserListRowView.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) prototype/Overlay/ShadeStrip.swift:103 — prototype/Overlay/ShadeStrip.swift:103-111 | prototype/Overlay/ShadeStrip.swift:112-120 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/Overlay/ShadeStrip.swift:103` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) prototype/App/GlanceProbe.swift:772 — prototype/App/GlanceProbe.swift:772-780 | prototype/App/GlanceProbe.swift:1237-1245 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) tools/archive/design-qa-batch23-29/WindowBrowserGridTitlePreview.swift:25 — tools/archive/design-qa-batch23-29/WindowBrowserGridTitlePreview.swift:25-33 | tools/archive/design-qa-batch23-29/WindowBrowserImagePreview.swift:33-41 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) tools/archive/design-qa-batch23-29/SettingsShadeLanguagePreview.swift:18 — tools/archive/design-qa-batch23-29/SettingsShadeLanguagePreview.swift:18-26 | tools/archive/design-qa-batch23-29/SilentPageLanguagePreview.swift:13-21 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `tools/archive/design-qa-batch23-29/SettingsShadeLanguagePreview.swift:18` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) tools/archive/design-qa-batch23-29/SettingsShadeLanguagePreview.swift:144 — tools/archive/design-qa-batch23-29/SettingsShadeLanguagePreview.swift:144-152 | tools/archive/design-qa-batch23-29/SettingsShadeLanguagePreview.swift:155-163 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×15
  • Duplicated block (8 lines × 2) prototype/App/FaceTemplateKeychainStore.swift:31 — prototype/App/FaceTemplateKeychainStore.swift:31-38 | prototype/App/FaceThresholdCalibrationStore.swift:16-23 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) prototype/App/FoldExit.swift:146 — prototype/App/FoldExit.swift:146-153 | prototype/App/FoldExit.swift:176-183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) prototype/Capture/PreviewRenderer.swift:187 — prototype/Capture/PreviewRenderer.swift:187-194 | prototype/Capture/PreviewRenderer.swift:215-222 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/Capture/PreviewRenderer.swift:187` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) prototype/Core/InteractionCoordinator.swift:269 — prototype/Core/InteractionCoordinator.swift:269-276 | prototype/Core/InteractionCoordinator.swift:301-308 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) prototype/Effects/FoldRenderer.swift:400 — prototype/Effects/FoldRenderer.swift:400-407 | prototype/Effects/FoldRenderer.swift:422-429 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/Effects/FoldRenderer.swift:400` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 2) prototype/WindowBrowser/DockHoverObserver.swift:554 — prototype/WindowBrowser/DockHoverObserver.swift:554-561 | prototype/WindowBrowser/DockHoverProbe.swift:265-273 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) prototype/WindowBrowser/WindowThumbnailService.swift:305 — prototype/WindowBrowser/WindowThumbnailService.swift:305-313 | prototype/WindowBrowser/WindowThumbnailService.swift:349-356 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/WindowBrowser/WindowThumbnailService.swift:305` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) prototype/WindowBrowser/WindowThumbnailService.swift:334 — prototype/WindowBrowser/WindowThumbnailService.swift:334-341 | prototype/WindowBrowser/WindowThumbnailService.swift:631-638 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) prototype/main.swift:118 — prototype/main.swift:118-125 | prototype/main.swift:376-383 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/main.swift:118` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) prototype/App/FoldTransaction.swift:505 — prototype/App/FoldTransaction.swift:505-512 | prototype/App/FoldTransaction.swift:518-525 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/FoldTransaction.swift:505` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) prototype/App/PictureInPicture.swift:560 — prototype/App/PictureInPicture.swift:560-567 | prototype/App/WS2RemoteEffects.swift:351-358 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/PictureInPicture.swift:560` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) prototype/Overlay/SystemAppearance.swift:244 — prototype/Overlay/SystemAppearance.swift:244-251 | prototype/Overlay/SystemAppearance.swift:290-297 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/Overlay/SystemAppearance.swift:244` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) prototype/App/Thumbnail.swift:373 — prototype/App/Thumbnail.swift:373-380 | prototype/Overlay/ShadeStrip.swift:490-497 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) tools/archive/design-qa-batch23-29/FileShelfStatePreview.swift:117 — tools/archive/design-qa-batch23-29/FileShelfStatePreview.swift:117-124 | tools/archive/design-qa-batch23-29/FileShelfSurfacePreview.swift:67-74 — before extracting anything, compare `tools/archive/design-qa-batch23-29/FileShelfStatePreview.swift` and `tools/archive/design-qa-batch23-29/FileShelfSurfacePreview.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tools/archive/design-qa-batch23-29/FileShelfStatePreview.swift:117` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) tools/archive/design-qa-batch23-29/check-notch-motion-preview.py:226 — tools/archive/design-qa-batch23-29/check-notch-motion-preview.py:226-233 | tools/archive/design-qa-batch23-29/check-progress-quantity-preview.py:330-337 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×13
  • Edited copy of a member (6 corresponding lines) prototype/Core/ExplainerScenes+Shortcuts.swift:162 — prototype/Core/ExplainerScenes+Shortcuts.swift:162-168 | prototype/Core/ExplainerScenes+Shortcuts.swift:171-176 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) prototype/App/TrackpadGestures.swift:2127 — prototype/App/TrackpadGestures.swift:2127-2132 | prototype/Core/WindowProxyMotion.swift:226-233 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) prototype/App/WS2SettingsInfo.swift:403 — prototype/App/WS2SettingsInfo.swift:403-408 | prototype/App/WS2SettingsInfo.swift:429-436 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) prototype/App/Preferences.swift:941 — prototype/App/Preferences.swift:941-946 | prototype/App/Preferences.swift:949-955 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) prototype/App/WS2OwnedSessionView.swift:268 — prototype/App/WS2OwnedSessionView.swift:268-273 | prototype/Effects/SettingsSearchSidebar.swift:318-328 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) prototype/Core/ConductorSession.swift:202 — prototype/Core/ConductorSession.swift:202-207 | prototype/Core/ConductorSession.swift:208-217 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) prototype/App/WS2GameControllerBridge.swift:202 — prototype/App/WS2GameControllerBridge.swift:202-207 | prototype/App/WS2GamepadDesktopControl.swift:105-116 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) prototype/App/HubHoldProbe.swift:11 — prototype/App/HubHoldProbe.swift:11-16 | prototype/App/HubHoldProbe.swift:18-23 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) prototype/Window/AXWindow.swift:9 — prototype/Window/AXWindow.swift:9-17 | prototype/WindowBrowser/WindowBrowserLiveAppProbe.swift:347-352 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) prototype/App/SlideOver.swift:1251 — prototype/App/SlideOver.swift:1251-1257 | prototype/App/SlideOverChrome.swift:422-427 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) prototype/App/Motion.swift:26 — prototype/App/Motion.swift:26-31 | prototype/Overlay/GlancePanel.swift:242-247 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) prototype/Effects/AppleSPUAccelerometer.swift:273 — prototype/Effects/AppleSPUAccelerometer.swift:273-278 | prototype/Effects/LidAngleSource.swift:221-226 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) prototype/App/WS2ConductorSettings.swift:165 — prototype/App/WS2ConductorSettings.swift:165-170 | prototype/App/WS2InputSettingsPane.swift:279-285 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×13
  • Edited copy of a member (10 corresponding lines) prototype/App/PictureInPicture.swift:558 — prototype/App/PictureInPicture.swift:558-567 | prototype/App/WS2RemoteEffects.swift:349-358 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) prototype/App/CountdownTimerHost.swift:244 — prototype/App/CountdownTimerHost.swift:244-253 | prototype/App/FocusTimerHost.swift:27-37 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) prototype/Overlay/ShadeStrip.swift:565 — prototype/Overlay/ShadeStrip.swift:565-575 | prototype/Overlay/ShadeStrip.swift:577-586 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) prototype/App/FaceTemplateKeychainStore.swift:46 — prototype/App/FaceTemplateKeychainStore.swift:46-56 | prototype/App/FaceThresholdCalibrationStore.swift:26-35 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) prototype/App/NotchLevelControl.swift:349 — prototype/App/NotchLevelControl.swift:349-358 | prototype/App/WS2RemoteEffects.swift:386-397 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) prototype/App/NotchLevelControl.swift:402 — prototype/App/NotchLevelControl.swift:402-411 | prototype/App/NotchLevelControl.swift:413-423 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) prototype/App/SoakLedger.swift:18 — prototype/App/SoakLedger.swift:18-27 | prototype/Effects/EffectSoakProbe.swift:133-143 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) prototype/App/BystanderTuck.swift:232 — prototype/App/BystanderTuck.swift:232-243 | prototype/App/WS2RemoteEffects.swift:305-314 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) prototype/WindowBrowser/WindowThumbnailService.swift:266 — prototype/WindowBrowser/WindowThumbnailService.swift:266-275 | prototype/WindowBrowser/WindowThumbnailService.swift:494-503 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) prototype/App/GlobalInputFilter.swift:100 — prototype/App/GlobalInputFilter.swift:100-109 | prototype/Core/DownloadActivity.swift:169-178 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) prototype/App/SettingsExplainerHost.swift:374 — prototype/App/SettingsExplainerHost.swift:374-385 | prototype/App/SettingsSearchIndex.swift:200-209 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) prototype/Effects/AppleSPUAccelerometer.swift:101 — prototype/Effects/AppleSPUAccelerometer.swift:101-110 | prototype/Effects/LidAngleSource.swift:68-81 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) tools/probes/companion-pairing/PairSetupProbe.swift:14 — tools/probes/companion-pairing/PairSetupProbe.swift:14-23 | tools/probes/companion-pairing/SRPProbe.swift:6-15 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×12
  • Edited copy of a member (9 corresponding lines) prototype/App/LaunchpadFolders.swift:133 — prototype/App/LaunchpadFolders.swift:133-141 | prototype/App/LaunchpadView.swift:720-729 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) prototype/Support/WS2CompanionCrypto.swift:77 — prototype/Support/WS2CompanionCrypto.swift:77-85 | prototype/Support/WS2CompanionCrypto.swift:119-128 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) prototype/App/HabitContext.swift:1262 — prototype/App/HabitContext.swift:1262-1275 | prototype/App/HabitContext.swift:1278-1286 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) prototype/Effects/DuoSettingsWindow.swift:685 — prototype/Effects/DuoSettingsWindow.swift:685-695 | prototype/Effects/DuoSettingsWindow.swift:784-792 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) prototype/App/SlideOverChrome.swift:152 — prototype/App/SlideOverChrome.swift:152-163 | prototype/App/SlideOverDropHint.swift:119-127 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) prototype/App/FileShelfStore.swift:211 — prototype/App/FileShelfStore.swift:211-221 | prototype/App/FileShelfStore.swift:225-233 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) prototype/App/NotchWatch.swift:224 — prototype/App/NotchWatch.swift:224-233 | prototype/App/NowPlayingCard.swift:663-671 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) prototype/App/LaunchpadView.swift:1363 — prototype/App/LaunchpadView.swift:1363-1371 | prototype/App/LaunchpadView.swift:1374-1382 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) prototype/Core/WS2SilentExecution.swift:58 — prototype/Core/WS2SilentExecution.swift:58-66 | prototype/Core/WS2SilentExecution.swift:92-101 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) prototype/App/ConductorSoundPlayer.swift:161 — prototype/App/ConductorSoundPlayer.swift:161-169 | prototype/App/FaceAutofillController.swift:426-434 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) prototype/WindowBrowser/DockHoverObserver.swift:553 — prototype/WindowBrowser/DockHoverObserver.swift:553-561 | prototype/WindowBrowser/DockHoverProbe.swift:265-273 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) prototype/App/MenuBarController.swift:320 — prototype/App/MenuBarController.swift:320-332 | prototype/Overlay/ShadeStrip.swift:404-412 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×10
  • Edited copy of a member (11 corresponding lines) prototype/App/WS2RemoteHost.swift:713 — prototype/App/WS2RemoteHost.swift:713-723 | tools/probes/remote-device/Handshake.swift:132-143 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) prototype/App/FaceCalibrationRecorder.swift:339 — prototype/App/FaceCalibrationRecorder.swift:339-349 | prototype/App/FaceEnrollmentHost.swift:112-123 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) prototype/App/WS2CodexApprovalHost.swift:464 — prototype/App/WS2CodexApprovalHost.swift:464-474 | prototype/Core/WS2OwnedProtocolHost.swift:50-60 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) prototype/App/NotchActivityController.swift:339 — prototype/App/NotchActivityController.swift:339-349 | prototype/App/NotchActivityController.swift:352-362 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) prototype/App/MissionControlKeys.swift:51 — prototype/App/MissionControlKeys.swift:51-63 | prototype/App/SLSOffscreenCheckProbe.swift:182-192 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) prototype/App/NotchLevelObserver.swift:437 — prototype/App/NotchLevelObserver.swift:437-447 | prototype/App/NotchLevelObserver.swift:469-479 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) prototype/Core/RemoteLayerHost.swift:208 — prototype/Core/RemoteLayerHost.swift:208-221 | prototype/Core/RemoteLayerHost.swift:224-234 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) prototype/App/WindowProxy.swift:189 — prototype/App/WindowProxy.swift:189-199 | prototype/App/WindowProxyStage.swift:215-227 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) prototype/WindowBrowser/WindowBrowserCardView.swift:210 — prototype/WindowBrowser/WindowBrowserCardView.swift:210-220 | prototype/WindowBrowser/WindowBrowserSelectionDetailView.swift:66-77 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) prototype/App/Carry.swift:458 — prototype/App/Carry.swift:458-468 | prototype/App/ScrollStripRun.swift:1474-1484 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (3 corresponding lines) · ×10
  • Edited copy of a member (3 corresponding lines) prototype/Core/NotchRow.swift:118 — prototype/Core/NotchRow.swift:118-120 | prototype/Core/NotchRow.swift:126-129 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) prototype/App/DockScenariosProbe.swift:288 — prototype/App/DockScenariosProbe.swift:288-290 | prototype/PinnedPreview.swift:1651-1653 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) prototype/Core/FlickMotion.swift:498 — prototype/Core/FlickMotion.swift:498-500 | prototype/Core/WindowProxyMotion.swift:122-125 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) prototype/Core/ScrollStrip.swift:885 — prototype/Core/ScrollStrip.swift:885-887 | prototype/Core/StripWidthMemory.swift:77-79 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) prototype/App/WS2ConductorSettingsCore.swift:25 — prototype/App/WS2ConductorSettingsCore.swift:25-27 | prototype/App/WS2InputPreferences.swift:60-62 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) prototype/App/PeripheralBatterySource.swift:156 — prototype/App/PeripheralBatterySource.swift:156-158 | tools/probes/WheelAssociationProbe.swift:60-65 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) prototype/App/Thumbnail.swift:31 — prototype/App/Thumbnail.swift:31-33 | prototype/Overlay/ShadeStrip.swift:143-145 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) prototype/Core/WindowSwitcherSearch.swift:15 — prototype/Core/WindowSwitcherSearch.swift:15-17 | prototype/WindowBrowser/WindowBrowserModels.swift:362-366 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:9 — tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:9-11 | tools/archive/design-qa-batch23-29/PrivacyPageCompositionPreview.swift:9-11 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) tools/probes/companion-pairing/pair-setup-interop.py:81 — tools/probes/companion-pairing/pair-setup-interop.py:81-84 | tools/probes/remote-device/handshake-interop.py:37-39 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×9
  • Edited copy of a member (13 corresponding lines) prototype/Core/ExplainerScenes+Browser.swift:54 — prototype/Core/ExplainerScenes+Browser.swift:54-66 | prototype/Core/ExplainerScenes+Common.swift:276-290 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) prototype/App/WS2GameControllerBridge.swift:100 — prototype/App/WS2GameControllerBridge.swift:100-115 | prototype/App/WS2GamepadDesktopControl.swift:118-130 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) prototype/Capture/PreviewRenderer.swift:346 — prototype/Capture/PreviewRenderer.swift:346-367 | prototype/Capture/WindowSnapshot.swift:63-75 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) prototype/App/GestureProbe.swift:2434 — prototype/App/GestureProbe.swift:2434-2447 | prototype/App/GestureProbe.swift:2486-2498 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) prototype/App/CollapseAppearanceSettings.swift:84 — prototype/App/CollapseAppearanceSettings.swift:84-96 | prototype/App/Preferences.swift:957-976 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) prototype/App/ArrangeController.swift:134 — prototype/App/ArrangeController.swift:134-146 | prototype/App/ArrangeController.swift:148-160 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) prototype/Support/WS2ProcessChannel.swift:38 — prototype/Support/WS2ProcessChannel.swift:38-50 | prototype/Support/WS2UnixSocket.swift:125-138 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) prototype/App/LaunchpadFolders.swift:760 — prototype/App/LaunchpadFolders.swift:760-772 | prototype/App/LaunchpadView.swift:1210-1224 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) prototype/App/SilentCoverProbe.swift:121 — prototype/App/SilentCoverProbe.swift:121-133 | prototype/App/SilentMilestoneProbe.swift:567-579 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×9
  • Edited copy of a member (8 corresponding lines) prototype/Support/WS2CompanionChannel.swift:211 — prototype/Support/WS2CompanionChannel.swift:211-218 | tools/probes/remote-device/Handshake.swift:184-191 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) prototype/App/SlideOverChrome.swift:348 — prototype/App/SlideOverChrome.swift:348-360 | prototype/App/SplitView.swift:865-872 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) prototype/App/MacVoiceTranscriber.swift:43 — prototype/App/MacVoiceTranscriber.swift:43-51 | prototype/App/SpeechVoiceprintCapture.swift:95-102 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) prototype/Core/HabitRules.swift:1151 — prototype/Core/HabitRules.swift:1151-1162 | prototype/Core/HabitRules.swift:1198-1205 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) prototype/App/NotchLevelControl.swift:366 — prototype/App/NotchLevelControl.swift:366-373 | prototype/App/NotchLevelObserver.swift:520-531 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) prototype/App/VoiceprintKeychainStore.swift:14 — prototype/App/VoiceprintKeychainStore.swift:14-21 | prototype/Support/WS2KeychainPeerStorage.swift:14-21 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) prototype/App/AirPodsBatterySource.swift:167 — prototype/App/AirPodsBatterySource.swift:167-174 | prototype/App/NotchLevelObserver.swift:414-423 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) prototype/App/WS2InputSettingsPane.swift:261 — prototype/App/WS2InputSettingsPane.swift:261-270 | prototype/App/WS2ConductorSettings.swift:157-164 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) prototype/WindowBrowser/DockHoverObserver.swift:366 — prototype/WindowBrowser/DockHoverObserver.swift:366-374 | prototype/WindowBrowser/DockHoverProbe.swift:256-263 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×9
  • Duplicated block (12 lines × 2) prototype/App/FaceCalibrationRecorder.swift:310 — prototype/App/FaceCalibrationRecorder.swift:310-321 | prototype/App/FaceEnrollmentHost.swift:84-95 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/FaceCalibrationRecorder.swift:310` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) prototype/Effects/WindowFoldEffects.swift:368 — prototype/Effects/WindowFoldEffects.swift:368-379 | prototype/Effects/WindowFoldEffects.swift:591-602 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/Effects/WindowFoldEffects.swift:368` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `prototype/Effects/WindowFoldEffects.swift:367` calls `FoldTransition` and `prototype/Effects/WindowFoldEffects.swift:590` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 2) prototype/Overlay/GlancePanel.swift:315 — prototype/Overlay/GlancePanel.swift:315-326 | prototype/Overlay/GlancePanel.swift:363-374 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) prototype/Overlay/GlancePanel.swift:403 — prototype/Overlay/GlancePanel.swift:403-414 | prototype/Overlay/GlancePanel.swift:435-446 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/Overlay/GlancePanel.swift:403` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) prototype/Effects/SettingsShotProbe.swift:174 — prototype/Effects/SettingsShotProbe.swift:174-185 | prototype/WindowBrowser/WindowBrowserShotProbe.swift:370-381 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/Effects/SettingsShotProbe.swift:174` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) prototype/App/Preferences.swift:780 — prototype/App/Preferences.swift:780-791 | prototype/Effects/DuoSettingsWindow.swift:739-750 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/Preferences.swift:780` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) tools/lid-report-probe/LidReportProbe.swift:30 — tools/lid-report-probe/LidReportProbe.swift:30-41 | tools/lid-trace/LidTraceRecorder.swift:13-24 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `tools/lid-report-probe/LidReportProbe.swift:30` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) tools/archive/design-qa-batch23-29/FeedbackPreview.swift:451 — tools/archive/design-qa-batch23-29/FeedbackPreview.swift:451-462 | tools/archive/design-qa-batch23-29/OwnedPhasePreview.swift:452-463 — before extracting anything, compare `tools/archive/design-qa-batch23-29/FeedbackPreview.swift` and `tools/archive/design-qa-batch23-29/OwnedPhasePreview.swift` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 464 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) tools/archive/design-qa-batch23-29/check-notch-motion-preview.py:91 — tools/archive/design-qa-batch23-29/check-notch-motion-preview.py:91-102 | tools/archive/design-qa-batch23-29/check-progress-quantity-preview.py:242-253 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×9
  • Duplicated block (5 lines × 3) prototype/App/Preferences.swift:990 — prototype/App/Preferences.swift:990-994 | prototype/Effects/DuoSettingsWindow.swift:687-691 | prototype/Effects/DuoSettingsWindow.swift:785-789 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `prototype/Effects/DuoSettingsWindow.swift:692` calls `NSEdgeInsets` and `prototype/Effects/DuoSettingsWindow.swift:790` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 3) prototype/App/SilentMilestoneProbe.swift:407 — prototype/App/SilentMilestoneProbe.swift:407-411 | prototype/App/SilentMilestoneProbe.swift:427-433 | prototype/App/SilentMilestoneProbe.swift:449-453 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/SilentMilestoneProbe.swift:407` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) prototype/Effects/FoldRenderer.swift:442 — prototype/Effects/FoldRenderer.swift:442-446 | prototype/Effects/FoldRenderer.swift:461-465 | prototype/Effects/FoldRenderer.swift:471-475 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `prototype/Effects/FoldRenderer.swift:459` calls `setFragmentTexture` and `prototype/Effects/FoldRenderer.swift:441` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 3) prototype/WindowBrowser/DockHoverProbe.swift:935 — prototype/WindowBrowser/DockHoverProbe.swift:935-939 | prototype/WindowBrowser/DockHoverProbe.swift:953-957 | prototype/WindowBrowser/DockHoverProbe.swift:983-987 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/WindowBrowser/DockHoverProbe.swift:935` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) tools/archive/design-qa-batch23-29/FeedbackPreview.swift:510 — tools/archive/design-qa-batch23-29/FeedbackPreview.swift:510-514 | tools/archive/design-qa-batch23-29/MediaFeedbackPreview.swift:10-14 | tools/archive/design-qa-batch23-29/MediaSurfacePreview.swift:10-14 — before extracting anything, compare `tools/archive/design-qa-batch23-29/FeedbackPreview.swift` and `tools/archive/design-qa-batch23-29/MediaFeedbackPreview.swift` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tools/archive/design-qa-batch23-29/FeedbackPreview.swift:510` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) tools/archive/design-qa-batch23-29/WelcomeStatePreview.swift:6 — tools/archive/design-qa-batch23-29/WelcomeStatePreview.swift:6-10 | tools/archive/design-qa-batch23-29/WindowBrowserGridTitlePreview.swift:5-9 | tools/archive/design-qa-batch23-29/WindowBrowserStatePreview.swift:11-15 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `tools/archive/design-qa-batch23-29/WelcomeStatePreview.swift:6` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:115 — tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:115-119 | tools/archive/design-qa-batch23-29/NotchMotionPreview.swift:12-16 | tools/archive/design-qa-batch23-29/NotchRetargetPreview.swift:15-19 — before extracting anything, compare `tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift` and `tools/archive/design-qa-batch23-29/NotchRetargetPreview.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 219 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) tools/archive/design-qa-batch23-29/CalendarCardPreview.swift:36 — tools/archive/design-qa-batch23-29/CalendarCardPreview.swift:36-40 | tools/archive/design-qa-batch23-29/CountdownTimerCardPreview.swift:37-41 | tools/archive/design-qa-batch23-29/FocusTimerCardPreview.swift:40-44 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `tools/archive/design-qa-batch23-29/CalendarCardPreview.swift:36` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) tools/archive/design-qa-batch23-29/FeedbackPreview.swift:605 — tools/archive/design-qa-batch23-29/FeedbackPreview.swift:605-609 | tools/archive/design-qa-batch23-29/MediaFeedbackPreview.swift:105-109 | tools/archive/design-qa-batch23-29/MediaSurfacePreview.swift:85-89 — before extracting anything, compare `tools/archive/design-qa-batch23-29/FeedbackPreview.swift` and `tools/archive/design-qa-batch23-29/MediaFeedbackPreview.swift` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tools/archive/design-qa-batch23-29/FeedbackPreview.swift:605` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×7
  • Edited copy of a member (16 corresponding lines) prototype/App/WS2GameControllerBridge.swift:51 — prototype/App/WS2GameControllerBridge.swift:51-66 | prototype/App/WS2GamepadDesktopControl.swift:81-103 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) prototype/App/GapProbesSupport.swift:77 — prototype/App/GapProbesSupport.swift:77-92 | prototype/App/GestureProbe.swift:1042-1058 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) prototype/App/NowPlayingStream.swift:232 — prototype/App/NowPlayingStream.swift:232-251 | prototype/App/NowPlayingStream.swift:257-272 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) prototype/App/BuiltInCurtain.swift:30 — prototype/App/BuiltInCurtain.swift:30-45 | prototype/WindowBrowser/WindowBrowserController.swift:2619-2639 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) prototype/WindowBrowser/WindowBrowserController.swift:3199 — prototype/WindowBrowser/WindowBrowserController.swift:3199-3214 | prototype/WindowBrowser/WindowBrowserController.swift:3307-3325 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) prototype/App/HabitKeys.swift:154 — prototype/App/HabitKeys.swift:154-169 | prototype/App/MissionControlKeys.swift:127-142 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) tools/probes/companion-pairing/WS2NativeSRPPrimitive.swift:31 — tools/probes/companion-pairing/WS2NativeSRPPrimitive.swift:31-46 | tools/probes/companion-pairing/WS2NativeSRPPrimitive.swift:47-66 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×7
  • Edited copy of a member (12 corresponding lines) prototype/Core/PrivateAppList.swift:44 — prototype/Core/PrivateAppList.swift:44-56 | prototype/Core/PrivateAppList.swift:59-70 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) prototype/App/WS2GameControllerBridge.swift:116 — prototype/App/WS2GameControllerBridge.swift:116-127 | prototype/App/WS2GamepadDesktopControl.swift:147-159 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) prototype/PinnedPreview.swift:494 — prototype/PinnedPreview.swift:494-506 | prototype/WindowBrowser/WindowBrowserNewWindow.swift:128-139 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) prototype/App/LaunchpadFolders.swift:681 — prototype/App/LaunchpadFolders.swift:681-693 | prototype/App/LaunchpadView.swift:752-763 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) prototype/WindowBrowser/WindowThumbnailService.swift:382 — prototype/WindowBrowser/WindowThumbnailService.swift:382-393 | prototype/WindowBrowser/WindowThumbnailService.swift:397-408 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) prototype/App/DownloadActivitySource.swift:53 — prototype/App/DownloadActivitySource.swift:53-64 | prototype/App/ScrollStripRun.swift:1382-1393 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) prototype/App/CarPlaySurface.swift:160 — prototype/App/CarPlaySurface.swift:160-172 | prototype/App/CarPlaySurface.swift:232-243 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×7
  • Duplicated block (10 lines × 2) prototype/App/NowPlayingStream.swift:242 — prototype/App/NowPlayingStream.swift:242-251 | prototype/App/NowPlayingStream.swift:263-272 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/NowPlayingStream.swift:242` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) prototype/App/Thumbnail.swift:107 — prototype/App/Thumbnail.swift:107-116 | prototype/Overlay/PaperSurfaceStyle.swift:85-94 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/Thumbnail.swift:107` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10 lines × 2) prototype/WindowBrowser/WindowBrowserCardView.swift:434 — prototype/WindowBrowser/WindowBrowserCardView.swift:434-443 | prototype/WindowBrowser/WindowBrowserListRowView.swift:280-289 — before extracting anything, compare `prototype/WindowBrowser/WindowBrowserCardView.swift` and `prototype/WindowBrowser/WindowBrowserListRowView.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) prototype/App/GapProbesFoldDesktops.swift:24 — prototype/App/GapProbesFoldDesktops.swift:24-33 | prototype/App/GapProbesSecondDisplayDesktops.swift:53-62 — before extracting anything, compare `prototype/App/GapProbesFoldDesktops.swift` and `prototype/App/GapProbesSecondDisplayDesktops.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/GapProbesFoldDesktops.swift:24` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) prototype/App/LaunchpadFolders.swift:182 — prototype/App/LaunchpadFolders.swift:182-191 | prototype/App/LaunchpadView.swift:472-481 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/LaunchpadFolders.swift:182` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) prototype/App/GapProbesFoldDesktops.swift:50 — prototype/App/GapProbesFoldDesktops.swift:50-59 | prototype/App/GapProbesSecondDisplayDesktops.swift:78-87 — before extracting anything, compare `prototype/App/GapProbesFoldDesktops.swift` and `prototype/App/GapProbesSecondDisplayDesktops.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/GapProbesFoldDesktops.swift:50` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) prototype/App/OverlayFactory.swift:64 — prototype/App/OverlayFactory.swift:64-73 | prototype/App/OverlayFactory.swift:96-105 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×6
  • Edited copy of a member (15 corresponding lines) prototype/WindowBrowser/WindowBrowserActionPresentation.swift:139 — prototype/WindowBrowser/WindowBrowserActionPresentation.swift:139-164 | prototype/WindowBrowser/WindowBrowserActionPresentation.swift:308-322 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) prototype/App/HabitContext.swift:1415 — prototype/App/HabitContext.swift:1415-1429 | prototype/WindowBrowser/WindowBrowserSettings.swift:187-212 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) prototype/App/WS2CodexApprovalHost.swift:406 — prototype/App/WS2CodexApprovalHost.swift:406-420 | prototype/App/WS2HookApprovalHost.swift:348-364 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) prototype/Support/WS2ProcessChannel.swift:74 — prototype/Support/WS2ProcessChannel.swift:74-88 | prototype/Support/WS2UnixSocket.swift:155-169 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) prototype/App/FaceObservationSource.swift:493 — prototype/App/FaceObservationSource.swift:493-507 | prototype/App/FaceObservationSource.swift:513-527 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) prototype/App/CarPlaySurface.swift:418 — prototype/App/CarPlaySurface.swift:418-432 | prototype/App/Launchpad.swift:167-181 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×6
  • Edited copy of a member (14 corresponding lines) prototype/App/DockScenariosProbe.swift:266 — prototype/App/DockScenariosProbe.swift:266-280 | prototype/App/DockSwipeProbe.swift:95-108 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) prototype/Effects/SettingsShotProbe.swift:174 — prototype/Effects/SettingsShotProbe.swift:174-187 | prototype/WindowBrowser/WindowBrowserShotProbe.swift:370-383 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) prototype/App/WS2ConductorPage.swift:980 — prototype/App/WS2ConductorPage.swift:980-996 | prototype/App/WS2ModelPickerView.swift:183-196 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) prototype/App/FaceTemplateKeychainStore.swift:59 — prototype/App/FaceTemplateKeychainStore.swift:59-73 | prototype/App/FaceThresholdCalibrationStore.swift:38-51 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) prototype/App/FoldTransaction.swift:427 — prototype/App/FoldTransaction.swift:427-441 | prototype/Window/AXWindow.swift:126-139 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) tools/lid-report-probe/LidReportProbe.swift:30 — tools/lid-report-probe/LidReportProbe.swift:30-43 | tools/lid-trace/LidTraceRecorder.swift:13-26 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (1 corresponding lines) · ×6
  • Edited copy of a member (1 corresponding lines) prototype/App/CountdownTimerHost.swift:69 — prototype/App/CountdownTimerHost.swift:69-69 | prototype/Core/CalendarPresentation.swift:116-116 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (1 corresponding lines) prototype/Core/ExplainerScenes+Common.swift:21 — prototype/Core/ExplainerScenes+Common.swift:21-21 | prototype/Core/ExplainerScenes+Shortcuts.swift:127-127 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (1 corresponding lines) prototype/App/DockSwipe.swift:35 — prototype/App/DockSwipe.swift:35-35 | prototype/App/TrackpadGestures.swift:144-144 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (1 corresponding lines) prototype/App/WS2RemoteEffects.swift:275 — prototype/App/WS2RemoteEffects.swift:275-277 | prototype/App/WS2RemoteHost.swift:934-934 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (1 corresponding lines) tools/continuity-probe/ContinuityProbe.swift:61 — tools/continuity-probe/ContinuityProbe.swift:61-61 | tools/probes/BLEReadProbe.swift:35-37 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (1 corresponding lines) tools/probes/companion-pairing/PairSetupProbe.swift:13 — tools/probes/companion-pairing/PairSetupProbe.swift:13-13 | tools/probes/companion-pairing/SRPProbe.swift:16-16 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×6
  • Duplicated block (11 lines × 2) prototype/App/FinderAliasProbe.swift:23 — prototype/App/FinderAliasProbe.swift:23-33 | prototype/App/FinderColumnsProbe.swift:15-25 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11 lines × 2) prototype/App/OverlayFactory.swift:46 — prototype/App/OverlayFactory.swift:46-56 | prototype/App/OverlayFactory.swift:150-160 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) prototype/App/WS2ConductorSettings.swift:5 — prototype/App/WS2ConductorSettings.swift:5-15 | prototype/App/WS2InputSettingsPane.swift:296-306 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/WS2ConductorSettings.swift:5` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) prototype/Core/NotchActivities.swift:158 — prototype/Core/NotchActivities.swift:158-168 | prototype/Core/NotchActivities.swift:204-214 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/Core/NotchActivities.swift:158` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) prototype/WindowBrowser/WindowPlacement.swift:290 — prototype/WindowBrowser/WindowPlacement.swift:290-300 | prototype/WindowBrowser/WindowPlacement.swift:335-345 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/WindowBrowser/WindowPlacement.swift:290` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) tools/archive/design-qa-batch23-29/SettingsShadeLanguagePreview.swift:173 — tools/archive/design-qa-batch23-29/SettingsShadeLanguagePreview.swift:173-183 | tools/archive/design-qa-batch23-29/SilentPageLanguagePreview.swift:73-83 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `tools/archive/design-qa-batch23-29/SettingsShadeLanguagePreview.swift:173` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `tools/archive/design-qa-batch23-29/SettingsShadeLanguagePreview.swift:172` calls `systemState` and `tools/archive/design-qa-batch23-29/SilentPageLanguagePreview.swift:72` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×6
  • Duplicated block (7 lines × 3) prototype/App/FoldExit.swift:34 — prototype/App/FoldExit.swift:34-40 | prototype/App/FoldExit.swift:146-152 | prototype/App/FoldExit.swift:176-182 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `prototype/App/FoldExit.swift:153` calls `removeValue` and `prototype/App/FoldExit.swift:41` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 3) prototype/App/PreferencesViews.swift:291 — prototype/App/PreferencesViews.swift:291-297 | prototype/App/WS2ConductorSettings.swift:11-17 | prototype/App/WS2InputSettingsPane.swift:302-308 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
  • Duplicated block (7 lines × 3) prototype/App/SLSOffscreenCheckProbe.swift:206 — prototype/App/SLSOffscreenCheckProbe.swift:206-212 | prototype/App/SilentCoverProbe.swift:113-119 | prototype/App/SilentMilestoneProbe.swift:559-565 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `prototype/App/SilentMilestoneProbe.swift:568` calls `hostCleanup` and `prototype/App/SilentCoverProbe.swift:122` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 3) prototype/App/WS2ConductorSettings.swift:176 — prototype/App/WS2ConductorSettings.swift:176-182 | prototype/Effects/DuoSettingsWindow.swift:786-792 | prototype/Effects/DuoSettingsWindow.swift:808-814 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/WS2ConductorSettings.swift:176` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 3) prototype/Capture/PreviewRenderer.swift:96 — prototype/Capture/PreviewRenderer.swift:96-102 | prototype/Capture/PreviewRenderer.swift:277-283 | prototype/Capture/PreviewRenderer.swift:313-319 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 3) tools/archive/design-qa-batch23-29/MergedRowPreview.swift:65 — tools/archive/design-qa-batch23-29/MergedRowPreview.swift:65-71 | tools/archive/design-qa-batch23-29/ProgressQuantityPreview.swift:65-71 | tools/archive/design-qa-batch23-29/UsageQuantityPreview.swift:86-92 — before extracting anything, compare `tools/archive/design-qa-batch23-29/MergedRowPreview.swift` and `tools/archive/design-qa-batch23-29/ProgressQuantityPreview.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tools/archive/design-qa-batch23-29/MergedRowPreview.swift:65` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D35 · Change Coupling · Change coupling · ×5
  • Change coupling: WindowBrowserController.swift ↔ WindowBrowserViews.swift prototype/WindowBrowser/WindowBrowserController.swift:1 — `prototype/WindowBrowser/WindowBrowserController.swift` and `prototype/WindowBrowser/WindowBrowserViews.swift` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `df35605a` test(probes): 權限卡片可截圖驗外觀;卡片綠燈那條路量過、不成立,已回退; `41af1f2d` Delete 620 lines of code nothing can reach; `ab3a34fd` Cut idle wakeups and redundant WindowServer work; finish two 1.0.14 r… — run `git show` on any of them.
  • Change coupling: WS2InputSettingsPane.swift ↔ DuoSettingsWindow.swift prototype/App/WS2InputSettingsPane.swift:1 — `prototype/App/WS2InputSettingsPane.swift` and `prototype/Effects/DuoSettingsWindow.swift` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — 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 `7193755a` feat(settings): 新开「手势」页,十条手势设置按四组放到一处(规格 R16); `3a7c0ea1` fix(settings): ⓘ 钉法收进行容器 + 老构建器清零 + Remote 子行去缩进(第38批); `335cf1c7` fix(settings): 行容器统一 + ⓘ 贴控件成列 + 侧栏两节图标 + 文案收尾(第37批) — run `git show` on any of them.
  • Change coupling: EventTap.swift ↔ Preferences.swift prototype/App/EventTap.swift:1 — `prototype/App/EventTap.swift` and `prototype/App/Preferences.swift` change together 56% of the time (9 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `636b24e7` feat(features): 功能目录、安装默认与第一批总闸; `33f795b1` feat(titlebar): 标题栏双击在后台判定,主线程卡住也不漏给系统;设置可选「照系统设置」(增补第 15 步,拍板 10-29 …; `1ff6ac8f` feat(arrange): 排布历史——状态栏菜单「整理▸撤销〈最近一步〉」(乙17,拍板第 20 条) — run `git show` on any of them.
  • Change coupling: Preferences.swift ↔ WS2InputSettingsPane.swift prototype/App/Preferences.swift:1 — `prototype/App/Preferences.swift` and `prototype/App/WS2InputSettingsPane.swift` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `5ee86ce6` fix(设置): 移出平滑滚动、鼠标滚动方向、三指/四指轻点四个做不到的开关; `7193755a` feat(settings): 新开「手势」页,十条手势设置按四组放到一处(规格 R16); `3a7c0ea1` fix(settings): ⓘ 钉法收进行容器 + 老构建器清零 + Remote 子行去缩进(第38批) — run `git show` on any of them.
  • Change coupling: WS2ConductorSettings.swift ↔ DuoSettingsWindow.swift prototype/App/WS2ConductorSettings.swift:1 — `prototype/App/WS2ConductorSettings.swift` and `prototype/Effects/DuoSettingsWindow.swift` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `3a7c0ea1` fix(settings): ⓘ 钉法收进行容器 + 老构建器清零 + Remote 子行去缩进(第38批); `335cf1c7` fix(settings): 行容器统一 + ⓘ 贴控件成列 + 侧栏两节图标 + 文案收尾(第37批); `6d33a691` feat(settings): 第36批打磨——图标补齐、行间距、文案通俗化 — run `git show` on any of them.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×5
  • Edited copy of a member (21 corresponding lines) prototype/App/StatusBarIcon.swift:5 — prototype/App/StatusBarIcon.swift:5-34 | prototype/Watchdog/GuardIcon.swift:7-27 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) prototype/Core/ExplainerScenes+Common.swift:56 — prototype/Core/ExplainerScenes+Common.swift:56-76 | prototype/Core/ExplainerScenes+Common.swift:249-273 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) prototype/App/WS2ConductorPage.swift:464 — prototype/App/WS2ConductorPage.swift:464-490 | prototype/App/WS2ModelPickerView.swift:138-158 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) prototype/App/NotchSpaceGate.swift:117 — prototype/App/NotchSpaceGate.swift:117-137 | prototype/App/SystemQuietState.swift:79-99 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) tools/probes/remote-device/handshake-interop.py:58 — tools/probes/remote-device/handshake-interop.py:58-78 | tools/probes/remote-device/socket-interop.py:54-74 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×5
  • Members sharing a duplicated core (4 members, 50+ identical tokens) prototype/App/NotchSpaceGate.swift:50 — prototype/App/NotchSpaceGate.swift:50-58 | prototype/Core/PiPLayout.swift:117-141 | prototype/WindowBrowser/WindowBrowserGeometry.swift:718-727 | prototype/WindowBrowser/WindowPlacement.swift:157-169 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) prototype/App/PreferencesViews.swift:282 — prototype/App/PreferencesViews.swift:282-299 | prototype/App/WS2ConductorSettings.swift:4-97 | prototype/App/WS2InputSettingsPane.swift:295-310 | prototype/App/WhatsNew1018.swift:32-56 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) prototype/WindowBrowser/DockHoverProbe.swift:403 — prototype/WindowBrowser/DockHoverProbe.swift:403-426 | prototype/WindowBrowser/DockHoverProbe.swift:430-445 | prototype/WindowBrowser/DockHoverProbe.swift:712-731 | prototype/WindowBrowser/DockHoverProbe.swift:793-832 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) tools/archive/design-qa-batch23-29/CalendarCardPreview.swift:5 — tools/archive/design-qa-batch23-29/CalendarCardPreview.swift:5-49 | tools/archive/design-qa-batch23-29/ConductorSurfacePreview.swift:40-63 | tools/archive/design-qa-batch23-29/CountdownTimerCardPreview.swift:5-50 | tools/archive/design-qa-batch23-29/FocusTimerCardPreview.swift:7-53 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) tools/archive/design-qa-batch23-29/MergedRowPreview.swift:7 — tools/archive/design-qa-batch23-29/MergedRowPreview.swift:7-95 | tools/archive/design-qa-batch23-29/PowerEarPreview.swift:6-70 | tools/archive/design-qa-batch23-29/ProgressQuantityPreview.swift:12-118 | tools/archive/design-qa-batch23-29/UsageQuantityPreview.swift:12-139 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×5
  • Edited copy of a member (19 corresponding lines) prototype/App/FaceCalibrationRecorder.swift:81 — prototype/App/FaceCalibrationRecorder.swift:81-99 | tools/probes/FaceFeaturePrintProbe.swift:79-103 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) prototype/Core/ExplainerScenes+Common.swift:79 — prototype/Core/ExplainerScenes+Common.swift:79-97 | prototype/Core/ExplainerScenes+Common.swift:100-118 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) prototype/WindowBrowser/DockHoverObserver.swift:565 — prototype/WindowBrowser/DockHoverObserver.swift:565-584 | prototype/WindowBrowser/DockHoverProbe.swift:226-244 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) tools/probes/remote-device/RemoteDeviceProbe.swift:229 — tools/probes/remote-device/RemoteDeviceProbe.swift:229-247 | tools/probes/remote-device/RemoteDeviceProbe.swift:248-266 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) tools/probes/FaceFeaturePrintProbe.swift:106 — tools/probes/FaceFeaturePrintProbe.swift:106-126 | tools/probes/head-motion-crosscheck/HeadMotionCrossCheckProbe.swift:37-55 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) · ×5
  • Edited copies of one member (3 members, 4+ corresponding lines) prototype/Core/NotchIslandGeometry.swift:25 — prototype/Core/NotchIslandGeometry.swift:25-29 | prototype/Core/WindowProxyMotion.swift:220-223 | prototype/WindowShade.swift:71-76 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 4+ corresponding lines) prototype/Core/CodexWire.swift:98 — prototype/Core/CodexWire.swift:98-101 | prototype/Core/CodexWire.swift:102-105 | prototype/Core/CodexWire.swift:106-109 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 4+ corresponding lines) prototype/App/PictureInPictureViews.swift:285 — prototype/App/PictureInPictureViews.swift:285-288 | prototype/App/SlideOver.swift:1298-1301 | prototype/App/SlideOverDropHint.swift:133-136 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 4+ corresponding lines) prototype/App/SilentMilestoneProbe.swift:521 — prototype/App/SilentMilestoneProbe.swift:521-524 | prototype/WindowBrowser/DockHoverObserver.swift:596-600 | prototype/WindowBrowser/DockHoverProbe.swift:275-279 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 4+ corresponding lines) prototype/App/Notch/NotchPanel.swift:759 — prototype/App/Notch/NotchPanel.swift:759-762 | prototype/App/NotchAuthentication.swift:271-274 | prototype/App/WS2RemoteHost.swift:1295-1298 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×4
  • Duplicated block (15 lines × 2) prototype/Overlay/PreviewSurfaces.swift:18 — prototype/Overlay/PreviewSurfaces.swift:18-32 | prototype/PinnedPreviewPanel.swift:182-196 — before extracting anything, compare `prototype/Overlay/PreviewSurfaces.swift` and `prototype/PinnedPreviewPanel.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) prototype/Effects/SettingsShotProbe.swift:191 — prototype/Effects/SettingsShotProbe.swift:191-205 | prototype/WindowBrowser/WindowBrowserShotProbe.swift:386-400 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) prototype/App/GapProbesFoldDesktops.swift:69 — prototype/App/GapProbesFoldDesktops.swift:69-83 | prototype/App/GapProbesSecondDisplayDesktops.swift:94-108 — before extracting anything, compare `prototype/App/GapProbesFoldDesktops.swift` and `prototype/App/GapProbesSecondDisplayDesktops.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `prototype/App/GapProbesFoldDesktops.swift:84` calls `currentSpace` and `prototype/App/GapProbesSecondDisplayDesktops.swift:109` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (15 lines × 2) prototype/App/BystanderTuck.swift:31 — prototype/App/BystanderTuck.swift:31-45 | prototype/App/PresenceLockDriver.swift:42-56 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `prototype/App/BystanderTuck.swift:46` calls `announce` and `prototype/App/PresenceLockDriver.swift:57` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×4
  • Duplicated block (9–10 lines × 2) prototype/App/FoldTransaction.swift:428 — prototype/App/FoldTransaction.swift:428-437 | prototype/Window/AXWindow.swift:127-135 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/FoldTransaction.swift:428` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9–10 lines × 2) prototype/App/GapProbesFoldDesktops.swift:11 — prototype/App/GapProbesFoldDesktops.swift:11-20 | prototype/App/GapProbesSlideOver.swift:139-147 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9–10 lines × 2) prototype/App/WS2ConductorPage.swift:987 — prototype/App/WS2ConductorPage.swift:987-996 | prototype/App/WS2ModelPickerView.swift:188-196 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/WS2ConductorPage.swift:987` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9–10 lines × 2) tools/archive/design-qa-batch23-29/CountdownTimerCardPreview.swift:20 — tools/archive/design-qa-batch23-29/CountdownTimerCardPreview.swift:20-28 | tools/archive/design-qa-batch23-29/FocusTimerCardPreview.swift:22-31 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×4
  • Duplicated block (5 lines × 4) prototype/App/CollapseAppearanceSettings.swift:88 — prototype/App/CollapseAppearanceSettings.swift:88-92 | prototype/App/Preferences.swift:990-994 | prototype/App/UpdaterSettings.swift:104-108 | prototype/Effects/DuoSettingsWindow.swift:687-691 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `control` to `NSView` in one and `NSControl` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `prototype/Effects/DuoSettingsWindow.swift:682` calls `tag`, `makeRow` and `prototype/App/CollapseAppearanceSettings.swift:87` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 4) prototype/WindowBrowser/DockHoverProbe.swift:409 — prototype/WindowBrowser/DockHoverProbe.swift:409-413 | prototype/WindowBrowser/DockHoverProbe.swift:432-436 | prototype/WindowBrowser/DockHoverProbe.swift:718-722 | prototype/WindowBrowser/DockHoverProbe.swift:804-808 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/WindowBrowser/DockHoverProbe.swift:409` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `prototype/WindowBrowser/DockHoverProbe.swift:416` calls `center` and `prototype/WindowBrowser/DockHoverProbe.swift:439` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 4) tools/archive/design-qa-batch23-29/FeedbackPreview.swift:264 — tools/archive/design-qa-batch23-29/FeedbackPreview.swift:264-268 | tools/archive/design-qa-batch23-29/FeedbackPreview.swift:296-300 | tools/archive/design-qa-batch23-29/OwnedPhasePreview.swift:265-269 | tools/archive/design-qa-batch23-29/OwnedPhasePreview.swift:297-301 — before extracting anything, compare `tools/archive/design-qa-batch23-29/FeedbackPreview.swift` and `tools/archive/design-qa-batch23-29/OwnedPhasePreview.swift` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 464 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 4) tools/archive/design-qa-batch23-29/CalendarCardPreview.swift:30 — tools/archive/design-qa-batch23-29/CalendarCardPreview.swift:30-34 | tools/archive/design-qa-batch23-29/ConductorSurfacePreview.swift:50-54 | tools/archive/design-qa-batch23-29/CountdownTimerCardPreview.swift:31-35 | tools/archive/design-qa-batch23-29/FocusTimerCardPreview.swift:34-38 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
D15 · Churn × Complexity Hotspots · Repeated repair · ×3
  • Repeated repair: prototype/App/OverlayPresentation.swift prototype/App/OverlayPresentation.swift:163 — prototype/App/OverlayPresentation.swift changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is AppDelegate.enforceOverlaySpaceInvariant at line 163), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — 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: “fix(native-feel): 彈簧收口、玻璃分層、Dock 綠燈叫系統選單、縫認系統半屏”; “fix(stage-manager): 三处台前调度边界——跨桌面收起、不可最小化换边、副屏卷帘条被挪”; “fix(stage-manager): 台前调度开着时让位换边、兄弟窗不再冒回来、卷帘条不被系统挪位带走”; “fix(windows): 双击松开、卷帘条淡入、角落停放与死设置”. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:16:35 +08:00' --until='2026-11-16 19:16:35 +08:00' --full-history --no-merges -- prototype/App/OverlayPresentation.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: prototype/Core/FoldVerifier.swift prototype/Core/FoldVerifier.swift:129 — prototype/Core/FoldVerifier.swift changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is FoldVerifier.check at line 129), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — 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: “fix(native-feel): 彈簧收口、玻璃分層、Dock 綠燈叫系統選單、縫認系統半屏”; “fix(fold): 收起验证过期后按真实状态收尾,不再让窗口凭空消失”; “fix(fold): 台前调度把最小化做成侧条卡片时按外框认作已收起,对账不误清,展开时请回舞台(规格 R19)”; “fix(fold): 台前调度下第二扇窗最小化验证不到时多等 2.5 秒再回滚(规格 R19)”. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:16:35 +08:00' --until='2026-11-16 19:16:35 +08:00' --full-history --no-merges -- prototype/Core/FoldVerifier.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: prototype/App/PrivateAppListSettings.swift prototype/App/PrivateAppListSettings.swift:120 — prototype/App/PrivateAppListSettings.swift changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is PrivateAppListPanel.reload at line 120), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — 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: “fix(本地化): 把写死的简体界面文字接进 WSL10n(12 处,新增 3 个键,复用 11 个)”; “fix(appkit): isFlipped 改为 nonisolated,修欢迎窗口双击闪退”; “fix(settings): 设置面板复核——两处真缺陷 + 一类隐患”. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:16:35 +08:00' --until='2026-11-16 19:16:35 +08:00' --full-history --no-merges -- prototype/App/PrivateAppListSettings.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D4 · Code Duplication · Edited copy of a member (22 corresponding lines) · ×3
  • Edited copy of a member (22 corresponding lines) prototype/App/BystanderTuck.swift:26 — prototype/App/BystanderTuck.swift:26-48 | prototype/App/PresenceLockDriver.swift:37-58 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) prototype/Core/HabitRules.swift:163 — prototype/Core/HabitRules.swift:163-184 | prototype/Core/HabitRules.swift:187-209 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) prototype/App/WS2ConductorPage.swift:352 — prototype/App/WS2ConductorPage.swift:352-373 | prototype/App/WS2ModelPickerView.swift:96-120 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 1+ corresponding lines) · ×3
  • Edited copies of one member (4 members, 1+ corresponding lines) prototype/Core/ExplainerScenes+Browser.swift:31 — prototype/Core/ExplainerScenes+Browser.swift:31-31 | prototype/Core/ExplainerScenes+Common.swift:15-15 | prototype/Core/ExplainerScenes+Notch.swift:15-15 | prototype/Core/ExplainerScenes+Shade.swift:38-38 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 1 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 1+ corresponding lines) prototype/App/ScrollStripPeek.swift:355 — prototype/App/ScrollStripPeek.swift:355-357 | prototype/App/TrackpadGestureSupport.swift:39-41 | prototype/App/TrackpadGestures.swift:1431-1431 | prototype/Window/AXWindow.swift:174-176 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 1 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 1+ corresponding lines) tools/archive/design-qa-batch23-29/MergedRowPreview.swift:6 — tools/archive/design-qa-batch23-29/MergedRowPreview.swift:6-6 | tools/archive/design-qa-batch23-29/ProgressQuantityPreview.swift:11-11 | tools/archive/design-qa-batch23-29/UsageQuantityPreview.swift:11-11 | tools/archive/design-qa-batch23-29/WindowBrowserStatePreview.swift:8-10 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 1 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×3
  • Duplicated block (7–8 lines × 2) prototype/App/Notch/NotchShoulders.swift:36 — prototype/App/Notch/NotchShoulders.swift:36-42 | prototype/WindowBrowser/WindowPlacement.swift:376-383 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/Notch/NotchShoulders.swift:36` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7–8 lines × 2) prototype/PinnedPreview.swift:329 — prototype/PinnedPreview.swift:329-335 | prototype/PinnedPreview.swift:859-866 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/PinnedPreview.swift:329` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7–8 lines × 2) prototype/WindowBrowser/DockHoverProbe.swift:602 — prototype/WindowBrowser/DockHoverProbe.swift:602-609 | prototype/WindowBrowser/DockHoverProbe.swift:1170-1176 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/WindowBrowser/DockHoverProbe.swift:602` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×3
  • Duplicated block (6 lines × 4) prototype/App/PreferencesViews.swift:290 — prototype/App/PreferencesViews.swift:290-295 | prototype/App/WS2ConductorSettings.swift:10-15 | prototype/App/WS2InputSettingsPane.swift:301-306 | prototype/App/WhatsNew1018.swift:40-45 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/PreferencesViews.swift:290` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 4) prototype/main.swift:259 — prototype/main.swift:259-264 | prototype/main.swift:266-271 | prototype/main.swift:273-278 | prototype/main.swift:279-286 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/main.swift:259` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (6 lines × 4) prototype/App/NotchSpaceGate.swift:53 — prototype/App/NotchSpaceGate.swift:53-58 | prototype/Core/PiPLayout.swift:136-141 | prototype/WindowBrowser/WindowBrowserGeometry.swift:722-727 | prototype/WindowBrowser/WindowPlacement.swift:164-169 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/NotchSpaceGate.swift:53` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×3
  • Duplicated block (13 lines × 2) tools/archive/design-qa-batch23-29/FeedbackPreview.swift:464 — tools/archive/design-qa-batch23-29/FeedbackPreview.swift:464-476 | tools/archive/design-qa-batch23-29/OwnedPhasePreview.swift:465-477 — before extracting anything, compare `tools/archive/design-qa-batch23-29/FeedbackPreview.swift` and `tools/archive/design-qa-batch23-29/OwnedPhasePreview.swift` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 464 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) tools/probes/remote-device/RemoteDeviceProbe.swift:232 — tools/probes/remote-device/RemoteDeviceProbe.swift:232-244 | tools/probes/remote-device/RemoteDeviceProbe.swift:251-263 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) tools/archive/design-qa-batch23-29/FeedbackPreview.swift:574 — tools/archive/design-qa-batch23-29/FeedbackPreview.swift:574-586 | tools/archive/design-qa-batch23-29/MediaFeedbackPreview.swift:74-86 — before extracting anything, compare `tools/archive/design-qa-batch23-29/FeedbackPreview.swift` and `tools/archive/design-qa-batch23-29/MediaFeedbackPreview.swift` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tools/archive/design-qa-batch23-29/FeedbackPreview.swift:574` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D3 · God Classes · FunctionTooLong · ×2
  • FunctionTooLong: REDACTED.top-level code prototype/main.swift:4 — FunctionTooLong — top-level code runs 355 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 255 over it, 3.55× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: PreviewRenderer.swift.nativeTitleStripLooksBroken prototype/Capture/PreviewRenderer.swift:141 — FunctionTooLong — nativeTitleStripLooksBroken runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×2
  • Edited copy of a member (26 corresponding lines) prototype/Window/AXWindow.swift:231 — prototype/Window/AXWindow.swift:231-256 | prototype/Window/AXWindow.swift:258-290 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) prototype/App/FaceCalibrationRecorder.swift:310 — prototype/App/FaceCalibrationRecorder.swift:310-336 | prototype/App/FaceEnrollmentHost.swift:84-109 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×2
  • Edited copy of a member (23 corresponding lines) prototype/App/NotchActivityController.swift:364 — prototype/App/NotchActivityController.swift:364-390 | prototype/App/NotchActivityController.swift:392-414 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) prototype/App/SlideOver.swift:287 — prototype/App/SlideOver.swift:287-311 | prototype/App/SlideOver.swift:347-369 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×2
  • Edited copy of a member (17 corresponding lines) prototype/App/EventTap.swift:345 — prototype/App/EventTap.swift:345-361 | prototype/App/EventTapCallback.swift:121-137 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) prototype/App/PictureInPictureViews.swift:327 — prototype/App/PictureInPictureViews.swift:327-343 | prototype/App/SlideOverDropHint.swift:34-51 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 4+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 4+ corresponding lines) prototype/App/GestureProbe.swift:2533 — prototype/App/GestureProbe.swift:2533-2536 | prototype/App/GlanceProbe.swift:1509-1512 | prototype/Core/ArrangementHistory.swift:90-93 | prototype/Core/DisplayRefit.swift:84-87 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 4+ corresponding lines) prototype/App/WS2CodexApprovalHost.swift:56 — prototype/App/WS2CodexApprovalHost.swift:56-60 | prototype/App/WS2CodexApprovalHost.swift:61-64 | prototype/App/WS2CodexApprovalHost.swift:65-69 | prototype/App/WS2CodexApprovalHost.swift:70-74 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×2
  • Duplicated block (16 lines × 2) prototype/App/HabitKeys.swift:126 — prototype/App/HabitKeys.swift:126-141 | prototype/App/MissionControlKeys.swift:100-115 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/HabitKeys.swift:126` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) prototype/Capture/FastCapture.swift:77 — prototype/Capture/FastCapture.swift:77-92 | prototype/Capture/WindowSnapshot.swift:79-94 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×2
  • Duplicated block (14 lines × 2) prototype/App/LaunchpadUninstall.swift:235 — prototype/App/LaunchpadUninstall.swift:235-248 | prototype/App/LaunchpadUninstall.swift:280-293 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/LaunchpadUninstall.swift:235` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) tools/archive/design-qa-batch23-29/FileShelfStatePreview.swift:13 — tools/archive/design-qa-batch23-29/FileShelfStatePreview.swift:13-26 | tools/archive/design-qa-batch23-29/FileShelfSurfacePreview.swift:13-26 — before extracting anything, compare `tools/archive/design-qa-batch23-29/FileShelfStatePreview.swift` and `tools/archive/design-qa-batch23-29/FileShelfSurfacePreview.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tools/archive/design-qa-batch23-29/FileShelfStatePreview.swift:13` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×2
  • Duplicated block (10–11 lines × 2) prototype/App/Notch/NotchPanel.swift:1965 — prototype/App/Notch/NotchPanel.swift:1965-1974 | prototype/App/Notch/NotchPanel.swift:1998-2008 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/Notch/NotchPanel.swift:1965` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10–11 lines × 2) prototype/App/WindowSwitcher.swift:69 — prototype/App/WindowSwitcher.swift:69-78 | prototype/WindowShade.swift:1053-1063 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (8–10 lines × 2) · ×2
  • Duplicated block (8–10 lines × 2) prototype/App/MissionControlKeys.swift:54 — prototype/App/MissionControlKeys.swift:54-63 | prototype/App/SLSOffscreenCheckProbe.swift:185-192 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/MissionControlKeys.swift:54` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8–10 lines × 2) prototype/PinnedPreview.swift:1072 — prototype/PinnedPreview.swift:1072-1081 | prototype/PinnedPreview.swift:1114-1121 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/PinnedPreview.swift:1072` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×2
  • Duplicated block (6–7 lines × 2) prototype/App/Glance.swift:484 — prototype/App/Glance.swift:484-490 | prototype/App/Glance.swift:533-538 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `prototype/App/Glance.swift:530` calls `thumbnail` and `prototype/App/Glance.swift:481` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6–7 lines × 2) prototype/WindowBrowser/WindowBrowserCardView.swift:330 — prototype/WindowBrowser/WindowBrowserCardView.swift:330-336 | prototype/WindowBrowser/WindowBrowserSelectionDetailView.swift:111-116 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×2
  • Duplicated block (6 lines × 3) prototype/App/CountdownTimerHost.swift:123 — prototype/App/CountdownTimerHost.swift:123-128 | prototype/App/NotchLevelControl.swift:350-355 | prototype/App/WS2RemoteEffects.swift:387-392 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
  • Duplicated block (6 lines × 3) prototype/Core/SystemIslandPolicy.swift:22 — prototype/Core/SystemIslandPolicy.swift:22-27 | prototype/Effects/EffectSoakProbe.swift:283-288 | prototype/Private/MultitouchBridge.swift:99-104 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (5–6 lines × 2) · ×2
  • Duplicated block (5–6 lines × 2) prototype/App/CheckProbes1031.swift:264 — prototype/App/CheckProbes1031.swift:264-268 | prototype/App/CheckProbes1031.swift:294-299 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/CheckProbes1031.swift:264` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (5–6 lines × 2) prototype/App/WS2AppRuntime.swift:136 — prototype/App/WS2AppRuntime.swift:136-141 | prototype/App/WS2AppRuntime.swift:151-155 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/WS2AppRuntime.swift:136` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (4–5 lines × 3) · ×2
  • Duplicated block (4–5 lines × 3) prototype/App/CalendarPresenter.swift:150 — prototype/App/CalendarPresenter.swift:150-154 | prototype/App/CountdownTimerCard.swift:102-106 | prototype/App/NowPlayingCard.swift:304-307 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/CalendarPresenter.swift:150` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `alpha` to `CGFloat = 1` in one and `CGFloat = 0.92` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `prototype/App/CalendarPresenter.swift:150` calls `monospacedDigitSystemFont`, `systemFont` and `prototype/App/NowPlayingCard.swift:304` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (4–5 lines × 3) prototype/App/SlideOver.swift:278 — prototype/App/SlideOver.swift:278-282 | prototype/App/SlideOver.swift:322-325 | prototype/App/SlideOver.swift:338-342 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/SlideOver.swift:278` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×2
  • Duplicated block (12 lines × 3) tools/archive/design-qa-batch23-29/FeedbackPreview.swift:527 — tools/archive/design-qa-batch23-29/FeedbackPreview.swift:527-538 | tools/archive/design-qa-batch23-29/MediaFeedbackPreview.swift:27-38 | tools/archive/design-qa-batch23-29/MediaSurfacePreview.swift:27-38 — before extracting anything, compare `tools/archive/design-qa-batch23-29/FeedbackPreview.swift` and `tools/archive/design-qa-batch23-29/MediaFeedbackPreview.swift` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tools/archive/design-qa-batch23-29/FeedbackPreview.swift:527` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 3) tools/archive/design-qa-batch23-29/FeedbackPreview.swift:589 — tools/archive/design-qa-batch23-29/FeedbackPreview.swift:589-600 | tools/archive/design-qa-batch23-29/MediaFeedbackPreview.swift:89-100 | tools/archive/design-qa-batch23-29/MediaSurfacePreview.swift:69-80 — before extracting anything, compare `tools/archive/design-qa-batch23-29/FeedbackPreview.swift` and `tools/archive/design-qa-batch23-29/MediaFeedbackPreview.swift` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tools/archive/design-qa-batch23-29/FeedbackPreview.swift:589` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×2
  • Sync-over-async blocking tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:176 — `run` is async and calls sleep — a blocking call inside async code stalls the cooperative pool's thread — one per core — and every task scheduled on it for as long as it runs.
  • Sync-over-async blocking tools/archive/design-qa-batch23-29/NotchRetargetPreview.swift:76 — `run` is async and calls sleep — a blocking call inside async code stalls the cooperative pool's thread — one per core — and every task scheduled on it for as long as it runs.
D1 · Cyclomatic Complexity · GlanceProbe.exercise (cyclomatic 127) · ×1
  • GlanceProbe.exercise (cyclomatic 127) prototype/App/GlanceProbe.swift:117 — GlanceProbe.exercise has cyclomatic complexity 127 (threshold 15). Of this number, 126 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseLaunchpadKeys (cyclomatic 125) · ×1
  • GlanceProbe.exerciseLaunchpadKeys (cyclomatic 125) prototype/App/LaunchpadKeysProbe.swift:27 — GlanceProbe.exerciseLaunchpadKeys has cyclomatic complexity 125 (threshold 15). Of this number, 107 points are the body's own statements and 18 belong to 7 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ConductorSession.receive (cyclomatic 125) · ×1
  • ConductorSession.receive (cyclomatic 125) prototype/Core/ConductorSession.swift:223 — ConductorSession.receive has cyclomatic complexity 125 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseNotch (cyclomatic 121) · ×1
  • GlanceProbe.exerciseNotch (cyclomatic 121) prototype/App/GestureProbe.swift:1906 — GlanceProbe.exerciseNotch has cyclomatic complexity 121 (threshold 15). Of this number, 111 points are the body's own statements and 10 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PresenceLock.handle (cyclomatic 113) · ×1
  • PresenceLock.handle (cyclomatic 113) prototype/Core/PresenceLock.swift:112 — PresenceLock.handle has cyclomatic complexity 113 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WS2SilentApply.perform (cyclomatic 109) · ×1
  • WS2SilentApply.perform (cyclomatic 109) prototype/App/WS2SilentApply.swift:34 — WS2SilentApply.perform has cyclomatic complexity 109 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NotchPanel.apply (cyclomatic 92) · ×1
  • NotchPanel.apply (cyclomatic 92) prototype/App/Notch/NotchPanel.swift:2110 — NotchPanel.apply has cyclomatic complexity 92 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · REDACTED.top-level code (cyclomatic 87) · ×1
  • REDACTED.top-level code (cyclomatic 87) prototype/main.swift:4 — REDACTED.top-level code has cyclomatic complexity 87 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WS2SilentReadout.sentence (cyclomatic 83) · ×1
  • WS2SilentReadout.sentence (cyclomatic 83) prototype/Core/WS2SilentGates.swift:432 — WS2SilentReadout.sentence has cyclomatic complexity 83 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · AppDelegate.shade (cyclomatic 82) · ×1
  • AppDelegate.shade (cyclomatic 82) prototype/App/ShadeController.swift:176 — AppDelegate.shade has cyclomatic complexity 82 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (AppDelegate.shade::installOverlay) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseFullScreenDesktops (cyclomatic 79) · ×1
  • GlanceProbe.exerciseFullScreenDesktops (cyclomatic 79) prototype/App/FullScreenProbe.swift:11 — GlanceProbe.exerciseFullScreenDesktops has cyclomatic complexity 79 (threshold 15). Of this number, 58 points are the body's own statements and 21 belong to 7 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseNotchShape (cyclomatic 79) · ×1
  • GlanceProbe.exerciseNotchShape (cyclomatic 79) prototype/App/NotchShapeProbe.swift:12 — GlanceProbe.exerciseNotchShape has cyclomatic complexity 79 (threshold 15). Of this number, 72 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · CodexWire.receive (cyclomatic 78) · ×1
  • CodexWire.receive (cyclomatic 78) prototype/Core/CodexWire.swift:135 — CodexWire.receive has cyclomatic complexity 78 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseThumbnail (cyclomatic 77) · ×1
  • GlanceProbe.exerciseThumbnail (cyclomatic 77) prototype/App/ThumbnailProbe.swift:11 — GlanceProbe.exerciseThumbnail has cyclomatic complexity 77 (threshold 15). Of this number, 62 points are the body's own statements and 15 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseGestures (cyclomatic 76) · ×1
  • GlanceProbe.exerciseGestures (cyclomatic 76) prototype/App/GestureProbe.swift:73 — GlanceProbe.exerciseGestures has cyclomatic complexity 76 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · HabitRules.judge (cyclomatic 66) · ×1
  • HabitRules.judge (cyclomatic 66) prototype/Core/HabitRules.swift:745 — HabitRules.judge has cyclomatic complexity 66 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseStripPeek (cyclomatic 64) · ×1
  • GlanceProbe.exerciseStripPeek (cyclomatic 64) prototype/App/StripPeekProbe.swift:12 — GlanceProbe.exerciseStripPeek has cyclomatic complexity 64 (threshold 15). Of this number, 60 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseSlideOver (cyclomatic 63) · ×1
  • GlanceProbe.exerciseSlideOver (cyclomatic 63) prototype/App/GestureProbe.swift:489 — GlanceProbe.exerciseSlideOver has cyclomatic complexity 63 (threshold 15). Of this number, 60 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WS2OwnedLaunchController.receive (cyclomatic 63) · ×1
  • WS2OwnedLaunchController.receive (cyclomatic 63) prototype/App/WS2OwnedLaunchController.swift:354 — WS2OwnedLaunchController.receive has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FaceGestureTracker.receive (cyclomatic 60) · ×1
  • FaceGestureTracker.receive (cyclomatic 60) prototype/Core/FaceGestureTracker.swift:46 — FaceGestureTracker.receive has cyclomatic complexity 60 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseDockScenarios (cyclomatic 59) · ×1
  • GlanceProbe.exerciseDockScenarios (cyclomatic 59) prototype/App/DockScenariosProbe.swift:10 — GlanceProbe.exerciseDockScenarios has cyclomatic complexity 59 (threshold 15). Of this number, 53 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FoldRenderer.draw (cyclomatic 58) · ×1
  • FoldRenderer.draw (cyclomatic 58) prototype/Effects/FoldRenderer.swift:357 — FoldRenderer.draw has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NotchContentView.place (cyclomatic 57) · ×1
  • NotchContentView.place (cyclomatic 57) prototype/App/Notch/NotchContentView.swift:308 — NotchContentView.place has cyclomatic complexity 57 (threshold 15). Of this number, 55 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SilentMilestoneProbe.exercise (cyclomatic 56) · ×1
  • SilentMilestoneProbe.exercise (cyclomatic 56) prototype/App/SilentMilestoneProbe.swift:21 — SilentMilestoneProbe.exercise has cyclomatic complexity 56 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ChromeProfile.swift.adobeChromeProfile (cyclomatic 56) · ×1
  • ChromeProfile.swift.adobeChromeProfile (cyclomatic 56) prototype/Window/ChromeProfile.swift:6 — ChromeProfile.swift.adobeChromeProfile has cyclomatic complexity 56 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · AgentSessions.receive (cyclomatic 53) · ×1
  • AgentSessions.receive (cyclomatic 53) prototype/Core/AgentSessions.swift:71 — AgentSessions.receive has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BezelCheck.read (cyclomatic 52) · ×1
  • BezelCheck.read (cyclomatic 52) prototype/Core/DisplayShape.swift:277 — BezelCheck.read has cyclomatic complexity 52 (threshold 15). Of this number, 47 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NotchPanel.legacyBaseTarget (cyclomatic 52) · ×1
  • NotchPanel.legacyBaseTarget (cyclomatic 52) prototype/App/Notch/NotchPanel.swift:1857 — NotchPanel.legacyBaseTarget has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TrackpadGestureController.handleFlick (cyclomatic 50) · ×1
  • TrackpadGestureController.handleFlick (cyclomatic 50) prototype/App/TrackpadGestures.swift:1302 — TrackpadGestureController.handleFlick has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WS2RemoteHost.profile (cyclomatic 50) · ×1
  • WS2RemoteHost.profile (cyclomatic 50) prototype/App/WS2RemoteHost.swift:726 — WS2RemoteHost.profile has cyclomatic complexity 50 (threshold 15). Of this number, 47 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppDelegate.observeFoldHide (cyclomatic 49) · ×1
  • AppDelegate.observeFoldHide (cyclomatic 49) prototype/App/WS2FoldCallbackGuard.swift:40 — AppDelegate.observeFoldHide has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WS2OwnedSessionView.render (cyclomatic 48) · ×1
  • WS2OwnedSessionView.render (cyclomatic 48) prototype/App/WS2OwnedSessionView.swift:154 — WS2OwnedSessionView.render has cyclomatic complexity 48 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseFinderAlias (cyclomatic 47) · ×1
  • GlanceProbe.exerciseFinderAlias (cyclomatic 47) prototype/App/FinderAliasProbe.swift:12 — GlanceProbe.exerciseFinderAlias has cyclomatic complexity 47 (threshold 15). Of this number, 30 points are the body's own statements and 17 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppDelegate.shade · ×1
  • AppDelegate.shade::installOverlay (cyclomatic 45) prototype/App/ShadeController.swift:365 — AppDelegate.shade::installOverlay has cyclomatic complexity 45 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (AppDelegate.shade) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseWinsSwitcher (cyclomatic 44) · ×1
  • GlanceProbe.exerciseWinsSwitcher (cyclomatic 44) prototype/App/WinsSwitcherProbe.swift:15 — GlanceProbe.exerciseWinsSwitcher has cyclomatic complexity 44 (threshold 15). Of this number, 32 points are the body's own statements and 12 belong to 6 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WS2CompanionChannel.receive (cyclomatic 44) · ×1
  • WS2CompanionChannel.receive (cyclomatic 44) prototype/Support/WS2CompanionChannel.swift:104 — WS2CompanionChannel.receive has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseSecondDisplayDesktops (cyclomatic 42) · ×1
  • GlanceProbe.exerciseSecondDisplayDesktops (cyclomatic 42) prototype/App/GapProbesSecondDisplayDesktops.swift:13 — GlanceProbe.exerciseSecondDisplayDesktops has cyclomatic complexity 42 (threshold 15). Of this number, 38 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TrackpadGestureController.keyStep (cyclomatic 41) · ×1
  • TrackpadGestureController.keyStep (cyclomatic 41) prototype/App/TrackpadGestures.swift:809 — TrackpadGestureController.keyStep has cyclomatic complexity 41 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WS2DeviceActionHost.receive (cyclomatic 41) · ×1
  • WS2DeviceActionHost.receive (cyclomatic 41) prototype/App/WS2DeviceActionHost.swift:56 — WS2DeviceActionHost.receive has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OwnerTurnChallenge.receive (cyclomatic 41) · ×1
  • OwnerTurnChallenge.receive (cyclomatic 41) prototype/Core/FaceGestureTracker.swift:271 — OwnerTurnChallenge.receive has cyclomatic complexity 41 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WindowBrowserActionPolicy.preflight (cyclomatic 41) · ×1
  • WindowBrowserActionPolicy.preflight (cyclomatic 41) prototype/WindowBrowser/WindowBrowserActions.swift:123 — WindowBrowserActionPolicy.preflight has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NotchActivityController.perform (cyclomatic 40) · ×1
  • NotchActivityController.perform (cyclomatic 40) prototype/App/NotchActivityController.swift:535 — NotchActivityController.perform has cyclomatic complexity 40 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · TrackpadGestureController.decideFlick (cyclomatic 40) · ×1
  • TrackpadGestureController.decideFlick (cyclomatic 40) prototype/App/TrackpadGestures.swift:1545 — TrackpadGestureController.decideFlick has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WindowFoldEffects.prepareFold (cyclomatic 40) · ×1
  • WindowFoldEffects.prepareFold (cyclomatic 40) prototype/Effects/WindowFoldEffects.swift:72 — WindowFoldEffects.prepareFold has cyclomatic complexity 40 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseStrip (cyclomatic 39) · ×1
  • GlanceProbe.exerciseStrip (cyclomatic 39) prototype/App/GestureProbe.swift:1448 — GlanceProbe.exerciseStrip has cyclomatic complexity 39 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseLaunchpadTiling (cyclomatic 39) · ×1
  • GlanceProbe.exerciseLaunchpadTiling (cyclomatic 39) prototype/App/LaunchpadTilingProbe.swift:22 — GlanceProbe.exerciseLaunchpadTiling has cyclomatic complexity 39 (threshold 15). Of this number, 19 points are the body's own statements and 20 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HabitWorker.handle (cyclomatic 39) · ×1
  • HabitWorker.handle (cyclomatic 39) prototype/App/HabitContext.swift:329 — HabitWorker.handle has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SlideOverRecovery.recoverAbandoned (cyclomatic 39) · ×1
  • SlideOverRecovery.recoverAbandoned (cyclomatic 39) prototype/App/SlideOverRecovery.swift:52 — SlideOverRecovery.recoverAbandoned has cyclomatic complexity 39 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WS2GameControllerBridge.sample (cyclomatic 39) · ×1
  • WS2GameControllerBridge.sample (cyclomatic 39) prototype/App/WS2GameControllerBridge.swift:138 — WS2GameControllerBridge.sample has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UpdateLaunchPolicy.decide (cyclomatic 39) · ×1
  • UpdateLaunchPolicy.decide (cyclomatic 39) prototype/Core/UpdateDecisions.swift:153 — UpdateLaunchPolicy.decide has cyclomatic complexity 39 (threshold 15). Of this number, 38 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Reader.value (cyclomatic 39) · ×1
  • Reader.value (cyclomatic 39) prototype/Core/WS2OPACK.swift:52 — Reader.value has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UpdateGuard.run (cyclomatic 39) · ×1
  • UpdateGuard.run (cyclomatic 39) prototype/Watchdog/main.swift:160 — UpdateGuard.run has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GlanceProbe.exercisePictureInPicture (cyclomatic 38) · ×1
  • GlanceProbe.exercisePictureInPicture (cyclomatic 38) prototype/App/GestureProbe.swift:1063 — GlanceProbe.exercisePictureInPicture has cyclomatic complexity 38 (threshold 15). Of this number, 32 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · GlanceProbe.hitch (cyclomatic 38) · ×1
  • GlanceProbe.hitch (cyclomatic 38) prototype/App/HitchProbe.swift:67 — GlanceProbe.hitch has cyclomatic complexity 38 (threshold 15). Of this number, 37 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SilentMilestoneProbe.asyncTerminals (cyclomatic 38) · ×1
  • SilentMilestoneProbe.asyncTerminals (cyclomatic 38) prototype/App/SilentMilestoneProbe.swift:318 — SilentMilestoneProbe.asyncTerminals has cyclomatic complexity 38 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PresenceLock.reconcile (cyclomatic 38) · ×1
  • PresenceLock.reconcile (cyclomatic 38) prototype/Core/PresenceLock.swift:256 — PresenceLock.reconcile has cyclomatic complexity 38 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TouchTap.frame (cyclomatic 37) · ×1
  • TouchTap.frame (cyclomatic 37) prototype/Core/TouchTap.swift:44 — TouchTap.frame has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NotchPanel.displayCompact (cyclomatic 37) · ×1
  • NotchPanel.displayCompact (cyclomatic 37) prototype/App/Notch/NotchPanel.swift:2326 — NotchPanel.displayCompact has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppDelegate.buildStatusMenuItems (cyclomatic 36) · ×1
  • AppDelegate.buildStatusMenuItems (cyclomatic 36) prototype/App/MenuBarController.swift:72 — AppDelegate.buildStatusMenuItems has cyclomatic complexity 36 (threshold 15). Of this number, 34 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseSlideOverSpaces (cyclomatic 36) · ×1
  • GlanceProbe.exerciseSlideOverSpaces (cyclomatic 36) prototype/App/GapProbesSlideOver.swift:134 — GlanceProbe.exerciseSlideOverSpaces has cyclomatic complexity 36 (threshold 15). Of this number, 30 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseLaunchpad (cyclomatic 36) · ×1
  • GlanceProbe.exerciseLaunchpad (cyclomatic 36) prototype/App/GestureProbe.swift:1735 — GlanceProbe.exerciseLaunchpad has cyclomatic complexity 36 (threshold 15). Of this number, 33 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseStripOverview (cyclomatic 36) · ×1
  • GlanceProbe.exerciseStripOverview (cyclomatic 36) prototype/App/StripPeekProbe.swift:230 — GlanceProbe.exerciseStripOverview has cyclomatic complexity 36 (threshold 15). Of this number, 34 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ExplainerElementLayer.recolor (cyclomatic 36) · ×1
  • ExplainerElementLayer.recolor (cyclomatic 36) prototype/App/SettingsExplainerView.swift:756 — ExplainerElementLayer.recolor has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SettingsSearchIndex.search (cyclomatic 36) · ×1
  • SettingsSearchIndex.search (cyclomatic 36) prototype/Core/SettingsSearch.swift:158 — SettingsSearchIndex.search has cyclomatic complexity 36 (threshold 15). Of this number, 35 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NotchCompactView.draw (cyclomatic 36) · ×1
  • NotchCompactView.draw (cyclomatic 36) prototype/App/Notch/NotchCompactViews.swift:505 — NotchCompactView.draw has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PreviewRenderer.swift.nativeTitleStripLooksBroken (cyclomatic 36) · ×1
  • PreviewRenderer.swift.nativeTitleStripLooksBroken (cyclomatic 36) prototype/Capture/PreviewRenderer.swift:141 — PreviewRenderer.swift.nativeTitleStripLooksBroken has cyclomatic complexity 36 (threshold 15). Of this number, 26 points are the body's own statements and 10 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseSlideOverBorder (cyclomatic 35) · ×1
  • GlanceProbe.exerciseSlideOverBorder (cyclomatic 35) prototype/App/GapProbesSlideOver.swift:13 — GlanceProbe.exerciseSlideOverBorder has cyclomatic complexity 35 (threshold 15). Of this number, 33 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · LaunchpadView.mouseUp (cyclomatic 35) · ×1
  • LaunchpadView.mouseUp (cyclomatic 35) prototype/App/LaunchpadView.swift:932 — LaunchpadView.mouseUp has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MeetingLinkDetector.classify (cyclomatic 35) · ×1
  • MeetingLinkDetector.classify (cyclomatic 35) prototype/Core/CalendarActivity.swift:196 — MeetingLinkDetector.classify has cyclomatic complexity 35 (threshold 15). Of this number, 34 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ConductorSession.touch (cyclomatic 35) · ×1
  • ConductorSession.touch (cyclomatic 35) prototype/Core/ConductorSession.swift:418 — ConductorSession.touch has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · InteractionCoordinator.acquire (cyclomatic 35) · ×1
  • InteractionCoordinator.acquire (cyclomatic 35) prototype/Core/InteractionCoordinator.swift:173 — InteractionCoordinator.acquire has cyclomatic complexity 35 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PowerFlashPolicy.observe (cyclomatic 35) · ×1
  • PowerFlashPolicy.observe (cyclomatic 35) prototype/Core/PowerFlash.swift:52 — PowerFlashPolicy.observe has cyclomatic complexity 35 (threshold 15). Of this number, 32 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · NotchController.wirePanelCallbacks (cyclomatic 35) · ×1
  • NotchController.wirePanelCallbacks (cyclomatic 35) prototype/App/Notch/NotchController.swift:551 — NotchController.wirePanelCallbacks has cyclomatic complexity 35 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseFoldDesktops (cyclomatic 34) · ×1
  • GlanceProbe.exerciseFoldDesktops (cyclomatic 34) prototype/App/GapProbesFoldDesktops.swift:9 — GlanceProbe.exerciseFoldDesktops has cyclomatic complexity 34 (threshold 15). Of this number, 30 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · HabitWorker.generic (cyclomatic 34) · ×1
  • HabitWorker.generic (cyclomatic 34) prototype/App/HabitContext.swift:433 — HabitWorker.generic 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.
D1 · Cyclomatic Complexity · LaunchpadView.control (cyclomatic 34) · ×1
  • LaunchpadView.control (cyclomatic 34) prototype/App/LaunchpadView.swift:1681 — LaunchpadView.control 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.
D1 · Cyclomatic Complexity · NotchActivitySources.poll (cyclomatic 34) · ×1
  • NotchActivitySources.poll (cyclomatic 34) prototype/App/NotchActivitySources.swift:257 — NotchActivitySources.poll 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.
D1 · Cyclomatic Complexity · TrackpadGestureController.updateFollow (cyclomatic 34) · ×1
  • TrackpadGestureController.updateFollow (cyclomatic 34) prototype/App/TrackpadGestures.swift:1069 — TrackpadGestureController.updateFollow 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.
D1 · Cyclomatic Complexity · WS2ConductorView.render (cyclomatic 34) · ×1
  • WS2ConductorView.render (cyclomatic 34) prototype/App/WS2ConductorView.swift:96 — WS2ConductorView.render has cyclomatic complexity 34 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · EffectSession.show (cyclomatic 34) · ×1
  • EffectSession.show (cyclomatic 34) prototype/Effects/EffectSession.swift:99 — EffectSession.show has cyclomatic complexity 34 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Policies.swift.windowPolicy (cyclomatic 34) · ×1
  • Policies.swift.windowPolicy (cyclomatic 34) prototype/Compatibility/Policies.swift:58 — Policies.swift.windowPolicy has cyclomatic complexity 34 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseFinderColumns (cyclomatic 33) · ×1
  • GlanceProbe.exerciseFinderColumns (cyclomatic 33) prototype/App/FinderColumnsProbe.swift:7 — GlanceProbe.exerciseFinderColumns has cyclomatic complexity 33 (threshold 15). Of this number, 20 points are the body's own statements and 13 belong to 5 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · LaunchpadView.scrollWheel (cyclomatic 33) · ×1
  • LaunchpadView.scrollWheel (cyclomatic 33) prototype/App/LaunchpadView.swift:629 — LaunchpadView.scrollWheel has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WindowSwitcherKeys.handle (cyclomatic 33) · ×1
  • WindowSwitcherKeys.handle (cyclomatic 33) prototype/App/WindowSwitcher.swift:97 — WindowSwitcherKeys.handle has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EffectWindowProbe.run (cyclomatic 33) · ×1
  • EffectWindowProbe.run (cyclomatic 33) prototype/Effects/EffectWindowProbe.swift:15 — EffectWindowProbe.run has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EventTapCallback.swift.eventTapCallback (cyclomatic 33) · ×1
  • EventTapCallback.swift.eventTapCallback (cyclomatic 33) prototype/App/EventTapCallback.swift:139 — EventTapCallback.swift.eventTapCallback has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HabitWords.lines (cyclomatic 32) · ×1
  • HabitWords.lines (cyclomatic 32) prototype/Core/HabitRules.swift:1274 — HabitWords.lines has cyclomatic complexity 32 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · NotchCanvasView.scrollWheel (cyclomatic 32) · ×1
  • NotchCanvasView.scrollWheel (cyclomatic 32) prototype/App/Notch/NotchCanvas.swift:1170 — NotchCanvasView.scrollWheel has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppDelegate.startFocusCurrentAppSession (cyclomatic 31) · ×1
  • AppDelegate.startFocusCurrentAppSession (cyclomatic 31) prototype/App/FocusSession.swift:361 — AppDelegate.startFocusCurrentAppSession has cyclomatic complexity 31 (threshold 15). Of this number, 18 points are the body's own statements and 13 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GlanceProbe.holdSetUp (cyclomatic 31) · ×1
  • GlanceProbe.holdSetUp (cyclomatic 31) prototype/App/HubHoldProbe.swift:41 — GlanceProbe.holdSetUp has cyclomatic complexity 31 (threshold 15). Of this number, 30 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · ActivityCard.update (cyclomatic 31) · ×1
  • ActivityCard.update (cyclomatic 31) prototype/App/NotchActivityView.swift:227 — ActivityCard.update has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WS2RemoteHost.input (cyclomatic 31) · ×1
  • WS2RemoteHost.input (cyclomatic 31) prototype/App/WS2RemoteHost.swift:815 — WS2RemoteHost.input has cyclomatic complexity 31 (threshold 15). Of this number, 28 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RemoteLayerHost.apply (cyclomatic 31) · ×1
  • RemoteLayerHost.apply (cyclomatic 31) prototype/Core/RemoteLayerHost.swift:142 — RemoteLayerHost.apply has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WS2SilentProductPort.accepted (cyclomatic 31) · ×1
  • WS2SilentProductPort.accepted (cyclomatic 31) prototype/Core/WS2SilentProductPort.swift:340 — WS2SilentProductPort.accepted has cyclomatic complexity 31 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: WS2SilentWindowEffect.effect (cyclomatic 37) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · WS2PairSetupServer.advance (cyclomatic 31) · ×1
  • WS2PairSetupServer.advance (cyclomatic 31) prototype/Support/WS2PairSetupServer.swift:118 — WS2PairSetupServer.advance has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NotchCanvasView.mouseUp (cyclomatic 31) · ×1
  • NotchCanvasView.mouseUp (cyclomatic 31) prototype/App/Notch/NotchCanvas.swift:1023 — NotchCanvasView.mouseUp has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseSplit (cyclomatic 30) · ×1
  • GlanceProbe.exerciseSplit (cyclomatic 30) prototype/App/GestureProbe.swift:1231 — GlanceProbe.exerciseSplit has cyclomatic complexity 30 (threshold 15). Of this number, 29 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · TrackpadGestureController.judgeFlick (cyclomatic 30) · ×1
  • TrackpadGestureController.judgeFlick (cyclomatic 30) prototype/App/TrackpadGestures.swift:1647 — TrackpadGestureController.judgeFlick has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FocusTimer.handle (cyclomatic 30) · ×1
  • FocusTimer.handle (cyclomatic 30) prototype/Core/FocusTimer.swift:125 — FocusTimer.handle has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MagicTiling.plan (cyclomatic 30) · ×1
  • MagicTiling.plan (cyclomatic 30) prototype/Core/MagicTiling.swift:122 — MagicTiling.plan has cyclomatic complexity 30 (threshold 15). Of this number, 29 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WS2ApprovalReview.command (cyclomatic 30) · ×1
  • WS2ApprovalReview.command (cyclomatic 30) prototype/Core/WS2ApprovalReview.swift:17 — WS2ApprovalReview.command has cyclomatic complexity 30 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · NativeProxyOverlayWindow.sendEvent (cyclomatic 30) · ×1
  • NativeProxyOverlayWindow.sendEvent (cyclomatic 30) prototype/Overlay/ShadeStrip.swift:414 — NativeProxyOverlayWindow.sendEvent has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WindowBrowserController.refreshPanel (cyclomatic 30) · ×1
  • WindowBrowserController.refreshPanel (cyclomatic 30) prototype/WindowBrowser/WindowBrowserController.swift:1463 — WindowBrowserController.refreshPanel has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppDelegate.handOffFocusBeforeHiding (cyclomatic 29) · ×1
  • AppDelegate.handOffFocusBeforeHiding (cyclomatic 29) prototype/App/FoldTransaction.swift:40 — AppDelegate.handOffFocusBeforeHiding has cyclomatic complexity 29 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · GlanceController.driveUnhide (cyclomatic 29) · ×1
  • GlanceController.driveUnhide (cyclomatic 29) prototype/App/Glance.swift:823 — GlanceController.driveUnhide has cyclomatic complexity 29 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · GlanceProbe.run (cyclomatic 29) · ×1
  • GlanceProbe.run (cyclomatic 29) prototype/App/GlanceProbe.swift:27 — GlanceProbe.run has cyclomatic complexity 29 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · GlanceProbe.restoreGuard (cyclomatic 29) · ×1
  • GlanceProbe.restoreGuard (cyclomatic 29) prototype/App/GlanceProbe.swift:893 — GlanceProbe.restoreGuard has cyclomatic complexity 29 (threshold 15). Of this number, 26 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PictureInPictureController.enter (cyclomatic 29) · ×1
  • PictureInPictureController.enter (cyclomatic 29) prototype/App/PictureInPicture.swift:90 — PictureInPictureController.enter has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SlideOverController.validateWindow (cyclomatic 29) · ×1
  • SlideOverController.validateWindow (cyclomatic 29) prototype/App/SlideOver.swift:793 — SlideOverController.validateWindow has cyclomatic complexity 29 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · TrackpadGestureController.dropSplit (cyclomatic 29) · ×1
  • TrackpadGestureController.dropSplit (cyclomatic 29) prototype/App/DropSplitRun.swift:19 — TrackpadGestureController.dropSplit has cyclomatic complexity 29 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WS2AppRuntime.init (cyclomatic 29) · ×1
  • WS2AppRuntime.init (cyclomatic 29) prototype/App/WS2AppRuntime.swift:62 — WS2AppRuntime.init has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WS2HookEvent.parse (cyclomatic 29) · ×1
  • WS2HookEvent.parse (cyclomatic 29) prototype/App/WS2HookServer.swift:53 — WS2HookEvent.parse has cyclomatic complexity 29 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WS2SilentApply.perform (cyclomatic 29) · ×1
  • WS2SilentApply.perform (cyclomatic 29) prototype/App/WS2SilentApply.swift:255 — WS2SilentApply.perform has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NotchController.init (cyclomatic 29) · ×1
  • NotchController.init (cyclomatic 29) prototype/App/Notch/NotchController.swift:180 — NotchController.init has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppDelegate.quickLookWindowCandidates (cyclomatic 28) · ×1
  • AppDelegate.quickLookWindowCandidates (cyclomatic 28) prototype/App/FoldExit.swift:228 — AppDelegate.quickLookWindowCandidates has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseWindowClasses (cyclomatic 28) · ×1
  • GlanceProbe.exerciseWindowClasses (cyclomatic 28) prototype/WindowBrowser/WindowClassesProbe.swift:29 — GlanceProbe.exerciseWindowClasses has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GlobalInputFilterState.admit (cyclomatic 28) · ×1
  • GlobalInputFilterState.admit (cyclomatic 28) prototype/App/GlobalInputFilter.swift:260 — GlobalInputFilterState.admit has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ExplainerElementLayer.apply (cyclomatic 28) · ×1
  • ExplainerElementLayer.apply (cyclomatic 28) prototype/App/SettingsExplainerView.swift:626 — ExplainerElementLayer.apply 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.
D1 · Cyclomatic Complexity · TrackpadGestureController.magicTile (cyclomatic 28) · ×1
  • TrackpadGestureController.magicTile (cyclomatic 28) prototype/App/MagicTilingRun.swift:71 — TrackpadGestureController.magicTile has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExplainerDirector.handle (cyclomatic 28) · ×1
  • ExplainerDirector.handle (cyclomatic 28) prototype/Core/ExplainerScript.swift:380 — ExplainerDirector.handle has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WindowFoldEffects.prepareRestore (cyclomatic 28) · ×1
  • WindowFoldEffects.prepareRestore (cyclomatic 28) prototype/Effects/WindowFoldEffects.swift:278 — WindowFoldEffects.prepareRestore has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NotchController.showPeek (cyclomatic 28) · ×1
  • NotchController.showPeek (cyclomatic 28) prototype/App/Notch/NotchController.swift:2154 — NotchController.showPeek has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppDelegate.applyReconcileAXSnapshots (cyclomatic 27) · ×1
  • AppDelegate.applyReconcileAXSnapshots (cyclomatic 27) prototype/App/Reconcile.swift:297 — AppDelegate.applyReconcileAXSnapshots has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseWins (cyclomatic 27) · ×1
  • GlanceProbe.exerciseWins (cyclomatic 27) prototype/App/GestureProbe.swift:1308 — GlanceProbe.exerciseWins has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ScrollStripController.evaluateColumns (cyclomatic 27) · ×1
  • ScrollStripController.evaluateColumns (cyclomatic 27) prototype/App/ScrollStripRun.swift:1143 — ScrollStripController.evaluateColumns has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ConductorSession.play (cyclomatic 27) · ×1
  • ConductorSession.play (cyclomatic 27) prototype/Core/ConductorSession.swift:503 — ConductorSession.play has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ConductorNotch.text (cyclomatic 31) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · FocusNavigator.move (cyclomatic 27) · ×1
  • FocusNavigator.move (cyclomatic 27) prototype/Core/FocusNavigator.swift:19 — FocusNavigator.move has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppDelegate.handleHotKey (cyclomatic 26) · ×1
  • AppDelegate.handleHotKey (cyclomatic 26) prototype/App/EventTap.swift:147 — AppDelegate.handleHotKey has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseElsewhere (cyclomatic 26) · ×1
  • GlanceProbe.exerciseElsewhere (cyclomatic 26) prototype/App/ElsewhereProbe.swift:7 — GlanceProbe.exerciseElsewhere has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · LaunchpadView.moveReorder (cyclomatic 26) · ×1
  • LaunchpadView.moveReorder (cyclomatic 26) prototype/App/LaunchpadView.swift:1227 — LaunchpadView.moveReorder has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NotchActivitySources.audioSnapshot (cyclomatic 26) · ×1
  • NotchActivitySources.audioSnapshot (cyclomatic 26) prototype/App/NotchActivitySources.swift:431 — NotchActivitySources.audioSnapshot has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WS2CodexApprovalHost.confirm (cyclomatic 26) · ×1
  • WS2CodexApprovalHost.confirm (cyclomatic 26) prototype/App/WS2CodexApprovalHost.swift:162 — WS2CodexApprovalHost.confirm has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HorizontalLadder.next (cyclomatic 26) · ×1
  • HorizontalLadder.next (cyclomatic 26) prototype/Core/TrackpadGesture.swift:206 — HorizontalLadder.next has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ScreenTile.action (cyclomatic 33) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Writer.value (cyclomatic 26) · ×1
  • Writer.value (cyclomatic 26) prototype/Core/WS2OPACK.swift:142 — Writer.value has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SettingsShotProbe.run (cyclomatic 26) · ×1
  • SettingsShotProbe.run (cyclomatic 26) prototype/Effects/SettingsShotProbe.swift:18 — SettingsShotProbe.run has cyclomatic complexity 26 (threshold 15). Of this number, 24 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SecureLogFile.init (cyclomatic 26) · ×1
  • SecureLogFile.init (cyclomatic 26) prototype/Support/SecureLogFile.swift:22 — SecureLogFile.init has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NotchPanel.restingTarget (cyclomatic 26) · ×1
  • NotchPanel.restingTarget (cyclomatic 26) prototype/App/Notch/NotchPanel.swift:1791 — NotchPanel.restingTarget has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · teach.frameAt (cyclomatic 26) · ×1
  • teach.frameAt (cyclomatic 26) site/teach.js:270 — teach.frameAt has cyclomatic complexity 26 (threshold 15). Of this number, 24 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppDelegate.arrangeShadedEntries (cyclomatic 25) · ×1
  • AppDelegate.arrangeShadedEntries (cyclomatic 25) prototype/App/ArrangeController.swift:236 — AppDelegate.arrangeShadedEntries has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppDelegate.frontmostWindowContaining (cyclomatic 25) · ×1
  • AppDelegate.frontmostWindowContaining (cyclomatic 25) prototype/App/EventTap.swift:565 — AppDelegate.frontmostWindowContaining has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · AppDelegate.updateFaceAutofillControls (cyclomatic 25) · ×1
  • AppDelegate.updateFaceAutofillControls (cyclomatic 25) prototype/App/FaceAutofillSettings.swift:70 — AppDelegate.updateFaceAutofillControls has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · AppDelegate.unshadeReturningElement (cyclomatic 25) · ×1
  • AppDelegate.unshadeReturningElement (cyclomatic 25) prototype/App/FoldExit.swift:7 — AppDelegate.unshadeReturningElement has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppDelegate.scheduleFoldVerification (cyclomatic 25) · ×1
  • AppDelegate.scheduleFoldVerification (cyclomatic 25) prototype/App/FoldTransaction.swift:108 — AppDelegate.scheduleFoldVerification has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · AppDelegate.performForwardedTrafficAction (cyclomatic 25) · ×1
  • AppDelegate.performForwardedTrafficAction (cyclomatic 25) prototype/App/FoldTransaction.swift:466 — AppDelegate.performForwardedTrafficAction has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 5 of the 25 points are its own statements and the rest belongs to 5 function items inside it that branch (retryOrFallback, attempt, verifyAfterPointerClick, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseMissionControlSurvey (cyclomatic 25) · ×1
  • GlanceProbe.exerciseMissionControlSurvey (cyclomatic 25) prototype/App/GestureProbe.swift:948 — GlanceProbe.exerciseMissionControlSurvey has cyclomatic complexity 25 (threshold 15). Of this number, 22 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LaunchpadView.animateOut (cyclomatic 25) · ×1
  • LaunchpadView.animateOut (cyclomatic 25) prototype/App/LaunchpadView.swift:1829 — LaunchpadView.animateOut has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WS2CodexApprovalHost.present (cyclomatic 25) · ×1
  • WS2CodexApprovalHost.present (cyclomatic 25) prototype/App/WS2CodexApprovalHost.swift:107 — WS2CodexApprovalHost.present has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · FaceQualityGate.rawHint (cyclomatic 25) · ×1
  • FaceQualityGate.rawHint (cyclomatic 25) prototype/Core/FaceCaptureQuality.swift:132 — FaceQualityGate.rawHint has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · RemoteMode.handle (cyclomatic 25) · ×1
  • RemoteMode.handle (cyclomatic 25) prototype/Core/RemoteMode.swift:63 — RemoteMode.handle has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EffectWindowProbe.verifyTitlebarControls (cyclomatic 25) · ×1
  • EffectWindowProbe.verifyTitlebarControls (cyclomatic 25) prototype/Effects/EffectWindowProbe.swift:127 — EffectWindowProbe.verifyTitlebarControls has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WindowBrowserActionPresentation.item (cyclomatic 25) · ×1
  • WindowBrowserActionPresentation.item (cyclomatic 25) prototype/WindowBrowser/WindowBrowserActionPresentation.swift:77 — WindowBrowserActionPresentation.item has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · NotchPanel.alert (cyclomatic 25) · ×1
  • NotchPanel.alert (cyclomatic 25) prototype/App/Notch/NotchPanel.swift:1081 — NotchPanel.alert has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · AppDelegate.handleAXNotification (cyclomatic 24) · ×1
  • AppDelegate.handleAXNotification (cyclomatic 24) prototype/App/FoldTransaction.swift:1176 — AppDelegate.handleAXNotification has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppDelegate.sourceWindowLooksUserVisible (cyclomatic 24) · ×1
  • AppDelegate.sourceWindowLooksUserVisible (cyclomatic 24) prototype/App/Reconcile.swift:77 — AppDelegate.sourceWindowLooksUserVisible has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseOverhangingEdge (cyclomatic 24) · ×1
  • GlanceProbe.exerciseOverhangingEdge (cyclomatic 24) prototype/App/StripPeekProbe.swift:340 — GlanceProbe.exerciseOverhangingEdge has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · LaunchpadController.show (cyclomatic 24) · ×1
  • LaunchpadController.show (cyclomatic 24) prototype/App/LaunchpadController.swift:242 — LaunchpadController.show has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LaunchpadView.mouseDragged (cyclomatic 24) · ×1
  • LaunchpadView.mouseDragged (cyclomatic 24) prototype/App/LaunchpadView.swift:867 — LaunchpadView.mouseDragged has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · LaunchpadView.folderScroll (cyclomatic 24) · ×1
  • LaunchpadView.folderScroll (cyclomatic 24) prototype/App/LaunchpadFolders.swift:695 — LaunchpadView.folderScroll has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MiddleTitlebarTap.handle (cyclomatic 24) · ×1
  • MiddleTitlebarTap.handle (cyclomatic 24) prototype/App/MiddleTitlebarTap.swift:110 — MiddleTitlebarTap.handle has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NotchDemoView.build (cyclomatic 24) · ×1
  • NotchDemoView.build (cyclomatic 24) prototype/App/NotchCoach.swift:164 — NotchDemoView.build has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · SilentMilestoneProbe.head (cyclomatic 24) · ×1
  • SilentMilestoneProbe.head (cyclomatic 24) prototype/App/SilentMilestoneProbe.swift:232 — SilentMilestoneProbe.head has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WS2PrivacyValues.value (cyclomatic 24) · ×1
  • WS2PrivacyValues.value (cyclomatic 24) prototype/App/WS2PrivacyPane.swift:553 — WS2PrivacyValues.value has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · WS2RemoteEffects.execute (cyclomatic 24) · ×1
  • WS2RemoteEffects.execute (cyclomatic 24) prototype/App/WS2RemoteEffects.swift:215 — WS2RemoteEffects.execute has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ClaudeWire.parse (cyclomatic 24) · ×1
  • ClaudeWire.parse (cyclomatic 24) prototype/Core/ClaudeWire.swift:32 — ClaudeWire.parse has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EffectFrameSource.stream (cyclomatic 24) · ×1
  • EffectFrameSource.stream (cyclomatic 24) prototype/Effects/EffectFrameSource.swift:254 — EffectFrameSource.stream has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WS2CompanionPairSetupChannel.receive (cyclomatic 24) · ×1
  • WS2CompanionPairSetupChannel.receive (cyclomatic 24) prototype/Support/WS2CompanionPairSetupChannel.swift:27 — WS2CompanionPairSetupChannel.receive has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WindowBrowserController.updateLivePreview (cyclomatic 24) · ×1
  • WindowBrowserController.updateLivePreview (cyclomatic 24) prototype/WindowBrowser/WindowBrowserController.swift:1703 — WindowBrowserController.updateLivePreview has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · NotchController.titleSettled (cyclomatic 24) · ×1
  • NotchController.titleSettled (cyclomatic 24) prototype/App/Notch/NotchController.swift:2622 — NotchController.titleSettled has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppDelegate.collectJournalRescueActions (cyclomatic 23) · ×1
  • AppDelegate.collectJournalRescueActions (cyclomatic 23) prototype/Recovery/Rescue.swift:48 — AppDelegate.collectJournalRescueActions has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FaceObservationWorker.captureOutput (cyclomatic 23) · ×1
  • FaceObservationWorker.captureOutput (cyclomatic 23) prototype/App/FaceObservationSource.swift:729 — FaceObservationWorker.captureOutput has cyclomatic complexity 23 (threshold 15). Of this number, 21 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GlanceController.tick (cyclomatic 23) · ×1
  • GlanceController.tick (cyclomatic 23) prototype/App/Glance.swift:909 — GlanceController.tick has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LaunchpadView.showVeil (cyclomatic 23) · ×1
  • LaunchpadView.showVeil (cyclomatic 23) prototype/App/LaunchpadFolders.swift:502 — LaunchpadView.showVeil has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SlideOverController.enter (cyclomatic 23) · ×1
  • SlideOverController.enter (cyclomatic 23) prototype/App/SlideOver.swift:163 — SlideOverController.enter has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TrackpadGestureController.showTitleHold (cyclomatic 23) · ×1
  • TrackpadGestureController.showTitleHold (cyclomatic 23) prototype/App/TrackpadGestures.swift:1468 — TrackpadGestureController.showTitleHold has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ConductorSession.handleButton (cyclomatic 23) · ×1
  • ConductorSession.handleButton (cyclomatic 23) prototype/Core/ConductorSession.swift:368 — ConductorSession.handleButton has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ConductorNotch.text (cyclomatic 31) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · FaceAutofill.decide (cyclomatic 23) · ×1
  • FaceAutofill.decide (cyclomatic 23) prototype/Core/FaceAutofill.swift:142 — FaceAutofill.decide has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · NotchController.windowTiles (cyclomatic 23) · ×1
  • NotchController.windowTiles (cyclomatic 23) prototype/App/Notch/NotchController.swift:2531 — NotchController.windowTiles has cyclomatic complexity 23 (threshold 15). Of this number, 20 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NotchPanel.earContent (cyclomatic 23) · ×1
  • NotchPanel.earContent (cyclomatic 23) prototype/App/Notch/NotchPanel.swift:991 — NotchPanel.earContent has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CountdownTimerCard.rebuild (cyclomatic 22) · ×1
  • CountdownTimerCard.rebuild (cyclomatic 22) prototype/App/CountdownTimerCard.swift:126 — CountdownTimerCard.rebuild has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GlanceProbe.capsuleOnscreenCheck (cyclomatic 22) · ×1
  • GlanceProbe.capsuleOnscreenCheck (cyclomatic 22) prototype/App/GlanceProbe.swift:1077 — GlanceProbe.capsuleOnscreenCheck has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseNotchDebugCycle (cyclomatic 22) · ×1
  • GlanceProbe.exerciseNotchDebugCycle (cyclomatic 22) prototype/App/CheckProbes1031.swift:241 — GlanceProbe.exerciseNotchDebugCycle has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseMagic (cyclomatic 22) · ×1
  • GlanceProbe.exerciseMagic (cyclomatic 22) prototype/App/GestureProbe.swift:1556 — GlanceProbe.exerciseMagic has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseHabits (cyclomatic 22) · ×1
  • GlanceProbe.exerciseHabits (cyclomatic 22) prototype/App/HabitProbe.swift:14 — GlanceProbe.exerciseHabits 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.
D1 · Cyclomatic Complexity · GlobalShortcut.factoryHotKey (cyclomatic 22) · ×1
  • GlobalShortcut.factoryHotKey (cyclomatic 22) prototype/App/GlobalShortcuts.swift:178 — GlobalShortcut.factoryHotKey has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: GlobalShortcut.hotKeyID (cyclomatic 41) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · NotchFaceObservationController.start (cyclomatic 22) · ×1
  • NotchFaceObservationController.start (cyclomatic 22) prototype/App/NotchFaceObservations.swift:30 — NotchFaceObservationController.start has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · TrackpadGestureController.perform (cyclomatic 22) · ×1
  • TrackpadGestureController.perform (cyclomatic 22) prototype/App/TrackpadGestures.swift:1190 — TrackpadGestureController.perform has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TrackpadGestureController.resize (cyclomatic 22) · ×1
  • TrackpadGestureController.resize (cyclomatic 22) prototype/App/TrackpadGestures.swift:2039 — TrackpadGestureController.resize 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.
D1 · Cyclomatic Complexity · WS2SilentHost.asyncObserved (cyclomatic 22) · ×1
  • WS2SilentHost.asyncObserved (cyclomatic 22) prototype/App/WS2SilentHost.swift:451 — WS2SilentHost.asyncObserved has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExplainerDirector.show (cyclomatic 22) · ×1
  • ExplainerDirector.show (cyclomatic 22) prototype/Core/ExplainerScript.swift:465 — ExplainerDirector.show has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NotchLevelSuppression.decide (cyclomatic 22) · ×1
  • NotchLevelSuppression.decide (cyclomatic 22) prototype/Core/NotchLevelSuppression.swift:96 — NotchLevelSuppression.decide 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.
D1 · Cyclomatic Complexity · WS2HeadGesture.shake (cyclomatic 22) · ×1
  • WS2HeadGesture.shake (cyclomatic 22) prototype/Core/WS2HeadGesture.swift:97 — WS2HeadGesture.shake has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DuoController.tickDesktop (cyclomatic 22) · ×1
  • DuoController.tickDesktop (cyclomatic 22) prototype/Effects/DuoController.swift:421 — DuoController.tickDesktop 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.
D1 · Cyclomatic Complexity · DuoSettingsWindow.liveChanged (cyclomatic 22) · ×1
  • DuoSettingsWindow.liveChanged (cyclomatic 22) prototype/Effects/DuoSettingsWindow.swift:1234 — DuoSettingsWindow.liveChanged has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WS2CompanionCrypto.answerM3 (cyclomatic 22) · ×1
  • WS2CompanionCrypto.answerM3 (cyclomatic 22) prototype/Support/WS2CompanionCrypto.swift:193 — WS2CompanionCrypto.answerM3 has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WindowCatalog.publish (cyclomatic 22) · ×1
  • WindowCatalog.publish (cyclomatic 22) prototype/WindowBrowser/WindowCatalog.swift:163 — WindowCatalog.publish has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PinnedPreviewController.beginInteraction (cyclomatic 21) · ×1
  • PinnedPreviewController.beginInteraction (cyclomatic 21) prototype/PinnedPreview.swift:1191 — PinnedPreviewController.beginInteraction has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ClaudeConductor.receive (cyclomatic 21) · ×1
  • ClaudeConductor.receive (cyclomatic 21) prototype/App/ClaudeConductor.swift:104 — ClaudeConductor.receive has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseReduceTransparency (cyclomatic 21) · ×1
  • GlanceProbe.exerciseReduceTransparency (cyclomatic 21) prototype/App/CheckProbes1031.swift:66 — GlanceProbe.exerciseReduceTransparency has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseSlideOverUnminimizable (cyclomatic 21) · ×1
  • GlanceProbe.exerciseSlideOverUnminimizable (cyclomatic 21) prototype/App/GapProbesSlideOver.swift:226 — GlanceProbe.exerciseSlideOverUnminimizable has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseNotchCalibration (cyclomatic 21) · ×1
  • GlanceProbe.exerciseNotchCalibration (cyclomatic 21) prototype/App/NotchShapeProbe.swift:174 — GlanceProbe.exerciseNotchCalibration has cyclomatic complexity 21 (threshold 15). Of this number, 17 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HabitWorker.readFocus (cyclomatic 21) · ×1
  • HabitWorker.readFocus (cyclomatic 21) prototype/App/HabitContext.swift:897 — HabitWorker.readFocus has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LaunchpadView.accessibilityChildren (cyclomatic 21) · ×1
  • LaunchpadView.accessibilityChildren (cyclomatic 21) prototype/App/LaunchpadView.swift:1890 — LaunchpadView.accessibilityChildren has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NowPlayingCard.renderProgress (cyclomatic 21) · ×1
  • NowPlayingCard.renderProgress (cyclomatic 21) prototype/App/NowPlayingCard.swift:556 — NowPlayingCard.renderProgress has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ScrollTap.handle (cyclomatic 21) · ×1
  • ScrollTap.handle (cyclomatic 21) prototype/App/ScrollTap.swift:161 — ScrollTap.handle has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SlideOverController.show (cyclomatic 21) · ×1
  • SlideOverController.show (cyclomatic 21) prototype/App/SlideOver.swift:386 — SlideOverController.show has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TrackpadGestureController.arrangeableWindows (cyclomatic 21) · ×1
  • TrackpadGestureController.arrangeableWindows (cyclomatic 21) prototype/App/MagicTilingRun.swift:32 — TrackpadGestureController.arrangeableWindows has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · UpdateLaunch.recordLaunch (cyclomatic 21) · ×1
  • UpdateLaunch.recordLaunch (cyclomatic 21) prototype/App/UpdaterLaunch.swift:73 — UpdateLaunch.recordLaunch has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WS2AppRuntime.openConductor (cyclomatic 21) · ×1
  • WS2AppRuntime.openConductor (cyclomatic 21) prototype/App/WS2AppRuntime.swift:413 — WS2AppRuntime.openConductor has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WS2SilentHost.offer (cyclomatic 21) · ×1
  • WS2SilentHost.offer (cyclomatic 21) prototype/App/WS2SilentHost.swift:183 — WS2SilentHost.offer has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MorphRetarget.kickKeyframes (cyclomatic 21) · ×1
  • MorphRetarget.kickKeyframes (cyclomatic 21) prototype/Core/FlickMotion.swift:362 — MorphRetarget.kickKeyframes has cyclomatic complexity 21 (threshold 15). Of this number, 16 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DuoController.prepareDesktop (cyclomatic 21) · ×1
  • DuoController.prepareDesktop (cyclomatic 21) prototype/Effects/DuoController.swift:333 — DuoController.prepareDesktop has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WindowBrowserContentView.keyDown (cyclomatic 21) · ×1
  • WindowBrowserContentView.keyDown (cyclomatic 21) prototype/WindowBrowser/WindowBrowserContentView.swift:1212 — WindowBrowserContentView.keyDown has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · WindowBrowserShotProbe.render (cyclomatic 21) · ×1
  • WindowBrowserShotProbe.render (cyclomatic 21) prototype/WindowBrowser/WindowBrowserShotProbe.swift:204 — WindowBrowserShotProbe.render has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · NotchCanvasView.morph (cyclomatic 21) · ×1
  • NotchCanvasView.morph (cyclomatic 21) prototype/App/Notch/NotchCanvas.swift:321 — NotchCanvasView.morph has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NotchCanvasView.performMorph (cyclomatic 21) · ×1
  • NotchCanvasView.performMorph (cyclomatic 21) prototype/App/Notch/NotchCanvas.swift:486 — NotchCanvasView.performMorph has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Compact.same (cyclomatic 21) · ×1
  • Compact.same (cyclomatic 21) prototype/App/Notch/NotchPanel.swift:98 — Compact.same has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · NotchTileView.drawOngoing (cyclomatic 21) · ×1
  • NotchTileView.drawOngoing (cyclomatic 21) prototype/App/Notch/NotchRowViews.swift:462 — NotchTileView.drawOngoing has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AXWindow.swift.chromeHeight (cyclomatic 21) · ×1
  • AXWindow.swift.chromeHeight (cyclomatic 21) prototype/Window/AXWindow.swift:668 — AXWindow.swift.chromeHeight has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WindowStreamCapture.stream (cyclomatic 20) · ×1
  • WindowStreamCapture.stream (cyclomatic 20) prototype/ScreenCaptureBridge.swift:482 — WindowStreamCapture.stream has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppDelegate.performTitleBarDoubleClickAction (cyclomatic 20) · ×1
  • AppDelegate.performTitleBarDoubleClickAction (cyclomatic 20) prototype/App/EventTap.swift:646 — AppDelegate.performTitleBarDoubleClickAction has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppDelegate.retargetToActiveSpaceWindow (cyclomatic 20) · ×1
  • AppDelegate.retargetToActiveSpaceWindow (cyclomatic 20) prototype/App/ShadeController.swift:9 — AppDelegate.retargetToActiveSpaceWindow 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.
D1 · Cyclomatic Complexity · HabitCenter.apply (cyclomatic 20) · ×1
  • HabitCenter.apply (cyclomatic 20) prototype/App/HabitContext.swift:1194 — HabitCenter.apply has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MenuBarRoom.measure (cyclomatic 20) · ×1
  • MenuBarRoom.measure (cyclomatic 20) prototype/App/NotchWatch.swift:241 — MenuBarRoom.measure has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · NowPlayingArtworkDecoder.decode (cyclomatic 20) · ×1
  • NowPlayingArtworkDecoder.decode (cyclomatic 20) prototype/App/NowPlayingArtwork.swift:44 — NowPlayingArtworkDecoder.decode 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.
D1 · Cyclomatic Complexity · PinchEventTap.noteTouches (cyclomatic 20) · ×1
  • PinchEventTap.noteTouches (cyclomatic 20) prototype/App/PinchEventTap.swift:113 — PinchEventTap.noteTouches has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SlideOverController.move (cyclomatic 20) · ×1
  • SlideOverController.move (cyclomatic 20) prototype/App/SlideOver.swift:920 — SlideOverController.move has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SlideOverController.beginResize (cyclomatic 20) · ×1
  • SlideOverController.beginResize (cyclomatic 20) prototype/App/SlideOver.swift:1053 — SlideOverController.beginResize 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.
D1 · Cyclomatic Complexity · SplitViewController.land (cyclomatic 20) · ×1
  • SplitViewController.land (cyclomatic 20) prototype/App/SplitView.swift:541 — SplitViewController.land has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TrackpadGestureController.refreshMonitors (cyclomatic 20) · ×1
  • TrackpadGestureController.refreshMonitors (cyclomatic 20) prototype/App/TrackpadGestures.swift:233 — TrackpadGestureController.refreshMonitors has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WS2AppRuntime.openModelPicker (cyclomatic 20) · ×1
  • WS2AppRuntime.openModelPicker (cyclomatic 20) prototype/App/WS2AppRuntime.swift:327 — WS2AppRuntime.openModelPicker 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.
D1 · Cyclomatic Complexity · WS2HookSessions.apply (cyclomatic 20) · ×1
  • WS2HookSessions.apply (cyclomatic 20) prototype/App/WS2HookServer.swift:209 — WS2HookSessions.apply has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · BystanderPolicy.observe (cyclomatic 20) · ×1
  • BystanderPolicy.observe (cyclomatic 20) prototype/Core/BystanderPolicy.swift:70 — BystanderPolicy.observe has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ScrollStrip.move (cyclomatic 20) · ×1
  • ScrollStrip.move (cyclomatic 20) prototype/Core/ScrollStrip.swift:686 — ScrollStrip.move has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WS2AppUninstallPlan.scan (cyclomatic 20) · ×1
  • WS2AppUninstallPlan.scan (cyclomatic 20) prototype/Core/WS2AppUninstallPlan.swift:79 — WS2AppUninstallPlan.scan has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WS2CameraChoice.decide (cyclomatic 20) · ×1
  • WS2CameraChoice.decide (cyclomatic 20) prototype/Core/WS2CameraChoice.swift:162 — WS2CameraChoice.decide 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.
D1 · Cyclomatic Complexity · WS2LocalLaunchProfile.admitsEffectiveConfig (cyclomatic 20) · ×1
  • WS2LocalLaunchProfile.admitsEffectiveConfig (cyclomatic 20) prototype/Support/WS2LocalLaunchProfile.swift:124 — WS2LocalLaunchProfile.admitsEffectiveConfig has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · WindowCatalogProbe.run (cyclomatic 20) · ×1
  • WindowCatalogProbe.run (cyclomatic 20) prototype/WindowBrowser/DockHoverProbe.swift:286 — WindowCatalogProbe.run has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WindowBrowserDiscovery.discover (cyclomatic 20) · ×1
  • WindowBrowserDiscovery.discover (cyclomatic 20) prototype/WindowBrowser/WindowBrowserDiscovery.swift:14 — WindowBrowserDiscovery.discover has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WindowBrowserGeometry.layoutPlan (cyclomatic 20) · ×1
  • WindowBrowserGeometry.layoutPlan (cyclomatic 20) prototype/WindowBrowser/WindowBrowserGeometry.swift:364 — WindowBrowserGeometry.layoutPlan has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · NotchCanvasView.routeRowScroll (cyclomatic 20) · ×1
  • NotchCanvasView.routeRowScroll (cyclomatic 20) prototype/App/Notch/NotchCanvas.swift:1231 — NotchCanvasView.routeRowScroll has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Content.same (cyclomatic 20) · ×1
  • Content.same (cyclomatic 20) prototype/App/Notch/NotchCanvas.swift:79 — Content.same 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.
D1 · Cyclomatic Complexity · NotchCompactView.update (cyclomatic 20) · ×1
  • NotchCompactView.update (cyclomatic 20) prototype/App/Notch/NotchCompactViews.swift:184 — NotchCompactView.update has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NotchController.finishTuck (cyclomatic 20) · ×1
  • NotchController.finishTuck (cyclomatic 20) prototype/App/Notch/NotchController.swift:961 — NotchController.finishTuck has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · NotchController.announceWhenFree (cyclomatic 20) · ×1
  • NotchController.announceWhenFree (cyclomatic 20) prototype/App/Notch/NotchController.swift:1563 — NotchController.announceWhenFree has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · AppDelegate.applicationDidFinishLaunching (cyclomatic 19) · ×1
  • AppDelegate.applicationDidFinishLaunching (cyclomatic 19) prototype/WindowShade.swift:362 — AppDelegate.applicationDidFinishLaunching 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.
D1 · Cyclomatic Complexity · AppDelegate.handleTitleBarTripleClick (cyclomatic 19) · ×1
  • AppDelegate.handleTitleBarTripleClick (cyclomatic 19) prototype/App/EventTap.swift:362 — AppDelegate.handleTitleBarTripleClick has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppDelegate.reapplyShadeHide (cyclomatic 19) · ×1
  • AppDelegate.reapplyShadeHide (cyclomatic 19) prototype/App/FoldTransaction.swift:372 — AppDelegate.reapplyShadeHide has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppDelegate.observeRestoredWindow (cyclomatic 19) · ×1
  • AppDelegate.observeRestoredWindow (cyclomatic 19) prototype/Effects/RestoreVerification.swift:5 — AppDelegate.observeRestoredWindow has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · AppDelegate.rescueActionVerified (cyclomatic 19) · ×1
  • AppDelegate.rescueActionVerified (cyclomatic 19) prototype/Recovery/Rescue.swift:123 — AppDelegate.rescueActionVerified has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · AudioLevelController.reevaluate (cyclomatic 19) · ×1
  • AudioLevelController.reevaluate (cyclomatic 19) prototype/App/AudioLevelTap.swift:432 — AudioLevelController.reevaluate has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · FaceRegionPixels.rgbSamples (cyclomatic 19) · ×1
  • FaceRegionPixels.rgbSamples (cyclomatic 19) prototype/App/FaceObservationSource.swift:177 — FaceRegionPixels.rgbSamples has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseShelfPeek (cyclomatic 19) · ×1
  • GlanceProbe.exerciseShelfPeek (cyclomatic 19) prototype/App/NotchShelfProbe.swift:64 — GlanceProbe.exerciseShelfPeek has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LaunchpadView.layoutPill (cyclomatic 19) · ×1
  • LaunchpadView.layoutPill (cyclomatic 19) prototype/App/LaunchpadView.swift:526 — LaunchpadView.layoutPill 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.
D1 · Cyclomatic Complexity · LaunchpadView.target (cyclomatic 19) · ×1
  • LaunchpadView.target (cyclomatic 19) prototype/App/LaunchpadView.swift:688 — LaunchpadView.target 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.
D1 · Cyclomatic Complexity · LaunchpadView.showZone (cyclomatic 19) · ×1
  • LaunchpadView.showZone (cyclomatic 19) prototype/App/LaunchpadView.swift:1513 — LaunchpadView.showZone has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MenuBarRoom.scanCover (cyclomatic 19) · ×1
  • MenuBarRoom.scanCover (cyclomatic 19) prototype/App/NotchWatch.swift:429 — MenuBarRoom.scanCover has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 2 function items inside it that branch (scan, layer). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · SLSOffscreenCheckProbe.exercise (cyclomatic 19) · ×1
  • SLSOffscreenCheckProbe.exercise (cyclomatic 19) prototype/App/SLSOffscreenCheckProbe.swift:29 — SLSOffscreenCheckProbe.exercise 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.
D1 · Cyclomatic Complexity · ExplainerElementLayer.build (cyclomatic 19) · ×1
  • ExplainerElementLayer.build (cyclomatic 19) prototype/App/SettingsExplainerView.swift:544 — ExplainerElementLayer.build has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · SilentCoverProbe.exercise (cyclomatic 19) · ×1
  • SilentCoverProbe.exercise (cyclomatic 19) prototype/App/SilentCoverProbe.swift:18 — SilentCoverProbe.exercise 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.
D1 · Cyclomatic Complexity · SlideOverController.endEdgeDrag (cyclomatic 19) · ×1
  • SlideOverController.endEdgeDrag (cyclomatic 19) prototype/App/SlideOver.swift:743 — SlideOverController.endEdgeDrag 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.
D1 · Cyclomatic Complexity · SlideOverController.pin (cyclomatic 19) · ×1
  • SlideOverController.pin (cyclomatic 19) prototype/App/SlideOver.swift:964 — SlideOverController.pin has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ArtworkPalette.make (cyclomatic 19) · ×1
  • ArtworkPalette.make (cyclomatic 19) prototype/Core/ArtworkPalette.swift:75 — ArtworkPalette.make has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ConductorSession.expire (cyclomatic 19) · ×1
  • ConductorSession.expire (cyclomatic 19) prototype/Core/ConductorSession.swift:660 — ConductorSession.expire has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: ConductorNotch.text (cyclomatic 31) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · CornerFitter.fit (cyclomatic 19) · ×1
  • CornerFitter.fit (cyclomatic 19) prototype/Core/DisplayShape.swift:167 — CornerFitter.fit has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FaceEnrollmentFlow.collect (cyclomatic 19) · ×1
  • FaceEnrollmentFlow.collect (cyclomatic 19) prototype/Core/FaceEnrollmentFlow.swift:228 — FaceEnrollmentFlow.collect 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.
D1 · Cyclomatic Complexity · FaceGestureTracker.usable (cyclomatic 19) · ×1
  • FaceGestureTracker.usable (cyclomatic 19) prototype/Core/FaceGestureTracker.swift:109 — FaceGestureTracker.usable has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · MiddleDrag.update (cyclomatic 19) · ×1
  • MiddleDrag.update (cyclomatic 19) prototype/Core/MiddleDrag.swift:55 — MiddleDrag.update has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SeamLayout.fitted (cyclomatic 19) · ×1
  • SeamLayout.fitted (cyclomatic 19) prototype/Core/SeamLayout.swift:123 — SeamLayout.fitted has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WS2HeadGesture.nod (cyclomatic 19) · ×1
  • WS2HeadGesture.nod (cyclomatic 19) prototype/Core/WS2HeadGesture.swift:67 — WS2HeadGesture.nod has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WS2Posture.decide (cyclomatic 19) · ×1
  • WS2Posture.decide (cyclomatic 19) prototype/Core/WS2Posture.swift:79 — WS2Posture.decide has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · DockProbeSupport.firstAppItemGeometry (cyclomatic 19) · ×1
  • DockProbeSupport.firstAppItemGeometry (cyclomatic 19) prototype/WindowBrowser/DockHoverProbe.swift:519 — DockProbeSupport.firstAppItemGeometry has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WindowBrowserController.handleImmediate (cyclomatic 19) · ×1
  • WindowBrowserController.handleImmediate (cyclomatic 19) prototype/WindowBrowser/WindowBrowserController.swift:2096 — WindowBrowserController.handleImmediate has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WindowBrowserSurfaceStyle.applyCard (cyclomatic 19) · ×1
  • WindowBrowserSurfaceStyle.applyCard (cyclomatic 19) prototype/WindowBrowser/WindowBrowserViews.swift:131 — WindowBrowserSurfaceStyle.applyCard has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NotchPanel.updateVisibility (cyclomatic 19) · ×1
  • NotchPanel.updateVisibility (cyclomatic 19) prototype/App/Notch/NotchPanel.swift:905 — NotchPanel.updateVisibility has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · NotchPanel.hintText (cyclomatic 19) · ×1
  • NotchPanel.hintText (cyclomatic 19) prototype/App/Notch/NotchPanel.swift:2421 — NotchPanel.hintText has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NotchTileView.drawAwayCell (cyclomatic 19) · ×1
  • NotchTileView.drawAwayCell (cyclomatic 19) prototype/App/Notch/NotchRowViews.swift:548 — NotchTileView.drawAwayCell has cyclomatic complexity 19 (threshold 15). Of this number, 13 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppDelegate.applyFeature (cyclomatic 18) · ×1
  • AppDelegate.applyFeature (cyclomatic 18) prototype/App/Preferences.swift:234 — AppDelegate.applyFeature 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 is NOT this file's highest cyclomatic complexity: AppDelegate.explainerAction (cyclomatic 24) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · AppDelegate.makeShadePlan (cyclomatic 18) · ×1
  • AppDelegate.makeShadePlan (cyclomatic 18) prototype/App/ShadeController.swift:114 — AppDelegate.makeShadePlan has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CarryController.layout (cyclomatic 18) · ×1
  • CarryController.layout (cyclomatic 18) prototype/App/Carry.swift:316 — CarryController.layout has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FocusTimerCard.render (cyclomatic 18) · ×1
  • FocusTimerCard.render (cyclomatic 18) prototype/App/FocusTimerCard.swift:83 — FocusTimerCard.render has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseCarry (cyclomatic 18) · ×1
  • GlanceProbe.exerciseCarry (cyclomatic 18) prototype/App/GlanceProbe.swift:687 — GlanceProbe.exerciseCarry has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseDisplayHotplug (cyclomatic 18) · ×1
  • GlanceProbe.exerciseDisplayHotplug (cyclomatic 18) prototype/App/CheckProbes1031.swift:193 — GlanceProbe.exerciseDisplayHotplug has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · LaunchpadView.moveFolderDrag (cyclomatic 18) · ×1
  • LaunchpadView.moveFolderDrag (cyclomatic 18) prototype/App/LaunchpadFolders.swift:774 — LaunchpadView.moveFolderDrag has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LaunchpadView.spring (cyclomatic 18) · ×1
  • LaunchpadView.spring (cyclomatic 18) prototype/App/LaunchpadOpenWith.swift:257 — LaunchpadView.spring has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · NotchActivityController.publish (cyclomatic 18) · ×1
  • NotchActivityController.publish (cyclomatic 18) prototype/App/NotchActivityController.swift:493 — NotchActivityController.publish has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to one function item inside it that branches (equivalent). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · NotchAuthenticationController.authorize (cyclomatic 18) · ×1
  • NotchAuthenticationController.authorize (cyclomatic 18) prototype/App/NotchAuthentication.swift:80 — NotchAuthenticationController.authorize has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MenuBarRoom.menuRoom (cyclomatic 18) · ×1
  • MenuBarRoom.menuRoom (cyclomatic 18) prototype/App/NotchWatch.swift:373 — MenuBarRoom.menuRoom has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PresenceLockDriver.apply (cyclomatic 18) · ×1
  • PresenceLockDriver.apply (cyclomatic 18) prototype/App/PresenceLockDriver.swift:393 — PresenceLockDriver.apply has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · WS2AgentSessionView.render (cyclomatic 18) · ×1
  • WS2AgentSessionView.render (cyclomatic 18) prototype/App/WS2AgentSessionView.swift:35 — WS2AgentSessionView.render has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · WS2OwnedCodexSession.init (cyclomatic 18) · ×1
  • WS2OwnedCodexSession.init (cyclomatic 18) prototype/App/WS2OwnedCodexSession.swift:25 — WS2OwnedCodexSession.init has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WS2RemoteHost.receive (cyclomatic 18) · ×1
  • WS2RemoteHost.receive (cyclomatic 18) prototype/App/WS2RemoteHost.swift:482 — WS2RemoteHost.receive has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WS2RemoteHost.finish (cyclomatic 18) · ×1
  • WS2RemoteHost.finish (cyclomatic 18) prototype/App/WS2RemoteHost.swift:952 — WS2RemoteHost.finish has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WS2SilentHost.startPersonalPhrasesIfConfigured (cyclomatic 18) · ×1
  • WS2SilentHost.startPersonalPhrasesIfConfigured (cyclomatic 18) prototype/App/WS2SilentHost.swift:65 — WS2SilentHost.startPersonalPhrasesIfConfigured has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WelcomeView.show (cyclomatic 18) · ×1
  • WelcomeView.show (cyclomatic 18) prototype/App/Welcome.swift:313 — WelcomeView.show has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · AwaySummary.build (cyclomatic 18) · ×1
  • AwaySummary.build (cyclomatic 18) prototype/Core/AwaySummary.swift:150 — AwaySummary.build has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ElsewhereWindows.plan (cyclomatic 18) · ×1
  • ElsewhereWindows.plan (cyclomatic 18) prototype/Core/ElsewhereWindows.swift:55 — ElsewhereWindows.plan has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · FaceThresholdCalibration.isValid (cyclomatic 18) · ×1
  • FaceThresholdCalibration.isValid (cyclomatic 18) prototype/Core/FaceThresholdCalibration.swift:228 — FaceThresholdCalibration.isValid has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · GazeCalibrationFit.fit (cyclomatic 18) · ×1
  • GazeCalibrationFit.fit (cyclomatic 18) prototype/Core/GazeAttention.swift:198 — GazeCalibrationFit.fit has cyclomatic complexity 18 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · HabitMenuKey.init (cyclomatic 18) · ×1
  • HabitMenuKey.init (cyclomatic 18) prototype/Core/HabitRules.swift:580 — HabitMenuKey.init has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: HabitKey.name (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · InteractionCoordinator.admit (cyclomatic 18) · ×1
  • InteractionCoordinator.admit (cyclomatic 18) prototype/Core/InteractionCoordinator.swift:288 — InteractionCoordinator.admit has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RemoteEventRouter.route (cyclomatic 18) · ×1
  • RemoteEventRouter.route (cyclomatic 18) prototype/Core/RemoteEventRouter.swift:16 — RemoteEventRouter.route has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · GestureRecognizer.swipeFrame (cyclomatic 18) · ×1
  • GestureRecognizer.swipeFrame (cyclomatic 18) prototype/Core/TrackpadGesture.swift:587 — GestureRecognizer.swipeFrame has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: ScreenTile.action (cyclomatic 33) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · WS2DeviceInputGate.button (cyclomatic 18) · ×1
  • WS2DeviceInputGate.button (cyclomatic 18) prototype/Core/WS2DeviceInputGate.swift:30 — WS2DeviceInputGate.button has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WS2SilentIntent.admit (cyclomatic 18) · ×1
  • WS2SilentIntent.admit (cyclomatic 18) prototype/Core/WS2SilentIntent.swift:16 — WS2SilentIntent.admit has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WS2SilentSession.confirm (cyclomatic 18) · ×1
  • WS2SilentSession.confirm (cyclomatic 18) prototype/Core/WS2SilentSession.swift:135 — WS2SilentSession.confirm has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppleSPUAccelerometer.receive (cyclomatic 18) · ×1
  • AppleSPUAccelerometer.receive (cyclomatic 18) prototype/Effects/AppleSPUAccelerometer.swift:235 — AppleSPUAccelerometer.receive has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WindowFoldEffects.fallback (cyclomatic 18) · ×1
  • WindowFoldEffects.fallback (cyclomatic 18) prototype/Effects/WindowFoldEffects.swift:451 — WindowFoldEffects.fallback has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WS2DuplexProcess.init (cyclomatic 18) · ×1
  • WS2DuplexProcess.init (cyclomatic 18) prototype/Support/WS2DuplexProcess.swift:44 — WS2DuplexProcess.init has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WS2HookConfiguration.preview (cyclomatic 18) · ×1
  • WS2HookConfiguration.preview (cyclomatic 18) prototype/Support/WS2HookConfiguration.swift:48 — WS2HookConfiguration.preview has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WindowStateHub.reconcile (cyclomatic 18) · ×1
  • WindowStateHub.reconcile (cyclomatic 18) prototype/Window/WindowStateHub.swift:459 — WindowStateHub.reconcile has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WindowBrowserController.configurePanel (cyclomatic 18) · ×1
  • WindowBrowserController.configurePanel (cyclomatic 18) prototype/WindowBrowser/WindowBrowserController.swift:1038 — WindowBrowserController.configurePanel has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WindowBrowserController.requestThumbnails (cyclomatic 18) · ×1
  • WindowBrowserController.requestThumbnails (cyclomatic 18) prototype/WindowBrowser/WindowBrowserController.swift:1556 — WindowBrowserController.requestThumbnails has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WindowPlacementGeometry.targetFrame (cyclomatic 18) · ×1
  • WindowPlacementGeometry.targetFrame (cyclomatic 18) prototype/WindowBrowser/WindowPlacement.swift:90 — WindowPlacementGeometry.targetFrame has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · NotchController.mergeIntoBurst (cyclomatic 18) · ×1
  • NotchController.mergeIntoBurst (cyclomatic 18) prototype/App/Notch/NotchController.swift:1661 — NotchController.mergeIntoBurst has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · NotchShoulders.move (cyclomatic 18) · ×1
  • NotchShoulders.move (cyclomatic 18) prototype/App/Notch/NotchShoulders.swift:123 — NotchShoulders.move has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ShadeStrip.swift.dominantIconColor (cyclomatic 18) · ×1
  • ShadeStrip.swift.dominantIconColor (cyclomatic 18) prototype/Overlay/ShadeStrip.swift:21 — ShadeStrip.swift.dominantIconColor has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppDelegate.hideWindow (cyclomatic 17) · ×1
  • AppDelegate.hideWindow (cyclomatic 17) prototype/App/FoldTransaction.swift:785 — AppDelegate.hideWindow has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppDelegate.windowBrowserManagedSnapshots (cyclomatic 17) · ×1
  • AppDelegate.windowBrowserManagedSnapshots (cyclomatic 17) prototype/WindowBrowser/WindowBrowserAppDelegate.swift:11 — AppDelegate.windowBrowserManagedSnapshots has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BystanderTuck.tuckPrivateWindows (cyclomatic 17) · ×1
  • BystanderTuck.tuckPrivateWindows (cyclomatic 17) prototype/App/BystanderTuck.swift:26 — BystanderTuck.tuckPrivateWindows has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · DirectionKeyPresets.choose (cyclomatic 17) · ×1
  • DirectionKeyPresets.choose (cyclomatic 17) prototype/App/DirectionKeyPresets.swift:71 — DirectionKeyPresets.choose has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · FaceAlignment.geometry (cyclomatic 17) · ×1
  • FaceAlignment.geometry (cyclomatic 17) prototype/App/FaceEmbedder.swift:37 — FaceAlignment.geometry has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · FaceScanExperiment.scanFrame (cyclomatic 17) · ×1
  • FaceScanExperiment.scanFrame (cyclomatic 17) prototype/App/FaceScanExperiment.swift:427 — FaceScanExperiment.scanFrame has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · FaceScanExperiment.challengeFrame (cyclomatic 17) · ×1
  • FaceScanExperiment.challengeFrame (cyclomatic 17) prototype/App/FaceScanExperiment.swift:495 — FaceScanExperiment.challengeFrame has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GlanceController.thumbnailTarget (cyclomatic 17) · ×1
  • GlanceController.thumbnailTarget (cyclomatic 17) prototype/App/Glance.swift:497 — GlanceController.thumbnailTarget has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseDockGestures (cyclomatic 17) · ×1
  • GlanceProbe.exerciseDockGestures (cyclomatic 17) prototype/App/DockSwipeProbe.swift:10 — GlanceProbe.exerciseDockGestures has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseBrowserIdentity (cyclomatic 17) · ×1
  • GlanceProbe.exerciseBrowserIdentity (cyclomatic 17) prototype/WindowBrowser/WindowBrowserInstanceProbe.swift:8 — GlanceProbe.exerciseBrowserIdentity has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseBrowserMore (cyclomatic 17) · ×1
  • GlanceProbe.exerciseBrowserMore (cyclomatic 17) prototype/WindowBrowser/WindowBrowserMoreProbe.swift:10 — GlanceProbe.exerciseBrowserMore has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Card.update (cyclomatic 17) · ×1
  • Card.update (cyclomatic 17) prototype/App/LaunchpadActivities.swift:78 — Card.update has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · NotchActivityView.update (cyclomatic 17) · ×1
  • NotchActivityView.update (cyclomatic 17) prototype/App/NotchActivityView.swift:47 — NotchActivityView.update has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · NotchActivityView.swipe (cyclomatic 17) · ×1
  • NotchActivityView.swipe (cyclomatic 17) prototype/App/NotchActivityView.swift:124 — NotchActivityView.swipe has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NotchSpaceGate.readFocusedWindow (cyclomatic 17) · ×1
  • NotchSpaceGate.readFocusedWindow (cyclomatic 17) prototype/App/NotchSpaceGate.swift:173 — NotchSpaceGate.readFocusedWindow has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PresencePrivateTuck.tuck (cyclomatic 17) · ×1
  • PresencePrivateTuck.tuck (cyclomatic 17) prototype/App/PresenceLockDriver.swift:37 — PresencePrivateTuck.tuck has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ScrollStripController.applyWatch (cyclomatic 17) · ×1
  • ScrollStripController.applyWatch (cyclomatic 17) prototype/App/ScrollStripRun.swift:1562 — ScrollStripController.applyWatch has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SplitViewController.settle (cyclomatic 17) · ×1
  • SplitViewController.settle (cyclomatic 17) prototype/App/SplitView.swift:610 — SplitViewController.settle has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TrackpadGestureController.doubleTap (cyclomatic 17) · ×1
  • TrackpadGestureController.doubleTap (cyclomatic 17) prototype/App/TrackpadGestures.swift:776 — TrackpadGestureController.doubleTap has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WS2AppRuntime.handleFocusEffects (cyclomatic 17) · ×1
  • WS2AppRuntime.handleFocusEffects (cyclomatic 17) prototype/App/WS2AppRuntime.swift:666 — WS2AppRuntime.handleFocusEffects has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · WS2ConductorPageView.renderSessions (cyclomatic 17) · ×1
  • WS2ConductorPageView.renderSessions (cyclomatic 17) prototype/App/WS2ConductorPage.swift:557 — WS2ConductorPageView.renderSessions has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WS2HookApprovalHost.allow (cyclomatic 17) · ×1
  • WS2HookApprovalHost.allow (cyclomatic 17) prototype/App/WS2HookApprovalHost.swift:100 — WS2HookApprovalHost.allow has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WS2OwnedLaunchController.synchronizeThreadAndTurn (cyclomatic 17) · ×1
  • WS2OwnedLaunchController.synchronizeThreadAndTurn (cyclomatic 17) prototype/App/WS2OwnedLaunchController.swift:428 — WS2OwnedLaunchController.synchronizeThreadAndTurn has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WindowGlide.run (cyclomatic 17) · ×1
  • WindowGlide.run (cyclomatic 17) prototype/App/WindowGlide.swift:89 — WindowGlide.run has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CaptureIndicatorRemoval.detect (cyclomatic 17) · ×1
  • CaptureIndicatorRemoval.detect (cyclomatic 17) prototype/Capture/CaptureIndicatorRemoval.swift:120 — CaptureIndicatorRemoval.detect has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Outline.points (cyclomatic 17) · ×1
  • Outline.points (cyclomatic 17) prototype/Core/DisplayShape.swift:109 — Outline.points has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FileShelfModel.add (cyclomatic 17) · ×1
  • FileShelfModel.add (cyclomatic 17) prototype/Core/FileShelfModel.swift:104 — FileShelfModel.add has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MiddleDrag.handle (cyclomatic 17) · ×1
  • MiddleDrag.handle (cyclomatic 17) prototype/Core/MiddleDrag.swift:32 — MiddleDrag.handle has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CodingSessionActivities.apply (cyclomatic 17) · ×1
  • CodingSessionActivities.apply (cyclomatic 17) prototype/Core/NotchActivities.swift:1054 — CodingSessionActivities.apply has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AgentSessionWindowMatch.strength (cyclomatic 17) · ×1
  • AgentSessionWindowMatch.strength (cyclomatic 17) prototype/Core/NotchActivities.swift:1272 — AgentSessionWindowMatch.strength has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · NotchGlancePlan.route (cyclomatic 17) · ×1
  • NotchGlancePlan.route (cyclomatic 17) prototype/Core/NotchGlancePlan.swift:57 — NotchGlancePlan.route has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PresenceLockGlue.commands (cyclomatic 17) · ×1
  • PresenceLockGlue.commands (cyclomatic 17) prototype/Core/PresenceLockGlue.swift:67 — PresenceLockGlue.commands has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · SeamLayout.isPair (cyclomatic 17) · ×1
  • SeamLayout.isPair (cyclomatic 17) prototype/Core/SeamLayout.swift:211 — SeamLayout.isPair has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WS2FoldCallbackStamp.accepts (cyclomatic 17) · ×1
  • WS2FoldCallbackStamp.accepts (cyclomatic 17) prototype/Core/WS2FoldCallbackStamp.swift:15 — WS2FoldCallbackStamp.accepts has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Parser.value (cyclomatic 17) · ×1
  • Parser.value (cyclomatic 17) prototype/Core/WS2StrictJSON.swift:22 — Parser.value has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EffectFrameAwaiter.first (cyclomatic 17) · ×1
  • EffectFrameAwaiter.first (cyclomatic 17) prototype/Effects/EffectFrameAwaiter.swift:6 — EffectFrameAwaiter.first has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · SettingsDesignPreview.compareCropGeometry (cyclomatic 17) · ×1
  • SettingsDesignPreview.compareCropGeometry (cyclomatic 17) prototype/Effects/SettingsDesignPreview.swift:218 — SettingsDesignPreview.compareCropGeometry has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · JournalNumeric.spaceID (cyclomatic 17) · ×1
  • JournalNumeric.spaceID (cyclomatic 17) prototype/Recovery/JournalNumeric.swift:62 — JournalNumeric.spaceID has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WS2CompanionChannel.sendEvent (cyclomatic 17) · ×1
  • WS2CompanionChannel.sendEvent (cyclomatic 17) prototype/Support/WS2CompanionChannel.swift:188 — WS2CompanionChannel.sendEvent has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WS2DuplexProcess.writeReady (cyclomatic 17) · ×1
  • WS2DuplexProcess.writeReady (cyclomatic 17) prototype/Support/WS2DuplexProcess.swift:177 — WS2DuplexProcess.writeReady has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WindowBrowserController.beginCardDrag (cyclomatic 17) · ×1
  • WindowBrowserController.beginCardDrag (cyclomatic 17) prototype/WindowBrowser/WindowBrowserController.swift:2426 — WindowBrowserController.beginCardDrag has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WindowBrowserContentPlan.index (cyclomatic 17) · ×1
  • WindowBrowserContentPlan.index (cyclomatic 17) prototype/WindowBrowser/WindowBrowserGeometry.swift:264 — WindowBrowserContentPlan.index has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NotchCanvasView.present (cyclomatic 17) · ×1
  • NotchCanvasView.present (cyclomatic 17) prototype/App/Notch/NotchCanvas.swift:768 — NotchCanvasView.present has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · NotchController.hoverChanged (cyclomatic 17) · ×1
  • NotchController.hoverChanged (cyclomatic 17) prototype/App/Notch/NotchController.swift:1157 — NotchController.hoverChanged has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NotchController.presentLevel (cyclomatic 17) · ×1
  • NotchController.presentLevel (cyclomatic 17) prototype/App/Notch/NotchController.swift:1365 — NotchController.presentLevel has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · history.arrange (cyclomatic 17) · ×1
  • history.arrange (cyclomatic 17) site/history.js:98 — history.arrange has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppDelegate.restoreArrangedOverlayFrames (cyclomatic 16) · ×1
  • AppDelegate.restoreArrangedOverlayFrames (cyclomatic 16) prototype/App/ArrangeController.swift:9 — AppDelegate.restoreArrangedOverlayFrames has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppDelegate.screenParametersChanged (cyclomatic 16) · ×1
  • AppDelegate.screenParametersChanged (cyclomatic 16) prototype/App/FoldTransaction.swift:1264 — AppDelegate.screenParametersChanged has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppDelegate.arrangeThumbnailEntries (cyclomatic 16) · ×1
  • AppDelegate.arrangeThumbnailEntries (cyclomatic 16) prototype/App/Thumbnail.swift:716 — AppDelegate.arrangeThumbnailEntries has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FileShelfNameLayout.lines (cyclomatic 16) · ×1
  • FileShelfNameLayout.lines (cyclomatic 16) prototype/App/FileShelfView.swift:564 — FileShelfNameLayout.lines has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FileShelfView.rowsChanged (cyclomatic 16) · ×1
  • FileShelfView.rowsChanged (cyclomatic 16) prototype/App/FileShelfView.swift:1017 — FileShelfView.rowsChanged has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseDockAutohideFrames (cyclomatic 16) · ×1
  • GlanceProbe.exerciseDockAutohideFrames (cyclomatic 16) prototype/App/CheckProbes1031.swift:27 — GlanceProbe.exerciseDockAutohideFrames has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseFlicks (cyclomatic 16) · ×1
  • GlanceProbe.exerciseFlicks (cyclomatic 16) prototype/App/GestureProbe.swift:2281 — GlanceProbe.exerciseFlicks has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GlanceProbe.exerciseQuietDefaults (cyclomatic 16) · ×1
  • GlanceProbe.exerciseQuietDefaults (cyclomatic 16) prototype/App/QuietDefaultsProbe.swift:10 — GlanceProbe.exerciseQuietDefaults has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HabitCenter.mouse (cyclomatic 16) · ×1
  • HabitCenter.mouse (cyclomatic 16) prototype/App/HabitContext.swift:1647 — HabitCenter.mouse has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LaunchpadController.place (cyclomatic 16) · ×1
  • LaunchpadController.place (cyclomatic 16) prototype/App/LaunchpadController.swift:568 — LaunchpadController.place has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CGEventPasswordTyper.type (cyclomatic 16) · ×1
  • CGEventPasswordTyper.type (cyclomatic 16) prototype/App/LockScreenPasswordEntry.swift:37 — CGEventPasswordTyper.type has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NowPlayingCard.crossfadeVolume (cyclomatic 16) · ×1
  • NowPlayingCard.crossfadeVolume (cyclomatic 16) prototype/App/NowPlayingCard.swift:855 — NowPlayingCard.crossfadeVolume has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · StripPeek.verdict (cyclomatic 16) · ×1
  • StripPeek.verdict (cyclomatic 16) prototype/App/ScrollStripPeek.swift:206 — StripPeek.verdict has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ScrollStripController.lateProbe (cyclomatic 16) · ×1
  • ScrollStripController.lateProbe (cyclomatic 16) prototype/App/ScrollStripRun.swift:1298 — ScrollStripController.lateProbe has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · SettingsExplainerView.apply (cyclomatic 16) · ×1
  • SettingsExplainerView.apply (cyclomatic 16) prototype/App/SettingsExplainerView.swift:74 — SettingsExplainerView.apply has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SlideOverController.flipToFreeEdge (cyclomatic 16) · ×1
  • SlideOverController.flipToFreeEdge (cyclomatic 16) prototype/App/SlideOver.swift:315 — SlideOverController.flipToFreeEdge has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · TrackpadGestureController.touchesChanged (cyclomatic 16) · ×1
  • TrackpadGestureController.touchesChanged (cyclomatic 16) prototype/App/TrackpadGestures.swift:1518 — TrackpadGestureController.touchesChanged has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TrackpadGestureController.moveToNextDisplay (cyclomatic 16) · ×1
  • TrackpadGestureController.moveToNextDisplay (cyclomatic 16) prototype/App/MagicTilingRun.swift:274 — TrackpadGestureController.moveToNextDisplay has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WS2CodexApprovalHost.receive (cyclomatic 16) · ×1
  • WS2CodexApprovalHost.receive (cyclomatic 16) prototype/App/WS2CodexApprovalHost.swift:79 — WS2CodexApprovalHost.receive has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WelcomeView.updateGrants (cyclomatic 16) · ×1
  • WelcomeView.updateGrants (cyclomatic 16) prototype/App/Welcome.swift:642 — WelcomeView.updateGrants has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WindowSwitcher.collect (cyclomatic 16) · ×1
  • WindowSwitcher.collect (cyclomatic 16) prototype/App/WindowSwitcher.swift:351 — WindowSwitcher.collect has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CaptureIndicatorProbe.capture (cyclomatic 16) · ×1
  • CaptureIndicatorProbe.capture (cyclomatic 16) prototype/Capture/CaptureIndicatorProbe.swift:55 — CaptureIndicatorProbe.capture has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ConductorRecognizer.toneCandidate (cyclomatic 16) · ×1
  • ConductorRecognizer.toneCandidate (cyclomatic 16) prototype/Core/ConductorGesture.swift:126 — ConductorRecognizer.toneCandidate has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DisplayShape.resolve (cyclomatic 16) · ×1
  • DisplayShape.resolve (cyclomatic 16) prototype/Core/DisplayShape.swift:471 — DisplayShape.resolve has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FaceGestureTracker.stable (cyclomatic 16) · ×1
  • FaceGestureTracker.stable (cyclomatic 16) prototype/Core/FaceGestureTracker.swift:123 — FaceGestureTracker.stable has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · FileShelfEntry.isValid (cyclomatic 16) · ×1
  • FileShelfEntry.isValid (cyclomatic 16) prototype/Core/FileShelfModel.swift:43 — FileShelfEntry.isValid has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · GazeFeatures.eye (cyclomatic 16) · ×1
  • GazeFeatures.eye (cyclomatic 16) prototype/Core/GazeAttention.swift:64 — GazeFeatures.eye has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GlanceIntent.sample (cyclomatic 16) · ×1
  • GlanceIntent.sample (cyclomatic 16) prototype/Core/GlanceIntent.swift:127 — GlanceIntent.sample has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HabitWords.demo (cyclomatic 16) · ×1
  • HabitWords.demo (cyclomatic 16) prototype/Core/HabitRules.swift:1364 — HabitWords.demo has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: HabitKey.name (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · InteractionCoordinator.remind (cyclomatic 16) · ×1
  • InteractionCoordinator.remind (cyclomatic 16) prototype/Core/InteractionCoordinator.swift:256 — InteractionCoordinator.remind has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · NotchActivityStore.upsert (cyclomatic 16) · ×1
  • NotchActivityStore.upsert (cyclomatic 16) prototype/Core/NotchActivities.swift:708 — NotchActivityStore.upsert has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ScrollSession.scroll (cyclomatic 16) · ×1
  • ScrollSession.scroll (cyclomatic 16) prototype/Core/ScrollSession.swift:66 — ScrollSession.scroll has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ScrollStrip.seam (cyclomatic 16) · ×1
  • ScrollStrip.seam (cyclomatic 16) prototype/Core/ScrollStrip.swift:624 — ScrollStrip.seam has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Parser.number (cyclomatic 16) · ×1
  • Parser.number (cyclomatic 16) prototype/Core/WS2StrictJSON.swift:55 — Parser.number has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DuoController.settingsChanged (cyclomatic 16) · ×1
  • DuoController.settingsChanged (cyclomatic 16) prototype/Effects/DuoController.swift:235 — DuoController.settingsChanged has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · JournalNumeric.exactUInt32 (cyclomatic 16) · ×1
  • JournalNumeric.exactUInt32 (cyclomatic 16) prototype/Recovery/JournalNumeric.swift:39 — JournalNumeric.exactUInt32 has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WS2DuplexProcess.readReady (cyclomatic 16) · ×1
  • WS2DuplexProcess.readReady (cyclomatic 16) prototype/Support/WS2DuplexProcess.swift:203 — WS2DuplexProcess.readReady has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WindowStateHub.diff (cyclomatic 16) · ×1
  • WindowStateHub.diff (cyclomatic 16) prototype/Window/WindowStateHub.swift:406 — WindowStateHub.diff has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WindowThumbnailService.request (cyclomatic 16) · ×1
  • WindowThumbnailService.request (cyclomatic 16) prototype/WindowBrowser/WindowThumbnailService.swift:413 — WindowThumbnailService.request has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · NotchCanvasView.setAuthentication (cyclomatic 16) · ×1
  • NotchCanvasView.setAuthentication (cyclomatic 16) prototype/App/Notch/NotchCanvas.swift:159 — NotchCanvasView.setAuthentication has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NotchCanvasView.placeCompanion (cyclomatic 16) · ×1
  • NotchCanvasView.placeCompanion (cyclomatic 16) prototype/App/Notch/NotchCanvas.swift:853 — NotchCanvasView.placeCompanion has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NotchPanel.minimumShapes (cyclomatic 16) · ×1
  • NotchPanel.minimumShapes (cyclomatic 16) prototype/App/Notch/NotchPanel.swift:1772 — NotchPanel.minimumShapes has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Compact.layoutSame (cyclomatic 16) · ×1
  • Compact.layoutSame (cyclomatic 16) prototype/App/Notch/NotchPanel.swift:111 — Compact.layoutSame has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · GlanceProbe.exerciseLaunchpadKeys (cognitive 149) · ×1
  • GlanceProbe.exerciseLaunchpadKeys (cognitive 149) prototype/App/LaunchpadKeysProbe.swift:27 — GlanceProbe.exerciseLaunchpadKeys has cognitive complexity 149 (threshold 15). Drivers by points: boolean chains 61, if/else 40 (47 pts), ternaries 21 (32 pts), loops 5 (6 pts), match/switch 1 (3 pts) (nesting depth added 21). Of this number, 130 points are the body's own statements and 19 belong to 7 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · GlanceProbe.exercise (cognitive 144) · ×1
  • GlanceProbe.exercise (cognitive 144) prototype/App/GlanceProbe.swift:117 — GlanceProbe.exercise has cognitive complexity 144 (threshold 15). Drivers by points: if/else 99 (112 pts), boolean chains 23, loops 4 (7 pts), ternaries 2 (nesting depth added 16). Of this number, 142 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · GlanceProbe.exerciseFullScreenDesktops (cognitive 141) · ×1
  • GlanceProbe.exerciseFullScreenDesktops (cognitive 141) prototype/App/FullScreenProbe.swift:11 — GlanceProbe.exerciseFullScreenDesktops has cognitive complexity 141 (threshold 15). Drivers by points: if/else 34 (79 pts), boolean chains 34, ternaries 7 (23 pts), error handling 2 (3 pts), loops 2 (nesting depth added 62). Of this number, 117 points are the body's own statements and 24 belong to 7 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConductorSession.receive (cognitive 140) · ×1
  • ConductorSession.receive (cognitive 140) prototype/Core/ConductorSession.swift:223 — ConductorSession.receive has cognitive complexity 140 (threshold 15). Drivers by points: if/else 40 (78 pts), boolean chains 57, match/switch 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · REDACTED.top-level code (cognitive 136) · ×1
  • REDACTED.top-level code (cognitive 136) prototype/main.swift:4 — REDACTED.top-level code has cognitive complexity 136 (threshold 15). Drivers by points: if/else 57 (74 pts), ternaries 11 (34 pts), loops 6 (13 pts), boolean chains 11, error handling 2 (4 pts) (nesting depth added 49). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlanceProbe.exerciseNotch (cognitive 135) · ×1
  • GlanceProbe.exerciseNotch (cognitive 135) prototype/App/GestureProbe.swift:1906 — GlanceProbe.exerciseNotch has cognitive complexity 135 (threshold 15). Drivers by points: boolean chains 70, ternaries 22 (30 pts), if/else 24 (27 pts), loops 8 (nesting depth added 11). Of this number, 123 points are the body's own statements and 12 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · WS2SilentApply.perform (cognitive 133) · ×1
  • WS2SilentApply.perform (cognitive 133) prototype/App/WS2SilentApply.swift:34 — WS2SilentApply.perform has cognitive complexity 133 (threshold 15). Drivers by points: if/else 31 (70 pts), boolean chains 32, ternaries 9 (24 pts), match/switch 4 (7 pts) (nesting depth added 57). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · PresenceLock.handle (cognitive 132) · ×1
  • PresenceLock.handle (cognitive 132) prototype/Core/PresenceLock.swift:112 — PresenceLock.handle has cognitive complexity 132 (threshold 15). Drivers by points: if/else 33 (65 pts), boolean chains 60, ternaries 2 (4 pts), match/switch 2 (3 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2OwnedLaunchController.receive (cognitive 121) · ×1
  • WS2OwnedLaunchController.receive (cognitive 121) prototype/App/WS2OwnedLaunchController.swift:354 — WS2OwnedLaunchController.receive has cognitive complexity 121 (threshold 15). Drivers by points: if/else 20 (61 pts), boolean chains 24, ternaries 4 (16 pts), match/switch 4 (14 pts), error handling 2 (6 pts) (nesting depth added 67). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodexWire.receive (cognitive 112) · ×1
  • CodexWire.receive (cognitive 112) prototype/Core/CodexWire.swift:135 — CodexWire.receive has cognitive complexity 112 (threshold 15). Drivers by points: if/else 40 (74 pts), boolean chains 35, loops 1 (2 pts), match/switch 1 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlanceProbe.exerciseDockScenarios (cognitive 110) · ×1
  • GlanceProbe.exerciseDockScenarios (cognitive 110) prototype/App/DockScenariosProbe.swift:10 — GlanceProbe.exerciseDockScenarios has cognitive complexity 110 (threshold 15). Drivers by points: if/else 37 (62 pts), ternaries 9 (23 pts), boolean chains 13, loops 7 (12 pts) (nesting depth added 44). Of this number, 104 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchContentView.place (cognitive 105) · ×1
  • NotchContentView.place (cognitive 105) prototype/App/Notch/NotchContentView.swift:308 — NotchContentView.place has cognitive complexity 105 (threshold 15). Drivers by points: if/else 25 (47 pts), ternaries 12 (32 pts), boolean chains 22, loops 3 (4 pts) (nesting depth added 43). Of this number, 103 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · WS2CompanionChannel.receive (cognitive 99) · ×1
  • WS2CompanionChannel.receive (cognitive 99) prototype/Support/WS2CompanionChannel.swift:104 — WS2CompanionChannel.receive has cognitive complexity 99 (threshold 15). Drivers by points: if/else 26 (74 pts), ternaries 4 (12 pts), boolean chains 10, match/switch 1 (2 pts), error handling 1 (nesting depth added 57). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchPanel.apply (cognitive 94) · ×1
  • NotchPanel.apply (cognitive 94) prototype/App/Notch/NotchPanel.swift:2110 — NotchPanel.apply has cognitive complexity 94 (threshold 15). Drivers by points: boolean chains 56, ternaries 25 (28 pts), if/else 10 (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.
D2 · Cognitive Complexity · AppDelegate.shade (cognitive 93) · ×1
  • AppDelegate.shade (cognitive 93) prototype/App/ShadeController.swift:176 — AppDelegate.shade has cognitive complexity 93 (threshold 15). Drivers by points: if/else 64 (78 pts), boolean chains 56, ternaries 16 (22 pts) (nesting depth added 20). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: one other method here (AppDelegate.shade::installOverlay) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · GlanceProbe.exerciseThumbnail (cognitive 86) · ×1
  • GlanceProbe.exerciseThumbnail (cognitive 86) prototype/App/ThumbnailProbe.swift:11 — GlanceProbe.exerciseThumbnail has cognitive complexity 86 (threshold 15). Drivers by points: boolean chains 40, if/else 34 (39 pts), ternaries 3 (4 pts), loops 1 (2 pts), error handling 1 (nesting depth added 7). Of this number, 71 points are the body's own statements and 15 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · HabitRules.judge (cognitive 86) · ×1
  • HabitRules.judge (cognitive 86) prototype/Core/HabitRules.swift:745 — HabitRules.judge has cognitive complexity 86 (threshold 15). Drivers by points: if/else 33 (61 pts), boolean chains 14, ternaries 5 (10 pts), match/switch 1 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlanceProbe.exerciseNotchShape (cognitive 84) · ×1
  • GlanceProbe.exerciseNotchShape (cognitive 84) prototype/App/NotchShapeProbe.swift:12 — GlanceProbe.exerciseNotchShape has cognitive complexity 84 (threshold 15). Drivers by points: boolean chains 56, ternaries 11 (14 pts), if/else 7 (9 pts), loops 4 (5 pts) (nesting depth added 6). Of this number, 73 points are the body's own statements and 11 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · GlanceProbe.exerciseGestures (cognitive 81) · ×1
  • GlanceProbe.exerciseGestures (cognitive 81) prototype/App/GestureProbe.swift:73 — GlanceProbe.exerciseGestures has cognitive complexity 81 (threshold 15). Drivers by points: boolean chains 42, if/else 30 (32 pts), ternaries 4 (5 pts), loops 1 (2 pts) (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · NotchPanel.legacyBaseTarget (cognitive 78) · ×1
  • NotchPanel.legacyBaseTarget (cognitive 78) prototype/App/Notch/NotchPanel.swift:1857 — NotchPanel.legacyBaseTarget has cognitive complexity 78 (threshold 15). Drivers by points: ternaries 15 (35 pts), if/else 18 (28 pts), boolean chains 9, match/switch 3 (6 pts) (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrackpadGestureController.handleFlick (cognitive 74) · ×1
  • TrackpadGestureController.handleFlick (cognitive 74) prototype/App/TrackpadGestures.swift:1302 — TrackpadGestureController.handleFlick has cognitive complexity 74 (threshold 15). Drivers by points: if/else 23 (47 pts), boolean chains 22, ternaries 2 (4 pts), match/switch 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AgentSessions.receive (cognitive 72) · ×1
  • AgentSessions.receive (cognitive 72) prototype/Core/AgentSessions.swift:71 — AgentSessions.receive has cognitive complexity 72 (threshold 15). Drivers by points: if/else 25 (46 pts), boolean chains 13, ternaries 5 (10 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlanceProbe.exerciseSlideOver (cognitive 70) · ×1
  • GlanceProbe.exerciseSlideOver (cognitive 70) prototype/App/GestureProbe.swift:489 — GlanceProbe.exerciseSlideOver has cognitive complexity 70 (threshold 15). Drivers by points: boolean chains 28, if/else 19 (21 pts), ternaries 18 (21 pts) (nesting depth added 5). Of this number, 67 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SettingsSearchIndex.search (cognitive 70) · ×1
  • SettingsSearchIndex.search (cognitive 70) prototype/Core/SettingsSearch.swift:158 — SettingsSearchIndex.search has cognitive complexity 70 (threshold 15). Drivers by points: if/else 16 (36 pts), loops 6 (15 pts), boolean chains 9, ternaries 3 (6 pts), match/switch 1 (4 pts) (nesting depth added 35). Of this number, 68 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlanceProbe.exerciseStripPeek (cognitive 68) · ×1
  • GlanceProbe.exerciseStripPeek (cognitive 68) prototype/App/StripPeekProbe.swift:12 — GlanceProbe.exerciseStripPeek has cognitive complexity 68 (threshold 15). Drivers by points: boolean chains 31, ternaries 17 (20 pts), if/else 16, loops 1 (nesting depth added 3). Of this number, 64 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BezelCheck.read (cognitive 68) · ×1
  • BezelCheck.read (cognitive 68) prototype/Core/DisplayShape.swift:277 — BezelCheck.read has cognitive complexity 68 (threshold 15). Drivers by points: if/else 21 (35 pts), boolean chains 27, ternaries 2 (5 pts), loops 1 (nesting depth added 17). Of this number, 60 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FoldRenderer.draw (cognitive 68) · ×1
  • FoldRenderer.draw (cognitive 68) prototype/Effects/FoldRenderer.swift:357 — FoldRenderer.draw has cognitive complexity 68 (threshold 15). Drivers by points: if/else 28 (39 pts), boolean chains 28, ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlanceProbe.hitch (cognitive 65) · ×1
  • GlanceProbe.hitch (cognitive 65) prototype/App/HitchProbe.swift:67 — GlanceProbe.hitch has cognitive complexity 65 (threshold 15). Drivers by points: if/else 16 (30 pts), ternaries 8 (14 pts), boolean chains 9, loops 5 (9 pts), error handling 2 (3 pts) (nesting depth added 25). Of this number, 64 points are the body's 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.
D2 · Cognitive Complexity · WS2RemoteHost.profile (cognitive 64) · ×1
  • WS2RemoteHost.profile (cognitive 64) prototype/App/WS2RemoteHost.swift:726 — WS2RemoteHost.profile has cognitive complexity 64 (threshold 15). Drivers by points: if/else 23 (44 pts), boolean chains 8, match/switch 4 (7 pts), loops 2 (4 pts), ternaries 1 (nesting depth added 26). Of this number, 62 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FaceGestureTracker.receive (cognitive 64) · ×1
  • FaceGestureTracker.receive (cognitive 64) prototype/Core/FaceGestureTracker.swift:46 — FaceGestureTracker.receive has cognitive complexity 64 (threshold 15). Drivers by points: boolean chains 36, if/else 18 (24 pts), ternaries 2 (3 pts), match/switch 1 (nesting depth added 7). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · SilentMilestoneProbe.exercise (cognitive 63) · ×1
  • SilentMilestoneProbe.exercise (cognitive 63) prototype/App/SilentMilestoneProbe.swift:21 — SilentMilestoneProbe.exercise has cognitive complexity 63 (threshold 15). Drivers by points: if/else 30 (33 pts), boolean chains 28, error handling 1, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · WS2DeviceActionHost.receive (cognitive 61) · ×1
  • WS2DeviceActionHost.receive (cognitive 61) prototype/App/WS2DeviceActionHost.swift:56 — WS2DeviceActionHost.receive has cognitive complexity 61 (threshold 15). Drivers by points: if/else 12 (34 pts), boolean chains 19, error handling 1 (3 pts), match/switch 2 (3 pts), loops 1 (2 pts) (nesting depth added 26). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · WindowBrowserActionPolicy.preflight (cognitive 61) · ×1
  • WindowBrowserActionPolicy.preflight (cognitive 61) prototype/WindowBrowser/WindowBrowserActions.swift:123 — WindowBrowserActionPolicy.preflight has cognitive complexity 61 (threshold 15). Drivers by points: if/else 28 (57 pts), ternaries 1 (3 pts), match/switch 1 (nesting depth added 31). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ChromeProfile.swift.adobeChromeProfile (cognitive 58) · ×1
  • ChromeProfile.swift.adobeChromeProfile (cognitive 58) prototype/Window/ChromeProfile.swift:6 — ChromeProfile.swift.adobeChromeProfile has cognitive complexity 58 (threshold 15). Drivers by points: boolean chains 46, if/else 7 (8 pts), ternaries 2 (4 pts) (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.
D2 · Cognitive Complexity · GlanceProbe.exerciseFinderAlias (cognitive 57) · ×1
  • GlanceProbe.exerciseFinderAlias (cognitive 57) prototype/App/FinderAliasProbe.swift:12 — GlanceProbe.exerciseFinderAlias has cognitive complexity 57 (threshold 15). Drivers by points: if/else 20 (25 pts), boolean chains 17, ternaries 6 (10 pts), loops 4 (5 pts) (nesting depth added 10). Of this number, 34 points are the body's own statements and 23 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SettingsShotProbe.run (cognitive 57) · ×1
  • SettingsShotProbe.run (cognitive 57) prototype/Effects/SettingsShotProbe.swift:18 — SettingsShotProbe.run has cognitive complexity 57 (threshold 15). Drivers by points: if/else 8 (21 pts), ternaries 6 (20 pts), loops 6 (11 pts), boolean chains 5 (nesting depth added 32). Of this number, 54 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppDelegate.observeFoldHide (cognitive 56) · ×1
  • AppDelegate.observeFoldHide (cognitive 56) prototype/App/WS2FoldCallbackGuard.swift:40 — AppDelegate.observeFoldHide has cognitive complexity 56 (threshold 15). Drivers by points: boolean chains 22, if/else 13 (21 pts), ternaries 6 (12 pts), match/switch 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppDelegate.shade · ×1
  • AppDelegate.shade::installOverlay (cognitive 55) prototype/App/ShadeController.swift:365 — AppDelegate.shade::installOverlay has cognitive complexity 55 (threshold 15). Drivers by points: if/else 26 (34 pts), boolean chains 17, ternaries 4 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: one other method here (AppDelegate.shade) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · SlideOverRecovery.recoverAbandoned (cognitive 55) · ×1
  • SlideOverRecovery.recoverAbandoned (cognitive 55) prototype/App/SlideOverRecovery.swift:52 — SlideOverRecovery.recoverAbandoned has cognitive complexity 55 (threshold 15). Drivers by points: boolean chains 27, if/else 9 (25 pts), loops 2 (3 pts) (nesting depth added 17). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · UpdateGuard.run (cognitive 55) · ×1
  • UpdateGuard.run (cognitive 55) prototype/Watchdog/main.swift:160 — UpdateGuard.run has cognitive complexity 55 (threshold 15). Drivers by points: if/else 19 (40 pts), boolean chains 7, loops 4 (5 pts), match/switch 2 (3 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TouchTap.frame (cognitive 54) · ×1
  • TouchTap.frame (cognitive 54) prototype/Core/TouchTap.swift:44 — TouchTap.frame has cognitive complexity 54 (threshold 15). Drivers by points: if/else 18 (33 pts), boolean chains 11, loops 5 (7 pts), ternaries 3 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchCompactView.draw (cognitive 54) · ×1
  • NotchCompactView.draw (cognitive 54) prototype/App/Notch/NotchCompactViews.swift:505 — NotchCompactView.draw has cognitive complexity 54 (threshold 15). Drivers by points: if/else 16 (26 pts), ternaries 10 (19 pts), boolean chains 9 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppDelegate.arrangeShadedEntries (cognitive 53) · ×1
  • AppDelegate.arrangeShadedEntries (cognitive 53) prototype/App/ArrangeController.swift:236 — AppDelegate.arrangeShadedEntries has cognitive complexity 53 (threshold 15). Drivers by points: if/else 20 (39 pts), ternaries 2 (6 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2GameControllerBridge.sample (cognitive 53) · ×1
  • WS2GameControllerBridge.sample (cognitive 53) prototype/App/WS2GameControllerBridge.swift:138 — WS2GameControllerBridge.sample has cognitive complexity 53 (threshold 15). Drivers by points: if/else 14 (24 pts), boolean chains 20, loops 3 (6 pts), error handling 1 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchPanel.displayCompact (cognitive 53) · ×1
  • NotchPanel.displayCompact (cognitive 53) prototype/App/Notch/NotchPanel.swift:2326 — NotchPanel.displayCompact has cognitive complexity 53 (threshold 15). Drivers by points: ternaries 15 (30 pts), boolean chains 16, if/else 5 (7 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlanceProbe.exerciseLaunchpadTiling (cognitive 52) · ×1
  • GlanceProbe.exerciseLaunchpadTiling (cognitive 52) prototype/App/LaunchpadTilingProbe.swift:22 — GlanceProbe.exerciseLaunchpadTiling has cognitive complexity 52 (threshold 15). Drivers by points: if/else 24 (29 pts), boolean chains 10, ternaries 4 (9 pts), loops 2, match/switch 1 (2 pts) (nesting depth added 11). Of this number, 29 points are the body's own statements and 23 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrackpadGestureController.decideFlick (cognitive 52) · ×1
  • TrackpadGestureController.decideFlick (cognitive 52) prototype/App/TrackpadGestures.swift:1545 — TrackpadGestureController.decideFlick has cognitive complexity 52 (threshold 15). Drivers by points: ternaries 9 (20 pts), boolean chains 18, if/else 9 (12 pts), match/switch 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExplainerElementLayer.recolor (cognitive 51) · ×1
  • ExplainerElementLayer.recolor (cognitive 51) prototype/App/SettingsExplainerView.swift:756 — ExplainerElementLayer.recolor has cognitive complexity 51 (threshold 15). Drivers by points: ternaries 18 (40 pts), loops 3 (5 pts), if/else 3 (4 pts), boolean chains 1, match/switch 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.
D2 · Cognitive Complexity · TrackpadGestureController.updateFollow (cognitive 51) · ×1
  • TrackpadGestureController.updateFollow (cognitive 51) prototype/App/TrackpadGestures.swift:1069 — TrackpadGestureController.updateFollow has cognitive complexity 51 (threshold 15). Drivers by points: if/else 17 (29 pts), boolean chains 13, ternaries 4 (9 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Reader.value (cognitive 51) · ×1
  • Reader.value (cognitive 51) prototype/Core/WS2OPACK.swift:52 — Reader.value has cognitive complexity 51 (threshold 15). Drivers by points: if/else 15 (29 pts), ternaries 6 (12 pts), boolean chains 4, loops 2 (4 pts), match/switch 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WindowFoldEffects.prepareFold (cognitive 51) · ×1
  • WindowFoldEffects.prepareFold (cognitive 51) prototype/Effects/WindowFoldEffects.swift:72 — WindowFoldEffects.prepareFold has cognitive complexity 51 (threshold 15). Drivers by points: boolean chains 25, if/else 13 (24 pts), error handling 1, ternaries 1 (nesting depth added 11). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · NotchCanvasView.scrollWheel (cognitive 51) · ×1
  • NotchCanvasView.scrollWheel (cognitive 51) prototype/App/Notch/NotchCanvas.swift:1170 — NotchCanvasView.scrollWheel has cognitive complexity 51 (threshold 15). Drivers by points: if/else 19 (36 pts), boolean chains 8, ternaries 3 (6 pts), match/switch 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.
D2 · Cognitive Complexity · UpdateLaunchPolicy.decide (cognitive 50) · ×1
  • UpdateLaunchPolicy.decide (cognitive 50) prototype/Core/UpdateDecisions.swift:153 — UpdateLaunchPolicy.decide has cognitive complexity 50 (threshold 15). Drivers by points: ternaries 8 (22 pts), if/else 9 (17 pts), boolean chains 7, match/switch 2 (4 pts) (nesting depth added 24). Of this number, 49 points are the body's 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.
D2 · Cognitive Complexity · WS2SilentReadout.sentence (cognitive 50) · ×1
  • WS2SilentReadout.sentence (cognitive 50) prototype/Core/WS2SilentGates.swift:432 — WS2SilentReadout.sentence has cognitive complexity 50 (threshold 15). Drivers by points: ternaries 11 (22 pts), if/else 11 (21 pts), boolean chains 6, match/switch 1 (nesting depth added 21). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · WS2PairSetupServer.advance (cognitive 50) · ×1
  • WS2PairSetupServer.advance (cognitive 50) prototype/Support/WS2PairSetupServer.swift:118 — WS2PairSetupServer.advance has cognitive complexity 50 (threshold 15). Drivers by points: if/else 13 (35 pts), boolean chains 12, match/switch 1 (2 pts), error handling 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlanceProbe.exerciseWinsSwitcher (cognitive 49) · ×1
  • GlanceProbe.exerciseWinsSwitcher (cognitive 49) prototype/App/WinsSwitcherProbe.swift:15 — GlanceProbe.exerciseWinsSwitcher has cognitive complexity 49 (threshold 15). Drivers by points: if/else 19 (22 pts), boolean chains 16, ternaries 8 (9 pts), loops 2 (nesting depth added 4). Of this number, 36 points are the body's own statements and 13 belong to 6 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · LaunchpadView.moveReorder (cognitive 49) · ×1
  • LaunchpadView.moveReorder (cognitive 49) prototype/App/LaunchpadView.swift:1227 — LaunchpadView.moveReorder has cognitive complexity 49 (threshold 15). Drivers by points: if/else 18 (30 pts), ternaries 5 (14 pts), boolean chains 5 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchActivitySources.audioSnapshot (cognitive 49) · ×1
  • NotchActivitySources.audioSnapshot (cognitive 49) prototype/App/NotchActivitySources.swift:431 — NotchActivitySources.audioSnapshot has cognitive complexity 49 (threshold 15). Drivers by points: if/else 10 (22 pts), ternaries 3 (13 pts), boolean chains 12, loops 1 (2 pts) (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · WS2OwnedSessionView.render (cognitive 49) · ×1
  • WS2OwnedSessionView.render (cognitive 49) prototype/App/WS2OwnedSessionView.swift:154 — WS2OwnedSessionView.render has cognitive complexity 49 (threshold 15). Drivers by points: boolean chains 35, if/else 7 (9 pts), ternaries 5 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · SettingsDesignPreview.compareCropGeometry (cognitive 49) · ×1
  • SettingsDesignPreview.compareCropGeometry (cognitive 49) prototype/Effects/SettingsDesignPreview.swift:218 — SettingsDesignPreview.compareCropGeometry has cognitive complexity 49 (threshold 15). Drivers by points: if/else 11 (35 pts), loops 3 (7 pts), ternaries 2 (6 pts), error handling 1 (nesting depth added 32). Of this number, 47 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · LaunchpadView.control (cognitive 48) · ×1
  • LaunchpadView.control (cognitive 48) prototype/App/LaunchpadView.swift:1681 — LaunchpadView.control has cognitive complexity 48 (threshold 15). Drivers by points: if/else 17 (31 pts), boolean chains 8, ternaries 2 (5 pts), match/switch 2 (4 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HorizontalLadder.next (cognitive 48) · ×1
  • HorizontalLadder.next (cognitive 48) prototype/Core/TrackpadGesture.swift:206 — HorizontalLadder.next has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 12 (29 pts), if/else 10 (17 pts), boolean chains 1, match/switch 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppDelegate.buildStatusMenuItems (cognitive 47) · ×1
  • AppDelegate.buildStatusMenuItems (cognitive 47) prototype/App/MenuBarController.swift:72 — AppDelegate.buildStatusMenuItems has cognitive complexity 47 (threshold 15). Drivers by points: if/else 24 (26 pts), loops 5 (10 pts), ternaries 3 (6 pts), boolean chains 5 (nesting depth added 10). Of this number, 45 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SecureLogFile.init (cognitive 47) · ×1
  • SecureLogFile.init (cognitive 47) prototype/Support/SecureLogFile.swift:22 — SecureLogFile.init has cognitive complexity 47 (threshold 15). Drivers by points: if/else 11 (29 pts), boolean chains 12, error handling 2 (4 pts), loops 1 (2 pts) (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · GlanceProbe.exerciseSecondDisplayDesktops (cognitive 46) · ×1
  • GlanceProbe.exerciseSecondDisplayDesktops (cognitive 46) prototype/App/GapProbesSecondDisplayDesktops.swift:13 — GlanceProbe.exerciseSecondDisplayDesktops has cognitive complexity 46 (threshold 15). Drivers by points: boolean chains 17, if/else 15, ternaries 10 (14 pts) (nesting depth added 4). Of this number, 42 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · HabitWorker.handle (cognitive 46) · ×1
  • HabitWorker.handle (cognitive 46) prototype/App/HabitContext.swift:329 — HabitWorker.handle has cognitive complexity 46 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 10, ternaries 4 (8 pts), match/switch 2 (4 pts), loops 1 (2 pts) (nesting depth added 18). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · PreviewRenderer.swift.nativeTitleStripLooksBroken (cognitive 45) · ×1
  • PreviewRenderer.swift.nativeTitleStripLooksBroken (cognitive 45) prototype/Capture/PreviewRenderer.swift:141 — PreviewRenderer.swift.nativeTitleStripLooksBroken has cognitive complexity 45 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 15, loops 6 (9 pts), ternaries 3 (nesting depth added 10). Of this number, 29 points are the body's own statements and 16 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SilentMilestoneProbe.asyncTerminals (cognitive 44) · ×1
  • SilentMilestoneProbe.asyncTerminals (cognitive 44) prototype/App/SilentMilestoneProbe.swift:318 — SilentMilestoneProbe.asyncTerminals has cognitive complexity 44 (threshold 15). Drivers by points: if/else 29, boolean chains 15. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · AppDelegate.quickLookWindowCandidates (cognitive 43) · ×1
  • AppDelegate.quickLookWindowCandidates (cognitive 43) prototype/App/FoldExit.swift:228 — AppDelegate.quickLookWindowCandidates has cognitive complexity 43 (threshold 15). Drivers by points: if/else 8 (21 pts), boolean chains 14, loops 4 (5 pts), ternaries 1 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlanceProbe.exerciseReduceTransparency (cognitive 43) · ×1
  • GlanceProbe.exerciseReduceTransparency (cognitive 43) prototype/App/CheckProbes1031.swift:66 — GlanceProbe.exerciseReduceTransparency has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 11 (24 pts), if/else 7 (13 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrackpadGestureController.keyStep (cognitive 43) · ×1
  • TrackpadGestureController.keyStep (cognitive 43) prototype/App/TrackpadGestures.swift:809 — TrackpadGestureController.keyStep has cognitive complexity 43 (threshold 15). Drivers by points: boolean chains 26, if/else 12 (15 pts), ternaries 2 (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.
D2 · Cognitive Complexity · OwnerTurnChallenge.receive (cognitive 43) · ×1
  • OwnerTurnChallenge.receive (cognitive 43) prototype/Core/FaceGestureTracker.swift:271 — OwnerTurnChallenge.receive has cognitive complexity 43 (threshold 15). Drivers by points: boolean chains 23, if/else 15 (17 pts), ternaries 1 (2 pts), match/switch 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.
D2 · Cognitive Complexity · PresenceLock.reconcile (cognitive 43) · ×1
  • PresenceLock.reconcile (cognitive 43) prototype/Core/PresenceLock.swift:256 — PresenceLock.reconcile has cognitive complexity 43 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 19, loops 1, match/switch 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · LaunchpadView.scrollWheel (cognitive 42) · ×1
  • LaunchpadView.scrollWheel (cognitive 42) prototype/App/LaunchpadView.swift:629 — LaunchpadView.scrollWheel has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17 (25 pts), boolean chains 12, ternaries 2 (4 pts), match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MeetingLinkDetector.classify (cognitive 42) · ×1
  • MeetingLinkDetector.classify (cognitive 42) prototype/Core/CalendarActivity.swift:196 — MeetingLinkDetector.classify has cognitive complexity 42 (threshold 15). Drivers by points: boolean chains 17, ternaries 7 (14 pts), if/else 11 (nesting depth added 7). Of this number, 41 points are the body's 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.
D2 · Cognitive Complexity · ConductorSession.touch (cognitive 42) · ×1
  • ConductorSession.touch (cognitive 42) prototype/Core/ConductorSession.swift:418 — ConductorSession.touch has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 11, match/switch 3 (6 pts), ternaries 2 (5 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EffectWindowProbe.run (cognitive 42) · ×1
  • EffectWindowProbe.run (cognitive 42) prototype/Effects/EffectWindowProbe.swift:15 — EffectWindowProbe.run has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 18, error handling 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchCanvasView.mouseUp (cognitive 42) · ×1
  • NotchCanvasView.mouseUp (cognitive 42) prototype/App/Notch/NotchCanvas.swift:1023 — NotchCanvasView.mouseUp has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 14, ternaries 1 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchController.showPeek (cognitive 42) · ×1
  • NotchController.showPeek (cognitive 42) prototype/App/Notch/NotchController.swift:2154 — NotchController.showPeek has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (28 pts), boolean chains 7, ternaries 2 (4 pts), match/switch 2 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlanceProbe.exerciseWins (cognitive 41) · ×1
  • GlanceProbe.exerciseWins (cognitive 41) prototype/App/GestureProbe.swift:1308 — GlanceProbe.exerciseWins has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 6 (13 pts), boolean chains 11, if/else 10 (11 pts), loops 3 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlanceProbe.exerciseStrip (cognitive 41) · ×1
  • GlanceProbe.exerciseStrip (cognitive 41) prototype/App/GestureProbe.swift:1448 — GlanceProbe.exerciseStrip has cognitive complexity 41 (threshold 15). Drivers by points: boolean chains 18, if/else 10 (11 pts), ternaries 8 (9 pts), loops 2, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · HabitWorker.generic (cognitive 41) · ×1
  • HabitWorker.generic (cognitive 41) prototype/App/HabitContext.swift:433 — HabitWorker.generic has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 18, ternaries 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppDelegate.applyReconcileAXSnapshots (cognitive 40) · ×1
  • AppDelegate.applyReconcileAXSnapshots (cognitive 40) prototype/App/Reconcile.swift:297 — AppDelegate.applyReconcileAXSnapshots has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 13, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppDelegate.collectJournalRescueActions (cognitive 40) · ×1
  • AppDelegate.collectJournalRescueActions (cognitive 40) prototype/Recovery/Rescue.swift:48 — AppDelegate.collectJournalRescueActions has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (27 pts), boolean chains 10, loops 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InteractionCoordinator.acquire (cognitive 40) · ×1
  • InteractionCoordinator.acquire (cognitive 40) prototype/Core/InteractionCoordinator.swift:173 — InteractionCoordinator.acquire has cognitive complexity 40 (threshold 15). Drivers by points: boolean chains 20, if/else 13 (18 pts), ternaries 1 (2 pts) (nesting depth added 6). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · AppDelegate.startFocusCurrentAppSession (cognitive 39) · ×1
  • AppDelegate.startFocusCurrentAppSession (cognitive 39) prototype/App/FocusSession.swift:361 — AppDelegate.startFocusCurrentAppSession has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 7, loops 6 (7 pts), ternaries 1 (nesting depth added 9). Of this number, 24 points are the body's own statements and 15 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlanceProbe.exercisePictureInPicture (cognitive 39) · ×1
  • GlanceProbe.exercisePictureInPicture (cognitive 39) prototype/App/GestureProbe.swift:1063 — GlanceProbe.exercisePictureInPicture has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 19, ternaries 10, if/else 7 (9 pts), loops 1 (nesting depth added 2). Of this number, 31 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · GlanceProbe.exerciseLaunchpad (cognitive 39) · ×1
  • GlanceProbe.exerciseLaunchpad (cognitive 39) prototype/App/GestureProbe.swift:1735 — GlanceProbe.exerciseLaunchpad has cognitive complexity 39 (threshold 15). Drivers by points: if/else 22 (25 pts), boolean chains 14 (nesting depth added 3). Of this number, 36 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · GlanceProbe.exerciseWindowClasses (cognitive 39) · ×1
  • GlanceProbe.exerciseWindowClasses (cognitive 39) prototype/WindowBrowser/WindowClassesProbe.swift:29 — GlanceProbe.exerciseWindowClasses has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 9 (18 pts), if/else 8 (11 pts), boolean chains 8, loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LaunchpadView.mouseUp (cognitive 39) · ×1
  • LaunchpadView.mouseUp (cognitive 39) prototype/App/LaunchpadView.swift:932 — LaunchpadView.mouseUp has cognitive complexity 39 (threshold 15). Drivers by points: if/else 21 (33 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ActivityCard.update (cognitive 39) · ×1
  • ActivityCard.update (cognitive 39) prototype/App/NotchActivityView.swift:227 — ActivityCard.update has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 20 (28 pts), if/else 8, boolean chains 3 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ConductorSession.play (cognitive 39) · ×1
  • ConductorSession.play (cognitive 39) prototype/Core/ConductorSession.swift:503 — ConductorSession.play has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 10, ternaries 1 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppDelegate.handleAXNotification (cognitive 38) · ×1
  • AppDelegate.handleAXNotification (cognitive 38) prototype/App/FoldTransaction.swift:1176 — AppDelegate.handleAXNotification has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (29 pts), boolean chains 9 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlanceProbe.capsuleOnscreenCheck (cognitive 38) · ×1
  • GlanceProbe.capsuleOnscreenCheck (cognitive 38) prototype/App/GlanceProbe.swift:1077 — GlanceProbe.capsuleOnscreenCheck has cognitive complexity 38 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 7, loops 4 (7 pts), ternaries 3 (7 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlanceProbe.exerciseFoldDesktops (cognitive 38) · ×1
  • GlanceProbe.exerciseFoldDesktops (cognitive 38) prototype/App/GapProbesFoldDesktops.swift:9 — GlanceProbe.exerciseFoldDesktops has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 16, ternaries 8 (12 pts), if/else 10 (nesting depth added 4). Of this number, 34 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · GlanceProbe.exerciseSlideOverBorder (cognitive 38) · ×1
  • GlanceProbe.exerciseSlideOverBorder (cognitive 38) prototype/App/GapProbesSlideOver.swift:13 — GlanceProbe.exerciseSlideOverBorder has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 17, ternaries 8 (10 pts), if/else 7, loops 3 (4 pts) (nesting depth added 3). Of this number, 36 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LaunchpadView.animateOut (cognitive 38) · ×1
  • LaunchpadView.animateOut (cognitive 38) prototype/App/LaunchpadView.swift:1829 — LaunchpadView.animateOut has cognitive complexity 38 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 9 (13 pts), boolean chains 7, loops 1 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WindowFoldEffects.prepareRestore (cognitive 38) · ×1
  • WindowFoldEffects.prepareRestore (cognitive 38) prototype/Effects/WindowFoldEffects.swift:278 — WindowFoldEffects.prepareRestore has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 14, error handling 1, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchController.wirePanelCallbacks (cognitive 38) · ×1
  • NotchController.wirePanelCallbacks (cognitive 38) prototype/App/Notch/NotchController.swift:551 — NotchController.wirePanelCallbacks has cognitive complexity 38 (threshold 15). Drivers by points: if/else 23 (25 pts), boolean chains 12, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · GlanceProbe.exerciseSlideOverSpaces (cognitive 37) · ×1
  • GlanceProbe.exerciseSlideOverSpaces (cognitive 37) prototype/App/GapProbesSlideOver.swift:134 — GlanceProbe.exerciseSlideOverSpaces has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 16, ternaries 10 (11 pts), if/else 10 (nesting depth added 1). Of this number, 31 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · GlanceProbe.exerciseStripOverview (cognitive 37) · ×1
  • GlanceProbe.exerciseStripOverview (cognitive 37) prototype/App/StripPeekProbe.swift:230 — GlanceProbe.exerciseStripOverview has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 14, ternaries 11 (12 pts), if/else 9, loops 1 (2 pts) (nesting depth added 2). Of this number, 35 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · NotchActivitySources.poll (cognitive 37) · ×1
  • NotchActivitySources.poll (cognitive 37) prototype/App/NotchActivitySources.swift:257 — NotchActivitySources.poll has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 11, ternaries 7 (11 pts), loops 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.
D2 · Cognitive Complexity · MagicTiling.plan (cognitive 37) · ×1
  • MagicTiling.plan (cognitive 37) prototype/Core/MagicTiling.swift:122 — MagicTiling.plan has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 15 (22 pts), if/else 9, boolean chains 5, loops 1 (nesting depth added 7). Of this number, 36 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · NativeProxyOverlayWindow.sendEvent (cognitive 37) · ×1
  • NativeProxyOverlayWindow.sendEvent (cognitive 37) prototype/Overlay/ShadeStrip.swift:414 — NativeProxyOverlayWindow.sendEvent has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 14 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WindowCatalog.publish (cognitive 37) · ×1
  • WindowCatalog.publish (cognitive 37) prototype/WindowBrowser/WindowCatalog.swift:163 — WindowCatalog.publish has cognitive complexity 37 (threshold 15). Drivers by points: if/else 20 (30 pts), boolean chains 5, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppDelegate.handOffFocusBeforeHiding (cognitive 36) · ×1
  • AppDelegate.handOffFocusBeforeHiding (cognitive 36) prototype/App/FoldTransaction.swift:40 — AppDelegate.handOffFocusBeforeHiding has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 19, if/else 6 (13 pts), loops 3 (4 pts) (nesting depth added 8). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · GlanceProbe.exerciseFinderColumns (cognitive 36) · ×1
  • GlanceProbe.exerciseFinderColumns (cognitive 36) prototype/App/FinderColumnsProbe.swift:7 — GlanceProbe.exerciseFinderColumns has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 13, ternaries 4 (5 pts), loops 2 (nesting depth added 4). Of this number, 19 points are the body's own statements and 17 belong to 5 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · GlanceProbe.holdSetUp (cognitive 36) · ×1
  • GlanceProbe.holdSetUp (cognitive 36) prototype/App/HubHoldProbe.swift:41 — GlanceProbe.holdSetUp has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 6 (12 pts), boolean chains 7, match/switch 1 (nesting depth added 13). Of this number, 35 points are the body's 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.
D2 · Cognitive Complexity · MiddleTitlebarTap.handle (cognitive 36) · ×1
  • MiddleTitlebarTap.handle (cognitive 36) prototype/App/MiddleTitlebarTap.swift:110 — MiddleTitlebarTap.handle has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 4, match/switch 3 (4 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2RemoteHost.input (cognitive 36) · ×1
  • WS2RemoteHost.input (cognitive 36) prototype/App/WS2RemoteHost.swift:815 — WS2RemoteHost.input has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 9, ternaries 4 (8 pts), match/switch 2 (3 pts), loops 1 (nesting depth added 10). Of this number, 32 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WindowSwitcherKeys.handle (cognitive 36) · ×1
  • WindowSwitcherKeys.handle (cognitive 36) prototype/App/WindowSwitcher.swift:97 — WindowSwitcherKeys.handle has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (17 pts), ternaries 4 (9 pts), boolean chains 7, match/switch 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PowerFlashPolicy.observe (cognitive 36) · ×1
  • PowerFlashPolicy.observe (cognitive 36) prototype/Core/PowerFlash.swift:52 — PowerFlashPolicy.observe has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 16, match/switch 1 (nesting depth added 4). Of this number, 35 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · WS2HeadGesture.shake (cognitive 36) · ×1
  • WS2HeadGesture.shake (cognitive 36) prototype/Core/WS2HeadGesture.swift:97 — WS2HeadGesture.shake has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (26 pts), boolean chains 9, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PictureInPictureController.enter (cognitive 35) · ×1
  • PictureInPictureController.enter (cognitive 35) prototype/App/PictureInPicture.swift:90 — PictureInPictureController.enter has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 9, error handling 3, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · WS2AppRuntime.init (cognitive 35) · ×1
  • WS2AppRuntime.init (cognitive 35) prototype/App/WS2AppRuntime.swift:62 — WS2AppRuntime.init has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 5, match/switch 3 (5 pts), loops 2, ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DockProbeSupport.firstAppItemGeometry (cognitive 35) · ×1
  • DockProbeSupport.firstAppItemGeometry (cognitive 35) prototype/WindowBrowser/DockHoverProbe.swift:519 — DockProbeSupport.firstAppItemGeometry has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 4 (9 pts), boolean chains 8 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EventTapCallback.swift.eventTapCallback (cognitive 35) · ×1
  • EventTapCallback.swift.eventTapCallback (cognitive 35) prototype/App/EventTapCallback.swift:139 — EventTapCallback.swift.eventTapCallback has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (20 pts), ternaries 5 (10 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScrollStripController.evaluateColumns (cognitive 34) · ×1
  • ScrollStripController.evaluateColumns (cognitive 34) prototype/App/ScrollStripRun.swift:1143 — ScrollStripController.evaluateColumns has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 10, match/switch 1 (4 pts), loops 2 (3 pts) (nesting depth added 10). Of this number, 32 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrackpadGestureController.magicTile (cognitive 34) · ×1
  • TrackpadGestureController.magicTile (cognitive 34) prototype/App/MagicTilingRun.swift:71 — TrackpadGestureController.magicTile has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 9, loops 2, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2SilentApply.perform (cognitive 34) · ×1
  • WS2SilentApply.perform (cognitive 34) prototype/App/WS2SilentApply.swift:255 — WS2SilentApply.perform has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (26 pts), ternaries 3 (6 pts), boolean chains 1, match/switch 1 (nesting depth added 16). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ExplainerDirector.handle (cognitive 34) · ×1
  • ExplainerDirector.handle (cognitive 34) prototype/Core/ExplainerScript.swift:380 — ExplainerDirector.handle has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 6, ternaries 2 (5 pts), match/switch 1 (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · FileShelfModel.add (cognitive 34) · ×1
  • FileShelfModel.add (cognitive 34) prototype/Core/FileShelfModel.swift:104 — FileShelfModel.add has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 5 (7 pts), ternaries 2 (7 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Writer.value (cognitive 34) · ×1
  • Writer.value (cognitive 34) prototype/Core/WS2OPACK.swift:142 — Writer.value has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (17 pts), ternaries 4 (11 pts), loops 2 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Policies.swift.windowPolicy (cognitive 34) · ×1
  • Policies.swift.windowPolicy (cognitive 34) prototype/Compatibility/Policies.swift:58 — Policies.swift.windowPolicy has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 23, if/else 11. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · GlanceController.driveUnhide (cognitive 33) · ×1
  • GlanceController.driveUnhide (cognitive 33) prototype/App/Glance.swift:823 — GlanceController.driveUnhide has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 19, if/else 9 (14 pts) (nesting depth added 5). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · HabitWorker.readFocus (cognitive 33) · ×1
  • HabitWorker.readFocus (cognitive 33) prototype/App/HabitContext.swift:897 — HabitWorker.readFocus has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LaunchpadView.folderScroll (cognitive 33) · ×1
  • LaunchpadView.folderScroll (cognitive 33) prototype/App/LaunchpadFolders.swift:695 — LaunchpadView.folderScroll has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 6, ternaries 2 (4 pts), match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2HeadGesture.nod (cognitive 33) · ×1
  • WS2HeadGesture.nod (cognitive 33) prototype/Core/WS2HeadGesture.swift:67 — WS2HeadGesture.nod has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (26 pts), boolean chains 6, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EffectSession.show (cognitive 33) · ×1
  • EffectSession.show (cognitive 33) prototype/Effects/EffectSession.swift:99 — EffectSession.show has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 20, if/else 13. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · AppDelegate.unshadeReturningElement (cognitive 32) · ×1
  • AppDelegate.unshadeReturningElement (cognitive 32) prototype/App/FoldExit.swift:7 — AppDelegate.unshadeReturningElement has cognitive complexity 32 (threshold 15). Drivers by points: if/else 19 (23 pts), boolean chains 6, ternaries 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · LaunchpadView.moveFolderDrag (cognitive 32) · ×1
  • LaunchpadView.moveFolderDrag (cognitive 32) prototype/App/LaunchpadFolders.swift:774 — LaunchpadView.moveFolderDrag has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (19 pts), ternaries 5 (11 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2CodexApprovalHost.confirm (cognitive 32) · ×1
  • WS2CodexApprovalHost.confirm (cognitive 32) prototype/App/WS2CodexApprovalHost.swift:162 — WS2CodexApprovalHost.confirm has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 8, ternaries 2 (5 pts), error handling 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2HookEvent.parse (cognitive 32) · ×1
  • WS2HookEvent.parse (cognitive 32) prototype/App/WS2HookServer.swift:53 — WS2HookEvent.parse has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 19, if/else 8 (11 pts), ternaries 1 (2 pts) (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · RemoteLayerHost.apply (cognitive 32) · ×1
  • RemoteLayerHost.apply (cognitive 32) prototype/Core/RemoteLayerHost.swift:142 — RemoteLayerHost.apply has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 6, match/switch 4 (6 pts), ternaries 2 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RemoteMode.handle (cognitive 32) · ×1
  • RemoteMode.handle (cognitive 32) prototype/Core/RemoteMode.swift:63 — RemoteMode.handle has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (16 pts), ternaries 5 (10 pts), boolean chains 5, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2CompanionPairSetupChannel.receive (cognitive 32) · ×1
  • WS2CompanionPairSetupChannel.receive (cognitive 32) prototype/Support/WS2CompanionPairSetupChannel.swift:27 — WS2CompanionPairSetupChannel.receive has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 12, ternaries 1 (2 pts), error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2DuplexProcess.writeReady (cognitive 32) · ×1
  • WS2DuplexProcess.writeReady (cognitive 32) prototype/Support/WS2DuplexProcess.swift:177 — WS2DuplexProcess.writeReady has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (24 pts), boolean chains 5, loops 1 (2 pts), error handling 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2HookConfiguration.preview (cognitive 32) · ×1
  • WS2HookConfiguration.preview (cognitive 32) prototype/Support/WS2HookConfiguration.swift:48 — WS2HookConfiguration.preview has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WindowBrowserController.refreshPanel (cognitive 32) · ×1
  • WindowBrowserController.refreshPanel (cognitive 32) prototype/WindowBrowser/WindowBrowserController.swift:1463 — WindowBrowserController.refreshPanel has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 14, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · LaunchpadController.show (cognitive 31) · ×1
  • LaunchpadController.show (cognitive 31) prototype/App/LaunchpadController.swift:242 — LaunchpadController.show has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (24 pts), boolean chains 3, match/switch 1 (2 pts), ternaries 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchCanvasView.morph (cognitive 31) · ×1
  • NotchCanvasView.morph (cognitive 31) prototype/App/Notch/NotchCanvas.swift:321 — NotchCanvasView.morph has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 9 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchController.windowTiles (cognitive 31) · ×1
  • NotchController.windowTiles (cognitive 31) prototype/App/Notch/NotchController.swift:2531 — NotchController.windowTiles has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 4 (8 pts), loops 5 (6 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 11). Of this number, 28 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ShadeStrip.swift.dominantIconColor (cognitive 31) · ×1
  • ShadeStrip.swift.dominantIconColor (cognitive 31) prototype/Overlay/ShadeStrip.swift:21 — ShadeStrip.swift.dominantIconColor has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CountdownTimerCard.rebuild (cognitive 30) · ×1
  • CountdownTimerCard.rebuild (cognitive 30) prototype/App/CountdownTimerCard.swift:126 — CountdownTimerCard.rebuild has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 11 (21 pts), boolean chains 6, loops 1 (2 pts), match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlanceProbe.restoreGuard (cognitive 30) · ×1
  • GlanceProbe.restoreGuard (cognitive 30) prototype/App/GlanceProbe.swift:893 — GlanceProbe.restoreGuard has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 16, ternaries 8 (10 pts), if/else 3, error handling 1 (nesting depth added 2). Of this number, 27 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · GlanceProbe.exerciseMissionControlSurvey (cognitive 30) · ×1
  • GlanceProbe.exerciseMissionControlSurvey (cognitive 30) prototype/App/GestureProbe.swift:948 — GlanceProbe.exerciseMissionControlSurvey has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 6 (10 pts), match/switch 3 (4 pts), boolean chains 3, error handling 1, loops 1 (nesting depth added 7). Of this number, 29 points are the body's 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.
D2 · Cognitive Complexity · GlanceProbe.exerciseSplit (cognitive 30) · ×1
  • GlanceProbe.exerciseSplit (cognitive 30) prototype/App/GestureProbe.swift:1231 — GlanceProbe.exerciseSplit has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 21, if/else 4 (5 pts), ternaries 3, loops 1 (nesting depth added 1). Of this number, 29 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · GlanceProbe.exerciseNotchCalibration (cognitive 30) · ×1
  • GlanceProbe.exerciseNotchCalibration (cognitive 30) prototype/App/NotchShapeProbe.swift:174 — GlanceProbe.exerciseNotchCalibration has cognitive complexity 30 (threshold 15). Drivers by points: loops 6 (10 pts), ternaries 3 (9 pts), boolean chains 6, if/else 5 (nesting depth added 10). Of this number, 26 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlobalInputFilterState.admit (cognitive 30) · ×1
  • GlobalInputFilterState.admit (cognitive 30) prototype/App/GlobalInputFilter.swift:260 — GlobalInputFilterState.admit has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 14, if/else 12 (14 pts), loops 1 (2 pts) (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.
D2 · Cognitive Complexity · LaunchpadView.accessibilityChildren (cognitive 30) · ×1
  • LaunchpadView.accessibilityChildren (cognitive 30) prototype/App/LaunchpadView.swift:1890 — LaunchpadView.accessibilityChildren has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (18 pts), loops 4 (7 pts), match/switch 2 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchActivityController.perform (cognitive 30) · ×1
  • NotchActivityController.perform (cognitive 30) prototype/App/NotchActivityController.swift:535 — NotchActivityController.perform has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (19 pts), match/switch 4 (7 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrackpadGestureController.judgeFlick (cognitive 30) · ×1
  • TrackpadGestureController.judgeFlick (cognitive 30) prototype/App/TrackpadGestures.swift:1647 — TrackpadGestureController.judgeFlick has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 10, ternaries 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · WS2ConductorView.render (cognitive 30) · ×1
  • WS2ConductorView.render (cognitive 30) prototype/App/WS2ConductorView.swift:96 — WS2ConductorView.render has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 7, ternaries 3 (7 pts), loops 3 (4 pts), 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.
D2 · Cognitive Complexity · WS2ApprovalReview.command (cognitive 30) · ×1
  • WS2ApprovalReview.command (cognitive 30) prototype/Core/WS2ApprovalReview.swift:17 — WS2ApprovalReview.command has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 18, if/else 8 (10 pts), loops 1, match/switch 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · WindowBrowserSurfaceStyle.applyCard (cognitive 30) · ×1
  • WindowBrowserSurfaceStyle.applyCard (cognitive 30) prototype/WindowBrowser/WindowBrowserViews.swift:131 — WindowBrowserSurfaceStyle.applyCard has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 7 (15 pts), if/else 11 (12 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppDelegate.performTitleBarDoubleClickAction (cognitive 29) · ×1
  • AppDelegate.performTitleBarDoubleClickAction (cognitive 29) prototype/App/EventTap.swift:646 — AppDelegate.performTitleBarDoubleClickAction has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlanceController.tick (cognitive 29) · ×1
  • GlanceController.tick (cognitive 29) prototype/App/Glance.swift:909 — GlanceController.tick has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 13, 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.
D2 · Cognitive Complexity · GlanceProbe.run (cognitive 29) · ×1
  • GlanceProbe.run (cognitive 29) prototype/App/GlanceProbe.swift:27 — GlanceProbe.run has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 14, if/else 10, error handling 3 (4 pts), loops 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · SilentCoverProbe.exercise (cognitive 29) · ×1
  • SilentCoverProbe.exercise (cognitive 29) prototype/App/SilentCoverProbe.swift:18 — SilentCoverProbe.exercise has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 7, error handling 1, ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SilentMilestoneProbe.head (cognitive 29) · ×1
  • SilentMilestoneProbe.head (cognitive 29) prototype/App/SilentMilestoneProbe.swift:232 — SilentMilestoneProbe.head has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 10, ternaries 2, error handling 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SlideOverController.validateWindow (cognitive 29) · ×1
  • SlideOverController.validateWindow (cognitive 29) prototype/App/SlideOver.swift:793 — SlideOverController.validateWindow has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 19, if/else 9 (10 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · WS2CodexApprovalHost.present (cognitive 29) · ×1
  • WS2CodexApprovalHost.present (cognitive 29) prototype/App/WS2CodexApprovalHost.swift:107 — WS2CodexApprovalHost.present has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 16, if/else 5 (7 pts), error handling 2 (5 pts), loops 1 (nesting depth added 5). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · WS2OwnedLaunchController.synchronizeThreadAndTurn (cognitive 29) · ×1
  • WS2OwnedLaunchController.synchronizeThreadAndTurn (cognitive 29) prototype/App/WS2OwnedLaunchController.swift:428 — WS2OwnedLaunchController.synchronizeThreadAndTurn has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 5 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WindowGlide.run (cognitive 29) · ×1
  • WindowGlide.run (cognitive 29) prototype/App/WindowGlide.swift:89 — WindowGlide.run has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 3, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConductorSession.handleButton (cognitive 29) · ×1
  • ConductorSession.handleButton (cognitive 29) prototype/Core/ConductorSession.swift:368 — ConductorSession.handleButton has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 7, ternaries 2 (5 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExplainerDirector.show (cognitive 29) · ×1
  • ExplainerDirector.show (cognitive 29) prototype/Core/ExplainerScript.swift:465 — ExplainerDirector.show has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 8, ternaries 1 (3 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchController.init (cognitive 29) · ×1
  • NotchController.init (cognitive 29) prototype/App/Notch/NotchController.swift:180 — NotchController.init has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12, loops 8, ternaries 3 (6 pts), boolean chains 2, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · NotchPanel.restingTarget (cognitive 29) · ×1
  • NotchPanel.restingTarget (cognitive 29) prototype/App/Notch/NotchPanel.swift:1791 — NotchPanel.restingTarget has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 14, if/else 8 (11 pts), ternaries 3 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchTileView.drawAwayCell (cognitive 29) · ×1
  • NotchTileView.drawAwayCell (cognitive 29) prototype/App/Notch/NotchRowViews.swift:548 — NotchTileView.drawAwayCell has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 6, ternaries 3 (5 pts) (nesting depth added 8). Of this number, 23 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FileShelfStore.sweep (cognitive 28) · ×1
  • FileShelfStore.sweep (cognitive 28) prototype/App/FileShelfStore.swift:275 — FileShelfStore.sweep has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 3 (5 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlanceProbe.exerciseNotchDebugCycle (cognitive 28) · ×1
  • GlanceProbe.exerciseNotchDebugCycle (cognitive 28) prototype/App/CheckProbes1031.swift:241 — GlanceProbe.exerciseNotchDebugCycle has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 7 (14 pts), boolean chains 8, loops 4, if/else 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchActivityView.swipe (cognitive 28) · ×1
  • NotchActivityView.swipe (cognitive 28) prototype/App/NotchActivityView.swift:124 — NotchActivityView.swipe has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SettingsExplainerView.apply (cognitive 28) · ×1
  • SettingsExplainerView.apply (cognitive 28) prototype/App/SettingsExplainerView.swift:74 — SettingsExplainerView.apply has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 3 (8 pts), match/switch 3 (5 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrackpadGestureController.perform (cognitive 28) · ×1
  • TrackpadGestureController.perform (cognitive 28) prototype/App/TrackpadGestures.swift:1190 — TrackpadGestureController.perform has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 2, ternaries 1 (2 pts), match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · TrackpadGestureController.dropSplit (cognitive 28) · ×1
  • TrackpadGestureController.dropSplit (cognitive 28) prototype/App/DropSplitRun.swift:19 — TrackpadGestureController.dropSplit has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 16, if/else 7 (8 pts), ternaries 1 (2 pts), loops 1, match/switch 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · WS2ConductorPageView.renderSessions (cognitive 28) · ×1
  • WS2ConductorPageView.renderSessions (cognitive 28) prototype/App/WS2ConductorPage.swift:557 — WS2ConductorPageView.renderSessions has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 5 (8 pts), loops 4 (7 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SeamLayout.fitted (cognitive 28) · ×1
  • SeamLayout.fitted (cognitive 28) prototype/Core/SeamLayout.swift:123 — SeamLayout.fitted has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 4 (8 pts), boolean chains 3, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DuoController.prepareDesktop (cognitive 28) · ×1
  • DuoController.prepareDesktop (cognitive 28) prototype/Effects/DuoController.swift:333 — DuoController.prepareDesktop has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 8, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DuoSettingsWindow.liveChanged (cognitive 28) · ×1
  • DuoSettingsWindow.liveChanged (cognitive 28) prototype/Effects/DuoSettingsWindow.swift:1234 — DuoSettingsWindow.liveChanged has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 9, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WindowCatalogProbe.run (cognitive 28) · ×1
  • WindowCatalogProbe.run (cognitive 28) prototype/WindowBrowser/DockHoverProbe.swift:286 — WindowCatalogProbe.run has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 6, loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 12). Of this number, 25 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WindowBrowserController.handleImmediate (cognitive 28) · ×1
  • WindowBrowserController.handleImmediate (cognitive 28) prototype/WindowBrowser/WindowBrowserController.swift:2096 — WindowBrowserController.handleImmediate has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (17 pts), ternaries 2 (6 pts), boolean chains 4, match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · teach.frameAt (cognitive 28) · ×1
  • teach.frameAt (cognitive 28) site/teach.js:270 — teach.frameAt has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 8 (11 pts), if/else 6 (7 pts), boolean chains 6, loops 3 (4 pts) (nesting depth added 5). Of this number, 25 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AppDelegate.performForwardedTrafficAction (cognitive 27) · ×1
  • AppDelegate.performForwardedTrafficAction (cognitive 27) prototype/App/FoldTransaction.swift:466 — AppDelegate.performForwardedTrafficAction has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 5, match/switch 1 (nesting depth added 6). Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to 5 function items inside it that branch (attempt, retryOrFallback, verifyAfterPointerClick, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · AppDelegate.windowBrowserManagedSnapshots (cognitive 27) · ×1
  • AppDelegate.windowBrowserManagedSnapshots (cognitive 27) prototype/WindowBrowser/WindowBrowserAppDelegate.swift:11 — AppDelegate.windowBrowserManagedSnapshots has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 2 (5 pts), match/switch 2 (4 pts), loops 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FaceObservationHub.activate (cognitive 27) · ×1
  • FaceObservationHub.activate (cognitive 27) prototype/App/FaceObservationSource.swift:344 — FaceObservationHub.activate has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (19 pts), error handling 2 (3 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExplainerElementLayer.apply (cognitive 27) · ×1
  • ExplainerElementLayer.apply (cognitive 27) prototype/App/SettingsExplainerView.swift:626 — ExplainerElementLayer.apply has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 8, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SplitViewController.land (cognitive 27) · ×1
  • SplitViewController.land (cognitive 27) prototype/App/SplitView.swift:541 — SplitViewController.land has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 5 (10 pts), boolean chains 7, if/else 4 (7 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClaudeWire.parse (cognitive 27) · ×1
  • ClaudeWire.parse (cognitive 27) prototype/Core/ClaudeWire.swift:32 — ClaudeWire.parse has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 9, match/switch 2 (3 pts), 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.
D2 · Cognitive Complexity · Outline.points (cognitive 27) · ×1
  • Outline.points (cognitive 27) prototype/Core/DisplayShape.swift:109 — Outline.points has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 4 (8 pts), match/switch 1 (2 pts) (nesting depth added 15). Of this number, 25 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CornerFitter.fit (cognitive 27) · ×1
  • CornerFitter.fit (cognitive 27) prototype/Core/DisplayShape.swift:167 — CornerFitter.fit has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 7, loops 3 (4 pts), ternaries 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FaceQualityGate.rawHint (cognitive 27) · ×1
  • FaceQualityGate.rawHint (cognitive 27) prototype/Core/FaceCaptureQuality.swift:132 — FaceQualityGate.rawHint has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 12 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · FocusTimer.handle (cognitive 27) · ×1
  • FocusTimer.handle (cognitive 27) prototype/Core/FocusTimer.swift:125 — FocusTimer.handle has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 5, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScrollStrip.seam (cognitive 27) · ×1
  • ScrollStrip.seam (cognitive 27) prototype/Core/ScrollStrip.swift:624 — ScrollStrip.seam has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 2 (7 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 10). Of this number, 21 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Parser.string (cognitive 27) · ×1
  • Parser.string (cognitive 27) prototype/Core/WS2StrictJSON.swift:74 — Parser.string has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 1 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · EffectWindowProbe.verifyTitlebarControls (cognitive 27) · ×1
  • EffectWindowProbe.verifyTitlebarControls (cognitive 27) prototype/Effects/EffectWindowProbe.swift:127 — EffectWindowProbe.verifyTitlebarControls has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 11, ternaries 1 (2 pts), loops 1 (nesting depth added 3). Of this number, 25 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · WS2CompanionCrypto.answerM3 (cognitive 27) · ×1
  • WS2CompanionCrypto.answerM3 (cognitive 27) prototype/Support/WS2CompanionCrypto.swift:193 — WS2CompanionCrypto.answerM3 has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 14, if/else 6 (12 pts), error handling 1 (nesting depth added 6). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · WS2CompanionTCPTransport.received (cognitive 27) · ×1
  • WS2CompanionTCPTransport.received (cognitive 27) prototype/Support/WS2CompanionTCPTransport.swift:157 — WS2CompanionTCPTransport.received has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 1 (3 pts), boolean chains 1, error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2DuplexProcess.readReady (cognitive 27) · ×1
  • WS2DuplexProcess.readReady (cognitive 27) prototype/Support/WS2DuplexProcess.swift:203 — WS2DuplexProcess.readReady has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchPanel.alert (cognitive 27) · ×1
  • NotchPanel.alert (cognitive 27) prototype/App/Notch/NotchPanel.swift:1081 — NotchPanel.alert has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 14, if/else 10 (13 pts) (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.
D2 · Cognitive Complexity · AppDelegate.frontmostWindowContaining (cognitive 26) · ×1
  • AppDelegate.frontmostWindowContaining (cognitive 26) prototype/App/EventTap.swift:565 — AppDelegate.frontmostWindowContaining has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 16, if/else 8 (10 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · AppDelegate.applyFeature (cognitive 26) · ×1
  • AppDelegate.applyFeature (cognitive 26) prototype/App/Preferences.swift:234 — AppDelegate.applyFeature has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (25 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · FaceRegionPixels.rgbSamples (cognitive 26) · ×1
  • FaceRegionPixels.rgbSamples (cognitive 26) prototype/App/FaceObservationSource.swift:177 — FaceRegionPixels.rgbSamples has cognitive complexity 26 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 6 (8 pts), boolean chains 7, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlanceProbe.exerciseElsewhere (cognitive 26) · ×1
  • GlanceProbe.exerciseElsewhere (cognitive 26) prototype/App/ElsewhereProbe.swift:7 — GlanceProbe.exerciseElsewhere has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 12, if/else 7 (8 pts), ternaries 5, error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · LaunchpadView.mouseDragged (cognitive 26) · ×1
  • LaunchpadView.mouseDragged (cognitive 26) prototype/App/LaunchpadView.swift:867 — LaunchpadView.mouseDragged has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 7, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PinchEventTap.noteTouches (cognitive 26) · ×1
  • PinchEventTap.noteTouches (cognitive 26) prototype/App/PinchEventTap.swift:113 — PinchEventTap.noteTouches has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 6 (8 pts), ternaries 3 (5 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SLSOffscreenCheckProbe.exercise (cognitive 26) · ×1
  • SLSOffscreenCheckProbe.exercise (cognitive 26) prototype/App/SLSOffscreenCheckProbe.swift:29 — SLSOffscreenCheckProbe.exercise has cognitive complexity 26 (threshold 15). Drivers by points: if/else 18 (19 pts), boolean chains 7 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · TrackpadGestureController.refreshMonitors (cognitive 26) · ×1
  • TrackpadGestureController.refreshMonitors (cognitive 26) prototype/App/TrackpadGestures.swift:233 — TrackpadGestureController.refreshMonitors has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2RemoteBonjourListener.init (cognitive 26) · ×1
  • WS2RemoteBonjourListener.init (cognitive 26) prototype/App/WS2RemoteHost.swift:1019 — WS2RemoteBonjourListener.init has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (7 pts), boolean chains 4, match/switch 1 (3 pts), error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MorphRetarget.kickKeyframes (cognitive 26) · ×1
  • MorphRetarget.kickKeyframes (cognitive 26) prototype/Core/FlickMotion.swift:362 — MorphRetarget.kickKeyframes has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 9, loops 2 (3 pts), ternaries 1 (nesting depth added 5). Of this number, 19 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MiddleDrag.update (cognitive 26) · ×1
  • MiddleDrag.update (cognitive 26) prototype/Core/MiddleDrag.swift:55 — MiddleDrag.update has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 7 (13 pts), if/else 10 (11 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2AppUninstallPlan.scan (cognitive 26) · ×1
  • WS2AppUninstallPlan.scan (cognitive 26) prototype/Core/WS2AppUninstallPlan.swift:79 — WS2AppUninstallPlan.scan has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 5, loops 1 (2 pts), ternaries 2 (nesting depth added 7). Of this number, 24 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Decoder.feed (cognitive 26) · ×1
  • Decoder.feed (cognitive 26) prototype/Core/WS2CompanionFrame.swift:20 — Decoder.feed has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WindowBrowserNewWindow.scan (cognitive 26) · ×1
  • WindowBrowserNewWindow.scan (cognitive 26) prototype/WindowBrowser/WindowBrowserNewWindow.swift:96 — WindowBrowserNewWindow.scan has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 4 (10 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchCompactView.update (cognitive 26) · ×1
  • NotchCompactView.update (cognitive 26) prototype/App/Notch/NotchCompactViews.swift:184 — NotchCompactView.update has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 8 (9 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppDelegate.handleHotKey (cognitive 25) · ×1
  • AppDelegate.handleHotKey (cognitive 25) prototype/App/EventTap.swift:147 — AppDelegate.handleHotKey has cognitive complexity 25 (threshold 15). Drivers by points: if/else 23, boolean chains 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · AppDelegate.updateFaceAutofillControls (cognitive 25) · ×1
  • AppDelegate.updateFaceAutofillControls (cognitive 25) prototype/App/FaceAutofillSettings.swift:70 — AppDelegate.updateFaceAutofillControls has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 11, if/else 8, ternaries 1 (3 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CarryController.layout (cognitive 25) · ×1
  • CarryController.layout (cognitive 25) prototype/App/Carry.swift:316 — CarryController.layout has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 7, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlanceProbe.exerciseShelfPeek (cognitive 25) · ×1
  • GlanceProbe.exerciseShelfPeek (cognitive 25) prototype/App/NotchShelfProbe.swift:64 — GlanceProbe.exerciseShelfPeek has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 6, ternaries 4, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExplainerElementLayer.build (cognitive 25) · ×1
  • ExplainerElementLayer.build (cognitive 25) prototype/App/SettingsExplainerView.swift:544 — ExplainerElementLayer.build has cognitive complexity 25 (threshold 15). Drivers by points: loops 6 (13 pts), ternaries 4 (9 pts), if/else 1 (2 pts), match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · TrackpadGestureController.resize (cognitive 25) · ×1
  • TrackpadGestureController.resize (cognitive 25) prototype/App/TrackpadGestures.swift:2039 — TrackpadGestureController.resize has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 5, ternaries 2 (5 pts), match/switch 2 (3 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ArtworkPalette.make (cognitive 25) · ×1
  • ArtworkPalette.make (cognitive 25) prototype/Core/ArtworkPalette.swift:75 — ArtworkPalette.make has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 4, loops 3 (nesting depth added 7). Of this number, 24 points are the body's 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.
D2 · Cognitive Complexity · FocusNavigator.move (cognitive 25) · ×1
  • FocusNavigator.move (cognitive 25) prototype/Core/FocusNavigator.swift:19 — FocusNavigator.move has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 10, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · EffectFrameSource.stream (cognitive 25) · ×1
  • EffectFrameSource.stream (cognitive 25) prototype/Effects/EffectFrameSource.swift:254 — EffectFrameSource.stream has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 13, if/else 10 (12 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · WS2LocalLaunchProfile.admitsEffectiveConfig (cognitive 25) · ×1
  • WS2LocalLaunchProfile.admitsEffectiveConfig (cognitive 25) prototype/Support/WS2LocalLaunchProfile.swift:124 — WS2LocalLaunchProfile.admitsEffectiveConfig has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (9 pts), loops 3 (4 pts), match/switch 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WindowBrowserController.requestThumbnails (cognitive 25) · ×1
  • WindowBrowserController.requestThumbnails (cognitive 25) prototype/WindowBrowser/WindowBrowserController.swift:1556 — WindowBrowserController.requestThumbnails has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (17 pts), ternaries 1 (3 pts), loops 2, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WindowBrowserDiscovery.discover (cognitive 25) · ×1
  • WindowBrowserDiscovery.discover (cognitive 25) prototype/WindowBrowser/WindowBrowserDiscovery.swift:14 — WindowBrowserDiscovery.discover has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 5, loops 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WindowBrowserGeometry.layoutPlan (cognitive 25) · ×1
  • WindowBrowserGeometry.layoutPlan (cognitive 25) prototype/WindowBrowser/WindowBrowserGeometry.swift:364 — WindowBrowserGeometry.layoutPlan has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 8 (12 pts), if/else 9 (10 pts), boolean chains 2, match/switch 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · NotchCanvasView.routeRowScroll (cognitive 25) · ×1
  • NotchCanvasView.routeRowScroll (cognitive 25) prototype/App/Notch/NotchCanvas.swift:1231 — NotchCanvasView.routeRowScroll has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 10 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchTileView.drawOngoing (cognitive 25) · ×1
  • NotchTileView.drawOngoing (cognitive 25) prototype/App/Notch/NotchRowViews.swift:462 — NotchTileView.drawOngoing has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 8 (10 pts), boolean chains 2, match/switch 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppDelegate.sourceWindowLooksUserVisible (cognitive 24) · ×1
  • AppDelegate.sourceWindowLooksUserVisible (cognitive 24) prototype/App/Reconcile.swift:77 — AppDelegate.sourceWindowLooksUserVisible has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 3, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppDelegate.arrangeThumbnailEntries (cognitive 24) · ×1
  • AppDelegate.arrangeThumbnailEntries (cognitive 24) prototype/App/Thumbnail.swift:716 — AppDelegate.arrangeThumbnailEntries has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 6 (9 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AudioLevelSink.consume (cognitive 24) · ×1
  • AudioLevelSink.consume (cognitive 24) prototype/App/AudioLevelTap.swift:143 — AudioLevelSink.consume has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConductorClaudeProbe.poll (cognitive 24) · ×1
  • ConductorClaudeProbe.poll (cognitive 24) prototype/App/ConductorClaudeProbe.swift:80 — ConductorClaudeProbe.poll has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 4 (10 pts), boolean chains 2 (nesting depth added 11). Of this number, 14 points are the body's own statements and 10 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LaunchpadView.animateIn (cognitive 24) · ×1
  • LaunchpadView.animateIn (cognitive 24) prototype/App/LaunchpadView.swift:1773 — LaunchpadView.animateIn has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (6 pts), ternaries 3 (5 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LaunchpadView.showVeil (cognitive 24) · ×1
  • LaunchpadView.showVeil (cognitive 24) prototype/App/LaunchpadFolders.swift:502 — LaunchpadView.showVeil has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 10 (11 pts), boolean chains 8, if/else 4 (5 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · SlideOverController.enter (cognitive 24) · ×1
  • SlideOverController.enter (cognitive 24) prototype/App/SlideOver.swift:163 — SlideOverController.enter has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 10, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · SlideOverController.show (cognitive 24) · ×1
  • SlideOverController.show (cognitive 24) prototype/App/SlideOver.swift:386 — SlideOverController.show has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 10, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrackpadGestureController.arrangeableWindows (cognitive 24) · ×1
  • TrackpadGestureController.arrangeableWindows (cognitive 24) prototype/App/MagicTilingRun.swift:32 — TrackpadGestureController.arrangeableWindows has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 13, if/else 4 (8 pts), loops 3 (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · WS2AppRuntime.handleFocusEffects (cognitive 24) · ×1
  • WS2AppRuntime.handleFocusEffects (cognitive 24) prototype/App/WS2AppRuntime.swift:666 — WS2AppRuntime.handleFocusEffects has cognitive complexity 24 (threshold 15). Drivers by points: error handling 4 (12 pts), if/else 2 (6 pts), ternaries 1 (3 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2CodexApprovalHost.receive (cognitive 24) · ×1
  • WS2CodexApprovalHost.receive (cognitive 24) prototype/App/WS2CodexApprovalHost.swift:79 — WS2CodexApprovalHost.receive has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 8, loops 2 (4 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2SilentHost.asyncObserved (cognitive 24) · ×1
  • WS2SilentHost.asyncObserved (cognitive 24) prototype/App/WS2SilentHost.swift:451 — WS2SilentHost.asyncObserved has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 4 (7 pts), boolean chains 4, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · MiddleDrag.handle (cognitive 24) · ×1
  • MiddleDrag.handle (cognitive 24) prototype/Core/MiddleDrag.swift:32 — MiddleDrag.handle has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (15 pts), ternaries 3 (7 pts), boolean chains 1, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScrollStrip.move (cognitive 24) · ×1
  • ScrollStrip.move (cognitive 24) prototype/Core/ScrollStrip.swift:686 — ScrollStrip.move has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 7, ternaries 2 (4 pts), match/switch 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TerminalIdentity.parse (cognitive 24) · ×1
  • TerminalIdentity.parse (cognitive 24) prototype/Core/TerminalIdentity.swift:55 — TerminalIdentity.parse has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Parser.number (cognitive 24) · ×1
  • Parser.number (cognitive 24) prototype/Core/WS2StrictJSON.swift:55 — Parser.number has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2SRPMontgomery.multiply (cognitive 24) · ×1
  • WS2SRPMontgomery.multiply (cognitive 24) prototype/Support/WS2PureSRP.swift:140 — WS2SRPMontgomery.multiply has cognitive complexity 24 (threshold 15). Drivers by points: loops 7 (12 pts), if/else 5 (9 pts), ternaries 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WindowBrowserController.updateLivePreview (cognitive 24) · ×1
  • WindowBrowserController.updateLivePreview (cognitive 24) prototype/WindowBrowser/WindowBrowserController.swift:1703 — WindowBrowserController.updateLivePreview has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 16, if/else 7 (8 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · WindowBrowserShotProbe.render (cognitive 24) · ×1
  • WindowBrowserShotProbe.render (cognitive 24) prototype/WindowBrowser/WindowBrowserShotProbe.swift:204 — WindowBrowserShotProbe.render has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 5, loops 2 (3 pts), ternaries 3 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · NotchCanvasView.performMorph (cognitive 24) · ×1
  • NotchCanvasView.performMorph (cognitive 24) prototype/App/Notch/NotchCanvas.swift:486 — NotchCanvasView.performMorph has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 5 (6 pts), boolean chains 5 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AppDelegate.handleTitleBarTripleClick (cognitive 23) · ×1
  • AppDelegate.handleTitleBarTripleClick (cognitive 23) prototype/App/EventTap.swift:362 — AppDelegate.handleTitleBarTripleClick has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 5 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppDelegate.scheduleFoldVerification (cognitive 23) · ×1
  • AppDelegate.scheduleFoldVerification (cognitive 23) prototype/App/FoldTransaction.swift:108 — AppDelegate.scheduleFoldVerification has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 12, if/else 8 (9 pts), match/switch 1, ternaries 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · GlanceProbe.exerciseMagic (cognitive 23) · ×1
  • GlanceProbe.exerciseMagic (cognitive 23) prototype/App/GestureProbe.swift:1556 — GlanceProbe.exerciseMagic has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 14, ternaries 4 (5 pts), if/else 4 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · GlanceProbe.smoothFlicks (cognitive 23) · ×1
  • GlanceProbe.smoothFlicks (cognitive 23) prototype/App/GestureProbe.swift:2502 — GlanceProbe.smoothFlicks has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 5 (15 pts), if/else 2 (5 pts), loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlanceProbe.exerciseOverhangingEdge (cognitive 23) · ×1
  • GlanceProbe.exerciseOverhangingEdge (cognitive 23) prototype/App/StripPeekProbe.swift:340 — GlanceProbe.exerciseOverhangingEdge has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 17, if/else 5, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · NotchFaceObservationController.start (cognitive 23) · ×1
  • NotchFaceObservationController.start (cognitive 23) prototype/App/NotchFaceObservations.swift:30 — NotchFaceObservationController.start has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 10, if/else 7 (10 pts), match/switch 1 (2 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MenuBarRoom.measure (cognitive 23) · ×1
  • MenuBarRoom.measure (cognitive 23) prototype/App/NotchWatch.swift:241 — MenuBarRoom.measure has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (11 pts), ternaries 7 (9 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · MenuBarRoom.menuRoom (cognitive 23) · ×1
  • MenuBarRoom.menuRoom (cognitive 23) prototype/App/NotchWatch.swift:373 — MenuBarRoom.menuRoom has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 10, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MenuBarRoom.scanCover · ×1
  • MenuBarRoom.scanCover::scan (cognitive 23) prototype/App/NotchWatch.swift:450 — MenuBarRoom.scanCover::scan has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2RemoteHost.receive (cognitive 23) · ×1
  • WS2RemoteHost.receive (cognitive 23) prototype/App/WS2RemoteHost.swift:482 — WS2RemoteHost.receive has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 3, match/switch 1 (2 pts), error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WindowSwitcher.collect (cognitive 23) · ×1
  • WindowSwitcher.collect (cognitive 23) prototype/App/WindowSwitcher.swift:351 — WindowSwitcher.collect has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 7, ternaries 2 (4 pts), loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AwaySummary.build (cognitive 23) · ×1
  • AwaySummary.build (cognitive 23) prototype/Core/AwaySummary.swift:150 — AwaySummary.build has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 3 (6 pts), loops 5, boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ElsewhereWindows.plan (cognitive 23) · ×1
  • ElsewhereWindows.plan (cognitive 23) prototype/Core/ElsewhereWindows.swift:55 — ElsewhereWindows.plan has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 11, if/else 4 (8 pts), loops 3 (4 pts) (nesting depth added 5). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · GlanceIntent.sample (cognitive 23) · ×1
  • GlanceIntent.sample (cognitive 23) prototype/Core/GlanceIntent.swift:127 — GlanceIntent.sample has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 3, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Hysteresis.observe (cognitive 23) · ×1
  • Hysteresis.observe (cognitive 23) prototype/Core/NotchRoomPolicy.swift:143 — Hysteresis.observe has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DuoController.tickDesktop (cognitive 23) · ×1
  • DuoController.tickDesktop (cognitive 23) prototype/Effects/DuoController.swift:421 — DuoController.tickDesktop has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 10, if/else 9 (10 pts), ternaries 2 (3 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · LockOverlayController.refresh (cognitive 23) · ×1
  • LockOverlayController.refresh (cognitive 23) prototype/Effects/LockOverlayController.swift:84 — LockOverlayController.refresh has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (15 pts), error handling 1 (3 pts), boolean chains 2, loops 1 (2 pts), match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WindowBrowserIdentityProbe.checkForeignWindow (cognitive 23) · ×1
  • WindowBrowserIdentityProbe.checkForeignWindow (cognitive 23) prototype/WindowBrowser/WindowBrowserIdentityProbe.swift:212 — WindowBrowserIdentityProbe.checkForeignWindow has cognitive complexity 23 (threshold 15). Drivers by points: if/else 3 (9 pts), ternaries 2 (6 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchCanvasView.present (cognitive 23) · ×1
  • NotchCanvasView.present (cognitive 23) prototype/App/Notch/NotchCanvas.swift:768 — NotchCanvasView.present has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 6 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · NotchCanvasView.placeCompanion (cognitive 23) · ×1
  • NotchCanvasView.placeCompanion (cognitive 23) prototype/App/Notch/NotchCanvas.swift:853 — NotchCanvasView.placeCompanion has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 7 (8 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchController.awayCellText (cognitive 23) · ×1
  • NotchController.awayCellText (cognitive 23) prototype/App/Notch/NotchController.swift:1781 — NotchController.awayCellText has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 7 (16 pts), if/else 3 (4 pts), match/switch 2 (3 pts) (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · NotchController.titleSettled (cognitive 23) · ×1
  • NotchController.titleSettled (cognitive 23) prototype/App/Notch/NotchController.swift:2622 — NotchController.titleSettled has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 10, if/else 9, ternaries 4. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · NotchPanel.earContent (cognitive 23) · ×1
  • NotchPanel.earContent (cognitive 23) prototype/App/Notch/NotchPanel.swift:991 — NotchPanel.earContent has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10, boolean chains 7, ternaries 3 (5 pts), match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · ClaudeConductor.receive (cognitive 22) · ×1
  • ClaudeConductor.receive (cognitive 22) prototype/App/ClaudeConductor.swift:104 — ClaudeConductor.receive has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 2, loops 1 (2 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · DirectionKeyPresets.choose (cognitive 22) · ×1
  • DirectionKeyPresets.choose (cognitive 22) prototype/App/DirectionKeyPresets.swift:71 — DirectionKeyPresets.choose has cognitive complexity 22 (threshold 15). Drivers by points: loops 6 (9 pts), if/else 4 (7 pts), boolean chains 4, ternaries 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FileShelfView.rowsChanged (cognitive 22) · ×1
  • FileShelfView.rowsChanged (cognitive 22) prototype/App/FileShelfView.swift:1017 — FileShelfView.rowsChanged has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, ternaries 3 (4 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LaunchpadView.layoutPill (cognitive 22) · ×1
  • LaunchpadView.layoutPill (cognitive 22) prototype/App/LaunchpadView.swift:526 — LaunchpadView.layoutPill has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 9, boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · LaunchpadView.showZone (cognitive 22) · ×1
  • LaunchpadView.showZone (cognitive 22) prototype/App/LaunchpadView.swift:1513 — LaunchpadView.showZone has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 9 (17 pts), if/else 3, boolean chains 1, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NowPlayingCard.crossfadeVolume (cognitive 22) · ×1
  • NowPlayingCard.crossfadeVolume (cognitive 22) prototype/App/NowPlayingCard.swift:855 — NowPlayingCard.crossfadeVolume has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 5 (9 pts), loops 4 (6 pts), if/else 4, boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SlideOverController.endEdgeDrag (cognitive 22) · ×1
  • SlideOverController.endEdgeDrag (cognitive 22) prototype/App/SlideOver.swift:743 — SlideOverController.endEdgeDrag has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 7, ternaries 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · TrackpadGestureController.showTitleHold (cognitive 22) · ×1
  • TrackpadGestureController.showTitleHold (cognitive 22) prototype/App/TrackpadGestures.swift:1468 — TrackpadGestureController.showTitleHold has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 18, if/else 3, loops 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · WS2SilentHost.offer (cognitive 22) · ×1
  • WS2SilentHost.offer (cognitive 22) prototype/App/WS2SilentHost.swift:183 — WS2SilentHost.offer has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 2, match/switch 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · CaptureIndicatorRemoval.detect (cognitive 22) · ×1
  • CaptureIndicatorRemoval.detect (cognitive 22) prototype/Capture/CaptureIndicatorRemoval.swift:120 — CaptureIndicatorRemoval.detect has cognitive complexity 22 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 5 (7 pts), boolean chains 6 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodexWire.ingest (cognitive 22) · ×1
  • CodexWire.ingest (cognitive 22) prototype/Core/CodexWire.swift:114 — CodexWire.ingest has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GazeCalibrationFit.fit (cognitive 22) · ×1
  • GazeCalibrationFit.fit (cognitive 22) prototype/Core/GazeAttention.swift:198 — GazeCalibrationFit.fit has cognitive complexity 22 (threshold 15). Drivers by points: loops 10 (15 pts), boolean chains 4, if/else 2, ternaries 1 (nesting depth added 5). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · GazeAttention.receive (cognitive 22) · ×1
  • GazeAttention.receive (cognitive 22) prototype/Core/GazeAttention.swift:386 — GazeAttention.receive has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StripNotchExchange.seam (cognitive 22) · ×1
  • StripNotchExchange.seam (cognitive 22) prototype/Core/StripNotchExchange.swift:109 — StripNotchExchange.seam has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3 (4 pts), ternaries 1 (4 pts), boolean chains 2 (nesting depth added 8). Of this number, 17 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2CameraChoice.match (cognitive 22) · ×1
  • WS2CameraChoice.match (cognitive 22) prototype/Core/WS2CameraChoice.swift:222 — WS2CameraChoice.match has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 3 (8 pts), boolean chains 1, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WindowFoldEffects.fallback (cognitive 22) · ×1
  • WindowFoldEffects.fallback (cognitive 22) prototype/Effects/WindowFoldEffects.swift:451 — WindowFoldEffects.fallback has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 8 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2BoundedInput.readAll (cognitive 22) · ×1
  • WS2BoundedInput.readAll (cognitive 22) prototype/Support/WS2BoundedInput.swift:9 — WS2BoundedInput.readAll has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 4, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WindowBrowserActionPresentation.item (cognitive 22) · ×1
  • WindowBrowserActionPresentation.item (cognitive 22) prototype/WindowBrowser/WindowBrowserActionPresentation.swift:77 — WindowBrowserActionPresentation.item has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 9, if/else 8, ternaries 1 (3 pts), match/switch 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · NotchController.hoverChanged (cognitive 22) · ×1
  • NotchController.hoverChanged (cognitive 22) prototype/App/Notch/NotchController.swift:1157 — NotchController.hoverChanged has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 7 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · privacy.privacyModel (cognitive 22) · ×1
  • privacy.privacyModel (cognitive 22) site/scripts/privacy.mjs:49 — privacy.privacyModel has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 5 (7 pts), boolean chains 1 (nesting depth added 9). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PinnedPreviewController.beginInteraction (cognitive 21) · ×1
  • PinnedPreviewController.beginInteraction (cognitive 21) prototype/PinnedPreview.swift:1191 — PinnedPreviewController.beginInteraction has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 9 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · AppDelegate.reapplyShadeHide (cognitive 21) · ×1
  • AppDelegate.reapplyShadeHide (cognitive 21) prototype/App/FoldTransaction.swift:372 — AppDelegate.reapplyShadeHide has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, ternaries 1 (2 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · AppDelegate.retargetToActiveSpaceWindow (cognitive 21) · ×1
  • AppDelegate.retargetToActiveSpaceWindow (cognitive 21) prototype/App/ShadeController.swift:9 — AppDelegate.retargetToActiveSpaceWindow has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 13, if/else 5 (7 pts), loops 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · AppDelegate.collectParkedWindowRescueActions (cognitive 21) · ×1
  • AppDelegate.collectParkedWindowRescueActions (cognitive 21) prototype/Recovery/Rescue.swift:151 — AppDelegate.collectParkedWindowRescueActions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FaceObservationWorker.captureOutput (cognitive 21) · ×1
  • FaceObservationWorker.captureOutput (cognitive 21) prototype/App/FaceObservationSource.swift:729 — FaceObservationWorker.captureOutput has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11, boolean chains 5, match/switch 1 (2 pts), ternaries 2, error handling 1 (nesting depth added 1). Of this number, 19 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · GlanceProbe.exerciseCarry (cognitive 21) · ×1
  • GlanceProbe.exerciseCarry (cognitive 21) prototype/App/GlanceProbe.swift:687 — GlanceProbe.exerciseCarry has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 4, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · GlanceProbe.foldTiming (cognitive 21) · ×1
  • GlanceProbe.foldTiming (cognitive 21) prototype/App/GlanceProbe.swift:761 — GlanceProbe.foldTiming has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (7 pts), ternaries 4 (7 pts), boolean chains 6, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlanceProbe.exerciseHabits (cognitive 21) · ×1
  • GlanceProbe.exerciseHabits (cognitive 21) prototype/App/HabitProbe.swift:14 — GlanceProbe.exerciseHabits has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 10, ternaries 6, if/else 5. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · LaunchpadActivityCards.render (cognitive 21) · ×1
  • LaunchpadActivityCards.render (cognitive 21) prototype/App/LaunchpadActivities.swift:25 — LaunchpadActivityCards.render has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 3 (9 pts), loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LaunchpadFolderOverlay.placeCells (cognitive 21) · ×1
  • LaunchpadFolderOverlay.placeCells (cognitive 21) prototype/App/LaunchpadFolders.swift:155 — LaunchpadFolderOverlay.placeCells has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 2, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NowPlayingCard.renderProgress (cognitive 21) · ×1
  • NowPlayingCard.renderProgress (cognitive 21) prototype/App/NowPlayingCard.swift:556 — NowPlayingCard.renderProgress has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 15, if/else 4, loops 1 (2 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · SlideOverController.move (cognitive 21) · ×1
  • SlideOverController.move (cognitive 21) prototype/App/SlideOver.swift:920 — SlideOverController.move has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 8, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · UpdateLaunch.recordLaunch (cognitive 21) · ×1
  • UpdateLaunch.recordLaunch (cognitive 21) prototype/App/UpdaterLaunch.swift:73 — UpdateLaunch.recordLaunch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 2, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2AppRuntime.openConductor (cognitive 21) · ×1
  • WS2AppRuntime.openConductor (cognitive 21) prototype/App/WS2AppRuntime.swift:413 — WS2AppRuntime.openConductor has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 10 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · WS2SilentHost.startPersonalPhrasesIfConfigured (cognitive 21) · ×1
  • WS2SilentHost.startPersonalPhrasesIfConfigured (cognitive 21) prototype/App/WS2SilentHost.swift:65 — WS2SilentHost.startPersonalPhrasesIfConfigured has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 10, if/else 6 (10 pts), error handling 1 (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · CaptureIndicatorProbe.capture (cognitive 21) · ×1
  • CaptureIndicatorProbe.capture (cognitive 21) prototype/Capture/CaptureIndicatorProbe.swift:55 — CaptureIndicatorProbe.capture has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 5, error handling 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BystanderPolicy.observe (cognitive 21) · ×1
  • BystanderPolicy.observe (cognitive 21) prototype/Core/BystanderPolicy.swift:70 — BystanderPolicy.observe has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 6, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · InteractionCoordinator.admit (cognitive 21) · ×1
  • InteractionCoordinator.admit (cognitive 21) prototype/Core/InteractionCoordinator.swift:288 — InteractionCoordinator.admit has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 8, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MissionControlPick.detection (cognitive 21) · ×1
  • MissionControlPick.detection (cognitive 21) prototype/Core/MissionControlPick.swift:46 — MissionControlPick.detection has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 5, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RectangleKeymap.resolve (cognitive 21) · ×1
  • RectangleKeymap.resolve (cognitive 21) prototype/Core/RectangleKeymap.swift:160 — RectangleKeymap.resolve has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 10). Of this number, 20 points are the body's 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.
D2 · Cognitive Complexity · RemoteLayerHost.conductor (cognitive 21) · ×1
  • RemoteLayerHost.conductor (cognitive 21) prototype/Core/RemoteLayerHost.swift:257 — RemoteLayerHost.conductor has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, ternaries 1 (3 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GestureRecognizer.swipeFrame (cognitive 21) · ×1
  • GestureRecognizer.swipeFrame (cognitive 21) prototype/Core/TrackpadGesture.swift:587 — GestureRecognizer.swipeFrame has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 8 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · WS2CameraChoice.decide (cognitive 21) · ×1
  • WS2CameraChoice.decide (cognitive 21) prototype/Core/WS2CameraChoice.swift:162 — WS2CameraChoice.decide has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 11, if/else 8, ternaries 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · Parser.value (cognitive 21) · ×1
  • Parser.value (cognitive 21) prototype/Core/WS2StrictJSON.swift:22 — Parser.value has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2CompanionChannel.sendEvent (cognitive 21) · ×1
  • WS2CompanionChannel.sendEvent (cognitive 21) prototype/Support/WS2CompanionChannel.swift:188 — WS2CompanionChannel.sendEvent has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (10 pts), error handling 1 (nesting depth added 5). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · WS2HookConfiguration.configuredHelpers (cognitive 21) · ×1
  • WS2HookConfiguration.configuredHelpers (cognitive 21) prototype/Support/WS2HookConfiguration.swift:30 — WS2HookConfiguration.configuredHelpers has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (9 pts), boolean chains 6, loops 3 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WindowStateHub.reconcile (cognitive 21) · ×1
  • WindowStateHub.reconcile (cognitive 21) prototype/Window/WindowStateHub.swift:459 — WindowStateHub.reconcile has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 7, ternaries 2 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EventTapCallback.swift.pointMayLieInTitlebarBand (cognitive 21) · ×1
  • EventTapCallback.swift.pointMayLieInTitlebarBand (cognitive 21) prototype/App/EventTapCallback.swift:21 — EventTapCallback.swift.pointMayLieInTitlebarBand has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WindowStreamCapture.stream (cognitive 20) · ×1
  • WindowStreamCapture.stream (cognitive 20) prototype/ScreenCaptureBridge.swift:482 — WindowStreamCapture.stream has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 8, ternaries 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · AppDelegate.registerGlobalShortcuts (cognitive 20) · ×1
  • AppDelegate.registerGlobalShortcuts (cognitive 20) prototype/App/EventTap.swift:40 — AppDelegate.registerGlobalShortcuts has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3 (4 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 6). Of this number, 15 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppDelegate.hideWindow (cognitive 20) · ×1
  • AppDelegate.hideWindow (cognitive 20) prototype/App/FoldTransaction.swift:785 — AppDelegate.hideWindow has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 6, loops 1 (2 pts), 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.
D2 · Cognitive Complexity · AppDelegate.screenParametersChanged (cognitive 20) · ×1
  • AppDelegate.screenParametersChanged (cognitive 20) prototype/App/FoldTransaction.swift:1264 — AppDelegate.screenParametersChanged has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 4, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BystanderGuard.startCamera (cognitive 20) · ×1
  • BystanderGuard.startCamera (cognitive 20) prototype/App/BystanderTuck.swift:257 — BystanderGuard.startCamera has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FileDragSensor.handle (cognitive 20) · ×1
  • FileDragSensor.handle (cognitive 20) prototype/App/FileDragSensor.swift:451 — FileDragSensor.handle has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 2 (3 pts) (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · GlanceProbe.walkBack (cognitive 20) · ×1
  • GlanceProbe.walkBack (cognitive 20) prototype/App/ElsewhereProbe.swift:104 — GlanceProbe.walkBack has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (8 pts), ternaries 3 (6 pts), boolean chains 4, if/else 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlanceProbe.exerciseSlideOverUnminimizable (cognitive 20) · ×1
  • GlanceProbe.exerciseSlideOverUnminimizable (cognitive 20) prototype/App/GapProbesSlideOver.swift:226 — GlanceProbe.exerciseSlideOverUnminimizable has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 11, if/else 6, ternaries 3. Of this number, 18 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · GlanceProbe.exercisePinFollow (cognitive 20) · ×1
  • GlanceProbe.exercisePinFollow (cognitive 20) prototype/App/PinFollowProbe.swift:6 — GlanceProbe.exercisePinFollow has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 3 (5 pts), boolean chains 4, loops 2 (nesting depth added 4). Of this number, 17 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlanceProbe.exerciseQuietDefaults (cognitive 20) · ×1
  • GlanceProbe.exerciseQuietDefaults (cognitive 20) prototype/App/QuietDefaultsProbe.swift:10 — GlanceProbe.exerciseQuietDefaults has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 7 (10 pts), boolean chains 5, if/else 2 (4 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HabitCenter.apply (cognitive 20) · ×1
  • HabitCenter.apply (cognitive 20) prototype/App/HabitContext.swift:1194 — HabitCenter.apply has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 9 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Card.update (cognitive 20) · ×1
  • Card.update (cognitive 20) prototype/App/LaunchpadActivities.swift:78 — Card.update has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 7 (10 pts), boolean chains 5, if/else 4, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ScrollStripController.applyWatch (cognitive 20) · ×1
  • ScrollStripController.applyWatch (cognitive 20) prototype/App/ScrollStripRun.swift:1562 — ScrollStripController.applyWatch has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 6, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SlideOverController.exit (cognitive 20) · ×1
  • SlideOverController.exit (cognitive 20) prototype/App/SlideOver.swift:449 — SlideOverController.exit has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 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.
D2 · Cognitive Complexity · WS2GamepadDesktopControl.handle (cognitive 20) · ×1
  • WS2GamepadDesktopControl.handle (cognitive 20) prototype/App/WS2GamepadDesktopControl.swift:175 — WS2GamepadDesktopControl.handle has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2SilentHost.watchAsyncEnd · ×1
  • WS2SilentHost.watchAsyncEnd::tick (cognitive 20) prototype/App/WS2SilentHost.swift:391 — WS2SilentHost.watchAsyncEnd::tick has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 2 (6 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConductorSession.expire (cognitive 20) · ×1
  • ConductorSession.expire (cognitive 20) prototype/Core/ConductorSession.swift:660 — ConductorSession.expire has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 9 (10 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · DirectionKeys.plan (cognitive 20) · ×1
  • DirectionKeys.plan (cognitive 20) prototype/Core/DirectionKeys.swift:98 — DirectionKeys.plan has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 4 (6 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DisplayShape.resolve (cognitive 20) · ×1
  • DisplayShape.resolve (cognitive 20) prototype/Core/DisplayShape.swift:471 — DisplayShape.resolve has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, ternaries 3 (5 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HabitWords.lines (cognitive 20) · ×1
  • HabitWords.lines (cognitive 20) prototype/Core/HabitRules.swift:1274 — HabitWords.lines has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 4 (7 pts), match/switch 2 (3 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · CodingSessionActivities.apply (cognitive 20) · ×1
  • CodingSessionActivities.apply (cognitive 20) prototype/Core/NotchActivities.swift:1054 — CodingSessionActivities.apply has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 6, ternaries 2 (4 pts), 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.
D2 · Cognitive Complexity · EffectFrameAwaiter.first (cognitive 20) · ×1
  • EffectFrameAwaiter.first (cognitive 20) prototype/Effects/EffectFrameAwaiter.swift:6 — EffectFrameAwaiter.first has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (9 pts), loops 1 (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · WindowFoldEffects.background (cognitive 20) · ×1
  • WindowFoldEffects.background (cognitive 20) prototype/Effects/WindowFoldEffects.swift:178 — WindowFoldEffects.background has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PrivateSLSWindowMover.init (cognitive 20) · ×1
  • PrivateSLSWindowMover.init (cognitive 20) prototype/Private/SkyLightBridge.swift:37 — PrivateSLSWindowMover.init has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 2, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · MainThreadSampler.watch (cognitive 20) · ×1
  • MainThreadSampler.watch (cognitive 20) prototype/Support/Diagnostics.swift:440 — MainThreadSampler.watch has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WindowStateHub.receive (cognitive 20) · ×1
  • WindowStateHub.receive (cognitive 20) prototype/Window/WindowStateHub.swift:322 — WindowStateHub.receive has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 3, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · WindowBrowserContentPlan.index (cognitive 20) · ×1
  • WindowBrowserContentPlan.index (cognitive 20) prototype/WindowBrowser/WindowBrowserGeometry.swift:264 — WindowBrowserContentPlan.index has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 4 (7 pts), match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchPanel.hintText (cognitive 20) · ×1
  • NotchPanel.hintText (cognitive 20) prototype/App/Notch/NotchPanel.swift:2421 — NotchPanel.hintText has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 7, if/else 4 (6 pts), ternaries 3 (6 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Compact.same (cognitive 20) · ×1
  • Compact.same (cognitive 20) prototype/App/Notch/NotchPanel.swift:98 — Compact.same has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 19, if/else 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · AXWindow.swift.chromeHeight (cognitive 20) · ×1
  • AXWindow.swift.chromeHeight (cognitive 20) prototype/Window/AXWindow.swift:668 — AXWindow.swift.chromeHeight has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, if/else 8. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · AppDelegate.restoreArrangedOverlayFrames (cognitive 19) · ×1
  • AppDelegate.restoreArrangedOverlayFrames (cognitive 19) prototype/App/ArrangeController.swift:9 — AppDelegate.restoreArrangedOverlayFrames has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 5 (7 pts), boolean chains 2 (nesting depth added 4). Of this number, 11 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · AppDelegate.enforceOverlaySpaceInvariant (cognitive 19) · ×1
  • AppDelegate.enforceOverlaySpaceInvariant (cognitive 19) prototype/App/OverlayPresentation.swift:163 — AppDelegate.enforceOverlaySpaceInvariant has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppDelegate.observeRestoredWindow (cognitive 19) · ×1
  • AppDelegate.observeRestoredWindow (cognitive 19) prototype/Effects/RestoreVerification.swift:5 — AppDelegate.observeRestoredWindow has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 13, if/else 3, ternaries 2 (3 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · AppDelegate.rescueActionVerified (cognitive 19) · ×1
  • AppDelegate.rescueActionVerified (cognitive 19) prototype/Recovery/Rescue.swift:123 — AppDelegate.rescueActionVerified has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 13, if/else 5 (6 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · AudioLevelController.reevaluate (cognitive 19) · ×1
  • AudioLevelController.reevaluate (cognitive 19) prototype/App/AudioLevelTap.swift:432 — AudioLevelController.reevaluate has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 11, if/else 7 (8 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · GlanceProbe.exerciseBrowserMore (cognitive 19) · ×1
  • GlanceProbe.exerciseBrowserMore (cognitive 19) prototype/WindowBrowser/WindowBrowserMoreProbe.swift:10 — GlanceProbe.exerciseBrowserMore has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), ternaries 3, boolean chains 2, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · HabitMenuIndex.scan (cognitive 19) · ×1
  • HabitMenuIndex.scan (cognitive 19) prototype/App/HabitContext.swift:104 — HabitMenuIndex.scan has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (6 pts), loops 3 (6 pts), ternaries 1 (4 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HabitCenter.mouse (cognitive 19) · ×1
  • HabitCenter.mouse (cognitive 19) prototype/App/HabitContext.swift:1647 — HabitCenter.mouse has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 7, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LaunchpadView.target (cognitive 19) · ×1
  • LaunchpadView.target (cognitive 19) prototype/App/LaunchpadView.swift:688 — LaunchpadView.target has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, match/switch 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · LaunchpadView.spring (cognitive 19) · ×1
  • LaunchpadView.spring (cognitive 19) prototype/App/LaunchpadOpenWith.swift:257 — LaunchpadView.spring has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8, ternaries 4 (5 pts), boolean chains 4, match/switch 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · NotchFaceRecognitionHost.ensureSurface (cognitive 19) · ×1
  • NotchFaceRecognitionHost.ensureSurface (cognitive 19) prototype/App/NotchFaceRecognition.swift:187 — NotchFaceRecognitionHost.ensureSurface has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchLevelObserver.handleKey (cognitive 19) · ×1
  • NotchLevelObserver.handleKey (cognitive 19) prototype/App/NotchLevelObserver.swift:138 — NotchLevelObserver.handleKey has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 2 (5 pts), boolean chains 4, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · NowPlayingArtworkDecoder.decode (cognitive 19) · ×1
  • NowPlayingArtworkDecoder.decode (cognitive 19) prototype/App/NowPlayingArtwork.swift:44 — NowPlayingArtworkDecoder.decode has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 15, if/else 4. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · ScrollTap.handle (cognitive 19) · ×1
  • ScrollTap.handle (cognitive 19) prototype/App/ScrollTap.swift:161 — ScrollTap.handle has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5, match/switch 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SettingsExplainerView.applyColors (cognitive 19) · ×1
  • SettingsExplainerView.applyColors (cognitive 19) prototype/App/SettingsExplainerView.swift:446 — SettingsExplainerView.applyColors has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 10 (15 pts), loops 3, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SlideOverController.beginResize (cognitive 19) · ×1
  • SlideOverController.beginResize (cognitive 19) prototype/App/SlideOver.swift:1053 — SlideOverController.beginResize has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 13, if/else 5, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · TrackpadGestureController.placementTarget (cognitive 19) · ×1
  • TrackpadGestureController.placementTarget (cognitive 19) prototype/App/TrackpadGestures.swift:1908 — TrackpadGestureController.placementTarget has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 5 (7 pts), boolean chains 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2AgentSessionView.render (cognitive 19) · ×1
  • WS2AgentSessionView.render (cognitive 19) prototype/App/WS2AgentSessionView.swift:35 — WS2AgentSessionView.render has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (4 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2AppRuntime.openModelPicker (cognitive 19) · ×1
  • WS2AppRuntime.openModelPicker (cognitive 19) prototype/App/WS2AppRuntime.swift:327 — WS2AppRuntime.openModelPicker has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 12, if/else 7. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · WS2HookSessions.compact (cognitive 19) · ×1
  • WS2HookSessions.compact (cognitive 19) prototype/App/WS2HookServer.swift:277 — WS2HookSessions.compact has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 3, ternaries 2 (3 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2RemoteHost.openLockVerifyWindow (cognitive 19) · ×1
  • WS2RemoteHost.openLockVerifyWindow (cognitive 19) prototype/App/WS2RemoteHost.swift:283 — WS2RemoteHost.openLockVerifyWindow has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 5, error handling 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConductorSession.tap (cognitive 19) · ×1
  • ConductorSession.tap (cognitive 19) prototype/Core/ConductorSession.swift:479 — ConductorSession.tap has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DownloadTracker.update (cognitive 19) · ×1
  • DownloadTracker.update (cognitive 19) prototype/Core/DownloadActivity.swift:68 — DownloadTracker.update has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (5 pts), boolean chains 4, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FaceEnrollmentFlow.collect (cognitive 19) · ×1
  • FaceEnrollmentFlow.collect (cognitive 19) prototype/Core/FaceEnrollmentFlow.swift:228 — FaceEnrollmentFlow.collect has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 8, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · FaceGestureTracker.usable (cognitive 19) · ×1
  • FaceGestureTracker.usable (cognitive 19) prototype/Core/FaceGestureTracker.swift:109 — FaceGestureTracker.usable has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 12, if/else 3 (6 pts), match/switch 1 (nesting depth added 3). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · GazeFeatures.eye (cognitive 19) · ×1
  • GazeFeatures.eye (cognitive 19) prototype/Core/GazeAttention.swift:64 — GazeFeatures.eye has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InteractionCoordinator.vacated (cognitive 19) · ×1
  • InteractionCoordinator.vacated (cognitive 19) prototype/Core/InteractionCoordinator.swift:107 — InteractionCoordinator.vacated has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, loops 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.
D2 · Cognitive Complexity · NotchActivityStore.upsert (cognitive 19) · ×1
  • NotchActivityStore.upsert (cognitive 19) prototype/Core/NotchActivities.swift:708 — NotchActivityStore.upsert has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 6 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SpeakerFbank.logMel (cognitive 19) · ×1
  • SpeakerFbank.logMel (cognitive 19) prototype/Core/SpeakerFbank.swift:65 — SpeakerFbank.logMel has cognitive complexity 19 (threshold 15). Drivers by points: loops 8 (16 pts), if/else 2, boolean chains 1 (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · DurableShadeJournal.save (cognitive 19) · ×1
  • DurableShadeJournal.save (cognitive 19) prototype/Recovery/DurableShadeJournal.swift:25 — DurableShadeJournal.save has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JournalNumeric.spaceID (cognitive 19) · ×1
  • JournalNumeric.spaceID (cognitive 19) prototype/Recovery/JournalNumeric.swift:62 — JournalNumeric.spaceID has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 6 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · WS2LocalLaunchProfile.prepare (cognitive 19) · ×1
  • WS2LocalLaunchProfile.prepare (cognitive 19) prototype/Support/WS2LocalLaunchProfile.swift:38 — WS2LocalLaunchProfile.prepare has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2ProcessChannel.send (cognitive 19) · ×1
  • WS2ProcessChannel.send (cognitive 19) prototype/Support/WS2ProcessChannel.swift:51 — WS2ProcessChannel.send has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 6, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WindowStateHub.diff (cognitive 19) · ×1
  • WindowStateHub.diff (cognitive 19) prototype/Window/WindowStateHub.swift:406 — WindowStateHub.diff has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 7, boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WindowThumbnailService.request (cognitive 19) · ×1
  • WindowThumbnailService.request (cognitive 19) prototype/WindowBrowser/WindowThumbnailService.swift:413 — WindowThumbnailService.request has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Content.same (cognitive 19) · ×1
  • Content.same (cognitive 19) prototype/App/Notch/NotchCanvas.swift:79 — Content.same has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 19. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · NotchCompactView.syncLevel (cognitive 19) · ×1
  • NotchCompactView.syncLevel (cognitive 19) prototype/App/Notch/NotchCompactViews.swift:429 — NotchCompactView.syncLevel has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 6, ternaries 2 (4 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchPanel.updateVisibility (cognitive 19) · ×1
  • NotchPanel.updateVisibility (cognitive 19) prototype/App/Notch/NotchPanel.swift:905 — NotchPanel.updateVisibility has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 14, if/else 4 (5 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · NotchShoulders.move (cognitive 19) · ×1
  • NotchShoulders.move (cognitive 19) prototype/App/Notch/NotchShoulders.swift:123 — NotchShoulders.move has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · AppDelegate.applicationDidFinishLaunching (cognitive 18) · ×1
  • AppDelegate.applicationDidFinishLaunching (cognitive 18) prototype/WindowShade.swift:362 — AppDelegate.applicationDidFinishLaunching has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · DeviceBatteryController.handle (cognitive 18) · ×1
  • DeviceBatteryController.handle (cognitive 18) prototype/App/DeviceBatteryController.swift:101 — DeviceBatteryController.handle has cognitive complexity 18 (threshold 15). Drivers by points: if/else 2 (6 pts), ternaries 2 (6 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FaceObservationWorker.start (cognitive 18) · ×1
  • FaceObservationWorker.start (cognitive 18) prototype/App/FaceObservationSource.swift:627 — FaceObservationWorker.start has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, loops 1 (2 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FaceScanExperiment.challengeFrame (cognitive 18) · ×1
  • FaceScanExperiment.challengeFrame (cognitive 18) prototype/App/FaceScanExperiment.swift:495 — FaceScanExperiment.challengeFrame has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5, match/switch 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FocusTimerCard.render (cognitive 18) · ×1
  • FocusTimerCard.render (cognitive 18) prototype/App/FocusTimerCard.swift:83 — FocusTimerCard.render has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 10 (11 pts), boolean chains 3, if/else 3, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · GlanceController.open (cognitive 18) · ×1
  • GlanceController.open (cognitive 18) prototype/App/Glance.swift:647 — GlanceController.open has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · GlanceProbe.exerciseDisplayHotplug (cognitive 18) · ×1
  • GlanceProbe.exerciseDisplayHotplug (cognitive 18) prototype/App/CheckProbes1031.swift:193 — GlanceProbe.exerciseDisplayHotplug has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, ternaries 5 (6 pts), loops 2, if/else 1 (nesting depth added 1). Of this number, 14 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · LaunchpadView.placeCells (cognitive 18) · ×1
  • LaunchpadView.placeCells (cognitive 18) prototype/App/LaunchpadView.swift:448 — LaunchpadView.placeCells has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchFaceRecognitionView.rebuildRow (cognitive 18) · ×1
  • NotchFaceRecognitionView.rebuildRow (cognitive 18) prototype/App/NotchFaceRecognition.swift:521 — NotchFaceRecognitionView.rebuildRow has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 5 (6 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchLeaseHub.route (cognitive 18) · ×1
  • NotchLeaseHub.route (cognitive 18) prototype/App/NotchLeases.swift:447 — NotchLeaseHub.route has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 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.
D2 · Cognitive Complexity · PresencePrivateTuck.tuck (cognitive 18) · ×1
  • PresencePrivateTuck.tuck (cognitive 18) prototype/App/PresenceLockDriver.swift:37 — PresencePrivateTuck.tuck has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 6 (7 pts), loops 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · SlideOverController.pin (cognitive 18) · ×1
  • SlideOverController.pin (cognitive 18) prototype/App/SlideOver.swift:964 — SlideOverController.pin has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 12, if/else 6. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · SplitViewController.settle (cognitive 18) · ×1
  • SplitViewController.settle (cognitive 18) prototype/App/SplitView.swift:610 — SplitViewController.settle has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 8, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · TrackpadGestureController.handle (cognitive 18) · ×1
  • TrackpadGestureController.handle (cognitive 18) prototype/App/TrackpadGestures.swift:364 — TrackpadGestureController.handle has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 6, match/switch 1 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · TrackpadGestureController.shake (cognitive 18) · ×1
  • TrackpadGestureController.shake (cognitive 18) prototype/App/MagicTilingRun.swift:231 — TrackpadGestureController.shake has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (6 pts), boolean chains 5, loops 3 (5 pts), ternaries 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UpdateStateSample.read (cognitive 18) · ×1
  • UpdateStateSample.read (cognitive 18) prototype/App/UpdaterLaunch.swift:286 — UpdateStateSample.read has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (4 pts), boolean chains 1, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2HookSessions.apply (cognitive 18) · ×1
  • WS2HookSessions.apply (cognitive 18) prototype/App/WS2HookServer.swift:209 — WS2HookSessions.apply has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, ternaries 3 (4 pts), match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · WS2RemoteHost.finish (cognitive 18) · ×1
  • WS2RemoteHost.finish (cognitive 18) prototype/App/WS2RemoteHost.swift:952 — WS2RemoteHost.finish has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 12, if/else 5 (6 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · WelcomeView.heroFinished (cognitive 18) · ×1
  • WelcomeView.heroFinished (cognitive 18) prototype/App/Welcome.swift:544 — WelcomeView.heroFinished has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 6 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HabitOccupancy.keyBindingCombos (cognitive 18) · ×1
  • HabitOccupancy.keyBindingCombos (cognitive 18) prototype/Core/HabitRules.swift:526 — HabitOccupancy.keyBindingCombos has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 4, loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InteractionCoordinator.remind (cognitive 18) · ×1
  • InteractionCoordinator.remind (cognitive 18) prototype/Core/InteractionCoordinator.swift:256 — InteractionCoordinator.remind has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 7 (8 pts), ternaries 1 (2 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · NotchGlancePlan.route (cognitive 18) · ×1
  • NotchGlancePlan.route (cognitive 18) prototype/Core/NotchGlancePlan.swift:57 — NotchGlancePlan.route has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 2 (4 pts), boolean chains 3, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · NotchLevelSuppression.decide (cognitive 18) · ×1
  • NotchLevelSuppression.decide (cognitive 18) prototype/Core/NotchLevelSuppression.swift:96 — NotchLevelSuppression.decide has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, match/switch 2 (3 pts), boolean chains 1, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · WS2DeviceInputGate.button (cognitive 18) · ×1
  • WS2DeviceInputGate.button (cognitive 18) prototype/Core/WS2DeviceInputGate.swift:30 — WS2DeviceInputGate.button has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 8 (9 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · AppleSPUAccelerometer.receive (cognitive 18) · ×1
  • AppleSPUAccelerometer.receive (cognitive 18) prototype/Effects/AppleSPUAccelerometer.swift:235 — AppleSPUAccelerometer.receive has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 8 (9 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · MainThreadSampler.captureMainStack (cognitive 18) · ×1
  • MainThreadSampler.captureMainStack (cognitive 18) prototype/Support/Diagnostics.swift:486 — MainThreadSampler.captureMainStack has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 5, loops 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.
D2 · Cognitive Complexity · NotchCanvasView.setAuthentication (cognitive 18) · ×1
  • NotchCanvasView.setAuthentication (cognitive 18) prototype/App/Notch/NotchCanvas.swift:159 — NotchCanvasView.setAuthentication has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 8 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchCanvasView.placeMinimum (cognitive 18) · ×1
  • NotchCanvasView.placeMinimum (cognitive 18) prototype/App/Notch/NotchCanvas.swift:614 — NotchCanvasView.placeMinimum has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchController.announceWhenFree (cognitive 18) · ×1
  • NotchController.announceWhenFree (cognitive 18) prototype/App/Notch/NotchController.swift:1563 — NotchController.announceWhenFree has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (7 pts), ternaries 2, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · NotchController.mergeIntoBurst (cognitive 18) · ×1
  • NotchController.mergeIntoBurst (cognitive 18) prototype/App/Notch/NotchController.swift:1661 — NotchController.mergeIntoBurst has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, if/else 6 (7 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · NotchTileView.describe (cognitive 18) · ×1
  • NotchTileView.describe (cognitive 18) prototype/App/Notch/NotchRowViews.swift:131 — NotchTileView.describe has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 6 (7 pts), match/switch 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppDelegate.settleFoldWaiters (cognitive 17) · ×1
  • AppDelegate.settleFoldWaiters (cognitive 17) prototype/App/FoldCompletion.swift:43 — AppDelegate.settleFoldWaiters has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 3 (5 pts), boolean chains 2, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppDelegate.bringOutOfStageStripIfNeeded (cognitive 17) · ×1
  • AppDelegate.bringOutOfStageStripIfNeeded (cognitive 17) prototype/App/FoldTransaction.swift:228 — AppDelegate.bringOutOfStageStripIfNeeded has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, match/switch 1 (nesting depth added 4). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to one function item inside it that branches (check). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · AppDelegate.makeProxyOverlay (cognitive 17) · ×1
  • AppDelegate.makeProxyOverlay (cognitive 17) prototype/App/OverlayFactory.swift:115 — AppDelegate.makeProxyOverlay has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, ternaries 5 (7 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AppDelegate.toggle (cognitive 17) · ×1
  • AppDelegate.toggle (cognitive 17) prototype/App/ShadeController.swift:36 — AppDelegate.toggle has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AppDelegate.makeShadePlan (cognitive 17) · ×1
  • AppDelegate.makeShadePlan (cognitive 17) prototype/App/ShadeController.swift:114 — AppDelegate.makeShadePlan has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, boolean chains 7, ternaries 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · BystanderTuck.tuckPrivateWindows (cognitive 17) · ×1
  • BystanderTuck.tuckPrivateWindows (cognitive 17) prototype/App/BystanderTuck.swift:26 — BystanderTuck.tuckPrivateWindows has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (6 pts), loops 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · BystanderTuck.onScreenCandidates (cognitive 17) · ×1
  • BystanderTuck.onScreenCandidates (cognitive 17) prototype/App/BystanderTuck.swift:78 — BystanderTuck.onScreenCandidates has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (7 pts), loops 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.
D2 · Cognitive Complexity · DockSwipeController.dockAppBundleID (cognitive 17) · ×1
  • DockSwipeController.dockAppBundleID (cognitive 17) prototype/App/DockSwipe.swift:176 — DockSwipeController.dockAppBundleID has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 7, loops 1 (nesting depth added 4). Of this number, 14 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FaceAlignment.geometry (cognitive 17) · ×1
  • FaceAlignment.geometry (cognitive 17) prototype/App/FaceEmbedder.swift:37 — FaceAlignment.geometry has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, if/else 4, ternaries 1 (2 pts) (nesting depth added 1). Of this number, 13 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · FaceEnrollmentProbe.scanCheck (cognitive 17) · ×1
  • FaceEnrollmentProbe.scanCheck (cognitive 17) prototype/App/FaceEnrollmentProbe.swift:77 — FaceEnrollmentProbe.scanCheck has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 3). Of this number, 15 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FaceObservationHub.receive (cognitive 17) · ×1
  • FaceObservationHub.receive (cognitive 17) prototype/App/FaceObservationSource.swift:452 — FaceObservationHub.receive has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 3 (5 pts), ternaries 1 (2 pts), loops 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.
D2 · Cognitive Complexity · FileDropPayload.read (cognitive 17) · ×1
  • FileDropPayload.read (cognitive 17) prototype/App/FileDragSensor.swift:265 — FileDropPayload.read has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, ternaries 1 (2 pts), match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · FileShelfNameLayout.lines (cognitive 17) · ×1
  • FileShelfNameLayout.lines (cognitive 17) prototype/App/FileShelfView.swift:564 — FileShelfNameLayout.lines has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 3, loops 2, ternaries 2 (nesting depth added 2). Of this number, 11 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · GlanceController.thumbnailTarget (cognitive 17) · ×1
  • GlanceController.thumbnailTarget (cognitive 17) prototype/App/Glance.swift:497 — GlanceController.thumbnailTarget has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 6, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · GlanceController.ensureTimer (cognitive 17) · ×1
  • GlanceController.ensureTimer (cognitive 17) prototype/App/Glance.swift:882 — GlanceController.ensureTimer has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 3 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlanceProbe.exerciseDockAutohideFrames (cognitive 17) · ×1
  • GlanceProbe.exerciseDockAutohideFrames (cognitive 17) prototype/App/CheckProbes1031.swift:27 — GlanceProbe.exerciseDockAutohideFrames has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 3, match/switch 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · GlanceProbe.exerciseBrowserIdentity (cognitive 17) · ×1
  • GlanceProbe.exerciseBrowserIdentity (cognitive 17) prototype/WindowBrowser/WindowBrowserInstanceProbe.swift:8 — GlanceProbe.exerciseBrowserIdentity has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 5, ternaries 4, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · LaunchpadController.place (cognitive 17) · ×1
  • LaunchpadController.place (cognitive 17) prototype/App/LaunchpadController.swift:568 — LaunchpadController.place has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · CGEventPasswordTyper.type (cognitive 17) · ×1
  • CGEventPasswordTyper.type (cognitive 17) prototype/App/LockScreenPasswordEntry.swift:37 — CGEventPasswordTyper.type has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 3, loops 2, match/switch 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchActivityController.publish (cognitive 17) · ×1
  • NotchActivityController.publish (cognitive 17) prototype/App/NotchActivityController.swift:493 — NotchActivityController.publish has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 16, if/else 1. Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to one function item inside it that branches (equivalent). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · NotchActivitySources.recordingState (cognitive 17) · ×1
  • NotchActivitySources.recordingState (cognitive 17) prototype/App/NotchActivitySources.swift:381 — NotchActivitySources.recordingState has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, loops 1 (nesting depth added 6). Of this number, 15 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchActivityView.update (cognitive 17) · ×1
  • NotchActivityView.update (cognitive 17) prototype/App/NotchActivityView.swift:47 — NotchActivityView.update has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 4, loops 2, ternaries 1 (2 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · NotchAuthenticationController.authorize (cognitive 17) · ×1
  • NotchAuthenticationController.authorize (cognitive 17) prototype/App/NotchAuthentication.swift:80 — NotchAuthenticationController.authorize has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 8. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · NotchFaceRecognitionView.updateAccessibility (cognitive 17) · ×1
  • NotchFaceRecognitionView.updateAccessibility (cognitive 17) prototype/App/NotchFaceRecognition.swift:566 — NotchFaceRecognitionView.updateAccessibility has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 1 (3 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchShelf.scan (cognitive 17) · ×1
  • NotchShelf.scan (cognitive 17) prototype/App/NotchShelf.swift:106 — NotchShelf.scan has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (5 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchSpaceGate.readFocusedWindow (cognitive 17) · ×1
  • NotchSpaceGate.readFocusedWindow (cognitive 17) prototype/App/NotchSpaceGate.swift:173 — NotchSpaceGate.readFocusedWindow has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (6 pts), ternaries 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · PresencePrivateTuck.onScreenCandidates (cognitive 17) · ×1
  • PresencePrivateTuck.onScreenCandidates (cognitive 17) prototype/App/PresenceLockDriver.swift:72 — PresencePrivateTuck.onScreenCandidates has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (7 pts), loops 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.
D2 · Cognitive Complexity · TrackpadGestureController.targetWindow (cognitive 17) · ×1
  • TrackpadGestureController.targetWindow (cognitive 17) prototype/App/TrackpadGestures.swift:613 — TrackpadGestureController.targetWindow has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5, loops 1 (nesting depth added 5). Of this number, 12 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrackpadGestureController.doubleTap (cognitive 17) · ×1
  • TrackpadGestureController.doubleTap (cognitive 17) prototype/App/TrackpadGestures.swift:776 — TrackpadGestureController.doubleTap has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, if/else 5 (6 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · TrackpadGestureController.refitPlacedWindows (cognitive 17) · ×1
  • TrackpadGestureController.refitPlacedWindows (cognitive 17) prototype/App/TrackpadGestures.swift:2199 — TrackpadGestureController.refitPlacedWindows has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 3 (6 pts), loops 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.
D2 · Cognitive Complexity · WS2AgentSessionWindowFinder.find (cognitive 17) · ×1
  • WS2AgentSessionWindowFinder.find (cognitive 17) prototype/App/WS2AgentSessionWindowFinder.swift:85 — WS2AgentSessionWindowFinder.find has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2OwnedCodexSession.init (cognitive 17) · ×1
  • WS2OwnedCodexSession.init (cognitive 17) prototype/App/WS2OwnedCodexSession.swift:25 — WS2OwnedCodexSession.init has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 7. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · WS2OwnedLaunchController.begin (cognitive 17) · ×1
  • WS2OwnedLaunchController.begin (cognitive 17) prototype/App/WS2OwnedLaunchController.swift:120 — WS2OwnedLaunchController.begin has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 4, ternaries 1 (2 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2RemoteHost.verifyStep (cognitive 17) · ×1
  • WS2RemoteHost.verifyStep (cognitive 17) prototype/App/WS2RemoteHost.swift:529 — WS2RemoteHost.verifyStep has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 1 (2 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WelcomeView.show (cognitive 17) · ×1
  • WelcomeView.show (cognitive 17) prototype/App/Welcome.swift:313 — WelcomeView.show has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 4, ternaries 2, match/switch 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · AudioLevelMeter.push (cognitive 17) · ×1
  • AudioLevelMeter.push (cognitive 17) prototype/Core/AudioLevelBands.swift:166 — AudioLevelMeter.push has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (9 pts), if/else 3 (7 pts), boolean chains 1 (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · FaceVetoCues.observe (cognitive 17) · ×1
  • FaceVetoCues.observe (cognitive 17) prototype/Core/FaceLivenessCues.swift:102 — FaceVetoCues.observe has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4 (nesting depth added 4). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D2 · Cognitive Complexity · FaceThresholdCalibration.isValid (cognitive 17) · ×1
  • FaceThresholdCalibration.isValid (cognitive 17) prototype/Core/FaceThresholdCalibration.swift:228 — FaceThresholdCalibration.isValid has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 14, if/else 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.
D2 · Cognitive Complexity · FocusTimer.advance (cognitive 17) · ×1
  • FocusTimer.advance (cognitive 17) prototype/Core/FocusTimer.swift:180 — FocusTimer.advance has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FoldVerifier.check (cognitive 17) · ×1
  • FoldVerifier.check (cognitive 17) prototype/Core/FoldVerifier.swift:129 — FoldVerifier.check has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LaunchpadLayout.reconciled (cognitive 17) · ×1
  • LaunchpadLayout.reconciled (cognitive 17) prototype/Core/LaunchpadModel.swift:302 — LaunchpadLayout.reconciled has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (7 pts), boolean chains 5, loops 2, match/switch 1 (2 pts), ternaries 1 (nesting depth added 5). Of this number, 12 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AgentSessionWindowMatch.strength (cognitive 17) · ×1
  • AgentSessionWindowMatch.strength (cognitive 17) prototype/Core/NotchActivities.swift:1272 — AgentSessionWindowMatch.strength has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 7 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · RemoteEventRouter.route (cognitive 17) · ×1
  • RemoteEventRouter.route (cognitive 17) prototype/Core/RemoteEventRouter.swift:16 — RemoteEventRouter.route has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7, match/switch 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UpdateGuardPolicy.watch (cognitive 17) · ×1
  • UpdateGuardPolicy.watch (cognitive 17) prototype/Core/UpdateDecisions.swift:292 — UpdateGuardPolicy.watch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 3 (7 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2SilentIntent.admit (cognitive 17) · ×1
  • WS2SilentIntent.admit (cognitive 17) prototype/Core/WS2SilentIntent.swift:16 — WS2SilentIntent.admit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 8. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · WS2SilentSession.confirm (cognitive 17) · ×1
  • WS2SilentSession.confirm (cognitive 17) prototype/Core/WS2SilentSession.swift:135 — WS2SilentSession.confirm has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, boolean chains 6, ternaries 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · BridgedSpaceMove.findSymbol (cognitive 17) · ×1
  • BridgedSpaceMove.findSymbol (cognitive 17) prototype/Private/BridgedSpaceMove.swift:77 — BridgedSpaceMove.findSymbol has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LockSpaceBridge.attach (cognitive 17) · ×1
  • LockSpaceBridge.attach (cognitive 17) prototype/Private/LockSpaceBridge.swift:41 — LockSpaceBridge.attach has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JournalNumeric.exactUInt32 (cognitive 17) · ×1
  • JournalNumeric.exactUInt32 (cognitive 17) prototype/Recovery/JournalNumeric.swift:39 — JournalNumeric.exactUInt32 has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 8 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · WS2AtomicConfiguration.readRegular (cognitive 17) · ×1
  • WS2AtomicConfiguration.readRegular (cognitive 17) prototype/Support/WS2AtomicConfiguration.swift:34 — WS2AtomicConfiguration.readRegular has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 6, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2AtomicConfiguration.commit (cognitive 17) · ×1
  • WS2AtomicConfiguration.commit (cognitive 17) prototype/Support/WS2AtomicConfiguration.swift:50 — WS2AtomicConfiguration.commit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2DuplexProcess.init (cognitive 17) · ×1
  • WS2DuplexProcess.init (cognitive 17) prototype/Support/WS2DuplexProcess.swift:44 — WS2DuplexProcess.init has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 15, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · WindowBrowserController.configurePanel (cognitive 17) · ×1
  • WindowBrowserController.configurePanel (cognitive 17) prototype/WindowBrowser/WindowBrowserController.swift:1038 — WindowBrowserController.configurePanel has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, boolean chains 5, ternaries 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · WindowBrowserTrafficLights.setRevealed (cognitive 17) · ×1
  • WindowBrowserTrafficLights.setRevealed (cognitive 17) prototype/WindowBrowser/WindowBrowserTrafficLights.swift:145 — WindowBrowserTrafficLights.setRevealed has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchController.finishTuck (cognitive 17) · ×1
  • NotchController.finishTuck (cognitive 17) prototype/App/Notch/NotchController.swift:961 — NotchController.finishTuck has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 6, ternaries 2 (3 pts), match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · history.arrange (cognitive 17) · ×1
  • history.arrange (cognitive 17) site/history.js:98 — history.arrange has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 5, ternaries 1 (nesting depth added 1). Of this number, 13 points are the body's own statements and 4 belong to 4 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PinnedPreviewController.startPreview (cognitive 16) · ×1
  • PinnedPreviewController.startPreview (cognitive 16) prototype/PinnedPreview.swift:289 — PinnedPreviewController.startPreview has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 2, error handling 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppDelegate.handleTitleBarDoubleClick (cognitive 16) · ×1
  • AppDelegate.handleTitleBarDoubleClick (cognitive 16) prototype/App/EventTap.swift:264 — AppDelegate.handleTitleBarDoubleClick has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppDelegate.rebuildMenu (cognitive 16) · ×1
  • AppDelegate.rebuildMenu (cognitive 16) prototype/App/MenuBarController.swift:39 — AppDelegate.rebuildMenu has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppDelegate.makePresenceDeviceRow (cognitive 16) · ×1
  • AppDelegate.makePresenceDeviceRow (cognitive 16) prototype/App/Preferences.swift:668 — AppDelegate.makePresenceDeviceRow has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (7 pts), if/else 6, boolean chains 2, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AppDelegate.showWelcome (cognitive 16) · ×1
  • AppDelegate.showWelcome (cognitive 16) prototype/App/Preferences.swift:1468 — AppDelegate.showWelcome has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 6, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ConductorAudioEngineOutput.ensureRunning (cognitive 16) · ×1
  • ConductorAudioEngineOutput.ensureRunning (cognitive 16) prototype/App/ConductorSoundPlayer.swift:137 — ConductorAudioEngineOutput.ensureRunning has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 2 (5 pts), boolean chains 2, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlanceProbe.menuBarOwner (cognitive 16) · ×1
  • GlanceProbe.menuBarOwner (cognitive 16) prototype/App/GlanceProbe.swift:836 — GlanceProbe.menuBarOwner has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 5, loops 2, ternaries 2 (nesting depth added 1). Of this number, 13 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · GlanceProbe.bringFixtureToCurrentStage (cognitive 16) · ×1
  • GlanceProbe.bringFixtureToCurrentStage (cognitive 16) prototype/App/GlanceProbe.swift:1449 — GlanceProbe.bringFixtureToCurrentStage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlanceProbe.exerciseDockGestures (cognitive 16) · ×1
  • GlanceProbe.exerciseDockGestures (cognitive 16) prototype/App/DockSwipeProbe.swift:10 — GlanceProbe.exerciseDockGestures has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, boolean chains 6, ternaries 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · HabitWorker.desktop (cognitive 16) · ×1
  • HabitWorker.desktop (cognitive 16) prototype/App/HabitContext.swift:1055 — HabitWorker.desktop has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppCatalog.scan (cognitive 16) · ×1
  • AppCatalog.scan (cognitive 16) prototype/App/Launchpad.swift:20 — AppCatalog.scan has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, loops 2 (nesting depth added 2). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 2 function items inside it that branch (walk, add). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · LaunchpadCell.showTarget (cognitive 16) · ×1
  • LaunchpadCell.showTarget (cognitive 16) prototype/App/Launchpad.swift:446 — LaunchpadCell.showTarget has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 2 (3 pts), boolean chains 2 (nesting depth added 3). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to one function item inside it that branches (pop). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · LaunchpadFolderOverlay.dismiss (cognitive 16) · ×1
  • LaunchpadFolderOverlay.dismiss (cognitive 16) prototype/App/LaunchpadFolders.swift:432 — LaunchpadFolderOverlay.dismiss has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (4 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LaunchpadView.mouseDown (cognitive 16) · ×1
  • LaunchpadView.mouseDown (cognitive 16) prototype/App/LaunchpadView.swift:784 — LaunchpadView.mouseDown has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 2, boolean chains 1 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · MiddleTitlebarTap.region (cognitive 16) · ×1
  • MiddleTitlebarTap.region (cognitive 16) prototype/App/MiddleTitlebarTap.swift:198 — MiddleTitlebarTap.region has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 6, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchActivityView.layoutContents (cognitive 16) · ×1
  • NotchActivityView.layoutContents (cognitive 16) prototype/App/NotchActivityView.swift:96 — NotchActivityView.layoutContents has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (8 pts), loops 4 (5 pts), if/else 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · NowPlayingCard.crossfade (cognitive 16) · ×1
  • NowPlayingCard.crossfade (cognitive 16) prototype/App/NowPlayingCard.swift:944 — NowPlayingCard.crossfade has cognitive complexity 16 (threshold 15). Drivers by points: loops 6 (8 pts), ternaries 3 (5 pts), if/else 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NowPlayingCard.runEntranceIfNeeded (cognitive 16) · ×1
  • NowPlayingCard.runEntranceIfNeeded (cognitive 16) prototype/App/NowPlayingCard.swift:969 — NowPlayingCard.runEntranceIfNeeded has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (5 pts), ternaries 2 (5 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScrollStripController.syncFocusObservers (cognitive 16) · ×1
  • ScrollStripController.syncFocusObservers (cognitive 16) prototype/App/ScrollStripRun.swift:1434 — ScrollStripController.syncFocusObservers has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 3, loops 2, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SlideOverController.flipToFreeEdge (cognitive 16) · ×1
  • SlideOverController.flipToFreeEdge (cognitive 16) prototype/App/SlideOver.swift:315 — SlideOverController.flipToFreeEdge has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 4 (5 pts), ternaries 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · SlideOverController.dragEnded (cognitive 16) · ×1
  • SlideOverController.dragEnded (cognitive 16) prototype/App/SlideOver.swift:525 — SlideOverController.dragEnded has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6, boolean chains 5, ternaries 2 (4 pts), match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · TrackpadGestureController.stripScroll (cognitive 16) · ×1
  • TrackpadGestureController.stripScroll (cognitive 16) prototype/App/TrackpadGestures.swift:428 — TrackpadGestureController.stripScroll has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrackpadGestureController.moveToNextDisplay (cognitive 16) · ×1
  • TrackpadGestureController.moveToNextDisplay (cognitive 16) prototype/App/MagicTilingRun.swift:274 — TrackpadGestureController.moveToNextDisplay has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 6, ternaries 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · WS2HookApprovalHost.allow (cognitive 16) · ×1
  • WS2HookApprovalHost.allow (cognitive 16) prototype/App/WS2HookApprovalHost.swift:100 — WS2HookApprovalHost.allow has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 5, ternaries 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PrivacyRowView.init (cognitive 16) · ×1
  • PrivacyRowView.init (cognitive 16) prototype/App/WS2PrivacyPane.swift:336 — PrivacyRowView.init has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 1 (2 pts), ternaries 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2PrivacyValues.value (cognitive 16) · ×1
  • WS2PrivacyValues.value (cognitive 16) prototype/App/WS2PrivacyPane.swift:553 — WS2PrivacyValues.value has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 2 (4 pts), match/switch 2 (3 pts) (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · WS2RemoteEffects.execute (cognitive 16) · ×1
  • WS2RemoteEffects.execute (cognitive 16) prototype/App/WS2RemoteEffects.swift:215 — WS2RemoteEffects.execute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 2 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · WelcomeView.updateGrants (cognitive 16) · ×1
  • WelcomeView.updateGrants (cognitive 16) prototype/App/Welcome.swift:642 — WelcomeView.updateGrants has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 5, loops 1 (2 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · WindowProxyArranger.writeOnce (cognitive 16) · ×1
  • WindowProxyArranger.writeOnce (cognitive 16) prototype/App/WindowProxyArranger.swift:327 — WindowProxyArranger.writeOnce has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BluetoothBatteryParse.parse (cognitive 16) · ×1
  • BluetoothBatteryParse.parse (cognitive 16) prototype/Core/BluetoothBatteryParse.swift:29 — BluetoothBatteryParse.parse has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConductorRecognizer.toneCandidate (cognitive 16) · ×1
  • ConductorRecognizer.toneCandidate (cognitive 16) prototype/Core/ConductorGesture.swift:126 — ConductorRecognizer.toneCandidate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, loops 1, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · FaceGestureTracker.stable (cognitive 16) · ×1
  • FaceGestureTracker.stable (cognitive 16) prototype/Core/FaceGestureTracker.swift:123 — FaceGestureTracker.stable has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 3 (6 pts), match/switch 1 (nesting depth added 3). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · FlickRelease.measure (cognitive 16) · ×1
  • FlickRelease.measure (cognitive 16) prototype/Core/FlickMotion.swift:95 — FlickRelease.measure has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, loops 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HabitWords.spoken (cognitive 16) · ×1
  • HabitWords.spoken (cognitive 16) prototype/Core/HabitRules.swift:1346 — HabitWords.spoken has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InteractionCoordinator.promoteReminders (cognitive 16) · ×1
  • InteractionCoordinator.promoteReminders (cognitive 16) prototype/Core/InteractionCoordinator.swift:135 — InteractionCoordinator.promoteReminders has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MissionControlPick.target (cognitive 16) · ×1
  • MissionControlPick.target (cognitive 16) prototype/Core/MissionControlPick.swift:95 — MissionControlPick.target has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchSessionEar.face (cognitive 16) · ×1
  • NotchSessionEar.face (cognitive 16) prototype/Core/NotchActivities.swift:1218 — NotchSessionEar.face has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 2 (4 pts), boolean chains 3, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PairingTLV.decode (cognitive 16) · ×1
  • PairingTLV.decode (cognitive 16) prototype/Core/PairingTLV.swift:6 — PairingTLV.decode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScrollSession.scroll (cognitive 16) · ×1
  • ScrollSession.scroll (cognitive 16) prototype/Core/ScrollSession.swift:66 — ScrollSession.scroll has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 7 (8 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · SmoothScroll.add (cognitive 16) · ×1
  • SmoothScroll.add (cognitive 16) prototype/Core/SmoothScroll.swift:32 — SmoothScroll.add has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 7, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · DisplayNeighbor.index (cognitive 16) · ×1
  • DisplayNeighbor.index (cognitive 16) prototype/Core/TrackpadGesture.swift:318 — DisplayNeighbor.index has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2FoldCallbackStamp.accepts (cognitive 16) · ×1
  • WS2FoldCallbackStamp.accepts (cognitive 16) prototype/Core/WS2FoldCallbackStamp.swift:15 — WS2FoldCallbackStamp.accepts has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 15, if/else 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · WS2SilentProductPort.accepted (cognitive 16) · ×1
  • WS2SilentProductPort.accepted (cognitive 16) prototype/Core/WS2SilentProductPort.swift:340 — WS2SilentProductPort.accepted has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · DuoController.settingsChanged (cognitive 16) · ×1
  • DuoController.settingsChanged (cognitive 16) prototype/Effects/DuoController.swift:235 — DuoController.settingsChanged has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 6. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · DuoSettingsWindow.select (cognitive 16) · ×1
  • DuoSettingsWindow.select (cognitive 16) prototype/Effects/DuoSettingsWindow.swift:501 — DuoSettingsWindow.select has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 6. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · LidAngleSource.connect (cognitive 16) · ×1
  • LidAngleSource.connect (cognitive 16) prototype/Effects/LidAngleSource.swift:108 — LidAngleSource.connect has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2CarPlayVideoDecoder.avccBlockBuffer (cognitive 16) · ×1
  • WS2CarPlayVideoDecoder.avccBlockBuffer (cognitive 16) prototype/Support/WS2CarPlayVideoDecoder.swift:98 — WS2CarPlayVideoDecoder.avccBlockBuffer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (4 pts), boolean chains 2, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WS2HookConfiguration.contains (cognitive 16) · ×1
  • WS2HookConfiguration.contains (cognitive 16) prototype/Support/WS2HookConfiguration.swift:11 — WS2HookConfiguration.contains has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WindowBrowserController.beginCardDrag (cognitive 16) · ×1
  • WindowBrowserController.beginCardDrag (cognitive 16) prototype/WindowBrowser/WindowBrowserController.swift:2426 — WindowBrowserController.beginCardDrag has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 7, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · WindowBrowserShotProbe.records (cognitive 16) · ×1
  • WindowBrowserShotProbe.records (cognitive 16) prototype/WindowBrowser/WindowBrowserShotProbe.swift:642 — WindowBrowserShotProbe.records has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 3 (6 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotchController.dragMoved (cognitive 16) · ×1
  • NotchController.dragMoved (cognitive 16) prototype/App/Notch/NotchController.swift:725 — NotchController.dragMoved has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PreviewRenderer.swift.estimatedCornerRadiusPixels (cognitive 16) · ×1
  • PreviewRenderer.swift.estimatedCornerRadiusPixels (cognitive 16) prototype/Capture/PreviewRenderer.swift:276 — PreviewRenderer.swift.estimatedCornerRadiusPixels has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 6). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to one function item inside it that branches (firstOpaqueDistance). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (5 members, 50+ identical tokens) prototype/App/Preferences.swift:770 — prototype/App/Preferences.swift:770-807 | prototype/Effects/DuoSettingsWindow.swift:729-758 | tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:13-21 | tools/archive/design-qa-batch23-29/PrivacyPageCompositionPreview.swift:13-21 | tools/archive/design-qa-batch23-29/PrivacyRowPreview.swift:9-66 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Edited copy of a member (43 corresponding lines) · ×1
  • Edited copy of a member (43 corresponding lines) prototype/Overlay/SystemAppearance.swift:238 — prototype/Overlay/SystemAppearance.swift:238-280 | prototype/Overlay/SystemAppearance.swift:284-326 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (36 corresponding lines) · ×1
  • Edited copy of a member (36 corresponding lines) prototype/Core/ScrollStrip.swift:624 — prototype/Core/ScrollStrip.swift:624-663 | prototype/Core/StripNotchExchange.swift:109-144 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (48 corresponding lines) · ×1
  • Edited copy of a member (48 corresponding lines) prototype/WindowBrowser/WindowBrowserCardView.swift:116 — prototype/WindowBrowser/WindowBrowserCardView.swift:116-170 | prototype/WindowBrowser/WindowBrowserListRowView.swift:116-163 — These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (40 corresponding lines) · ×1
  • Edited copy of a member (40 corresponding lines) prototype/App/LaunchpadFolders.swift:695 — prototype/App/LaunchpadFolders.swift:695-734 | prototype/App/LaunchpadView.swift:629-677 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 18+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 18+ corresponding lines) prototype/Core/ExplainerScenes+Common.swift:147 — prototype/Core/ExplainerScenes+Common.swift:147-167 | prototype/Core/ExplainerScenes+Common.swift:194-213 | prototype/Core/ExplainerScenes+Notch.swift:79-97 | prototype/Core/ExplainerScenes+Shade.swift:86-103 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (39 corresponding lines) · ×1
  • Edited copy of a member (39 corresponding lines) prototype/App/Thumbnail.swift:102 — prototype/App/Thumbnail.swift:102-140 | prototype/Overlay/PaperSurfaceStyle.swift:80-118 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (24 corresponding lines) · ×1
  • Edited copy of a member (24 corresponding lines) prototype/App/Preferences.swift:2156 — prototype/App/Preferences.swift:2156-2181 | prototype/App/WS2InputSettingsPane.swift:193-216 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (28 corresponding lines) · ×1
  • Edited copy of a member (28 corresponding lines) prototype/Core/InteractionCoordinator.swift:256 — prototype/Core/InteractionCoordinator.swift:256-283 | prototype/Core/InteractionCoordinator.swift:288-322 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (41 corresponding lines) · ×1
  • Edited copy of a member (41 corresponding lines) prototype/WindowBrowser/WindowPlacement.swift:276 — prototype/WindowBrowser/WindowPlacement.swift:276-316 | prototype/WindowBrowser/WindowPlacement.swift:318-360 — 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 — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (32 corresponding lines) · ×1
  • Edited copy of a member (32 corresponding lines) prototype/App/DockToolRunner.swift:57 — prototype/App/DockToolRunner.swift:57-91 | prototype/App/UpdaterSystem.swift:159-190 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (38 corresponding lines) · ×1
  • Edited copy of a member (38 corresponding lines) prototype/WindowBrowser/WindowBrowserController.swift:2976 — prototype/WindowBrowser/WindowBrowserController.swift:2976-3017 | prototype/WindowBrowser/WindowBrowserController.swift:3268-3305 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×1
  • Edited copy of a member (25 corresponding lines) prototype/Core/RectangleKeymap.swift:95 — prototype/Core/RectangleKeymap.swift:95-120 | prototype/Core/RectangleKeymap.swift:123-147 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (42 corresponding lines) · ×1
  • Edited copy of a member (42 corresponding lines) prototype/WindowBrowser/WindowThumbnailService.swift:282 — prototype/WindowBrowser/WindowThumbnailService.swift:282-323 | prototype/WindowBrowser/WindowThumbnailService.swift:325-366 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (35 corresponding lines) · ×1
  • Edited copy of a member (35 corresponding lines) prototype/App/LaunchpadFolders.swift:155 — prototype/App/LaunchpadFolders.swift:155-193 | prototype/App/LaunchpadView.swift:448-482 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 16+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 16+ corresponding lines) prototype/Core/ExplainerScenes+Browser.swift:34 — prototype/Core/ExplainerScenes+Browser.swift:34-51 | prototype/Core/ExplainerScenes+Common.swift:338-353 | prototype/Core/ExplainerScenes+Shade.swift:43-58 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (30 corresponding lines) · ×1
  • Edited copy of a member (30 corresponding lines) prototype/App/FoldExit.swift:128 — prototype/App/FoldExit.swift:128-162 | prototype/App/FoldExit.swift:163-192 — 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 — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 33+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 33+ corresponding lines) prototype/App/HabitKeys.swift:119 — prototype/App/HabitKeys.swift:119-152 | prototype/App/MiddleTitlebarTap.swift:50-90 | prototype/App/MissionControlKeys.swift:89-125 | prototype/App/ScrollTap.swift:104-136 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 33 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (29 corresponding lines) · ×1
  • Edited copy of a member (29 corresponding lines) prototype/Core/WS2HeadGesture.swift:67 — prototype/Core/WS2HeadGesture.swift:67-95 | prototype/Core/WS2HeadGesture.swift:97-126 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×1
  • Edited copy of a member (18 corresponding lines) prototype/App/SlideOver.swift:1200 — prototype/App/SlideOver.swift:1200-1217 | prototype/App/SplitView.swift:785-802 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (27 corresponding lines) · ×1
  • Edited copy of a member (27 corresponding lines) prototype/Overlay/PreviewSurfaces.swift:17 — prototype/Overlay/PreviewSurfaces.swift:17-47 | prototype/PinnedPreviewPanel.swift:179-205 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 7+ corresponding lines) prototype/App/CalendarPresenter.swift:148 — prototype/App/CalendarPresenter.swift:148-154 | prototype/App/CountdownTimerCard.swift:100-106 | prototype/App/NowPlayingCard.swift:303-311 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 15+ corresponding lines) prototype/App/Carry.swift:12 — prototype/App/Carry.swift:12-27 | prototype/App/ScrollStripOverview.swift:258-272 | prototype/Overlay/GlancePanel.swift:13-30 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 7+ corresponding lines) prototype/Core/SystemIslandPolicy.swift:21 — prototype/Core/SystemIslandPolicy.swift:21-27 | prototype/Effects/EffectSoakProbe.swift:282-288 | prototype/Private/MultitouchBridge.swift:98-104 | prototype/Support/CrashReporting.swift:85-91 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 5+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 5+ corresponding lines) prototype/Core/ExplainerScenes+Browser.swift:122 — prototype/Core/ExplainerScenes+Browser.swift:122-126 | prototype/Core/ExplainerScenes+Shade.swift:135-140 | prototype/Core/ExplainerScenes+Shade.swift:143-149 | prototype/Core/ExplainerScenes+Shade.swift:194-199 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 6+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 6+ corresponding lines) prototype/App/AudioLevelTap.swift:96 — prototype/App/AudioLevelTap.swift:96-103 | prototype/App/AudioLevelTap.swift:105-112 | prototype/App/AudioOutputRoutes.swift:104-111 | prototype/App/AudioOutputRoutes.swift:113-120 | prototype/App/NotchActivitySources.swift:368-373 | prototype/App/NotchActivitySources.swift:374-379 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 9+ corresponding lines) prototype/App/EntitlementProbe.swift:66 — prototype/App/EntitlementProbe.swift:66-74 | prototype/App/NotchActivitySources.swift:324-332 | prototype/App/PresenceLockDriver.swift:183-191 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 8+ corresponding lines) prototype/App/DockScenariosProbe.swift:328 — prototype/App/DockScenariosProbe.swift:328-336 | prototype/App/DockSwipeProbe.swift:85-92 | prototype/App/SLSOffscreenCheckProbe.swift:205-212 | prototype/App/SilentCoverProbe.swift:112-119 | prototype/App/SilentMilestoneProbe.swift:558-565 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 6+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 6+ corresponding lines) prototype/App/Preferences.swift:190 — prototype/App/Preferences.swift:190-197 | prototype/App/Preferences.swift:200-205 | prototype/Effects/DuoSettingsWindow.swift:639-646 | prototype/Effects/DuoSettingsWindow.swift:649-654 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 6+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 6+ corresponding lines) prototype/App/TrackpadGestureSupport.swift:14 — prototype/App/TrackpadGestureSupport.swift:14-19 | prototype/Window/AXWindow.swift:118-124 | prototype/Window/AXWindow.swift:485-494 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 8+ corresponding lines) prototype/App/Notch/NotchController.swift:836 — prototype/App/Notch/NotchController.swift:836-843 | prototype/App/NotchLevelObserver.swift:215-226 | prototype/App/ScrollStripRun.swift:1094-1104 | prototype/App/WS2HomePlayPresenceSource.swift:104-112 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 3+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 3+ corresponding lines) prototype/App/AuthorizationService.swift:32 — prototype/App/AuthorizationService.swift:32-36 | prototype/Effects/DuoController.swift:175-180 | prototype/Effects/LockOverlayController.swift:58-60 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 3+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 3+ corresponding lines) prototype/App/ConductorClaudeProbe.swift:35 — prototype/App/ConductorClaudeProbe.swift:35-39 | prototype/App/FaceEnrollmentProbe.swift:23-27 | prototype/App/HookApprovalProbe.swift:26-30 | prototype/App/SessionPeekProbe.swift:18-20 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×1
  • Duplicated block (20 lines × 2) prototype/App/FinderAliasProbe.swift:68 — prototype/App/FinderAliasProbe.swift:68-87 | prototype/App/FinderColumnsProbe.swift:40-59 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (4–19 lines × 3) · ×1
  • Duplicated block (4–19 lines × 3) prototype/Effects/DuoSettingsWindow.swift:520 — prototype/Effects/DuoSettingsWindow.swift:520-523 | tools/archive/design-qa-batch23-29/BrowserSettingsPreview.swift:31-49 | tools/archive/design-qa-batch23-29/SettingsShadeLanguagePreview.swift:54-72 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `tools/archive/design-qa-batch23-29/BrowserSettingsPreview.swift:31` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `tools/archive/design-qa-batch23-29/BrowserSettingsPreview.swift:52` calls `constraint` and `tools/archive/design-qa-batch23-29/SettingsShadeLanguagePreview.swift:75` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×1
  • Duplicated block (17 lines × 2) prototype/App/MiddleTitlebarTap.swift:70 — prototype/App/MiddleTitlebarTap.swift:70-86 | prototype/App/ScrollTap.swift:117-133 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×1
  • Duplicated block (24 lines × 2) prototype/App/BystanderTuck.swift:79 — prototype/App/BystanderTuck.swift:79-102 | prototype/App/PresenceLockDriver.swift:73-96 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (1–13 lines × 6) · ×1
  • Duplicated block (1–13 lines × 6) prototype/App/Preferences.swift:771 — prototype/App/Preferences.swift:771-783 | prototype/Effects/DuoSettingsWindow.swift:730-742 | tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:16-16 | tools/archive/design-qa-batch23-29/PrivacyPageCompositionPreview.swift:16-16 | tools/archive/design-qa-batch23-29/PrivacyRowPreview.swift:28-28 | tools/archive/design-qa-batch23-29/PrivacyRowPreview.swift:29-29 — there are 6 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/Preferences.swift:771` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8–11 lines × 2) · ×1
  • Duplicated block (8–11 lines × 2) prototype/App/StatusBarIcon.swift:6 — prototype/App/StatusBarIcon.swift:6-16 | prototype/Watchdog/GuardIcon.swift:8-15 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/StatusBarIcon.swift:6` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×1
  • Duplicated block (10 lines × 3) prototype/App/ConductorClaudeProbe.swift:24 — prototype/App/ConductorClaudeProbe.swift:24-33 | prototype/App/FaceEnrollmentProbe.swift:12-21 | prototype/App/HookApprovalProbe.swift:15-24 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×1
  • Duplicated block (8–9 lines × 2) prototype/Overlay/ShadeStrip.swift:607 — prototype/Overlay/ShadeStrip.swift:607-615 | prototype/Overlay/ShadeStrip.swift:716-723 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/Overlay/ShadeStrip.swift:607` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (4–7 lines × 3) · ×1
  • Duplicated block (4–7 lines × 3) prototype/App/BystanderTuck.swift:79 — prototype/App/BystanderTuck.swift:79-85 | prototype/App/MagicTilingRun.swift:37-40 | prototype/App/PresenceLockDriver.swift:73-79 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/BystanderTuck.swift:79` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (2–5 lines × 8) · ×1
  • Duplicated block (2–5 lines × 8) prototype/App/GestureProbe.swift:197 — prototype/App/GestureProbe.swift:197-201 | prototype/App/GestureProbe.swift:227-228 | prototype/App/GestureProbe.swift:239-244 | prototype/App/GestureProbe.swift:263-264 | prototype/App/GestureProbe.swift:382-383 | prototype/App/GestureProbe.swift:386-387 | prototype/App/GestureProbe.swift:408-411 | prototype/App/GestureProbe.swift:430-431 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `prototype/App/GestureProbe.swift:380` calls `sleep`, `seconds`, `key` and `prototype/App/GestureProbe.swift:197` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (3–5 lines × 3) · ×1
  • Duplicated block (3–5 lines × 3) prototype/App/GlanceProbe.swift:857 — prototype/App/GlanceProbe.swift:857-859 | prototype/App/GlanceProbe.swift:1276-1280 | prototype/App/SoakLedger.swift:176-180 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `prototype/App/GlanceProbe.swift:857` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5 lines × 9) · ×1
  • Duplicated block (5 lines × 9) prototype/App/FileShelfView.swift:485 — prototype/App/FileShelfView.swift:485-490 | prototype/App/FileShelfView.swift:762-767 | prototype/App/Notch/NotchRowViews.swift:336-341 | prototype/App/NowPlayingCard.swift:45-50 | prototype/App/NowPlayingCard.swift:109-114 | prototype/App/NowPlayingCard.swift:684-689 | prototype/App/PictureInPictureViews.swift:115-120 | prototype/App/PictureInPictureViews.swift:258-262 | prototype/App/SplitView.swift:824-829 — there are 9 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 9 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `prototype/App/PictureInPictureViews.swift:265` calls `accessibilityPerformPress` and `prototype/App/FileShelfView.swift:770` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8 lines × 5) · ×1
  • Duplicated block (8 lines × 5) prototype/App/ScrollStripOverview.swift:689 — prototype/App/ScrollStripOverview.swift:689-696 | prototype/WindowBrowser/WindowBrowserActionBar.swift:13-21 | prototype/WindowBrowser/WindowBrowserCardView.swift:345-354 | prototype/WindowBrowser/WindowBrowserListRowView.swift:218-227 | prototype/WindowBrowser/WindowBrowserTrafficLights.swift:210-218 — before extracting anything, compare `prototype/WindowBrowser/WindowBrowserCardView.swift` and `prototype/WindowBrowser/WindowBrowserListRowView.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Edited copy of a member (66 corresponding lines) · ×1
  • Edited copy of a member (66 corresponding lines) tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:33 — tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:33-98 | tools/archive/design-qa-batch23-29/PrivacyPageCompositionPreview.swift:33-98 — These two members are one piece of code written twice and then edited apart: 66 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (51 corresponding lines) · ×1
  • Edited copy of a member (51 corresponding lines) tools/archive/design-qa-batch23-29/MediaOwnedStatePreview.swift:99 — tools/archive/design-qa-batch23-29/MediaOwnedStatePreview.swift:99-149 | tools/archive/design-qa-batch23-29/OwnedStatePreview.swift:11-61 — These two members are one piece of code written twice and then edited apart: 51 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (9 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (9 members, 50+ identical tokens) tools/archive/design-qa-batch23-29/FeedbackPreview.swift:515 — tools/archive/design-qa-batch23-29/FeedbackPreview.swift:515-609 | tools/archive/design-qa-batch23-29/FileShelfStatePreview.swift:13-127 | tools/archive/design-qa-batch23-29/FileShelfSurfacePreview.swift:13-77 | tools/archive/design-qa-batch23-29/MediaArtworkPreview.swift:29-86 | tools/archive/design-qa-batch23-29/MediaFeedbackPreview.swift:15-109 | tools/archive/design-qa-batch23-29/MediaOwnedStatePreview.swift:29-86 | tools/archive/design-qa-batch23-29/MediaOwnedStatePreview.swift:150-178 | tools/archive/design-qa-batch23-29/MediaSurfacePreview.swift:15-89 | tools/archive/design-qa-batch23-29/OwnedStatePreview.swift:62-90 — These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (6 members, 50+ identical tokens) tools/archive/design-qa-batch23-29/FeedbackPreview.swift:480 — tools/archive/design-qa-batch23-29/FeedbackPreview.swift:480-486 | tools/archive/design-qa-batch23-29/MediaOwnedStatePreview.swift:94-98 | tools/archive/design-qa-batch23-29/OwnedErrorFlowChecks.swift:6-10 | tools/archive/design-qa-batch23-29/OwnedPhasePreview.swift:481-487 | tools/archive/design-qa-batch23-29/OwnedScrollPreview.swift:6-10 | tools/archive/design-qa-batch23-29/OwnedStatePreview.swift:6-10 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 13+ corresponding lines) tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:122 — tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:122-135 | tools/archive/design-qa-batch23-29/NotchMotionPreview.swift:18-30 | tools/archive/design-qa-batch23-29/NotchRetargetPreview.swift:22-35 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 7+ corresponding lines) tools/archive/design-qa-batch23-29/FeedbackPreview.swift:506 — tools/archive/design-qa-batch23-29/FeedbackPreview.swift:506-514 | tools/archive/design-qa-batch23-29/FileShelfStatePreview.swift:6-12 | tools/archive/design-qa-batch23-29/FileShelfSurfacePreview.swift:6-12 | tools/archive/design-qa-batch23-29/MediaFeedbackPreview.swift:6-14 | tools/archive/design-qa-batch23-29/MediaSurfacePreview.swift:6-14 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 5+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 5+ corresponding lines) tools/probes/companion-pairing/SRPProbe.swift:17 — tools/probes/companion-pairing/SRPProbe.swift:17-22 | tools/probes/game-controller/GameControllerProbe.swift:10-14 | tools/probes/head-motion-crosscheck/HeadMotionCrossCheckProbe.swift:87-91 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 1+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 1+ corresponding lines) tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:120 — tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:120-120 | tools/archive/design-qa-batch23-29/NotchMotionPreview.swift:17-17 | tools/archive/design-qa-batch23-29/NotchRetargetPreview.swift:20-20 | tools/archive/design-qa-batch23-29/PrivacyDetailColumnDraftPreview.swift:37-37 | tools/archive/design-qa-batch23-29/UsageDetailDraftPreview.swift:107-107 | tools/archive/design-qa-batch23-29/WindowBrowserImagePreview.swift:7-7 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 1 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (2 corresponding lines) · ×1
  • Edited copy of a member (2 corresponding lines) tools/probes/companion-pairing/pair-setup-interop.py:93 — tools/probes/companion-pairing/pair-setup-interop.py:93-95 | tools/probes/remote-device/handshake-interop.py:46-47 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (174 lines × 2) · ×1
  • Duplicated block (174 lines × 2) tools/archive/design-qa-batch23-29/FeedbackPreview.swift:21 — tools/archive/design-qa-batch23-29/FeedbackPreview.swift:21-194 | tools/archive/design-qa-batch23-29/OwnedPhasePreview.swift:22-195 — before extracting anything, compare `tools/archive/design-qa-batch23-29/FeedbackPreview.swift` and `tools/archive/design-qa-batch23-29/OwnedPhasePreview.swift` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 464 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `tools/archive/design-qa-batch23-29/OwnedPhasePreview.swift:20` calls `URL` and `tools/archive/design-qa-batch23-29/FeedbackPreview.swift:19` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (167 lines × 2) · ×1
  • Duplicated block (167 lines × 2) tools/archive/design-qa-batch23-29/FeedbackPreview.swift:206 — tools/archive/design-qa-batch23-29/FeedbackPreview.swift:206-372 | tools/archive/design-qa-batch23-29/OwnedPhasePreview.swift:207-373 — before extracting anything, compare `tools/archive/design-qa-batch23-29/FeedbackPreview.swift` and `tools/archive/design-qa-batch23-29/OwnedPhasePreview.swift` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 464 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (48 lines × 2) · ×1
  • Duplicated block (48 lines × 2) tools/archive/design-qa-batch23-29/FeedbackPreview.swift:402 — tools/archive/design-qa-batch23-29/FeedbackPreview.swift:402-449 | tools/archive/design-qa-batch23-29/OwnedPhasePreview.swift:403-450 — before extracting anything, compare `tools/archive/design-qa-batch23-29/FeedbackPreview.swift` and `tools/archive/design-qa-batch23-29/OwnedPhasePreview.swift` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 464 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (160 lines × 2) · ×1
  • Duplicated block (160 lines × 2) tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:176 — tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:176-335 | tools/archive/design-qa-batch23-29/NotchRetargetPreview.swift:76-235 — before extracting anything, compare `tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift` and `tools/archive/design-qa-batch23-29/NotchRetargetPreview.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 219 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×1
  • Duplicated block (14 lines × 3) tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:162 — tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:162-175 | tools/archive/design-qa-batch23-29/NotchMotionPreview.swift:31-44 | tools/archive/design-qa-batch23-29/NotchRetargetPreview.swift:62-75 — before extracting anything, compare `tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift` and `tools/archive/design-qa-batch23-29/NotchRetargetPreview.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 219 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (3–12 lines × 4) · ×1
  • Duplicated block (3–12 lines × 4) tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:256 — tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:256-258 | tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:266-277 | tools/archive/design-qa-batch23-29/NotchRetargetPreview.swift:156-158 | tools/archive/design-qa-batch23-29/NotchRetargetPreview.swift:166-177 — before extracting anything, compare `tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift` and `tools/archive/design-qa-batch23-29/NotchRetargetPreview.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 219 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:277` calls `morph`, `token` and `tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:258` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×1
  • Duplicated block (23 lines × 2) tools/archive/design-qa-batch23-29/ProgressQuantityPreview.swift:79 — tools/archive/design-qa-batch23-29/ProgressQuantityPreview.swift:79-101 | tools/archive/design-qa-batch23-29/UsageQuantityPreview.swift:100-122 — before extracting anything, compare `tools/archive/design-qa-batch23-29/ProgressQuantityPreview.swift` and `tools/archive/design-qa-batch23-29/UsageQuantityPreview.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tools/archive/design-qa-batch23-29/ProgressQuantityPreview.swift:79` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (2–8 lines × 3) · ×1
  • Duplicated block (2–8 lines × 3) tools/archive/design-qa-batch23-29/FeedbackPreview.swift:535 — tools/archive/design-qa-batch23-29/FeedbackPreview.swift:535-542 | tools/archive/design-qa-batch23-29/MediaFeedbackPreview.swift:35-42 | tools/archive/design-qa-batch23-29/MediaSurfacePreview.swift:41-42 — before extracting anything, compare `tools/archive/design-qa-batch23-29/FeedbackPreview.swift` and `tools/archive/design-qa-batch23-29/MediaFeedbackPreview.swift` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tools/archive/design-qa-batch23-29/FeedbackPreview.swift:535` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (4–8 lines × 3) · ×1
  • Duplicated block (4–8 lines × 3) tools/archive/design-qa-batch23-29/FeedbackPreview.swift:558 — tools/archive/design-qa-batch23-29/FeedbackPreview.swift:558-565 | tools/archive/design-qa-batch23-29/MediaFeedbackPreview.swift:58-65 | tools/archive/design-qa-batch23-29/MediaSurfacePreview.swift:57-60 — before extracting anything, compare `tools/archive/design-qa-batch23-29/FeedbackPreview.swift` and `tools/archive/design-qa-batch23-29/MediaFeedbackPreview.swift` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tools/archive/design-qa-batch23-29/FeedbackPreview.swift:558` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (58 lines × 2) · ×1
  • Duplicated block (58 lines × 2) tools/archive/design-qa-batch23-29/MediaArtworkPreview.swift:29 — tools/archive/design-qa-batch23-29/MediaArtworkPreview.swift:29-86 | tools/archive/design-qa-batch23-29/MediaOwnedStatePreview.swift:29-86 — before extracting anything, compare `tools/archive/design-qa-batch23-29/MediaArtworkPreview.swift` and `tools/archive/design-qa-batch23-29/MediaOwnedStatePreview.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (2–7 lines × 6) · ×1
  • Duplicated block (2–7 lines × 6) tools/archive/design-qa-batch23-29/FeedbackPreview.swift:480 — tools/archive/design-qa-batch23-29/FeedbackPreview.swift:480-486 | tools/archive/design-qa-batch23-29/MediaOwnedStatePreview.swift:95-96 | tools/archive/design-qa-batch23-29/OwnedErrorFlowChecks.swift:7-8 | tools/archive/design-qa-batch23-29/OwnedPhasePreview.swift:481-487 | tools/archive/design-qa-batch23-29/OwnedScrollPreview.swift:7-8 | tools/archive/design-qa-batch23-29/OwnedStatePreview.swift:7-8 — before extracting anything, compare `tools/archive/design-qa-batch23-29/FeedbackPreview.swift` and `tools/archive/design-qa-batch23-29/OwnedPhasePreview.swift` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 464 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (43 lines × 2) · ×1
  • Duplicated block (43 lines × 2) tools/archive/design-qa-batch23-29/MediaOwnedStatePreview.swift:99 — tools/archive/design-qa-batch23-29/MediaOwnedStatePreview.swift:99-141 | tools/archive/design-qa-batch23-29/OwnedStatePreview.swift:11-53 — before extracting anything, compare `tools/archive/design-qa-batch23-29/MediaOwnedStatePreview.swift` and `tools/archive/design-qa-batch23-29/OwnedStatePreview.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tools/archive/design-qa-batch23-29/MediaOwnedStatePreview.swift:99` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (4–6 lines × 5) · ×1
  • Duplicated block (4–6 lines × 5) tools/archive/design-qa-batch23-29/FeedbackPreview.swift:544 — tools/archive/design-qa-batch23-29/FeedbackPreview.swift:544-549 | tools/archive/design-qa-batch23-29/MediaArtworkPreview.swift:55-58 | tools/archive/design-qa-batch23-29/MediaFeedbackPreview.swift:44-49 | tools/archive/design-qa-batch23-29/MediaOwnedStatePreview.swift:55-58 | tools/archive/design-qa-batch23-29/MediaSurfacePreview.swift:44-49 — before extracting anything, compare `tools/archive/design-qa-batch23-29/FeedbackPreview.swift` and `tools/archive/design-qa-batch23-29/MediaFeedbackPreview.swift` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (19 lines × 3) · ×1
  • Duplicated block (19 lines × 3) tools/archive/design-qa-batch23-29/MergedRowPreview.swift:73 — tools/archive/design-qa-batch23-29/MergedRowPreview.swift:73-91 | tools/archive/design-qa-batch23-29/ProgressQuantityPreview.swift:96-114 | tools/archive/design-qa-batch23-29/UsageQuantityPreview.swift:117-135 — before extracting anything, compare `tools/archive/design-qa-batch23-29/MergedRowPreview.swift` and `tools/archive/design-qa-batch23-29/ProgressQuantityPreview.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tools/archive/design-qa-batch23-29/MergedRowPreview.swift:73` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×1
  • Duplicated block (21 lines × 2) tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:141 — tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:141-161 | tools/archive/design-qa-batch23-29/NotchRetargetPreview.swift:41-61 — before extracting anything, compare `tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift` and `tools/archive/design-qa-batch23-29/NotchRetargetPreview.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 219 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (2–6 lines × 4) · ×1
  • Duplicated block (2–6 lines × 4) tools/archive/design-qa-batch23-29/FeedbackPreview.swift:283 — tools/archive/design-qa-batch23-29/FeedbackPreview.swift:283-284 | tools/archive/design-qa-batch23-29/FeedbackPreview.swift:352-357 | tools/archive/design-qa-batch23-29/OwnedPhasePreview.swift:284-285 | tools/archive/design-qa-batch23-29/OwnedPhasePreview.swift:353-358 — before extracting anything, compare `tools/archive/design-qa-batch23-29/FeedbackPreview.swift` and `tools/archive/design-qa-batch23-29/OwnedPhasePreview.swift` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 464 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `tools/archive/design-qa-batch23-29/FeedbackPreview.swift:357` calls `record`, `enabledWord` and `tools/archive/design-qa-batch23-29/FeedbackPreview.swift:284` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (5 lines × 6) · ×1
  • Duplicated block (5 lines × 6) tools/archive/design-qa-batch23-29/FeedbackPreview.swift:65 — tools/archive/design-qa-batch23-29/FeedbackPreview.swift:65-71 | tools/archive/design-qa-batch23-29/FeedbackPreview.swift:142-146 | tools/archive/design-qa-batch23-29/FeedbackPreview.swift:156-160 | tools/archive/design-qa-batch23-29/OwnedPhasePreview.swift:66-72 | tools/archive/design-qa-batch23-29/OwnedPhasePreview.swift:143-147 | tools/archive/design-qa-batch23-29/OwnedPhasePreview.swift:157-161 — before extracting anything, compare `tools/archive/design-qa-batch23-29/FeedbackPreview.swift` and `tools/archive/design-qa-batch23-29/OwnedPhasePreview.swift` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 464 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tools/archive/design-qa-batch23-29/FeedbackPreview.swift:65` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×1
  • Duplicated block (7 lines × 4) tools/archive/design-qa-batch23-29/MergedRowPreview.swift:7 — tools/archive/design-qa-batch23-29/MergedRowPreview.swift:7-13 | tools/archive/design-qa-batch23-29/PowerEarPreview.swift:6-12 | tools/archive/design-qa-batch23-29/ProgressQuantityPreview.swift:12-18 | tools/archive/design-qa-batch23-29/UsageQuantityPreview.swift:12-18 — before extracting anything, compare `tools/archive/design-qa-batch23-29/MergedRowPreview.swift` and `tools/archive/design-qa-batch23-29/ProgressQuantityPreview.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tools/archive/design-qa-batch23-29/MergedRowPreview.swift:7` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `tools/archive/design-qa-batch23-29/MergedRowPreview.swift:6` calls `rect` and `tools/archive/design-qa-batch23-29/PowerEarPreview.swift:5` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (50 lines × 2) · ×1
  • Duplicated block (50 lines × 2) tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:33 — tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:33-82 | tools/archive/design-qa-batch23-29/PrivacyPageCompositionPreview.swift:33-82 — before extracting anything, compare `tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift` and `tools/archive/design-qa-batch23-29/PrivacyPageCompositionPreview.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:33` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×1
  • Duplicated block (22 lines × 2) tools/archive/design-qa-batch23-29/MediaArtworkPreview.swift:7 — tools/archive/design-qa-batch23-29/MediaArtworkPreview.swift:7-28 | tools/archive/design-qa-batch23-29/MediaOwnedStatePreview.swift:7-28 — before extracting anything, compare `tools/archive/design-qa-batch23-29/MediaArtworkPreview.swift` and `tools/archive/design-qa-batch23-29/MediaOwnedStatePreview.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (3–5 lines × 6) · ×1
  • Duplicated block (3–5 lines × 6) tools/archive/design-qa-batch23-29/FileShelfStatePreview.swift:74 — tools/archive/design-qa-batch23-29/FileShelfStatePreview.swift:74-77 | tools/archive/design-qa-batch23-29/FileShelfSurfacePreview.swift:49-52 | tools/archive/design-qa-batch23-29/MediaArtworkPreview.swift:56-58 | tools/archive/design-qa-batch23-29/MediaOwnedStatePreview.swift:56-58 | tools/archive/design-qa-batch23-29/MediaOwnedStatePreview.swift:154-158 | tools/archive/design-qa-batch23-29/OwnedStatePreview.swift:66-70 — before extracting anything, compare `tools/archive/design-qa-batch23-29/FileShelfStatePreview.swift` and `tools/archive/design-qa-batch23-29/FileShelfSurfacePreview.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `tools/archive/design-qa-batch23-29/MediaOwnedStatePreview.swift:158` calls `layoutSubtreeIfNeeded` and `tools/archive/design-qa-batch23-29/FileShelfStatePreview.swift:77` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×1
  • Duplicated block (8 lines × 3) tools/archive/design-qa-batch23-29/FeedbackPreview.swift:515 — tools/archive/design-qa-batch23-29/FeedbackPreview.swift:515-522 | tools/archive/design-qa-batch23-29/MediaFeedbackPreview.swift:15-22 | tools/archive/design-qa-batch23-29/MediaSurfacePreview.swift:15-22 — before extracting anything, compare `tools/archive/design-qa-batch23-29/FeedbackPreview.swift` and `tools/archive/design-qa-batch23-29/MediaFeedbackPreview.swift` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tools/archive/design-qa-batch23-29/FeedbackPreview.swift:515` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Minor — 52 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×40
  • Duplicated predicate tools/archive/design-qa-batch23-29/check-privacy-column-production.py:17 — `abs(f['actualRowWidth']-width)<0.1 and abs(f['hostWidth']-(width+32))<0.1` appears character-identically in 2 files — tools/archive/design-qa-batch23-29/check-privacy-column-production.py, tools/archive/design-qa-batch23-29/check-privacy-row-preview.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tools/archive/design-qa-batch23-29/check-fileshelf-preview.py:23 — `abs(f['contentWidth']-560)<.1 and abs(f['contentHeight']-126.5)<.1` appears character-identically in 2 files — tools/archive/design-qa-batch23-29/check-fileshelf-preview.py, tools/archive/design-qa-batch23-29/check-fileshelf-state-preview.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tools/archive/design-qa-batch23-29/check-fileshelf-preview.py:22 — `abs(f['width']-561)<.1 and abs(f['height']-160)<.1` appears character-identically in 2 files — tools/archive/design-qa-batch23-29/check-fileshelf-preview.py, tools/archive/design-qa-batch23-29/check-fileshelf-state-preview.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tools/archive/design-qa-batch23-29/check-fileshelf-preview.py:27 — `abs(x-(14+84*i))<.1 and y==0 and w==76 and h==104` appears character-identically in 2 files — tools/archive/design-qa-batch23-29/check-fileshelf-preview.py, tools/archive/design-qa-batch23-29/check-fileshelf-state-preview.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tools/archive/design-qa-batch23-29/check-privacy-column-draft.py:28 — `body['text']==text and body['tooltip']==text` appears character-identically in 2 files — tools/archive/design-qa-batch23-29/check-privacy-column-draft.py, tools/archive/design-qa-batch23-29/check-privacy-column-production.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tools/archive/design-qa-batch23-29/check-fileshelf-preview.py:13 — `cleanup['temporaryDirectoriesRemoved'] and cleanup['volatileDomainRestored']` appears character-identically in 2 files — tools/archive/design-qa-batch23-29/check-fileshelf-preview.py, tools/archive/design-qa-batch23-29/check-fileshelf-state-preview.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tools/archive/design-qa-batch23-29/check-fileshelf-preview.py:21 — `f['panelAlpha']==0 and not f['intersectsScreen'] and not f['activeApplication']` appears character-identically in 2 files — tools/archive/design-qa-batch23-29/check-fileshelf-preview.py, tools/archive/design-qa-batch23-29/check-fileshelf-state-preview.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tools/archive/design-qa-batch23-29/check-browser-settings-preview.py:21 — `frame['visible'] is False and frame['active'] is False and frame['alpha'] == 0` appears character-identically in 4 files — tools/archive/design-qa-batch23-29/check-browser-settings-preview.py, tools/archive/design-qa-batch23-29/check-grid-title-preview.py, tools/archive/design-qa-batch23-29/check-merged-row-preview.py, tools/archive/design-qa-batch23-29/check-window-browser-preview.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tools/archive/design-qa-batch23-29/check-notch-motion-preview.py:37 — `isinstance(value, (int, float)) and not isinstance(value, bool)` appears character-identically in 2 files — tools/archive/design-qa-batch23-29/check-notch-motion-preview.py, tools/archive/design-qa-batch23-29/check-progress-quantity-preview.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tools/probes/remote-device/pipelined-interop.py:58 — `m4[6] == b'\x04' and srp.verify_proof(m4[4].hex().encode())` appears character-identically in 2 files — tools/probes/remote-device/pipelined-interop.py, tools/probes/remote-device/socket-interop.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tools/archive/design-qa-batch23-29/check-privacy-column-production.py:16 — `not f['visible'] and not f['active'] and f['alpha']==0 and f['mainThread'] and f['toggles']==0` appears character-identically in 2 files — tools/archive/design-qa-batch23-29/check-privacy-column-production.py, tools/archive/design-qa-batch23-29/check-privacy-row-preview.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tools/archive/design-qa-batch23-29/check-feedback-preview.py:37 — `not frame['intersectsScreen'] and not frame['activeApplication']` appears character-identically in 2 files — tools/archive/design-qa-batch23-29/check-feedback-preview.py, tools/archive/design-qa-batch23-29/check-owned-preview.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tools/archive/design-qa-batch23-29/check-privacy-column-production.py:7 — `not r['pageInstantiated'] and r['plannedFixtureOnly']` appears character-identically in 2 files — tools/archive/design-qa-batch23-29/check-privacy-column-production.py, tools/archive/design-qa-batch23-29/check-privacy-row-preview.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tools/archive/design-qa-batch23-29/check-fileshelf-preview.py:33 — `p.is_relative_to(root) and hashlib.sha256(p.read_bytes()).hexdigest()==digest` appears character-identically in 3 files — tools/archive/design-qa-batch23-29/check-fileshelf-preview.py, tools/archive/design-qa-batch23-29/check-fileshelf-state-preview.py, tools/archive/design-qa-batch23-29/check-media-owned-state-preview.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tools/archive/design-qa-batch23-29/check-privacy-column-production.py:53 — `renderer['swiftLanguageVersion']==6 and renderer['strictConcurrency'] and renderer['warningsAsErrors'] and not renderer['optimized']` appears character-identically in 3 files — tools/archive/design-qa-batch23-29/check-privacy-column-production.py, tools/archive/design-qa-batch23-29/check-privacy-row-preview.py, tools/archive/design-qa-batch23-29/check-usage-detail-preview.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tools/archive/design-qa-batch23-29/check-privacy-column-production.py:29 — `value['text']=='还没读' and f['registeredStatus']=='planned'` appears character-identically in 2 files — tools/archive/design-qa-batch23-29/check-privacy-column-production.py, tools/archive/design-qa-batch23-29/check-privacy-row-preview.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift:51 — `!rows.isEmpty || group.title==WS2PrivacyCopy.destinationGroupTitle` appears character-identically in 2 files — tools/archive/design-qa-batch23-29/Batch26CombinedEntry.swift, tools/archive/design-qa-batch23-29/PrivacyPageCompositionPreview.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate prototype/App/GapProbesSlideOver.swift:197 — `!slide.mirrorVisible && slide.tabVisible` appears character-identically in 2 files — prototype/App/GapProbesSlideOver.swift, prototype/App/GestureProbe.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate prototype/WindowBrowser/DockHoverProbe.swift:292 — `$0.activationPolicy == .regular && !$0.isTerminated` appears character-identically in 2 files — prototype/WindowBrowser/DockHoverProbe.swift, prototype/WindowBrowser/WindowBrowserController.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate prototype/App/WS2ConductorPage.swift:471 — `$0.properties.generalCategory != .control && $0.properties.generalCategory != .format` appears character-identically in 2 files — prototype/App/WS2ConductorPage.swift, prototype/App/WS2ModelPickerView.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate prototype/App/MagicTilingRun.swift:93 — `NotchController.isEnabled && owner.notch.isAvailable` appears character-identically in 2 files — prototype/App/MagicTilingRun.swift, prototype/App/NotchFaceRecognition.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate prototype/App/GestureProbe.swift:1459 — `TrackpadGestureController.neighbor(of: screen, toward: .left) != nil || TrackpadGestureController.neighbor(of: screen, toward: .right) != ni…` appears character-identically in 2 files — prototype/App/GestureProbe.swift, prototype/App/StripPeekProbe.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate prototype/Core/FlickMotion.swift:499 — `abs($0.x) < Self.settleDistance && abs($0.v) < Self.settleSpeed` appears character-identically in 2 files — prototype/Core/FlickMotion.swift, prototype/Core/WindowProxyMotion.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate prototype/Core/DisplayRefit.swift:85 — `abs(a.minX - b.minX) <= tolerance && abs(a.minY - b.minY) <= tolerance && abs(a.width - b.width) <= tolerance && abs(a.height - b.height) <=…` appears character-identically in 2 files — prototype/Core/DisplayRefit.swift, prototype/WindowShade.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate prototype/App/DropSplitRun.swift:116 — `abs(observed.width - target.width) > 4 || abs(observed.height - target.height) > 4` appears character-identically in 4 files — prototype/App/DropSplitRun.swift, prototype/App/MagicTilingRun.swift, prototype/App/TrackpadGestures.swift, prototype/App/WindowProxyArranger.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • + 15 more in this group — see findings.md.
X7 · Silent fallback defaults · Silent fallback default in catch · ×3
  • Silent fallback default in catch prototype/App/WS2AppUninstallScanner.swift:18 — `namesInDirectory` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
  • Silent fallback default in catch prototype/Core/CalendarActivity.swift:186 — `candidates` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
  • Silent fallback default in catch prototype/Core/FrameRhythmAnalysis.swift:163 — `json` turns every thrown error into `"{}"` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
D21 · Naming Consistency · `messageId` spells `Id` where 506 names in the project spell it `ID` · ×2
  • `messageId` spells `Id` where 506 names in the project spell it `ID` tools/carplay/iap2/Iap2Csm.swift:17 — 506 of 509 names in project repository spell the token `ID` (506 of 509; unit: names in project repository containing `ID`). Peers: AudioLevelSystem.appPIDs(bundleID) (prototype/App/AudioLevelTap.swift:74); AudioLevelTapping.start(bundleID) (prototype/App/AudioLevelTap.swift:127); AudioProcessTap.tapID (prototype/App/AudioLevelTap.swift:205); AudioProcessTap.aggregateID (prototype/App/AudioLevelTap.swift:206); AudioProcessTap.procID (prototype/App/AudioLevelTap.swift:207). Rename to `messageID`. [rule N6]
  • `messageId` spells `Id` where 506 names in the project spell it `ID` tools/carplay/iap2/Iap2Csm.swift:20 — 506 of 509 names in project repository spell the token `ID` (506 of 509; unit: names in project repository containing `ID`). Peers: AudioLevelSystem.appPIDs(bundleID) (prototype/App/AudioLevelTap.swift:74); AudioLevelTapping.start(bundleID) (prototype/App/AudioLevelTap.swift:127); AudioProcessTap.tapID (prototype/App/AudioLevelTap.swift:205); AudioProcessTap.aggregateID (prototype/App/AudioLevelTap.swift:206); AudioProcessTap.procID (prototype/App/AudioLevelTap.swift:207). Rename to `messageID`. [rule N6]
D21 · Naming Consistency · `controlSessionId` spells `Id` where 506 names in the project spell it `ID` · ×1
  • `controlSessionId` spells `Id` where 506 names in the project spell it `ID` tools/carplay/iap2/Iap2Link.swift:13 — 506 of 509 names in project repository spell the token `ID` (506 of 509; unit: names in project repository containing `ID`). Peers: AudioLevelSystem.appPIDs(bundleID) (prototype/App/AudioLevelTap.swift:74); AudioLevelTapping.start(bundleID) (prototype/App/AudioLevelTap.swift:127); AudioProcessTap.tapID (prototype/App/AudioLevelTap.swift:205); AudioProcessTap.aggregateID (prototype/App/AudioLevelTap.swift:206); AudioProcessTap.procID (prototype/App/AudioLevelTap.swift:207). Rename to `controlSessionID`. [rule N6]
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add CodeQL's Swift pack (Swift/Xcode) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 1 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P3 · Security & performance tooling · No dependency-update automation · ×1
  • No dependency-update automation site/package.json:11 — `site/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
Minor — 1 finding(s)
D12 · Dependency Hygiene · Dependency hygiene PARTLY measured · ×1
  • Dependency hygiene PARTLY measured — npm pinning read, dependency currency not (the committed lockfile resolved no direct production dependency) — This repository's npm dependencies were read for PINNING discipline: 0 production declaration(s) plus 2 development one(s) across 1 package.json (1 of them the product — the rest are example, documentation or fixture manifests, which are read and counted but screened off the rules below, because both prescribe a MOVE and "align your example apps" is not a remedy), against 1 committed lockfile(s). No pinning defect was found. That is only PART of dependency hygiene, so this dimension is NOT SCORED: whether any of these packages has a newer, deprecated or abandoned release is the dependency-CURRENCY question, and answering it needs concrete resolved versions. This repository's committed lockfile WAS read and it resolves no direct production dependency to grade — a package.json states version RANGES, which name no particular release to be behind. That is a fact about this repository, not a reader we are missing. A clean pinning pass is NOT an all-clear for these dependencies, and it is not a finding that they are all USED. Note also what is deliberately NOT charged here: a workspace legitimately carries ONE lockfile for many manifests, so no row is raised off the lockfile count, only reported. Known CVEs in the same dependency graph are a separate question again, reported under D30 wherever the manifest is OSV-readable.

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=0 --max-count=200" --report-format json --report-path /tmp/watchdog-gitleaks-7e4d19bff4304116babb4fc481242dd8/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=200 --max-count=800" --report-format json --report-path /tmp/watchdog-gitleaks-7e4d19bff4304116babb4fc481242dd8/history-1.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-1.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=1000 --max-count=214" --report-format json --report-path /tmp/watchdog-gitleaks-7e4d19bff4304116babb4fc481242dd8/history-2.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-2.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-7e4d19bff4304116babb4fc481242dd8/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .1artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .2artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .0artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—semgrep --config /opt/semgrep-rules/gdpr.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .4artifacts/raw/semgrep-gdpr.json
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1e8b0-6168-7ab8-81c7-1f28689c002a · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

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

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