Public report of JerryZLiu/Dayflow, published 14 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 14 November 2026, 08:53 UTC · Survey ID cd_e858c4a79ef6457295f7c1910b28f851
JerryZLiu/Dayflow
Measured 14 November 2026, 08:53 UTC, at code version 2c79e16
CAI scoreWeak
CriticalWeakAdequateStrongExemplary
Down 7 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 126,935 lines of product code in 3 projects, tests not counted · Estimated rebuild effort: about 0.8 person-years · Weakest lens: Production Readiness, 34
Findings by how serious they are
8 critical978 serious60 minor
35 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
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
14 November 2026, 08:53 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 ▸
44of 44 dimensions measured by tools.
1040of 1046 findings point to an exact file and line, so you can open each one in the code. The other 6 concern the repository as a whole, such as missing documentation.
44dimensions across 7 lenses, read from 126,935 lines of product code in 3 projects.
JerryZLiu/Dayflow falls short of our standard for production because we found no working pipeline that builds or tests changes to the code and no automated security scanning of the code, its secrets or its dependencies. It scores 46 out of 100 and is rated Weak, and six of its eight critical findings are security problems.
Production Readiness, at 34, is the weakest lens and counts most in the score. The best first step is making the tests check their results, worth about 7 points. Adding automated security scanning would lift Production Readiness itself, worth about 6 points. Raising Production Readiness to 70 would lift the score to about 55.
Four weaknesses in the code could be used by an attacker. Two passwords or keys are open to anyone who can read the repository. Fixing the weaknesses the scanner points to and replacing each exposed password or key would close both risks. The two tests that check nothing need to check the result they produce.
The product code is 126,935 lines, about €120,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 forThe 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.
If Production Readiness rose from 34 to 70, the lowest score rated Strong, the score would rise from 46 to about 55.
Code composition: what the lines of code are
Product code 97%Tests 3%
New since the last survey: 348 findings
These 348 critical or serious findings weren't in the previous survey, on 26 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
God Classes · MethodTooLong: Condenser.renderItems Dayflow/Dayflow/Core/Recording/AccessibilityLogCondenser.swift
God Classes · FileTooLong: Recording/AccessibilityLogCondenser.swift Dayflow/Dayflow/Core/Recording/AccessibilityLogCondenser.swift
God Classes · ClassTooLong: DailyBriefStore Dayflow/Dayflow/Core/DailyBrief/DailyBriefStore.swift
God Classes · FileTooLong: Docket/DocketHandoffTransition.swift Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketHandoffTransition.swift
God Classes · FileTooLong: DailyBrief/DailyBriefStore.swift Dayflow/Dayflow/Core/DailyBrief/DailyBriefStore.swift
God Classes · ClassTooLong: Condenser Dayflow/Dayflow/Core/Recording/AccessibilityLogCondenser.swift
God Classes · ClassTooLong: DocketHandoffDirector Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketHandoffTransition.swift
God Classes · FileTooLong: Docket/DocketDeckView.swift Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketDeckView.swift
God Classes · FileTooLong: DailyBrief/DailyBriefPageView.swift Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefPageView.swift
God Classes · ClassTooLong: PIIMaskRules Dayflow/Dayflow/Core/PrivacyShield/PIIMaskRules.swift
God Classes · ClassTooLong: DocketDeckView Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketDeckView.swift
Code Duplication · Near-duplicate member family (4 members, 51 shared lines) Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift
Code Duplication · Near-duplicate member pair (222 shared lines) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift
Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) Dayflow/Dayflow/Views/Components/CategoryPickerOverlay.swift
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) Dayflow/Dayflow/Core/Flow/FlowEarlyBirdController.swift
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) Dayflow/Dayflow/Views/UI/Agents/AgentsOverviewView.swift
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) Dayflow/Dayflow/Views/UI/Settings/SettingsAccountSection.swift
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) Dayflow/Dayflow/Views/UI/WhatsNewView.swift
Code Duplication · Edited copy of a member (199 corresponding lines) Dayflow/Dayflow/Utilities/DayflowTheme.swift
Code Duplication · Edited copy of a member (111 corresponding lines) Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift
Code Duplication · Edited copy of a member (91 corresponding lines) Dayflow/Dayflow/Core/Recording/StorageManager.swift
Code Duplication · Edited copy of a member (99 corresponding lines) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift
Code Duplication · Edited copy of a member (82 corresponding lines) Dayflow/Dayflow/Views/UI/MainView/TimelineActivityLoader.swift
Code Duplication · Edited copy of a member (52 corresponding lines) Dayflow/Dayflow/Core/AI/ClaudeProvider+Text.swift
Code Duplication · Edited copy of a member (83 corresponding lines) Dayflow/Dayflow/Core/AI/GemmaBackupProvider.swift
Code Duplication · Edited copy of a member (70 corresponding lines) Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Frames.swift
Code Duplication · Edited copy of a member (43 corresponding lines) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyContextChartsSection.swift
Code Duplication · Edited copy of a member (48 corresponding lines) Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.swift
Code Duplication · Edited copy of a member (51 corresponding lines) Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift
Code Duplication · Edited copy of a member (54 corresponding lines) Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Frames.swift
Code Duplication · Edited copy of a member (62 corresponding lines) Dayflow/Dayflow/Views/Components/CategoryDonutChart.swift
Code Duplication · Edited copy of a member (55 corresponding lines) Dayflow/Dayflow/Core/AI/ClaudeProvider+Prompts.swift
Code Duplication · Edited copy of a member (38 corresponding lines) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift
Code Duplication · Edited copy of a member (46 corresponding lines) Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift
Code Duplication · Edited copy of a member (61 corresponding lines) Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Summaries.swift
Code Duplication · Edited copy of a member (38 corresponding lines) Dayflow/Dayflow/Core/Recording/StorageManager+Reprocessing.swift
Code Duplication · Edited copy of a member (34 corresponding lines) Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift
Code Duplication · Edited copy of a member (29 corresponding lines) Dayflow/Dayflow/Views/UI/ProgressRingView.swift
Code Duplication · Edited copy of a member (41 corresponding lines) Dayflow/Dayflow/Views/UI/ChatCharts.swift
Code Duplication · Edited copy of a member (27 corresponding lines) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyFocusHeatmapSection.swift
Code Duplication · Edited copy of a member (31 corresponding lines) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyInteractionGraphGlyphs.swift
Code Duplication · Edited copy of a member (27 corresponding lines) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Prompting.swift
Code Duplication · Edited copy of a member (22 corresponding lines) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyComponents.swift
Code Duplication · Edited copy of a member (35 corresponding lines) Dayflow/Dayflow/Core/AI/ChatToolExecutor.swift
Code Duplication · Edited copy of a member (27 corresponding lines) Dayflow/Dayflow/Core/Recording/StorageManager+TimelineReview.swift
Code Duplication · Edited copy of a member (34 corresponding lines) Dayflow/Dayflow/Views/Components/ReferralSurveyView.swift
Code Duplication · Edited copies of one member (3 members, 36+ corresponding lines) Dayflow/Dayflow/Views/UI/DailyView+Workflow.swift
Code Duplication · Edited copy of a member (29 corresponding lines) Dayflow/Dayflow/Core/AI/AgentCLISupport+Parsing.swift
Code Duplication · Edited copy of a member (32 corresponding lines) Dayflow/Dayflow/Views/Components/DayGoalFlowView.swift
Code Duplication · Edited copy of a member (36 corresponding lines) Dayflow/Dayflow/Core/Recording/StorageManager+Reprocessing.swift
Code Duplication · Edited copy of a member (30 corresponding lines) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyContextChartsSection.swift
Code Duplication · Edited copy of a member (22 corresponding lines) Dayflow/Dayflow/Views/UI/CanvasTimelineDataView.swift
Code Duplication · Edited copy of a member (24 corresponding lines) Dayflow/Dayflow/Views/UI/Settings/SettingsReferralProgramCard.swift
Code Duplication · Edited copy of a member (34 corresponding lines) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+DashboardStreaming.swift
Code Duplication · Edited copy of a member (21 corresponding lines) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Upload.swift
Code Duplication · Edited copy of a member (23 corresponding lines) Dayflow/Dayflow/Views/UI/Settings/SettingsAccountSection.swift
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 117 findings
These 117 critical or serious findings were in the previous survey, on 26 October 2026, and are gone from this one. The first 100 are listed here.
€39,000 to €200,000, for 648 to 2,054 hours of work, about 0.8 person-years for 1 to 2 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.7 at a score of 46. 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.
Size
Large: 126,935 lines of product code
What it is not
Not 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
Resolve the 1 Assertions commented out finding(s) in Test Quality — start with DayflowUITests.swift.
Raises the score by about 7 points · Low effort · Test Quality
2
Resolve the 1 Test project verifies nothing finding(s) in Test Quality — start with DayflowUITests.swift.
Raises the score by about 7 points · Low effort · Test Quality
3
Run what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
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 €120,000 to build again, about 0.8 person-years of work. Its weakest lens is Production Readiness, at 34 (Weak). 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
Resolve the 1 Assertions commented out finding(s) in Test Quality. Of all the actions in this report, it raises the score most for the work it takes: about 7 points for low effort, because it clears the 1 Test Quality findings. 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.1 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 5% to 11% on every change. The history of the code shows how much it changes: about 70,223 lines over the last 90 days, which is about 284,793 lines a year. At that pace, the extra work comes to an estimated 34.1 to 204.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.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
4 modules, with 2 dependencies between them. One loop runs through 2 of the modules, marked above the diagonal.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
Uses a module listed above itPart of a loopThe module itself
3→4 tools~dayflow-cli~dayflow uses repositorypart of a loop✕
Connections
29 pairs of types, where a type in tools~dayflow-cli~dayflow uses a type in repository. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
tools~dayflow-cli~dayflow uses repository, so a change to repository can break tools~dayflow-cli~dayflow, while a change to tools~dayflow-cli~dayflow can't break repository.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
repository uses tools~dayflow-cli~dayflow, so a change to tools~dayflow-cli~dayflow can break repository, while a change to repository can't break tools~dayflow-cli~dayflow.
Position
Below the diagonal: repository uses a module listed above it, which is the healthy direction.
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 category
Findings
Severity
A05:2025 — Injection
4
High / Critical
A07:2025 — Authentication Failures
3
High / Critical
A03:2025 — Software Supply Chain Failures
1
Medium
Roadmap
Top priorities: Resolve the 1 Assertions commented out finding(s) in Test Quality — start with DayflowUITests.swift; Resolve the 1 Test project verifies nothing finding(s) in Test Quality — start with DayflowUITests.swift; Run what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 Assertions commented out finding(s) in Test Quality — start with DayflowUITests.swift.
Run what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
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 — 8
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 — 978
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 — 60
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 35
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 44 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 44 dimensions across the health lenses
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
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, 1040 of 1046 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.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
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.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.swift) 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) 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 — 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 — 0 SwiftPM declaration(s) across 1 `Package.swift` and 0 committed pin(s) were read for PINNING discipline (0 defect(s) reported), but the outdated signal comes from listing each declared repository's release tags rather than from a registry, and none of them resolved to a version to compare, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (8 contributor(s) across 2386 commit(s) sampled, automation and bot accounts excluded). One of them holds 100% of the history; the other 7 hold 0% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
D21 Naming Consistency — 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 an ADMISSION gap, not an environment fault: no published-package marker D22 reads admitted any project here. D22 DOES collect the public API of every language in this tree, and admits a project only when its manifest makes that ecosystem's publication act in a form the marker recognises — so what is missing is not a collector but an admission rule for the publication act this repository makes, if it makes one. The remedy is a better discriminator for that marker — not a collector, and no change to the scan image can close it. The marker's rules are measured to refuse applications, so one refused repository is the rule working as calibrated; several are the evidence that it is too strict. For npm the surface is what a published package.json's entry points (exports, main, module, types) export, followed through the source; an entry that names build output the tree does not commit (dist/, build/) is not followed back to source, because only a tsconfig outDir/rootDir pair states that mapping and a bundler's input lives in executable configuration this engine does not evaluate.
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.
D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `Dayflow/Dayflow/Core/AI/AgentCLISupport+Parsing.swift`, `Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift`, `Dayflow/Dayflow/Core/AI/ClaudeTimelinePrompt.swift`, `Dayflow/Dayflow/Core/AI/CodexExecutableResolver.swift`, `Dayflow/Dayflow/Core/AI/CodexProvider.swift`, … (+54 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.
AC6 Visual & motion safety — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 32 further occurrence(s) are not listed individually; the score already reflects all 72.
AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing 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.
AXB1 Runtime evidence locked — no reproducible boot — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Subject: 3 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. We then boot it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
C4 Data Retention — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'GRDB' is imported (Dayflow/Dayflow/Core/Recording/StorageDateHelpers.swift:7), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
C5 Data-Subject Rights — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'GRDB' is imported (Dayflow/Dayflow/Core/Recording/StorageDateHelpers.swift:7), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and no C#, F#, JavaScript/TypeScript, Dart, Ruby or Scala was found, and this repository's 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.
IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and no C#, JavaScript/TypeScript, Java, Dart, Ruby or Scala was found, and this repository's 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.
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 reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala, Rust and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala, Rust or Kotlin 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.
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 reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin 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.
X13 Undrained process stream — 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, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin 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.
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 and Dart source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Ruby, Python, Go, Rust or Dart 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 reads C# syntax, and JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala or Kotlin 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.
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, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin 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.
X18 Disposal-pattern 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 reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala or PHP 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.
X19 Unrestored process-global state — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Python, Dart, Ruby, Scala or PHP 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 JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python 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.
X22 Contradicted release guard — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, TypeScript/JavaScript, Python, Dart, Ruby, Scala, Kotlin and PHP source only, and no C# was loaded, and this repository's 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.
X23 Unguarded diagnostic materialisation — 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, F#, Python, Dart, Ruby, Scala, Kotlin and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, F#, Python, Dart, Ruby, Scala, Kotlin or PHP 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.
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 reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Erlang, Python, Dart and Ruby source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Erlang, Python, Dart or Ruby 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.
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 and Kotlin source only, and no C# was loaded, no Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala or Kotlin was found, and this repository's 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 reads C# syntax, and JavaScript/TypeScript (Vue and Svelte components included), Java, Rust, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, Rust, Dart, Ruby, Scala or Kotlin 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.
X30 Support guard that admits what it rejects — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Scala, JavaScript/TypeScript, Java, Kotlin, Python, PHP, Go, Rust, Dart and Ruby source only, and no C# was loaded and no Scala, JavaScript, TypeScript, Java, Kotlin, Python, PHP, Go, Rust, Dart or Ruby 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.
X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala 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.
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, and Kotlin source only, and no C# was loaded, no TypeScript was found, and this repository's 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.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
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.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
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.
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.
82 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Condenser.renderItems at 212. A further 5 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 TimelineFailureClassification.cardMessage at 18 — they are counted neither in the figure above nor in this dimension's score. 2 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: Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefComponents.swift (DailyBriefApps.displayName at 17), Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyInteractionGraphGlyphs.swift (WeeklyInteractionGraphGlyphView.body 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.
+ 77 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 1 body over 60 down to 60 or less in Cyclomatic Complexity — start with Condenser.renderItems (cyclomatic 212). — Refactoring it lifts Cyclomatic Complexity from 5.2 to about 6.5/10.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 139 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 1 body over 120 down to 120 or less in Cognitive Complexity — start with Condenser.renderItems (cognitive 356). — Refactoring it lifts Cognitive Complexity from 4.7 to about 5.8/10.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes7.3 / 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.
Resolve the 42 MethodTooLong finding(s) in God Classes — start with DayflowBackendProvider.swift (3), ChatCLIProcessRunner.swift (2), GeminiDirectProvider+Transcription.swift (2). — One of this dimension's main actionable groups (42 warning-level).
Resolve the 40 FileTooLong finding(s) in God Classes — start with ChatCLIProcessRunner.swift, WhatsNewView.swift, AccessibilityLogCondenser.swift. — One of this dimension's main actionable groups (40 warning-level).
Resolve the 30 ClassTooLong finding(s) in God Classes — start with ChatCLIProcessRunner.swift, DailyBriefStore.swift, LLMService.swift. — One of this dimension's main actionable groups (30 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
321 duplicated block group(s) detected. 11.2 % of the production lines (14,217 of 126,935) are in a reported copy. A further 217 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 6 of the 538 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.
+ 197 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 22 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with GemmaBackupProvider+Summaries.swift (2), WeeklyDonutBuilder.swift (2), AgentCLISupport+Parsing.swift. — One of this dimension's main actionable groups (22 warning-level).
Resolve the 17 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with DayflowBackendProvider.swift, GeminiDirectProvider+ActivityCards.swift, GeminiDirectProvider+Upload.swift. — One of this dimension's main actionable groups (17 warning-level).
Resolve the 16 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with DayflowBackendProvider.swift, OllamaProvider+Transcription.swift, TimelineCardColorPicker.swift. — One of this dimension's main actionable groups (16 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
2 production modules (SwiftPM+Xcode), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; a workspace's implicit (product-name) dependency is not visible there; 0 module(s) off the main sequence.
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.
Resolve the 11 Low cohesion finding(s) in Cohesion (LCOM4) — start with StorageManager.swift, AnalyticsService.swift, AccessibilityLogCondenser.swift. — One of this dimension's main actionable groups (11 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D10 · Test Quality9.7 / 10Adequategated by 2 critical findings✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
Test project verifies nothing: DayflowUITestsDayflow/DayflowUITests/DayflowUITests.swift:23
No assertions: testWeeklyDashboardSnapshotIsSendableForBackgroundLoading · ×3Dayflow/DayflowTests/WeeklyDashboardBuilderTests.swift:29
What to do
Resolve the 1 Assertions commented out finding(s) in Test Quality — start with DayflowUITests.swift. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 Test project verifies nothing finding(s) in Test Quality — start with DayflowUITests.swift. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 3 No assertions finding(s) in Test Quality — start with WeeklyDashboardBuilderTests.swift, DayflowUITests.swift, DayflowUITestsLaunchTests.swift. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 0 third-party package(s) use a banned license. This repository's 1 SwiftPM file(s) declare no third-party dependencies and no committed resolution pins any, so there is no third-party package licence to grade — a complete answer, not a gap in coverage. It also commits no CocoaPods or Carthage manifest, so SwiftPM is the only package manager it takes dependencies through. This repository's OWN licence is its own choice and is not judged here.
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.
Resolve the 16 Hotspot finding(s) in Churn × Complexity Hotspots — start with ChatCLIProcessRunner.swift, FlowWebView.swift, DailyBriefGenerator.swift. — One of this dimension's main actionable groups (16 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
1 deducted task-comment markers across 126935 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.
Resolve the 1 TodoComment finding(s) in Explicit Debt — start with OllamaProvider.swift. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
No ADRs foundDayflow/Dayflow.xcodeproj/project.pbxproj:1
What to do
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with project.pbxproj. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
4 naming inconsistencies among 157 declarations measured against a convention their peers follow.
`feedbackUrl` spells `Url` where 136 names in the project spell it `URL`Dayflow/Dayflow/Core/DailyBrief/DailyBriefModels.swift:76
`imageUrl` spells `Url` where 136 names in the project spell it `URL`Dayflow/Dayflow/Core/DailyBrief/DailyBriefModels.swift:124
`fileUrl` spells `Url` where 136 names in the project spell it `URL`Dayflow/Dayflow/Models/AnalysisModels.swift:15
`isApiKeyInput` spells `Api` where 21 names in the project spell it `API`Dayflow/Dayflow/Views/Onboarding/ProviderSetupState.swift:503
What to do
Resolve the 1 `feedbackUrl` spells `Url` where 136 names in the project spell it `URL` finding(s) in Naming Consistency — start with DailyBriefModels.swift. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 `imageUrl` spells `Url` where 136 names in the project spell it `URL` finding(s) in Naming Consistency — start with DailyBriefModels.swift. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 `fileUrl` spells `Url` where 136 names in the project spell it `URL` finding(s) in Naming Consistency — start with AnalysisModels.swift. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
1 of 3 build units (SwiftPM, Xcode, checkout) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
0 % of calls cross a namespace and 1 % 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.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: REDACTED 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.
2 finding(s): 0 critical, 2 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
What to do
Resolve the 2 REDACTED finding(s) in Secrets (history) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
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).
4 finding(s): 0 critical, 4 high, 0 medium, 0 low. semgrep hit a parse error in 7 file(s) — `Dayflow/Dayflow/System/AnalyticsService.swift`, `Dayflow/Dayflow/Views/Components/DaySummaryView.swift` (line 942), `Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift` (line 897), `Dayflow/Dayflow/Views/UI/Agents/AgentPlaybackView.swift`, `Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketHandoffTransition.swift` (line 563), … (+2 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
Resolve the 4 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED, REDACTED. — One of this dimension's main actionable groups (4 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Resolve the 1 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Every significant source file has living knowledge — recently and meaningfully worked. Counted over 387 of the 446 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
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.
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.
No dependency in any ecosystem this repository declares is published as malicious.
✓ On the Gold path — maintain.
Detailed fixes: d43_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives10.0 / 10Exemplary○ Nothing flagged
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
Do you agree with this assessment?
AC2 · Forms & labels10.0 / 10Exemplary○ Nothing flagged
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Do you agree with this assessment?
AC3 · Page structure4.3 / 10Weak✓ Tool-verified
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:2
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".
This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:354
What to do
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.
Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
`.modal` moves (`transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. (×2) — Dayflow/Dayflow/Resources/DailyBriefIntro.html:46, scripts/daily_brief_intro/src/intro.css:35
`.step.is-active .copy > *` moves (`animation: copy-in 0.6s var(--ease-out) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. (×2) — Dayflow/Dayflow/Resources/DailyBriefIntro.html:65, scripts/daily_brief_intro/src/intro.css:54
`.next-btn` moves (`transition: transform 0.18s var(--ease-out), box-shadow 0.18s, opacity 0.3s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. (×2) — Dayflow/Dayflow/Resources/DailyBriefIntro.html:76, scripts/daily_brief_intro/src/intro.css:65
`.step.is-active .drift` moves (`animation: drift 16s ease-in-out infinite alternate`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. (×2) — Dayflow/Dayflow/Resources/DailyBriefIntro.html:86, scripts/daily_brief_intro/src/intro.css:75
`.step.is-active .flip180.drift` moves (`animation-name: drift-flip`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:87
`.step.is-active .s1-card` moves (`animation: s1-card-in 0.55s var(--ease-out) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:103
`.step.is-active .pk b` moves (`animation: pk-down 2.6s ease-in infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:125
`.step.is-active .pk--up b` moves (`animation-name: pk-up`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:126
`.step.is-active .s1-ring` moves (`animation: s1-ring-in 0.5s var(--spring) 0.8s both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:137
`.step.is-active .s1-pulse` moves (`animation: s1-pulse 1.6s ease-in-out 1.3s infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:138
`.step.is-active .s1-bub` moves (`animation: s1-pop 0.55s var(--spring) var(--d) both, s1-float var(--f) ease-in-out calc(var(--d) + 0.6s) infinite alternate`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:157
`.step.is-active .s2-stack` moves (`animation: s2-stack-in 0.6s var(--ease-out) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:181
`.step.is-active .s2-agent--pixel` moves (`animation: s2-in-left 0.6s var(--spring) 0.35s both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:194
`.step.is-active .s2-agent--robot` moves (`animation: s2-in-right 0.6s var(--spring) 0.5s both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:195
`.s2-agent.is-walking.is-holding .s2-walker` moves (`animation: s2-step 0.27s ease-in-out infinite alternate`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:197
`.s2-agent.is-catching .s2-walker` moves (`animation: s2-catch 0.45s var(--spring) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:198
`.art--3[data-phase^="a"] .s3-card` moves (`animation: s3-in 0.7s var(--ease-out) calc(var(--in, 0s) + var(--d)) both, s3-float 5s ease-in-out calc(var(--in, 0s) + var(--d) + 0.9s) infinite alternate`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:227
`.art--3[data-phase^="a"] .s3-bar` moves (`animation: s3-bar 0.5s var(--ease-out) calc(var(--in, 0s) + var(--d) + 0.3s) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:229
`.art--3[data-phase^="a"] .s3-row p` moves (`animation: s3-fade 0.5s var(--ease-out) calc(var(--in, 0s) + var(--d) + 0.25s) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:230
`.art--3[data-phase^="a"] .s3-avs > span` moves (`animation: s3-pop 0.45s var(--spring) calc(var(--in, 0s) + var(--d) + 0.45s + var(--i) * 0.07s) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:231
`.art--3[data-phase^="a"] .s3-chan` moves (`animation: s3-slide 0.45s var(--ease-out) calc(var(--in, 0s) + var(--d) + 0.75s) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:232
`.art--3[data-phase="b"] .s3-col` moves (`animation: grp-out 0.55s cubic-bezier(0.5, 0, 0.75, 0.3) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:253
`.art--3[data-phase="a"] .s4-slot--a` moves (`animation: s4-out-a 0.6s cubic-bezier(0.5, 0, 0.75, 0.3) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:254
`.art--3[data-phase="a"] .s4-slot--b` moves (`animation: s4-out-b 0.6s cubic-bezier(0.5, 0, 0.75, 0.3) 0.06s both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:255
`.art--3[data-phase^="b"] .s4-slot--a .s4-deal` moves (`animation: s4-deal-a 0.8s var(--spring) calc(var(--in, 0s) + 0.15s) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:270
`.art--3[data-phase^="b"] .s4-slot--b .s4-deal` moves (`animation: s4-deal-b 0.8s var(--spring) calc(var(--in, 0s) + 0.38s) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:271
`.art--3[data-phase^="b"] .s4-slot--a .s4-sway` moves (`animation: s4-sway-a 4.2s ease-in-out 1s infinite alternate`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:272
`.art--3[data-phase^="b"] .s4-slot--b .s4-sway` moves (`animation: s4-sway-b 4.8s ease-in-out 1.2s infinite alternate`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:273
`.s4-slot .s4-card` moves (`transition: transform 0.35s var(--ease-out), box-shadow 0.35s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:276
`.step.is-active .s5-title` moves (`animation: s5-title-in 0.7s var(--ease-out) 0.1s both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:286
`.step.is-active .s5-bg` moves (`animation: s5-bg 22s ease-in-out infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:288
`.s5-seal` moves (`transition: transform 0.25s var(--spring), opacity 0.3s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:323
`.step.is-active .s5-drop` moves (`animation: s5-drop 0.8s var(--ease-out) 0.2s both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:329
`.step.is-active .s5-float` moves (`animation: s5-float 5.5s ease-in-out 1s infinite alternate`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Dayflow/Dayflow/Resources/DailyBriefIntro.html:330
`.next-btn` sets color: #fff on background-color: #ff9f6f — 2.0:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — Dayflow/Dayflow/Resources/DailyBriefIntro.html:70
`.next-btn` sets color: #fff on background-color: #ff9f6f — 2.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — scripts/daily_brief_intro/src/intro.css:59
What to do
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
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.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
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.
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.
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.
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.
Do you agree with this assessment?
P1 · CI/CD gates0.0 / 10Critical✓ Tool-verified
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.
What to do
Add a CI workflow that builds and runs the test suite on every push/PR.
Do you agree with this assessment?
P2 · Observability7.0 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
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) — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
What to do
Run what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
What to do
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
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.
`executeStreaming` is async and calls .wait() — 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. — Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:677
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.
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.
Do you agree with this assessment?
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.
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. (×14) — Dayflow/Dayflow/Views/UI/Settings/StorageSettingsViewModel.swift:255, Dayflow/Dayflow/Views/UI/MainView/Support.swift:66, Dayflow/Dayflow/Views/UI/Agents/AgentPlaybackView.swift:247, …
What to do
Swallowed exception (caught, then discarded)
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
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.
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 — 26 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 24 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 5 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: this repository stores data through 'GRDB' (Dayflow/Dayflow/Core/Recording/StorageDateHelpers.swift:7) but declares no persisted model this check reads (SwiftData @Model, Core Data, Realm, GRDB and Fluent types, GRDB and SQLite.swift columns, CREATE TABLE and ALTER TABLE … ADD columns in SQL migrations). Personal data may be written through raw SQL or a hosted backend, so whether a retention limit applies here could not be established, and its absence is not scored.
C5 Data-Subject Rights — Not assessed: this repository stores data through 'GRDB' (Dayflow/Dayflow/Core/Recording/StorageDateHelpers.swift:7) but declares no persisted model this check reads (SwiftData @Model, Core Data NSManagedObject, Realm Object, GRDB record and Fluent Model properties, GRDB and SQLite.swift columns, CREATE TABLE and ALTER TABLE … ADD columns in SQL files). Personal data may be written through raw SQL or a hosted backend, so whether data-subject rights apply here could not be established, and their absence is not scored.
P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 64 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AX1 Captive dependencies — Not applicable: this repository's 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).
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — not assessed — interface segregation is computed over a type surface 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
AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D11 Test Reliability — Test reliability not included — no .swift test runner
D12 Dependency Hygiene — Not scored — 0 SwiftPM declaration(s) across 1 `Package.swift` and 0 committed pin(s) were read for PINNING discipline (0 defect(s) reported), but the outdated signal comes from listing each declared repository's release tags rather than from a registry, and none of them resolved to a version to compare, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
D16 Bus Factor — single-maintainer repository — bus factor is not applicable
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D19 Documentation Quality — No runnable or published unit to look for an example in, and no multi-project root README to look for a map in; the other documentation kinds are withheld (see the gaps), so documentation quality is not applicable here.
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D25 ADR Conformance — no ADRs to check
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — 59 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D36 Supply-chain Provenance & Signing — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not included — suite not readable by the collector
DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
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 and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
M4 Documentation accuracy — Not applicable: the 2 current-state document(s) make no claim of a kind M4 checks.
P12 CI test-gate honesty — no CI workflow found
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the Swift source, so there is no service whose uptime a failing dependency could take down
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `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.
X1 Async correctness — 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
X12 Unreachable branch — 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
X13 Undrained process stream — 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
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 — 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
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 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
X19 Unrestored process-global state — 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
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: this check looks for a pattern guard or `case` label that increments, decrements or assigns while the switch is deciding whether it matches, and in this repository's languages none can. Swift has no `++` or `--`, and an assignment yields `()`, which cannot be an operand of `&&`, `||` or `?:` nor the Bool a `case … where` clause needs. Not a gap in the analyzer and not a finding about your code.
X22 Contradicted release guard — 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
X23 Unguarded diagnostic materialisation — 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
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 — 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
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 — 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
X30 Support guard that admits what it rejects — 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
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
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.
Assertions commented out: testExample Dayflow/DayflowUITests/DayflowUITests.swift:23— The test body contains commented-out assertion calls and no live one — it runs, verifies nothing, and still passes. Restore the assertions or delete the test; a green test that checks nothing is worse than an absent one.
D10 · Test Quality· Test project verifies nothing · ×1
Test project verifies nothing: DayflowUITests Dayflow/DayflowUITests/DayflowUITests.swift:23— No conventional assertion call was detected in 3 of 3 tests in `DayflowUITests` — the project as a whole, not one method. 1 of them has its assertions commented out, so this suite did verify conventionally and was switched off — it is not an approval/verifier harness.
MethodTooLong: LLMProviderSetupView.currentStepContent REDACTED:200— MethodTooLong — currentStepContent runs 365 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 265 over it, 3.65× 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: LLMService.processBatch Dayflow/Dayflow/Core/AI/LLMService.swift:650— MethodTooLong — processBatch runs 349 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 249 over it, 3.49× 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: Condenser.renderItems Dayflow/Dayflow/Core/Recording/AccessibilityLogCondenser.swift:866— MethodTooLong — renderItems runs 296 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 196 over it, 2.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: ChatCLIProcessRunner.executeStreaming Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:677— MethodTooLong — executeStreaming runs 249 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 149 over it, 2.49× 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: GeminiDirectProvider.geminiTranscribeRequest Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift:259— MethodTooLong — geminiTranscribeRequest runs 229 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 129 over it, 2.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: StorageManager.migrate Dayflow/Dayflow/Core/Recording/StorageManager.swift:458— MethodTooLong — migrate runs 223 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 123 over it, 2.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.
MethodTooLong: ChatCLIProcessRunner.run Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:1531— MethodTooLong — run runs 213 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 113 over it, 2.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: DailyView.regenerateStandupFromTimeline Dayflow/Dayflow/Views/UI/DailyView+Standup.swift:264— MethodTooLong — regenerateStandupFromTimeline runs 193 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 93 over it, 1.93× 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: ChatService.processConversation Dayflow/Dayflow/Core/AI/ChatService.swift:172— MethodTooLong — processConversation runs 191 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 91 over it, 1.91× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: DailyRecapScheduler.runCheck Dayflow/Dayflow/Core/AI/DailyRecapScheduler.swift:71— MethodTooLong — runCheck runs 172 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 72 over it, 1.72× 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: CodexProvider.transcribeScreenshots Dayflow/Dayflow/Core/AI/CodexProvider+Transcription.swift:12— MethodTooLong — transcribeScreenshots runs 170 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 70 over it, 1.70× 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: GeminiDirectProvider.transcribeVideoData Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift:14— MethodTooLong — transcribeVideoData runs 167 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 67 over it, 1.67× 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: DayflowTheme.lightPalette Dayflow/Dayflow/Utilities/DayflowTheme.swift:235— MethodTooLong — lightPalette runs 163 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 63 over it, 1.63× 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: DayflowTheme.darkPalette Dayflow/Dayflow/Utilities/DayflowTheme.swift:450— MethodTooLong — darkPalette runs 158 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 58 over it, 1.58× 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: DailyWorkflowGrid.body Dayflow/Dayflow/Views/UI/DailyWorkflowGrid.swift:33— MethodTooLong — body runs 157 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 57 over it, 1.57× 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: VideoPlayerModal.body Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:613— MethodTooLong — body runs 154 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 54 over it, 1.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: WeeklySankeyModelFactory.build Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyModelFactory.swift:263— MethodTooLong — build runs 147 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 47 over it, 1.47× 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: DayflowBackendProvider.generateTimeline Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:560— MethodTooLong — generateTimeline runs 146 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 46 over it, 1.46× 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: Coordinator.handle Dayflow/Dayflow/Views/UI/Flow/FlowWebView.swift:150— MethodTooLong — handle 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: OnboardingFlow.body Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:44— MethodTooLong — body 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: OllamaProvider.callChatAPI Dayflow/Dayflow/Core/AI/OllamaProvider+Networking.swift:70— MethodTooLong — callChatAPI runs 140 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 40 over it, 1.40× 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: WeeklyInteractionGraphLayoutBuilder.layout Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyInteractionGraphLayout.swift:35— MethodTooLong — layout runs 139 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 39 over it, 1.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ClaudeProvider.transcribeScreenshots Dayflow/Dayflow/Core/AI/ClaudeProvider+Transcription.swift:12— MethodTooLong — transcribeScreenshots 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: DayflowBackendProvider.transcribeScreenshots Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:380— MethodTooLong — transcribeScreenshots runs 131 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 31 over it, 1.31× 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: OnboardingCategoryPreset.categoryDefinitions Dayflow/Dayflow/Models/TimelineCategory.swift:318— MethodTooLong — categoryDefinitions 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.
FileTooLong: AI/ChatCLIProcessRunner.swift Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift— FileTooLong — 1281 significant lines (blank, comment-only and punctuation-only lines excluded), about 86% of them inside a single declaration: ChatCLIProcessRunner (242-1807). The bar is 500 significant lines; this is 781 over it, 2.56× 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: UI/WhatsNewView.swift Dayflow/Dayflow/Views/UI/WhatsNewView.swift— FileTooLong — 1079 significant lines (blank, comment-only and punctuation-only lines excluded), about 68% of them inside a single declaration: WhatsNewView (181-1206). The bar is 500 significant lines; this is 579 over it, 2.16× 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: Recording/AccessibilityLogCondenser.swift Dayflow/Dayflow/Core/Recording/AccessibilityLogCondenser.swift— FileTooLong — 1040 significant lines (blank, comment-only and punctuation-only lines excluded), about 61% of them inside a single declaration: Condenser (684-1579). 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: Flow/FlowDistractionAgent.swift Dayflow/Dayflow/Core/Flow/FlowDistractionAgent.swift— FileTooLong — 1004 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 504 over it, 2.01× 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: Docket/DocketHandoffTransition.swift Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketHandoffTransition.swift— FileTooLong — 964 significant lines (blank, comment-only and punctuation-only lines excluded), about 65% of them inside a single declaration: DocketHandoffDirector (118-1094). The bar is 500 significant lines; this is 464 over it, 1.93× 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: UI/SupportChatWebView.swift Dayflow/Dayflow/Views/UI/SupportChatWebView.swift— FileTooLong — 930 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 430 over it, 1.86× 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: Settings/SettingsAccountSection.swift Dayflow/Dayflow/Views/UI/Settings/SettingsAccountSection.swift— FileTooLong — 919 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 419 over it, 1.84× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: DailyBrief/DailyBriefGenerator.swift Dayflow/Dayflow/Core/DailyBrief/DailyBriefGenerator.swift— FileTooLong — 903 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 403 over it, 1.81× 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: AI/LLMService.swift Dayflow/Dayflow/Core/AI/LLMService.swift— FileTooLong — 872 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: LLMService (97-1247). The bar is 500 significant lines; this is 372 over it, 1.74× 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: System/DayflowAuthManager.swift Dayflow/Dayflow/System/DayflowAuthManager.swift— FileTooLong — 846 significant lines (blank, comment-only and punctuation-only lines excluded), about 62% of them inside a single declaration: DayflowAuthManager (286-1062). The bar is 500 significant lines; this is 346 over it, 1.69× 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: DailyBrief/DailyBriefStore.swift Dayflow/Dayflow/Core/DailyBrief/DailyBriefStore.swift— FileTooLong — 816 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: DailyBriefStore (21-1324). The bar is 500 significant lines; this is 316 over it, 1.63× 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: Recording/StorageManager+TimelineCards.swift Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift— FileTooLong — 799 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 299 over it, 1.60× 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: Weekly/WeeklyView.swift Dayflow/Dayflow/Views/UI/Weekly/WeeklyView.swift— FileTooLong — 749 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 249 over it, 1.50× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Components/DayGoalHeader.swift Dayflow/Dayflow/Views/Components/DayGoalHeader.swift— FileTooLong — 710 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 210 over it, 1.42× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Components/DaySummaryView.swift Dayflow/Dayflow/Views/Components/DaySummaryView.swift— FileTooLong — 674 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: DaySummaryView (28-940). The bar is 500 significant lines; this is 174 over it, 1.35× 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: AI/DayflowBackendProvider.swift Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift— FileTooLong — 665 significant lines (blank, comment-only and punctuation-only lines excluded), about 79% of them inside a single declaration: DayflowBackendProvider (191-912). The bar is 500 significant lines; this is 165 over it, 1.33× 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: Recording/ScreenRecorder.swift Dayflow/Dayflow/Core/Recording/ScreenRecorder.swift— FileTooLong — 661 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: ScreenRecorder (87-1076). The bar is 500 significant lines; this is 161 over it, 1.32× 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: Settings/SettingsProvidersTabView.swift Dayflow/Dayflow/Views/UI/Settings/SettingsProvidersTabView.swift— FileTooLong — 650 significant lines (blank, comment-only and punctuation-only lines excluded), about 67% of them inside a single declaration: SettingsProvidersTabView (4-628). The bar is 500 significant lines; this is 150 over it, 1.30× 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: Docket/DocketDeckView.swift Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketDeckView.swift— FileTooLong — 640 significant lines (blank, comment-only and punctuation-only lines excluded), about 63% of them inside a single declaration: DocketDeckView (17-614). The bar is 500 significant lines; this is 140 over it, 1.28× 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: UI/CanvasTimelineDataView.swift Dayflow/Dayflow/Views/UI/CanvasTimelineDataView.swift— FileTooLong — 634 significant lines (blank, comment-only and punctuation-only lines excluded), about 86% of them inside a single declaration: CanvasTimelineDataView (39-851). The bar is 500 significant lines; this is 134 over it, 1.27× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: Components/TimelineCardColorPicker.swift Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift— FileTooLong — 629 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: ColorOrganizerRoot (6-893). The bar is 500 significant lines; this is 129 over it, 1.26× 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: REDACTED REDACTED— FileTooLong — 625 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: ProvidersSettingsViewModel (5-842). The bar is 500 significant lines; this is 125 over it, 1.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: DailyBrief/DailyBriefSections.swift Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefSections.swift— FileTooLong — 617 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 117 over it, 1.23× 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: REDACTED REDACTED— FileTooLong — 613 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: LLMProviderSetupView (5-865). The bar is 500 significant lines; this is 113 over it, 1.23× 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: Analysis/AnalysisManager.swift Dayflow/Dayflow/Core/Analysis/AnalysisManager.swift— FileTooLong — 612 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: AnalysisManager (29-978). The bar is 500 significant lines; this is 112 over it, 1.22× 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.
+ 15 more in this group — see findings.md.
AC6 · Visual & motion safety· Animation without a prefers-reduced-motion guard · ×38
Animation without a prefers-reduced-motion guard Dayflow/Dayflow/Resources/DailyBriefIntro.html:46— `.modal` moves (`transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Dayflow/Dayflow/Resources/DailyBriefIntro.html:65— `.step.is-active .copy > *` moves (`animation: copy-in 0.6s var(--ease-out) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Dayflow/Dayflow/Resources/DailyBriefIntro.html:76— `.next-btn` moves (`transition: transform 0.18s var(--ease-out), box-shadow 0.18s, opacity 0.3s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Dayflow/Dayflow/Resources/DailyBriefIntro.html:86— `.step.is-active .drift` moves (`animation: drift 16s ease-in-out infinite alternate`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Dayflow/Dayflow/Resources/DailyBriefIntro.html:87— `.step.is-active .flip180.drift` moves (`animation-name: drift-flip`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Dayflow/Dayflow/Resources/DailyBriefIntro.html:103— `.step.is-active .s1-card` moves (`animation: s1-card-in 0.55s var(--ease-out) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Dayflow/Dayflow/Resources/DailyBriefIntro.html:125— `.step.is-active .pk b` moves (`animation: pk-down 2.6s ease-in infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Dayflow/Dayflow/Resources/DailyBriefIntro.html:126— `.step.is-active .pk--up b` moves (`animation-name: pk-up`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Dayflow/Dayflow/Resources/DailyBriefIntro.html:137— `.step.is-active .s1-ring` moves (`animation: s1-ring-in 0.5s var(--spring) 0.8s both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Dayflow/Dayflow/Resources/DailyBriefIntro.html:138— `.step.is-active .s1-pulse` moves (`animation: s1-pulse 1.6s ease-in-out 1.3s infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Dayflow/Dayflow/Resources/DailyBriefIntro.html:157— `.step.is-active .s1-bub` moves (`animation: s1-pop 0.55s var(--spring) var(--d) both, s1-float var(--f) ease-in-out calc(var(--d) + 0.6s) infinite alternate`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Dayflow/Dayflow/Resources/DailyBriefIntro.html:181— `.step.is-active .s2-stack` moves (`animation: s2-stack-in 0.6s var(--ease-out) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Dayflow/Dayflow/Resources/DailyBriefIntro.html:194— `.step.is-active .s2-agent--pixel` moves (`animation: s2-in-left 0.6s var(--spring) 0.35s both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Dayflow/Dayflow/Resources/DailyBriefIntro.html:195— `.step.is-active .s2-agent--robot` moves (`animation: s2-in-right 0.6s var(--spring) 0.5s both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Dayflow/Dayflow/Resources/DailyBriefIntro.html:197— `.s2-agent.is-walking.is-holding .s2-walker` moves (`animation: s2-step 0.27s ease-in-out infinite alternate`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Dayflow/Dayflow/Resources/DailyBriefIntro.html:198— `.s2-agent.is-catching .s2-walker` moves (`animation: s2-catch 0.45s var(--spring) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Dayflow/Dayflow/Resources/DailyBriefIntro.html:227— `.art--3[data-phase^="a"] .s3-card` moves (`animation: s3-in 0.7s var(--ease-out) calc(var(--in, 0s) + var(--d)) both, s3-float 5s ease-in-out calc(var(--in, 0s) + var(--d) + 0.9s) infinite alternate`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Dayflow/Dayflow/Resources/DailyBriefIntro.html:229— `.art--3[data-phase^="a"] .s3-bar` moves (`animation: s3-bar 0.5s var(--ease-out) calc(var(--in, 0s) + var(--d) + 0.3s) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Dayflow/Dayflow/Resources/DailyBriefIntro.html:230— `.art--3[data-phase^="a"] .s3-row p` moves (`animation: s3-fade 0.5s var(--ease-out) calc(var(--in, 0s) + var(--d) + 0.25s) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Dayflow/Dayflow/Resources/DailyBriefIntro.html:231— `.art--3[data-phase^="a"] .s3-avs > span` moves (`animation: s3-pop 0.45s var(--spring) calc(var(--in, 0s) + var(--d) + 0.45s + var(--i) * 0.07s) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Dayflow/Dayflow/Resources/DailyBriefIntro.html:232— `.art--3[data-phase^="a"] .s3-chan` moves (`animation: s3-slide 0.45s var(--ease-out) calc(var(--in, 0s) + var(--d) + 0.75s) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Dayflow/Dayflow/Resources/DailyBriefIntro.html:253— `.art--3[data-phase="b"] .s3-col` moves (`animation: grp-out 0.55s cubic-bezier(0.5, 0, 0.75, 0.3) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Dayflow/Dayflow/Resources/DailyBriefIntro.html:254— `.art--3[data-phase="a"] .s4-slot--a` moves (`animation: s4-out-a 0.6s cubic-bezier(0.5, 0, 0.75, 0.3) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Dayflow/Dayflow/Resources/DailyBriefIntro.html:255— `.art--3[data-phase="a"] .s4-slot--b` moves (`animation: s4-out-b 0.6s cubic-bezier(0.5, 0, 0.75, 0.3) 0.06s both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Dayflow/Dayflow/Resources/DailyBriefIntro.html:270— `.art--3[data-phase^="b"] .s4-slot--a .s4-deal` moves (`animation: s4-deal-a 0.8s var(--spring) calc(var(--in, 0s) + 0.15s) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
ClassTooLong: ChatCLIProcessRunner Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:242— ClassTooLong — 1106 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods. The bar is 400 significant lines; this is 706 over it, 2.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.
ClassTooLong: DailyBriefStore Dayflow/Dayflow/Core/DailyBrief/DailyBriefStore.swift:20— ClassTooLong — 805 significant lines (blank, comment-only and punctuation-only lines excluded), 85 methods. The bar is 400 significant lines; this is 405 over it, 2.01× 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: LLMService Dayflow/Dayflow/Core/AI/LLMService.swift:97— ClassTooLong — 805 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 405 over it, 2.01× 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: WhatsNewView Dayflow/Dayflow/Views/UI/WhatsNewView.swift:181— ClassTooLong — 730 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 330 over it, 1.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: DaySummaryView Dayflow/Dayflow/Views/Components/DaySummaryView.swift:28— ClassTooLong — 646 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 246 over it, 1.62× 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: Condenser Dayflow/Dayflow/Core/Recording/AccessibilityLogCondenser.swift:684— ClassTooLong — 631 significant lines (blank, comment-only and punctuation-only lines excluded), 18 methods. The bar is 400 significant lines; this is 231 over it, 1.58× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: DocketHandoffDirector Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketHandoffTransition.swift:117— ClassTooLong — 628 significant lines (blank, comment-only and punctuation-only lines excluded), 49 methods. The bar is 400 significant lines; this is 228 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.
ClassTooLong: ColorOrganizerRoot Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift:6— ClassTooLong — 621 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 221 over it, 1.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: ScreenRecorder Dayflow/Dayflow/Core/Recording/ScreenRecorder.swift:87— ClassTooLong — 619 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 219 over it, 1.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: LLMProviderSetupView REDACTED:5— ClassTooLong — 610 significant lines (blank, comment-only and punctuation-only lines excluded), 12 methods. The bar is 400 significant lines; this is 210 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.
ClassTooLong: ProvidersSettingsViewModel REDACTED:4— ClassTooLong — 607 significant lines (blank, comment-only and punctuation-only lines excluded), 51 methods. The bar is 400 significant lines; this is 207 over it, 1.52× 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: AnalysisManager Dayflow/Dayflow/Core/Analysis/AnalysisManager.swift:29— ClassTooLong — 596 significant lines (blank, comment-only and punctuation-only lines excluded), 27 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: WeeklyInteractionGraphLayoutBuilder Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyInteractionGraphLayout.swift:3— ClassTooLong — 580 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 180 over it, 1.45× 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: StorageManager Dayflow/Dayflow/Core/Recording/StorageManager.swift:10— ClassTooLong — 560 significant lines (blank, comment-only and punctuation-only lines excluded), 115 methods. The bar is 400 significant lines; this is 160 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: WeeklySankeyModelFactory Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyModelFactory.swift:3— ClassTooLong — 547 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 147 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.
ClassTooLong: CanvasTimelineDataView Dayflow/Dayflow/Views/UI/CanvasTimelineDataView.swift:39— ClassTooLong — 546 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 146 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.
ClassTooLong: WeekTimelineGridView Dayflow/Dayflow/Views/UI/MainView/WeekTimelineGridView.swift:49— ClassTooLong — 534 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 134 over it, 1.34× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: DayflowBackendProvider Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:191— ClassTooLong — 528 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods. The bar is 400 significant lines; this is 128 over it, 1.32× 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: DayflowAuthManager Dayflow/Dayflow/System/DayflowAuthManager.swift:285— ClassTooLong — 527 significant lines (blank, comment-only and punctuation-only lines excluded), 42 methods. The bar is 400 significant lines; this is 127 over it, 1.32× 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: DailyRecapGenerator Dayflow/Dayflow/Core/AI/DailyRecapGenerator.swift:70— ClassTooLong — 522 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 400 significant lines; this is 122 over it, 1.31× 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: TimelineReviewOverlay Dayflow/Dayflow/Views/UI/TimelineReviewOverlay.swift:9— ClassTooLong — 504 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 104 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: SupportChatPage Dayflow/Dayflow/Views/UI/SupportChatWebView.swift:655— ClassTooLong — 501 significant lines (blank, comment-only and punctuation-only lines excluded), 0 methods. The bar is 400 significant lines; this is 101 over it, 1.25× 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: ActivityCard Dayflow/Dayflow/Views/UI/MainView/ActivityCard.swift:7— ClassTooLong — 498 significant lines (blank, comment-only and punctuation-only lines excluded), 16 methods. The bar is 400 significant lines; this is 98 over it, 1.25× 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: DayflowProOnboardingSignInPanel Dayflow/Dayflow/Views/Onboarding/Prototype/DayflowProOnboardingSignIn.swift:48— ClassTooLong — 481 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 81 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ChatService Dayflow/Dayflow/Core/AI/ChatService.swift:13— ClassTooLong — 477 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 77 over it, 1.19× 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.
Duplicated block (8 lines × 2) Dayflow/Dayflow/Core/AI/AgentCLISupport+Parsing.swift:348— Dayflow/Dayflow/Core/AI/AgentCLISupport+Parsing.swift:348-355 | Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:1465-1472 — 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 `Dayflow/Dayflow/Core/AI/AgentCLISupport+Parsing.swift:348` 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) Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.swift:208— Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.swift:208-215 | Dayflow/Dayflow/Core/AI/CodexProvider+Timeline.swift:236-243 — before extracting anything, compare `Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.swift` and `Dayflow/Dayflow/Core/AI/CodexProvider+Timeline.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 110 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.
Duplicated block (8 lines × 2) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:383— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:383-390 | Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Text.swift:12-19 — before extracting anything, compare `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift` and `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Text.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 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 `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:383` 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) Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Summaries.swift:240— Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Summaries.swift:240-247 | Dayflow/Dayflow/Core/AI/OllamaProvider+Summaries.swift:340-347 — 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 `Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Summaries.swift:240` 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) Dayflow/Dayflow/Core/AI/GemmaBackupProvider.swift:25— Dayflow/Dayflow/Core/AI/GemmaBackupProvider.swift:25-32 | Dayflow/Dayflow/Core/AI/OllamaProvider+Transcription.swift:460-467 — 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) Dayflow/Dayflow/Core/AgentAccess/AgentBridgeServer.swift:69— Dayflow/Dayflow/Core/AgentAccess/AgentBridgeServer.swift:69-76 | tools/dayflow-cli/Sources/dayflow/Bridge.swift:54-61 — 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 `Dayflow/Dayflow/Core/AgentAccess/AgentBridgeServer.swift:69` 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) Dayflow/Dayflow/Core/AgentAccess/AgentUsageTelemetryQueue.swift:173— Dayflow/Dayflow/Core/AgentAccess/AgentUsageTelemetryQueue.swift:173-180 | tools/dayflow-cli/Sources/dayflow/AgentUsageTelemetry.swift:205-212 — 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. 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 (8 lines × 2) Dayflow/Dayflow/Core/Recording/StorageManager+Chunks.swift:13— Dayflow/Dayflow/Core/Recording/StorageManager+Chunks.swift:13-21 | Dayflow/Dayflow/Core/Recording/StorageManager+Chunks.swift:28-35 — 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 `Dayflow/Dayflow/Core/Recording/StorageManager+Chunks.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. 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 (8 lines × 2) Dayflow/Dayflow/Core/Recording/StorageManager+Maintenance.swift:217— Dayflow/Dayflow/Core/Recording/StorageManager+Maintenance.swift:217-224 | Dayflow/Dayflow/Core/Recording/StorageManager+Maintenance.swift:258-265 — 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 `Dayflow/Dayflow/Core/Recording/StorageManager+Maintenance.swift:217` 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) Dayflow/Dayflow/Core/Weekly/WeeklyDonutBuilder.swift:165— Dayflow/Dayflow/Core/Weekly/WeeklyDonutBuilder.swift:165-173 | Dayflow/Dayflow/Core/Weekly/WeeklyOverviewBuilder.swift:458-465 — before extracting anything, compare `Dayflow/Dayflow/Core/Weekly/WeeklyDonutBuilder.swift` and `Dayflow/Dayflow/Core/Weekly/WeeklyOverviewBuilder.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 66 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 `Dayflow/Dayflow/Core/Weekly/WeeklyDonutBuilder.swift:165` 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) Dayflow/Dayflow/Views/Components/ColorWheelPicker.swift:305— Dayflow/Dayflow/Views/Components/ColorWheelPicker.swift:305-312 | Dayflow/Dayflow/Views/Components/ColorWheelPicker.swift:316-323 — 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 `Dayflow/Dayflow/Views/Components/ColorWheelPicker.swift:305` 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) Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift:470— Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift:470-477 | Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift:575-582 — 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 `Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift:470` 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) Dayflow/Dayflow/Views/UI/ChatHistoryPanel.swift:20— Dayflow/Dayflow/Views/UI/ChatHistoryPanel.swift:20-27 | Dayflow/Dayflow/Views/UI/ChatView+Content.swift:253-261 — 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 `Dayflow/Dayflow/Views/UI/ChatHistoryPanel.swift:20` 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) Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:203— Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:203-210 | Dayflow/Dayflow/Views/UI/TimelineReviewChrome.swift:15-22 — 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 (8 lines × 2) REDACTED:831— REDACTED:831-838 | REDACTED:850-857 — 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 `REDACTED:831` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyContextChartsSection.swift:108— Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyContextChartsSection.swift:108-115 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyContextShiftComparisonSection.swift:78-85 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyContextChartsSection.swift:108` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyContextChartsSection.swift:116` calls `lineLimit`, `minimumScaleFactor` and `Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyContextShiftComparisonSection.swift:86` 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 (8 lines × 2) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyModelFactory.swift:38— Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyModelFactory.swift:38-45 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyModelFactory.swift:135-142 — 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 `Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyModelFactory.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 (8 lines × 2) Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Summaries.swift:74— Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Summaries.swift:74-81 | Dayflow/Dayflow/Core/AI/OllamaProvider+Summaries.swift:91-98 — 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 `Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Summaries.swift:74` 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) Dayflow/Dayflow/Core/Weekly/WeeklyDonutBuilder.swift:215— Dayflow/Dayflow/Core/Weekly/WeeklyDonutBuilder.swift:215-222 | Dayflow/Dayflow/Core/Weekly/WeeklyOverviewBuilder.swift:481-488 — before extracting anything, compare `Dayflow/Dayflow/Core/Weekly/WeeklyDonutBuilder.swift` and `Dayflow/Dayflow/Core/Weekly/WeeklyOverviewBuilder.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 66 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 (8 lines × 2) Dayflow/Dayflow/Core/AI/ClaudeProvider+Text.swift:46— Dayflow/Dayflow/Core/AI/ClaudeProvider+Text.swift:46-53 | Dayflow/Dayflow/Core/AI/CodexProvider+Text.swift:46-53 — before extracting anything, compare `Dayflow/Dayflow/Core/AI/ClaudeProvider+Text.swift` and `Dayflow/Dayflow/Core/AI/CodexProvider+Text.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 86 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 (8 lines × 2) REDACTED:820— REDACTED:820-827 | REDACTED:299-306 — 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) Dayflow/Dayflow/Views/UI/CanvasTimelineDataView.swift:602— Dayflow/Dayflow/Views/UI/CanvasTimelineDataView.swift:602-609 | Dayflow/Dayflow/Views/UI/MainView/WeekTimelineStatusCard.swift:73-80 — 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 (5 lines × 2) Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:717— Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:717-721 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:866-870 — 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 `Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:717` 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) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:357— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:357-361 | Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift:263-268 — before extracting anything, compare `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift` and `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 320 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 `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:357` 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 lines × 2) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Upload.swift:137— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Upload.swift:137-141 | Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Upload.swift:257-261 — 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) Dayflow/Dayflow/Core/Flow/FlowSessionTimeline.swift:395— Dayflow/Dayflow/Core/Flow/FlowSessionTimeline.swift:395-400 | Dayflow/Dayflow/Core/Flow/FlowSessionTimeline.swift:485-489 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) Dayflow/Dayflow/Menu/FlowMenuBarViews.swift:453— Dayflow/Dayflow/Menu/FlowMenuBarViews.swift:453-457 | Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketMenus.swift:433-437 — 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 `Dayflow/Dayflow/Menu/FlowMenuBarViews.swift:453` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 2) Dayflow/Dayflow/Views/Components/CategorySetupCards.swift:98— Dayflow/Dayflow/Views/Components/CategorySetupCards.swift:98-104 | Dayflow/Dayflow/Views/Components/CategorySetupCards.swift:162-166 — 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 `Dayflow/Dayflow/Views/Components/CategorySetupCards.swift:98` 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) Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift:283— Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift:283-289 | Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift:599-603 — 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) Dayflow/Dayflow/Views/UI/Agents/AgentThreadCardView.swift:156— Dayflow/Dayflow/Views/UI/Agents/AgentThreadCardView.swift:156-160 | Dayflow/Dayflow/Views/UI/Agents/AgentThreadCardView.swift:340-344 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Dayflow/Dayflow/Views/UI/Agents/AgentThreadCardView.swift:162` calls `AgentStatusChipView` and `Dayflow/Dayflow/Views/UI/Agents/AgentThreadCardView.swift:345` 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 × 2) Dayflow/Dayflow/Views/UI/MainView/TimelineCalendarPopover.swift:292— Dayflow/Dayflow/Views/UI/MainView/TimelineCalendarPopover.swift:292-296 | Dayflow/Dayflow/Views/UI/MainView/TimelineCalendarPopover.swift:309-313 — 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 `Dayflow/Dayflow/Views/UI/MainView/TimelineCalendarPopover.swift:292` 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) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyApplicationInteractionsSection.swift:454— Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyApplicationInteractionsSection.swift:454-458 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyInteractionGraphGlyphs.swift:11-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 `Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyApplicationInteractionsSection.swift:454` 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 (5 lines × 2) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyModelFactory.swift:118— Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyModelFactory.swift:118-122 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyModelFactory.swift:160-164 — 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 `Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyModelFactory.swift:118` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyModelFactory.swift:165` calls `Set`, `appTemplates`, `contains` and `Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyModelFactory.swift:124` 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 × 2) Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:271— Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:271-275 | Dayflow/Dayflow/Core/AgentAccess/CodexMCPRegistration.swift:232-236 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) Dayflow/Dayflow/Core/DailyBrief/DailyBriefGenerator.swift:1320— Dayflow/Dayflow/Core/DailyBrief/DailyBriefGenerator.swift:1320-1324 | Dayflow/Dayflow/Core/DailyBrief/DailyBriefThreadIndex.swift:279-284 — 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) Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:307— Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:307-311 | Dayflow/Dayflow/Views/UI/TimelineReviewChrome.swift:55-59 — 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 (5 lines × 2) Dayflow/Dayflow/Core/Recording/StorageManager+Chunks.swift:6— Dayflow/Dayflow/Core/Recording/StorageManager+Chunks.swift:6-10 | Dayflow/Dayflow/Core/Recording/StorageManager+Screenshots.swift:9-13 — 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) Dayflow/Dayflow/Core/AI/AgentCLISupport+Parsing.swift:324— Dayflow/Dayflow/Core/AI/AgentCLISupport+Parsing.swift:324-328 | Dayflow/Dayflow/Views/Onboarding/ChatCLITestView.swift:145-149 — 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 `Dayflow/Dayflow/Core/AI/AgentCLISupport+Parsing.swift:324` 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) tools/dayflow-cli/Sources/dayflow/main.swift:136— tools/dayflow-cli/Sources/dayflow/main.swift:136-140 | tools/dayflow-cli/Sources/dayflow/main.swift:345-349 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `tools/dayflow-cli/Sources/dayflow/main.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.
Hotspot: Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:677— Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 52 in ChatCLIProcessRunner.executeStreaming at line 677. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 03:45:18 -08:00' --until='2026-11-13 03:45:18 -08:00' --full-history --no-merges -- Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.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: Dayflow/Dayflow/Views/UI/Flow/FlowWebView.swift Dayflow/Dayflow/Views/UI/Flow/FlowWebView.swift:150— Dayflow/Dayflow/Views/UI/Flow/FlowWebView.swift changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in Coordinator.handle at line 150. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 03:45:18 -08:00' --until='2026-11-13 03:45:18 -08:00' --full-history --no-merges -- Dayflow/Dayflow/Views/UI/Flow/FlowWebView.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: Dayflow/Dayflow/Core/DailyBrief/DailyBriefGenerator.swift Dayflow/Dayflow/Core/DailyBrief/DailyBriefGenerator.swift:1181— Dayflow/Dayflow/Core/DailyBrief/DailyBriefGenerator.swift changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in DailyBriefGenerator.cleaned at line 1181. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 03:45:18 -08:00' --until='2026-11-13 03:45:18 -08:00' --full-history --no-merges -- Dayflow/Dayflow/Core/DailyBrief/DailyBriefGenerator.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: Dayflow/Dayflow/Core/AI/LLMService.swift Dayflow/Dayflow/Core/AI/LLMService.swift:650— Dayflow/Dayflow/Core/AI/LLMService.swift changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in LLMService.processBatch at line 650. 1 of those changes was a fix/bug commit, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 03:45:18 -08:00' --until='2026-11-13 03:45:18 -08:00' --full-history --no-merges -- Dayflow/Dayflow/Core/AI/LLMService.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: Dayflow/Dayflow/Core/Flow/FlowDistractionAgent.swift Dayflow/Dayflow/Core/Flow/FlowDistractionAgent.swift:586— Dayflow/Dayflow/Core/Flow/FlowDistractionAgent.swift changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in FlowDistractionAgent.tick at line 586. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 03:45:18 -08:00' --until='2026-11-13 03:45:18 -08:00' --full-history --no-merges -- Dayflow/Dayflow/Core/Flow/FlowDistractionAgent.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: Dayflow/Dayflow/App/DayflowApp.swift Dayflow/Dayflow/App/DayflowApp.swift:293— Dayflow/Dayflow/App/DayflowApp.swift changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in DayflowApp.body at line 293. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 03:45:18 -08:00' --until='2026-11-13 03:45:18 -08:00' --full-history --no-merges -- Dayflow/Dayflow/App/DayflowApp.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: Dayflow/Dayflow/App/AppDelegate.swift Dayflow/Dayflow/App/AppDelegate.swift:65— Dayflow/Dayflow/App/AppDelegate.swift changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in AppDelegate.applicationDidFinishLaunching at line 65. 1 of those changes was a fix/bug commit, and the other 11 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 03:45:18 -08:00' --until='2026-11-13 03:45:18 -08:00' --full-history --no-merges -- Dayflow/Dayflow/App/AppDelegate.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: Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefPageView.swift Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefPageView.swift:671— Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefPageView.swift changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in DailyBriefDebugStats.lines at line 671. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 03:45:18 -08:00' --until='2026-11-13 03:45:18 -08:00' --full-history --no-merges -- Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefPageView.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: REDACTED REDACTED:200— REDACTED changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in LLMProviderSetupView.currentStepContent at line 200. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 03:45:18 -08:00' --until='2026-11-13 03:45:18 -08:00' --full-history --no-merges -- REDACTED`: 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: Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:44— Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in OnboardingFlow.body at line 44. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 03:45:18 -08:00' --until='2026-11-13 03:45:18 -08:00' --full-history --no-merges -- Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.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: Dayflow/Dayflow/Views/Onboarding/ChatCLITestView.swift Dayflow/Dayflow/Views/Onboarding/ChatCLITestView.swift:108— Dayflow/Dayflow/Views/Onboarding/ChatCLITestView.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in ChatCLITestView.runTest 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 03:45:18 -08:00' --until='2026-11-13 03:45:18 -08:00' --full-history --no-merges -- Dayflow/Dayflow/Views/Onboarding/ChatCLITestView.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: Dayflow/Dayflow/Core/Recording/ScreenRecorder.swift Dayflow/Dayflow/Core/Recording/ScreenRecorder.swift:273— Dayflow/Dayflow/Core/Recording/ScreenRecorder.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in ScreenRecorder.setupCapture at line 273. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 03:45:18 -08:00' --until='2026-11-13 03:45:18 -08:00' --full-history --no-merges -- Dayflow/Dayflow/Core/Recording/ScreenRecorder.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: Dayflow/Dayflow/Views/UI/MainView/ActivityCard.swift Dayflow/Dayflow/Views/UI/MainView/ActivityCard.swift:173— Dayflow/Dayflow/Views/UI/MainView/ActivityCard.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in ActivityCard.activityDetails at line 173. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 03:45:18 -08:00' --until='2026-11-13 03:45:18 -08:00' --full-history --no-merges -- Dayflow/Dayflow/Views/UI/MainView/ActivityCard.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: Dayflow/Dayflow/Core/AI/CodexProvider+Transcription.swift Dayflow/Dayflow/Core/AI/CodexProvider+Transcription.swift:12— Dayflow/Dayflow/Core/AI/CodexProvider+Transcription.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in CodexProvider.transcribeScreenshots at line 12. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 03:45:18 -08:00' --until='2026-11-13 03:45:18 -08:00' --full-history --no-merges -- Dayflow/Dayflow/Core/AI/CodexProvider+Transcription.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: Dayflow/Dayflow/Core/Flow/FlowSessionTimeline.swift Dayflow/Dayflow/Core/Flow/FlowSessionTimeline.swift:163— Dayflow/Dayflow/Core/Flow/FlowSessionTimeline.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in FlowSessionTimeline.apply at line 163. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 03:45:18 -08:00' --until='2026-11-13 03:45:18 -08:00' --full-history --no-merges -- Dayflow/Dayflow/Core/Flow/FlowSessionTimeline.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: Dayflow/Dayflow/Core/AI/CodexProvider+ActivityCards.swift Dayflow/Dayflow/Core/AI/CodexProvider+ActivityCards.swift:7— Dayflow/Dayflow/Core/AI/CodexProvider+ActivityCards.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in CodexProvider.generateActivityCards at line 7. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 03:45:18 -08:00' --until='2026-11-13 03:45:18 -08:00' --full-history --no-merges -- Dayflow/Dayflow/Core/AI/CodexProvider+ActivityCards.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.
Duplicated block (6 lines × 2) Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:432— Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:432-437 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:624-629 — 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 `Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:432` 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 first that the copies are not typed on the same thing: the declarations holding them bind `batchId` to `Int64?) async throws -> (observations: [Observation]` in one and `Int64? ) async throws -> (cards: [ActivityCardData]` 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) Dayflow/Dayflow/Core/AI/OllamaProvider+Transcription.swift:132— Dayflow/Dayflow/Core/AI/OllamaProvider+Transcription.swift:132-137 | Dayflow/Dayflow/Core/AI/OllamaProvider+Transcription.swift:144-149 — 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 `Dayflow/Dayflow/Core/AI/OllamaProvider+Transcription.swift:132` 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, `Dayflow/Dayflow/Core/AI/OllamaProvider+Transcription.swift:128` calls `parseJSONResponse` and `Dayflow/Dayflow/Core/AI/OllamaProvider+Transcription.swift:141` 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 lines × 2) Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift:453— Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift:453-458 | Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift:550-555 — 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 `Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift:453` 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) Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefPageView.swift:131— Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefPageView.swift:131-136 | Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefSections.swift:936-941 — 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 `Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefPageView.swift:131` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefPageView.swift:137` calls `contentShape`, `Circle` and `Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefSections.swift:942` 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 lines × 2) Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketDaybreakHeader.swift:123— Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketDaybreakHeader.swift:123-128 | Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketDaybreakHeader.swift:140-145 — 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 `Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketDaybreakHeader.swift:123` 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) Dayflow/Dayflow/Views/UI/Flow/FlowOverlayView.swift:231— Dayflow/Dayflow/Views/UI/Flow/FlowOverlayView.swift:231-236 | Dayflow/Dayflow/Views/UI/Flow/FlowOverlayView.swift:348-354 — 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 `Dayflow/Dayflow/Views/UI/Flow/FlowOverlayView.swift:231` 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) Dayflow/Dayflow/Views/UI/GitHubStarPromptCard.swift:171— Dayflow/Dayflow/Views/UI/GitHubStarPromptCard.swift:171-176 | Dayflow/Dayflow/Views/UI/MainView/Layout.swift:675-680 — 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 `Dayflow/Dayflow/Views/UI/GitHubStarPromptCard.swift:171` 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) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyModelFactory.swift:47— Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyModelFactory.swift:47-53 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyModelFactory.swift:144-149 — 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 `Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyModelFactory.swift:47` 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) Dayflow/Dayflow/Views/UI/TimelineReviewPlaybackModels.swift:188— Dayflow/Dayflow/Views/UI/TimelineReviewPlaybackModels.swift:188-193 | Dayflow/Dayflow/Views/UI/TimelineReviewPlaybackModels.swift:486-491 — 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) Dayflow/Dayflow/Core/Weekly/WeeklyDonutBuilder.swift:188— Dayflow/Dayflow/Core/Weekly/WeeklyDonutBuilder.swift:188-193 | Dayflow/Dayflow/Core/Weekly/WeeklyOverviewBuilder.swift:474-479 — before extracting anything, compare `Dayflow/Dayflow/Core/Weekly/WeeklyDonutBuilder.swift` and `Dayflow/Dayflow/Core/Weekly/WeeklyOverviewBuilder.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 66 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) Dayflow/Dayflow/Views/Components/CategoryPickerOverlay.swift:168— Dayflow/Dayflow/Views/Components/CategoryPickerOverlay.swift:168-173 | Dayflow/Dayflow/Views/Components/CategoryPickerView.swift:229-234 — 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 (6 lines × 2) Dayflow/Dayflow/Views/UI/CanvasActivityCard.swift:48— Dayflow/Dayflow/Views/UI/CanvasActivityCard.swift:48-53 | Dayflow/Dayflow/Views/UI/MainView/WeekTimelineActivityCard.swift:56-61 — 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 (6 lines × 2) Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:300— Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:300-305 | Dayflow/Dayflow/Views/UI/TimelineReviewChrome.swift:48-53 — 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) Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshowPlayback.swift:170— Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshowPlayback.swift:170-175 | Dayflow/Dayflow/Views/UI/TimelineReviewPlaybackModels.swift:423-428 — 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) Dayflow/Dayflow/Views/UI/ChatView+State.swift:50— Dayflow/Dayflow/Views/UI/ChatView+State.swift:50-55 | Dayflow/Dayflow/Views/UI/MainView/Support.swift:140-149 — 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 (6 lines × 2) tools/dayflow-cli/Sources/dayflow/MCPServer.swift:372— tools/dayflow-cli/Sources/dayflow/MCPServer.swift:372-377 | tools/dayflow-cli/Sources/dayflow/MCPServer.swift:426-431 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `tools/dayflow-cli/Sources/dayflow/MCPServer.swift:372` 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 `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 (10 lines × 2) Dayflow/Dayflow/Core/AI/ClaudeProvider+Transcription.swift:12— Dayflow/Dayflow/Core/AI/ClaudeProvider+Transcription.swift:12-21 | Dayflow/Dayflow/Core/AI/CodexProvider+Transcription.swift:12-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 `Dayflow/Dayflow/Core/AI/ClaudeProvider+Transcription.swift:12` 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) Dayflow/Dayflow/Core/AI/CodexProvider+ActivityCards.swift:112— Dayflow/Dayflow/Core/AI/CodexProvider+ActivityCards.swift:112-121 | Dayflow/Dayflow/Core/AI/CodexProvider+Transcription.swift:193-202 — 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 `Dayflow/Dayflow/Core/AI/CodexProvider+ActivityCards.swift:112` 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) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Text.swift:125— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Text.swift:125-134 | Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift:228-237 — 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 `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Text.swift:125` 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) Dayflow/Dayflow/Core/AI/OllamaProvider+Summaries.swift:159— Dayflow/Dayflow/Core/AI/OllamaProvider+Summaries.swift:159-168 | Dayflow/Dayflow/Core/AI/OllamaProvider+Summaries.swift:453-462 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Core/AI/OllamaProvider+Summaries.swift:159` 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) Dayflow/Dayflow/Core/Flow/FlowOverlayController.swift:112— Dayflow/Dayflow/Core/Flow/FlowOverlayController.swift:112-121 | Dayflow/Dayflow/System/PermissionHelperPanel.swift:451-460 — 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 `Dayflow/Dayflow/Core/Flow/FlowOverlayController.swift:112` 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 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 (10 lines × 2) Dayflow/Dayflow/Core/Recording/StorageManager+Maintenance.swift:182— Dayflow/Dayflow/Core/Recording/StorageManager+Maintenance.swift:182-191 | Dayflow/Dayflow/Core/Recording/StorageManager+Maintenance.swift:280-289 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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) Dayflow/Dayflow/Core/Recording/StorageManager+Observations.swift:38— Dayflow/Dayflow/Core/Recording/StorageManager+Observations.swift:38-47 | Dayflow/Dayflow/Core/Recording/StorageManager+Observations.swift:67-76 — 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 `Dayflow/Dayflow/Core/Recording/StorageManager+Observations.swift:38` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) Dayflow/Dayflow/Views/Onboarding/APIKeyInputView.swift:27— Dayflow/Dayflow/Views/Onboarding/APIKeyInputView.swift:27-36 | Dayflow/Dayflow/Views/Onboarding/TerminalCommandView.swift:17-26 — 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 `Dayflow/Dayflow/Views/Onboarding/APIKeyInputView.swift:27` 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) REDACTED:643— REDACTED:643-652 | REDACTED:654-663 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) Dayflow/Dayflow/Views/Onboarding/Prototype/DayflowProOnboardingSignIn.swift:513— Dayflow/Dayflow/Views/Onboarding/Prototype/DayflowProOnboardingSignIn.swift:513-522 | Dayflow/Dayflow/Views/Onboarding/Prototype/DayflowProOnboardingSignIn.swift:542-551 — 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 `Dayflow/Dayflow/Views/Onboarding/Prototype/DayflowProOnboardingSignIn.swift:513` 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) Dayflow/Dayflow/Views/UI/GitHubStarPromptCard.swift:159— Dayflow/Dayflow/Views/UI/GitHubStarPromptCard.swift:159-168 | Dayflow/Dayflow/Views/UI/SurveyPromptCard.swift:244-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. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Views/UI/GitHubStarPromptCard.swift:159` 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) Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:154— Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:154-163 | Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:651-660 — 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 `Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:154` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `0` in one and `4` 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 (10 lines × 2) Dayflow/Dayflow/Views/UI/WhatsNewView.swift:595— Dayflow/Dayflow/Views/UI/WhatsNewView.swift:595-604 | Dayflow/Dayflow/Views/UI/WhatsNewView.swift:773-782 — 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 `Dayflow/Dayflow/Views/UI/WhatsNewView.swift:595` 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, `Dayflow/Dayflow/Views/UI/WhatsNewView.swift:772` calls `frame` and `Dayflow/Dayflow/Views/UI/WhatsNewView.swift:594` 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 (10 lines × 2) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyFocusHeatmapSection.swift:161— Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyFocusHeatmapSection.swift:161-170 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyWorkflowSection.swift:122-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.
Duplicated block (10 lines × 2) Dayflow/Dayflow/Views/Onboarding/ChatCLIDetectionViews.swift:177— Dayflow/Dayflow/Views/Onboarding/ChatCLIDetectionViews.swift:177-186 | Dayflow/Dayflow/Views/Onboarding/ProviderSetupState.swift:469-478 — 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) Dayflow/Dayflow/Core/AI/ChatService.swift:673— Dayflow/Dayflow/Core/AI/ChatService.swift:673-683 | Dayflow/Dayflow/Core/AI/ChatService.swift:688-698 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (11 lines × 2) Dayflow/Dayflow/Core/AI/CodexProvider+ActivityCards.swift:59— Dayflow/Dayflow/Core/AI/CodexProvider+ActivityCards.swift:59-69 | Dayflow/Dayflow/Core/AI/CodexProvider+Transcription.swift:181-191 — 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 `Dayflow/Dayflow/Core/AI/CodexProvider+ActivityCards.swift:59` 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 (11 lines × 2) Dayflow/Dayflow/Core/AI/DailyRecapScheduler.swift:210— Dayflow/Dayflow/Core/AI/DailyRecapScheduler.swift:210-220 | Dayflow/Dayflow/Views/UI/DailyView+Standup.swift:384-394 — 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 `Dayflow/Dayflow/Core/AI/DailyRecapScheduler.swift:210` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) Dayflow/Dayflow/Core/AI/GemmaBackupProvider.swift:194— Dayflow/Dayflow/Core/AI/GemmaBackupProvider.swift:194-204 | Dayflow/Dayflow/Core/AI/OllamaProvider.swift:131-141 — 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) Dayflow/Dayflow/Core/Recording/StorageManager+TimelineReview.swift:230— Dayflow/Dayflow/Core/Recording/StorageManager+TimelineReview.swift:230-240 | Dayflow/Dayflow/Views/UI/TimelineReviewOverlay.swift:658-668 — 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 `Dayflow/Dayflow/Core/Recording/StorageManager+TimelineReview.swift:230` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (11 lines × 2) Dayflow/Dayflow/Core/Weekly/WeeklyDashboardBuilder.swift:406— Dayflow/Dayflow/Core/Weekly/WeeklyDashboardBuilder.swift:406-416 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyWorkflowSection.swift:299-309 — 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 (11 lines × 2) Dayflow/Dayflow/Views/Components/DayFocusSummarySection.swift:68— Dayflow/Dayflow/Views/Components/DayFocusSummarySection.swift:68-78 | Dayflow/Dayflow/Views/Components/DayFocusSummarySection.swift:97-107 — 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) Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift:249— Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift:249-259 | Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift:315-325 — 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 `Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift:249` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:782— Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:782-792 | Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeRoleSelectionStep.swift:82-92 — before extracting anything, compare `Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift` and `Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeRoleSelectionStep.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:782` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) Dayflow/Dayflow/Views/UI/ChatView+Content.swift:31— Dayflow/Dayflow/Views/UI/ChatView+Content.swift:31-41 | Dayflow/Dayflow/Views/UI/ChatWelcomeComponents.swift:84-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. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Views/UI/ChatView+Content.swift:31` 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, `Dayflow/Dayflow/Views/UI/ChatWelcomeComponents.swift:95` calls `scaleEffect` and `Dayflow/Dayflow/Views/UI/ChatView+Content.swift:42` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 2) Dayflow/Dayflow/Views/UI/DailyAccessLockedViews.swift:205— Dayflow/Dayflow/Views/UI/DailyAccessLockedViews.swift:205-215 | Dayflow/Dayflow/Views/UI/DailyAccessLockedViews.swift:370-380 — 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 `Dayflow/Dayflow/Views/UI/DailyAccessLockedViews.swift:205` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefCompletedView.swift:171— Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefCompletedView.swift:171-181 | Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefSavedView.swift:63-73 — 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 `Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefCompletedView.swift:171` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefSavedView.swift:60` calls `Image`, `font`, `system` and `Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefCompletedView.swift:170` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 2) Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:49— Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:49-59 | Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:627-637 — 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 `Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:49` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) Dayflow/Dayflow/Views/Components/ColorWheelPicker.swift:264— Dayflow/Dayflow/Views/Components/ColorWheelPicker.swift:264-274 | Dayflow/Dayflow/Views/Components/ColorWheelPicker.swift:291-301 — 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 `Dayflow/Dayflow/Views/Components/ColorWheelPicker.swift:264` 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) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Prompting.swift:11— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Prompting.swift:11-17 | Dayflow/Dayflow/Core/AI/TimelineOutputSupport.swift:57-63 — before extracting anything, compare `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Prompting.swift` and `Dayflow/Dayflow/Core/AI/TimelineOutputSupport.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 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 `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Prompting.swift:11` 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) Dayflow/Dayflow/System/DayflowAuthManager.swift:552— Dayflow/Dayflow/System/DayflowAuthManager.swift:552-558 | Dayflow/Dayflow/System/DayflowAuthManager.swift:563-569 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) Dayflow/Dayflow/Utilities/DayflowTheme.swift:243— Dayflow/Dayflow/Utilities/DayflowTheme.swift:243-249 | Dayflow/Dayflow/Utilities/DayflowTheme.swift:253-259 — 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 `Dayflow/Dayflow/Utilities/DayflowTheme.swift:243` 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) Dayflow/Dayflow/Views/Components/DaySummaryView.swift:265— Dayflow/Dayflow/Views/Components/DaySummaryView.swift:265-271 | Dayflow/Dayflow/Views/Components/DaySummaryView.swift:914-920 — 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 `Dayflow/Dayflow/Views/Components/DaySummaryView.swift:265` 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) Dayflow/Dayflow/Views/Onboarding/Prototype/DayflowProOnboardingSignIn.swift:160— Dayflow/Dayflow/Views/Onboarding/Prototype/DayflowProOnboardingSignIn.swift:160-166 | Dayflow/Dayflow/Views/Onboarding/Prototype/DayflowProOnboardingSignIn.swift:227-233 — 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 `Dayflow/Dayflow/Views/Onboarding/Prototype/DayflowProOnboardingSignIn.swift:160` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `scaled(4)` in one and `scaled(10)` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7 lines × 2) Dayflow/Dayflow/Views/UI/ChatView+Content.swift:476— Dayflow/Dayflow/Views/UI/ChatView+Content.swift:476-482 | Dayflow/Dayflow/Views/UI/DailyAccessLockedViews.swift:239-245 — 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 `Dayflow/Dayflow/Views/UI/ChatView+Content.swift:476` 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) Dayflow/Dayflow/Views/UI/DailyView+Standup.swift:72— Dayflow/Dayflow/Views/UI/DailyView+Standup.swift:72-78 | Dayflow/Dayflow/Views/UI/DailyView+Standup.swift:126-132 — 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 `Dayflow/Dayflow/Views/UI/DailyView+Standup.swift:72` 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) Dayflow/Dayflow/Views/UI/MainView/ActivityCard.swift:372— Dayflow/Dayflow/Views/UI/MainView/ActivityCard.swift:372-378 | Dayflow/Dayflow/Views/UI/MainView/ActivityCard.swift:393-399 — 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 `Dayflow/Dayflow/Views/UI/MainView/ActivityCard.swift:372` 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) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyInteractionGraphLayout.swift:231— Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyInteractionGraphLayout.swift:231-237 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyInteractionGraphLayout.swift:410-416 — 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 `Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyInteractionGraphLayout.swift:231` 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) Dayflow/Dayflow/Core/AI/ClaudeProvider+Text.swift:100— Dayflow/Dayflow/Core/AI/ClaudeProvider+Text.swift:100-106 | Dayflow/Dayflow/Core/AI/CodexProvider+Text.swift:100-106 — before extracting anything, compare `Dayflow/Dayflow/Core/AI/ClaudeProvider+Text.swift` and `Dayflow/Dayflow/Core/AI/CodexProvider+Text.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 86 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 `Dayflow/Dayflow/Core/AI/ClaudeProvider+Text.swift:100` 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) Dayflow/Dayflow/Core/AI/ActivityCardPromptOverrides.swift:8— Dayflow/Dayflow/Core/AI/ActivityCardPromptOverrides.swift:8-14 | Dayflow/Dayflow/Core/AI/GeminiPromptPreferences.swift:8-14 — 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 (7 lines × 2) Dayflow/Dayflow/Core/Recording/AccessibilityTreeReader.swift:379— Dayflow/Dayflow/Core/Recording/AccessibilityTreeReader.swift:379-385 | Dayflow/Dayflow/Core/Recording/BrowserWindowInspector.swift:213-219 — 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) Dayflow/Dayflow/Core/Weekly/WeeklyDonutBuilder.swift:207— Dayflow/Dayflow/Core/Weekly/WeeklyDonutBuilder.swift:207-213 | Dayflow/Dayflow/Core/Weekly/WeeklyOverviewBuilder.swift:420-426 — before extracting anything, compare `Dayflow/Dayflow/Core/Weekly/WeeklyDonutBuilder.swift` and `Dayflow/Dayflow/Core/Weekly/WeeklyOverviewBuilder.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 66 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) Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:242— Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:242-248 | Dayflow/Dayflow/Views/UI/TimelineReviewMediaViews.swift:82-88 — 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.
Swallowed exception (caught, then discarded) Dayflow/Dayflow/Views/UI/Settings/StorageSettingsViewModel.swift:255— `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) Dayflow/Dayflow/Views/UI/MainView/Support.swift:66— `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) Dayflow/Dayflow/Views/UI/Agents/AgentPlaybackView.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) Dayflow/Dayflow/Views/UI/Agents/AgentPlaybackView.swift:394— `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) Dayflow/Dayflow/Views/UI/Agents/AgentThreadOpener.swift:292— `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) Dayflow/Dayflow/System/DayflowAuthManager.swift:605— `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) Dayflow/Dayflow/Core/Recording/StorageFileManagerExtensions.swift:24— `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) Dayflow/Dayflow/Core/Net/FaviconService.swift:315— `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) Dayflow/Dayflow/Core/DailyBrief/DailyBriefGenerator.swift:675— `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) Dayflow/Dayflow/Core/AgentAccess/AgentClientRegistration.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) Dayflow/Dayflow/Core/AgentAccess/AgentUsageTelemetryQueue.swift:160— `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) Dayflow/Dayflow/Core/AgentAccess/CodexMCPRegistration.swift:253— `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) Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:288— `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) Dayflow/Dayflow/Core/AI/ShellEnvironment.swift:352— `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.
Duplicated block (9 lines × 2) Dayflow/Dayflow/Core/AI/AgentCLISupport+Parsing.swift:145— Dayflow/Dayflow/Core/AI/AgentCLISupport+Parsing.swift:145-153 | Dayflow/Dayflow/Core/AI/AgentCLISupport+Parsing.swift:181-189 — 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 `Dayflow/Dayflow/Core/AI/AgentCLISupport+Parsing.swift:145` 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) Dayflow/Dayflow/Core/AI/DailyRecapGenerator.swift:805— Dayflow/Dayflow/Core/AI/DailyRecapGenerator.swift:805-813 | Dayflow/Dayflow/Core/AI/DailyRecapScheduler.swift:428-436 — 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) Dayflow/Dayflow/Core/AI/DailyRecapGenerator.swift:815— Dayflow/Dayflow/Core/AI/DailyRecapGenerator.swift:815-823 | Dayflow/Dayflow/Core/AI/DailyRecapScheduler.swift:438-446 — 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) Dayflow/Dayflow/Core/AI/OllamaProvider+Summaries.swift:295— Dayflow/Dayflow/Core/AI/OllamaProvider+Summaries.swift:295-303 | Dayflow/Dayflow/Core/AI/OllamaProvider+Summaries.swift:392-400 — 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) Dayflow/Dayflow/Core/Flow/FlowSessionTimeline.swift:210— Dayflow/Dayflow/Core/Flow/FlowSessionTimeline.swift:210-218 | Dayflow/Dayflow/Core/Flow/FlowSessionTimeline.swift:230-238 — 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) Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:144— Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:144-152 | Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:1062-1070 — 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) Dayflow/Dayflow/Utilities/DayflowTheme.swift:317— Dayflow/Dayflow/Utilities/DayflowTheme.swift:317-325 | Dayflow/Dayflow/Utilities/DayflowTheme.swift:538-546 — 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 `Dayflow/Dayflow/Utilities/DayflowTheme.swift:317` 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) Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefMenuBarNotice.swift:342— Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefMenuBarNotice.swift:342-350 | Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketMenus.swift:358-366 — 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 `Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefMenuBarNotice.swift:342` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshowPlayback.swift:139— Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshowPlayback.swift:139-147 | Dayflow/Dayflow/Views/UI/TimelineReviewPlaybackModels.swift:389-397 — 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 `Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshowPlayback.swift:139` 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) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyInteractionGraphGlyphs.swift:159— Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyInteractionGraphGlyphs.swift:159-167 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyInteractionGraphGlyphs.swift:169-177 — 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 `Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyInteractionGraphGlyphs.swift:159` 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, `Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyInteractionGraphGlyphs.swift:168` calls `RoundedRectangle`, `fill`, `Color` and `Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyInteractionGraphGlyphs.swift:178` 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) Dayflow/Dayflow/Views/UI/WhatsNewView.swift:510— Dayflow/Dayflow/Views/UI/WhatsNewView.swift:510-518 | Dayflow/Dayflow/Views/UI/WhatsNewView.swift:678-686 — 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 `Dayflow/Dayflow/Views/UI/WhatsNewView.swift:510` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `6` in one and `10` 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 (9 lines × 2) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyFocusHeatmapSection.swift:228— Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyFocusHeatmapSection.swift:228-236 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyWorkflowSection.swift:258-266 — 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) Dayflow/Dayflow/Core/AI/GeminiPromptPreferences.swift:21— Dayflow/Dayflow/Core/AI/GeminiPromptPreferences.swift:21-29 | Dayflow/Dayflow/Core/AI/OllamaPromptPreferences.swift:19-27 — 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 (13 lines × 2) Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.swift:17— Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.swift:17-29 | Dayflow/Dayflow/Core/AI/CodexProvider+Timeline.swift:17-29 — before extracting anything, compare `Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.swift` and `Dayflow/Dayflow/Core/AI/CodexProvider+Timeline.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 110 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 `Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.swift:17` 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 (13 lines × 2) Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:399— Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:399-411 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:581-596 — 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 `Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:399` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (13 lines × 2) Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Networking.swift:254— Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Networking.swift:254-266 | Dayflow/Dayflow/Core/AI/OllamaProvider+Summaries.swift:67-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 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 (13 lines × 2) REDACTED:282— REDACTED:282-294 | REDACTED:671-683 — 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 `REDACTED:282` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (13 lines × 2) Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:825— Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:825-837 | Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeFlow.swift:247-259 — 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 (13 lines × 2) Dayflow/Dayflow/Views/UI/Agents/AgentsBriefingView.swift:73— Dayflow/Dayflow/Views/UI/Agents/AgentsBriefingView.swift:73-85 | Dayflow/Dayflow/Views/UI/Agents/AgentsCardsView.swift:100-112 — 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 (13 lines × 2) Dayflow/Dayflow/Views/UI/CanvasTimelineDataView.swift:434— Dayflow/Dayflow/Views/UI/CanvasTimelineDataView.swift:434-446 | Dayflow/Dayflow/Views/UI/CanvasTimelineDataView.swift:450-462 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Views/UI/CanvasTimelineDataView.swift:434` 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 (13 lines × 2) Dayflow/Dayflow/Views/UI/DailyAccessLockedViews.swift:219— Dayflow/Dayflow/Views/UI/DailyAccessLockedViews.swift:219-231 | Dayflow/Dayflow/Views/UI/DailyAccessLockedViews.swift:403-415 — 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 `Dayflow/Dayflow/Views/UI/DailyAccessLockedViews.swift:219` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) Dayflow/Dayflow/Views/UI/Flow/FlowSupportChatView.swift:67— Dayflow/Dayflow/Views/UI/Flow/FlowSupportChatView.swift:67-79 | Dayflow/Dayflow/Views/UI/Flow/FlowWaitlistChatView.swift:37-49 — 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 `Dayflow/Dayflow/Views/UI/Flow/FlowSupportChatView.swift:67` 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, `Dayflow/Dayflow/Views/UI/Flow/FlowSupportChatView.swift:81` calls `frame` and `Dayflow/Dayflow/Views/UI/Flow/FlowWaitlistChatView.swift:50` 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 (13 lines × 2) Dayflow/Dayflow/Views/UI/Settings/SettingsStorageTabView.swift:153— Dayflow/Dayflow/Views/UI/Settings/SettingsStorageTabView.swift:153-165 | Dayflow/Dayflow/Views/UI/Settings/SettingsStorageTabView.swift:252-264 — 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 `Dayflow/Dayflow/Views/UI/Settings/SettingsStorageTabView.swift:153` 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 (13 lines × 2) Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:206— Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:206-218 | Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:634-646 — 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 `Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:206` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) Dayflow/Dayflow/Views/UI/GitHubStarPromptCard.swift:173— Dayflow/Dayflow/Views/UI/GitHubStarPromptCard.swift:173-185 | Dayflow/Dayflow/Views/UI/SurveyPromptCard.swift:261-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. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Views/UI/GitHubStarPromptCard.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.
Duplicated block (12 lines × 2) Dayflow/Dayflow/Core/AI/ClaudeProvider+ActivityCards.swift:68— Dayflow/Dayflow/Core/AI/ClaudeProvider+ActivityCards.swift:68-79 | Dayflow/Dayflow/Core/AI/ClaudeProvider+Transcription.swift:76-87 — before extracting anything, compare `Dayflow/Dayflow/Core/AI/ClaudeProvider+ActivityCards.swift` and `Dayflow/Dayflow/Core/AI/ClaudeProvider+Transcription.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 57 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) Dayflow/Dayflow/Core/AI/DailyRecapGenerator.swift:792— Dayflow/Dayflow/Core/AI/DailyRecapGenerator.swift:792-803 | Dayflow/Dayflow/Core/AI/DailyRecapScheduler.swift:415-426 — 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 (12 lines × 2) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Prompting.swift:37— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Prompting.swift:37-48 | Dayflow/Dayflow/Core/AI/TimelineOutputSupport.swift:84-95 — before extracting anything, compare `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Prompting.swift` and `Dayflow/Dayflow/Core/AI/TimelineOutputSupport.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 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 `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Prompting.swift:37` 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 (12 lines × 2) Dayflow/Dayflow/Core/AI/OllamaProvider+Networking.swift:131— Dayflow/Dayflow/Core/AI/OllamaProvider+Networking.swift:131-142 | Dayflow/Dayflow/Core/AI/OllamaProvider+Networking.swift:175-186 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Core/AI/OllamaProvider+Networking.swift:131` 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) Dayflow/Dayflow/Core/Flow/FlowEarlyBirdController.swift:144— Dayflow/Dayflow/Core/Flow/FlowEarlyBirdController.swift:144-155 | Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefMenuBarNotice.swift:138-149 — 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 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 (12 lines × 2) Dayflow/Dayflow/Core/Recording/StorageManager+Reprocessing.swift:115— Dayflow/Dayflow/Core/Recording/StorageManager+Reprocessing.swift:115-126 | Dayflow/Dayflow/Core/Recording/StorageManager+Reprocessing.swift:195-206 — 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 (12 lines × 2) Dayflow/Dayflow/System/DayflowAuthManager.swift:647— Dayflow/Dayflow/System/DayflowAuthManager.swift:647-658 | Dayflow/Dayflow/System/DayflowAuthManager.swift:752-763 — 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 `Dayflow/Dayflow/System/DayflowAuthManager.swift:647` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Dayflow/Dayflow/System/DayflowAuthManager.swift:751` calls `clearPendingReferralCode` and `Dayflow/Dayflow/System/DayflowAuthManager.swift:646` 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 (12 lines × 2) Dayflow/Dayflow/Views/Components/ToolCallBubble.swift:164— Dayflow/Dayflow/Views/Components/ToolCallBubble.swift:164-175 | Dayflow/Dayflow/Views/Components/ToolCallBubble.swift:177-188 — 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) Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeFlow.swift:212— Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeFlow.swift:212-223 | Dayflow/Dayflow/Views/UI/Agents/AgentsView.swift:167-178 — 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 `Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeFlow.swift:212` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `10` in one and `14` 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 (12 lines × 2) Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefPageView.swift:776— Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefPageView.swift:776-787 | Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefPageView.swift:874-885 — 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 `Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefPageView.swift:776` 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) Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshowPlayback.swift:305— Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshowPlayback.swift:305-316 | Dayflow/Dayflow/Views/UI/TimelineReviewFrameLoading.swift:147-158 — 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 (12 lines × 2) Dayflow/Dayflow/Views/UI/Settings/SettingsDataTabView.swift:337— Dayflow/Dayflow/Views/UI/Settings/SettingsDataTabView.swift:337-348 | Dayflow/Dayflow/Views/UI/Settings/SettingsDataTabView.swift:352-363 — 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 `Dayflow/Dayflow/Views/UI/Settings/SettingsDataTabView.swift:337` 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.
TooManyMethods: StorageManager Dayflow/Dayflow/Core/Recording/StorageManager.swift:10— TooManyMethods — 115 methods, declared across 13 files: Recording/StorageManager+TimelineCards.swift (28), Recording/StorageManager+Maintenance.swift (18), Recording/StorageManager+Chunks.swift (13), Recording/StorageManager+Screenshots.swift (11), +9 more file(s). The bar is 30 methods; this is 85 over it, 3.83× 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: DailyBriefStore Dayflow/Dayflow/Core/DailyBrief/DailyBriefStore.swift:20— 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: GeminiDirectProvider Dayflow/Dayflow/Core/AI/GeminiDirectProvider.swift:8— TooManyMethods — 70 methods, declared across 11 files: AI/GeminiDirectProvider+DashboardTools.swift (15), AI/GeminiDirectProvider+DashboardStreaming.swift (12), AI/GeminiDirectProvider+DashboardChat.swift (9), AI/GeminiDirectProvider+ActivityCards.swift (8), +7 more file(s). The bar is 30 methods; this is 40 over it, 2.33× 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: MainView Dayflow/Dayflow/Views/UI/MainView/MainView.swift:15— TooManyMethods — 59 methods, declared across 7 files: MainView/Layout.swift (17), MainView/Support.swift (11), MainView/Actions.swift (10), MainView/Lifecycle.swift (7), +3 more file(s). The bar is 30 methods; this is 29 over it, 1.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: DailyView Dayflow/Dayflow/Views/UI/DailyView.swift:6— TooManyMethods — 56 methods, declared across 5 files: UI/DailyView+Standup.swift (20), UI/DailyView+Workflow.swift (19), UI/DailyView+Access.swift (12), UI/DailyView+Provider.swift (4), +1 more file(s). The bar is 30 methods; this is 26 over it, 1.87× 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: ProvidersSettingsViewModel REDACTED:4— TooManyMethods — 51 methods, declared across 2 files: REDACTED (38), Settings/ProvidersSettingsViewModel+PromptOverrides.swift (13). The bar is 30 methods; this is 21 over it, 1.70× 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: DayflowAuthManager Dayflow/Dayflow/System/DayflowAuthManager.swift:285— TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ClaudeProvider Dayflow/Dayflow/Core/AI/ClaudeProvider.swift:3— TooManyMethods — 41 methods, declared across 7 files: AI/ClaudeStrictJSONParser.swift (10), AI/ClaudeProvider.swift (7), AI/ClaudeProvider+Timeline.swift (6), AI/ClaudeProvider+ActivityCards.swift (5), +3 more file(s). The bar is 30 methods; this is 11 over it, 1.37× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ChatCLIProcessRunner Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:242— TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: FlowDistractionAgent Dayflow/Dayflow/Core/Flow/FlowDistractionAgent.swift:27— TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DailyRecapGenerator Dayflow/Dayflow/Core/AI/DailyRecapGenerator.swift:70— TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×11
Members sharing a duplicated core (4 members, 50+ identical tokens) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Prompting.swift:32— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Prompting.swift:32-48 | Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Networking.swift:233-251 | Dayflow/Dayflow/Core/AI/OllamaProvider.swift:212-230 | Dayflow/Dayflow/Core/AI/TimelineOutputSupport.swift:79-95 — 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) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift:620— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift:620-627 | Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Networking.swift:268-275 | Dayflow/Dayflow/Core/AI/OllamaProvider.swift:259-266 | Dayflow/Dayflow/Core/AI/TimelineOutputSupport.swift:32-39 — 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) Dayflow/Dayflow/Core/Flow/FlowEarlyBirdController.swift:140— Dayflow/Dayflow/Core/Flow/FlowEarlyBirdController.swift:140-164 | Dayflow/Dayflow/Core/Flow/FlowOverlayController.swift:110-133 | Dayflow/Dayflow/System/PermissionHelperPanel.swift:449-468 | Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefMenuBarNotice.swift:134-164 — 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) Dayflow/Dayflow/Core/Weekly/WeeklyDashboardBuilder.swift:490— Dayflow/Dayflow/Core/Weekly/WeeklyDashboardBuilder.swift:490-499 | Dayflow/Dayflow/Core/Weekly/WeeklyDonutBuilder.swift:165-176 | Dayflow/Dayflow/Core/Weekly/WeeklyOverviewBuilder.swift:458-467 | Dayflow/Dayflow/Views/UI/DailyWorkflowComputation.swift:405-410 — 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) Dayflow/Dayflow/Views/Components/CategoryPickerOverlay.swift:284— Dayflow/Dayflow/Views/Components/CategoryPickerOverlay.swift:284-306 | Dayflow/Dayflow/Views/Components/DayCategorySelectionEditor.swift:139-161 | Dayflow/Dayflow/Views/Components/DayGoalSetupComponents.swift:384-406 | Dayflow/Dayflow/Views/UI/ChatStylesAndDebug.swift:156-173 — 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) Dayflow/Dayflow/Views/Components/ReferralSurveyView.swift:180— Dayflow/Dayflow/Views/Components/ReferralSurveyView.swift:180-202 | Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:756-792 | Dayflow/Dayflow/Views/Onboarding/Prototype/DayflowProOnboardingSignIn.swift:74-158 | Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeRoleSelectionStep.swift:27-129 — 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) Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeChooseProviderStep.swift:317— Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeChooseProviderStep.swift:317-325 | Dayflow/Dayflow/Views/UI/Agents/AgentsBriefingView.swift:72-86 | Dayflow/Dayflow/Views/UI/Agents/AgentsCardsView.swift:85-119 | Dayflow/Dayflow/Views/UI/Agents/AgentsCardsView.swift:121-137 — 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) Dayflow/Dayflow/Views/UI/Agents/AgentsOverviewView.swift:291— Dayflow/Dayflow/Views/UI/Agents/AgentsOverviewView.swift:291-311 | Dayflow/Dayflow/Views/UI/Settings/SettingsProvidersTabView.swift:640-715 | Dayflow/Dayflow/Views/UI/SettingsView.swift:206-228 | Dayflow/Dayflow/Views/UI/WhatsNewView.swift:937-992 — 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) Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:162— Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:162-219 | Dayflow/Dayflow/Views/UI/TimelineReviewChrome.swift:13-25 | Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:220-275 | Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:613-839 — 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) Dayflow/Dayflow/Views/UI/Settings/SettingsAccountSection.swift:157— Dayflow/Dayflow/Views/UI/Settings/SettingsAccountSection.swift:157-203 | Dayflow/Dayflow/Views/UI/Settings/SettingsBrowserPrivacySection.swift:34-47 | Dayflow/Dayflow/Views/UI/Settings/SettingsBrowserPrivacySection.swift:86-112 | Dayflow/Dayflow/Views/UI/Settings/SettingsBrowserPrivacySection.swift:114-162 — 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) Dayflow/Dayflow/Views/UI/WhatsNewView.swift:379— Dayflow/Dayflow/Views/UI/WhatsNewView.swift:379-467 | Dayflow/Dayflow/Views/UI/WhatsNewView.swift:508-604 | Dayflow/Dayflow/Views/UI/WhatsNewView.swift:677-711 | Dayflow/Dayflow/Views/UI/WhatsNewView.swift:716-783 — 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 (9 corresponding lines) · ×11
Edited copy of a member (9 corresponding lines) Dayflow/Dayflow/Views/UI/Agents/AgentsModels.swift:44— Dayflow/Dayflow/Views/UI/Agents/AgentsModels.swift:44-52 | Dayflow/Dayflow/Views/UI/Agents/AgentsModels.swift:117-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) Dayflow/Dayflow/Core/Thumbnails/ScreenshotThumbnailCache.swift:62— Dayflow/Dayflow/Core/Thumbnails/ScreenshotThumbnailCache.swift:62-70 | Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:447-455 — 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) Dayflow/Dayflow/Core/Net/FaviconService.swift:136— Dayflow/Dayflow/Core/Net/FaviconService.swift:136-144 | Dayflow/Dayflow/Core/Net/FaviconService.swift:146-157 — 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) Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:250— Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:250-262 | Dayflow/Dayflow/Views/UI/TimelineReviewMediaViews.swift:90-98 — 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) Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:342— Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:342-352 | Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:841-849 — 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) Dayflow/Dayflow/Core/DailyBrief/DailyBriefGenerator.swift:503— Dayflow/Dayflow/Core/DailyBrief/DailyBriefGenerator.swift:503-511 | Dayflow/Dayflow/Core/DailyBrief/DailyBriefLinkImages.swift:199-207 — 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) Dayflow/Dayflow/Views/UI/Agents/AgentPlaybackView.swift:530— Dayflow/Dayflow/Views/UI/Agents/AgentPlaybackView.swift:530-539 | Dayflow/Dayflow/Views/UI/Agents/AgentPlaybackView.swift:541-549 — 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) Dayflow/Dayflow/Views/UI/Agents/AgentPlaybackView.swift:598— Dayflow/Dayflow/Views/UI/Agents/AgentPlaybackView.swift:598-606 | Dayflow/Dayflow/Views/UI/Flow/FlowWebView.swift:462-474 — 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) Dayflow/Dayflow/Core/Recording/AccessibilityRecorder.swift:300— Dayflow/Dayflow/Core/Recording/AccessibilityRecorder.swift:300-309 | Dayflow/Dayflow/Core/Recording/AccessibilityRecorder.swift:311-319 — 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) Dayflow/Dayflow/Core/Recording/StorageManager+Maintenance.swift:32— Dayflow/Dayflow/Core/Recording/StorageManager+Maintenance.swift:32-40 | Dayflow/Dayflow/Core/Recording/StorageManager+Maintenance.swift:302-316 — 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) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyFocusHeatmapSection.swift:36— Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyFocusHeatmapSection.swift:36-46 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyWorkflowSection.swift:8-16 — 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.
Low cohesion: StorageManager (LCOM4 18) Dayflow/Dayflow/Core/Recording/StorageManager.swift:10— StorageManager's methods fall into 18 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 18 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: AnalyticsService (LCOM4 8) Dayflow/Dayflow/System/AnalyticsService.swift:214— AnalyticsService's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — 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 8 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: String (LCOM4 8) Dayflow/Dayflow/Core/Recording/AccessibilityLogCondenser.swift:385— String's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — 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 8 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: StatusBarController (LCOM4 6) Dayflow/Dayflow/System/StatusBarController.swift:5— StatusBarController'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: ClaudeProvider (LCOM4 5) Dayflow/Dayflow/Core/AI/ClaudeProvider.swift:3— ClaudeProvider'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: DailyBriefStore (LCOM4 5) Dayflow/Dayflow/Core/DailyBrief/DailyBriefStore.swift:20— DailyBriefStore'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: AppState (LCOM4 4) Dayflow/Dayflow/App/AppState.swift:11— AppState'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: AccessibilityTreeReader (LCOM4 4) Dayflow/Dayflow/Core/Recording/AccessibilityTreeReader.swift:60— AccessibilityTreeReader'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: NonInteractiveAVPlayerView (LCOM4 4) Dayflow/Dayflow/Views/Onboarding/VideoLaunchView.swift:187— NonInteractiveAVPlayerView'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: Coordinator (LCOM4 4) Dayflow/Dayflow/Views/UI/Flow/FlowWebView.swift:114— Coordinator'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: OtherSettingsViewModel (LCOM4 4) Dayflow/Dayflow/Views/UI/Settings/OtherSettingsViewModel.swift:6— OtherSettingsViewModel'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 (10 corresponding lines) · ×10
Edited copy of a member (10 corresponding lines) Dayflow/Dayflow/Core/AI/ChatToolExecutor.swift:266— Dayflow/Dayflow/Core/AI/ChatToolExecutor.swift:266-282 | tools/dayflow-cli/Sources/dayflow/DayBoundary.swift:40-49 — 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) Dayflow/Dayflow/Core/PrivacyShield/PIIText.swift:200— Dayflow/Dayflow/Core/PrivacyShield/PIIText.swift:200-209 | Dayflow/Dayflow/Core/PrivacyShield/PIIText.swift:212-222 — 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) Dayflow/Dayflow/Core/PrivacyShield/PIIText.swift:275— Dayflow/Dayflow/Core/PrivacyShield/PIIText.swift:275-284 | Dayflow/Dayflow/Core/PrivacyShield/PIIText.swift:287-297 — 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) Dayflow/Dayflow/Views/UI/TimelineReviewChrome.swift:133— Dayflow/Dayflow/Views/UI/TimelineReviewChrome.swift:133-145 | Dayflow/Dayflow/Views/UI/TimelineReviewChrome.swift:151-160 — 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) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+DashboardStreaming.swift:418— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+DashboardStreaming.swift:418-430 | Dayflow/Dayflow/Utilities/GeminiAPIHelper.swift:233-242 — 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) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyFocusHeatmapSection.swift:172— Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyFocusHeatmapSection.swift:172-181 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyWorkflowSection.swift:133-142 — 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) Dayflow/Dayflow/Core/Weekly/WeeklyDonutBuilder.swift:154— Dayflow/Dayflow/Core/Weekly/WeeklyDonutBuilder.swift:154-163 | Dayflow/Dayflow/Core/Weekly/WeeklyOverviewBuilder.swift:428-437 — 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) Dayflow/Dayflow/Core/Notifications/NotificationService.swift:386— Dayflow/Dayflow/Core/Notifications/NotificationService.swift:386-395 | Dayflow/Dayflow/System/StatusBarController.swift:248-257 — 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) Dayflow/Dayflow/Views/Components/DaySummaryStats.swift:181— Dayflow/Dayflow/Views/Components/DaySummaryStats.swift:181-190 | Dayflow/Dayflow/Views/Components/DaySummaryStats.swift:228-239 — 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) Dayflow/Dayflow/Core/AI/ChatPromptBuilder.swift:550— Dayflow/Dayflow/Core/AI/ChatPromptBuilder.swift:550-559 | Dayflow/Dayflow/Core/AI/DailyRecapGenerator.swift:624-634 — 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.
Duplicated block (14 lines × 2) Dayflow/Dayflow/Core/AI/ChatMetadataParser.swift:62— Dayflow/Dayflow/Core/AI/ChatMetadataParser.swift:62-75 | Dayflow/Dayflow/Core/AI/ChatMetadataParser.swift:84-97 — 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 `Dayflow/Dayflow/Core/AI/ChatMetadataParser.swift:62` 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 (14 lines × 2) Dayflow/Dayflow/Core/AI/ChatService.swift:500— Dayflow/Dayflow/Core/AI/ChatService.swift:500-513 | Dayflow/Dayflow/Core/AI/ChatService.swift:518-531 — 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 `Dayflow/Dayflow/Core/AI/ChatService.swift:500` 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 (14 lines × 2) Dayflow/Dayflow/Core/AI/ClaudePromptDefaults.swift:30— Dayflow/Dayflow/Core/AI/ClaudePromptDefaults.swift:30-43 | Dayflow/Dayflow/Core/AI/CodexPromptPreferences.swift:38-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 `Dayflow/Dayflow/Core/AI/ClaudePromptDefaults.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 (14 lines × 2) Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:322— Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:322-335 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:851-864 — 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 `Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:322` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Networking.swift:238— Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Networking.swift:238-251 | Dayflow/Dayflow/Core/AI/OllamaProvider.swift:217-230 — 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 `Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Networking.swift:238` 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 (14 lines × 2) Dayflow/Dayflow/Core/AI/LLMService.swift:1024— Dayflow/Dayflow/Core/AI/LLMService.swift:1024-1037 | Dayflow/Dayflow/Core/AI/LLMService.swift:1135-1148 — 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 `Dayflow/Dayflow/Core/AI/LLMService.swift:1024` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) Dayflow/Dayflow/Views/Components/DayGoalHeader.swift:300— Dayflow/Dayflow/Views/Components/DayGoalHeader.swift:300-313 | Dayflow/Dayflow/Views/Components/DayGoalHeader.swift:318-331 — 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 `Dayflow/Dayflow/Views/Components/DayGoalHeader.swift:300` 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, `Dayflow/Dayflow/Views/Components/DayGoalHeader.swift:332` calls `scaleEffect` and `Dayflow/Dayflow/Views/Components/DayGoalHeader.swift:314` 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 (14 lines × 2) Dayflow/Dayflow/Views/Onboarding/ChatCLIDetectionViews.swift:158— Dayflow/Dayflow/Views/Onboarding/ChatCLIDetectionViews.swift:158-171 | Dayflow/Dayflow/Views/Onboarding/ChatCLITestView.swift:41-54 — 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 `Dayflow/Dayflow/Views/Onboarding/ChatCLIDetectionViews.swift:158` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) Dayflow/Dayflow/Views/UI/DailyWorkflowComputation.swift:295— Dayflow/Dayflow/Views/UI/DailyWorkflowComputation.swift:295-308 | Dayflow/Dayflow/Views/UI/DailyWorkflowComputation.swift:335-348 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Views/UI/DailyWorkflowComputation.swift:295` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyApplicationInteractionsSection.swift:191— Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyApplicationInteractionsSection.swift:191-204 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyApplicationInteractionsSection.swift:238-251 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyApplicationInteractionsSection.swift:191` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×8
Edited copy of a member (16 corresponding lines) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:702— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:702-721 | Dayflow/Dayflow/Core/AI/TimelineOutputSupport.swift:115-130 — 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) Dayflow/Dayflow/Views/UI/SurveyPromptCard.swift:238— Dayflow/Dayflow/Views/UI/SurveyPromptCard.swift:238-256 | Dayflow/Dayflow/Views/UI/SurveyPromptCard.swift:258-273 — 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) Dayflow/Dayflow/Views/UI/BugReportView.swift:92— Dayflow/Dayflow/Views/UI/BugReportView.swift:92-107 | Dayflow/Dayflow/Views/UI/Flow/FlowView.swift:100-121 — 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) Dayflow/Dayflow/Core/Recording/StorageManager+Chunks.swift:77— Dayflow/Dayflow/Core/Recording/StorageManager+Chunks.swift:77-92 | Dayflow/Dayflow/Core/Recording/StorageManager+Screenshots.swift:119-140 — 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) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyFocusHeatmapSection.swift:48— Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyFocusHeatmapSection.swift:48-65 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyWorkflowSection.swift:18-33 — 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) Dayflow/Dayflow/Core/AI/DailyRecapGenerator.swift:332— Dayflow/Dayflow/Core/AI/DailyRecapGenerator.swift:332-354 | Dayflow/Dayflow/Core/AI/DailyRecapScheduler.swift:398-413 — 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) Dayflow/Dayflow/Views/UI/MainView/Actions.swift:6— Dayflow/Dayflow/Views/UI/MainView/Actions.swift:6-21 | Dayflow/Dayflow/Views/UI/MainView/Actions.swift:23-39 — 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) Dayflow/Dayflow/Views/UI/DailyStandupComponents.swift:273— Dayflow/Dayflow/Views/UI/DailyStandupComponents.swift:273-292 | Dayflow/Dayflow/Views/UI/DailyStandupComponents.swift:294-309 — 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 (14 corresponding lines) · ×8
Edited copy of a member (14 corresponding lines) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:723— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:723-742 | Dayflow/Dayflow/Core/AI/TimelineOutputSupport.swift:132-145 — 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) Dayflow/Dayflow/Views/Components/CategoryDonutChart.swift:171— Dayflow/Dayflow/Views/Components/CategoryDonutChart.swift:171-185 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyDonutSection.swift:194-207 — 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) Dayflow/Dayflow/Views/UI/TimelineReviewChrome.swift:176— Dayflow/Dayflow/Views/UI/TimelineReviewChrome.swift:176-189 | Dayflow/Dayflow/Views/UI/TimelineReviewChrome.swift:191-204 — 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) Dayflow/Dayflow/Core/AI/ClaudeStrictJSONParser.swift:46— Dayflow/Dayflow/Core/AI/ClaudeStrictJSONParser.swift:46-59 | Dayflow/Dayflow/Core/AI/ClaudeStrictJSONParser.swift:61-76 — 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) Dayflow/Dayflow/Views/UI/DailyStandupComponents.swift:382— Dayflow/Dayflow/Views/UI/DailyStandupComponents.swift:382-397 | Dayflow/Dayflow/Views/UI/DailyStandupComponents.swift:413-426 — 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) Dayflow/Dayflow/Core/Recording/StorageManager+Maintenance.swift:415— Dayflow/Dayflow/Core/Recording/StorageManager+Maintenance.swift:415-428 | Dayflow/Dayflow/Core/Recording/TimelapseStorageManager.swift:31-44 — 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) Dayflow/Dayflow/Core/AI/ClaudeTranscriptionInputBuilder.swift:173— Dayflow/Dayflow/Core/AI/ClaudeTranscriptionInputBuilder.swift:173-187 | Dayflow/Dayflow/Utilities/GeminiAPIHelper.swift:42-55 — 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) Dayflow/Dayflow/Views/UI/SupportChatWebView.swift:600— Dayflow/Dayflow/Views/UI/SupportChatWebView.swift:600-615 | Dayflow/Dayflow/Views/UI/WhatsNewView.swift:1496-1509 — 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 (5 corresponding lines) · ×8
Edited copy of a member (5 corresponding lines) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+DashboardTools.swift:4— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+DashboardTools.swift:4-9 | Dayflow/Dayflow/Core/AI/GeminiDirectProvider+DashboardTools.swift:11-15 — 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) Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketStyle.swift:185— Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketStyle.swift:185-189 | Dayflow/Dayflow/Views/UI/Settings/SettingsComponents.swift:297-302 — 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) Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift:634— Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift:634-638 | Dayflow/Dayflow/Views/Onboarding/SetupContinueButton.swift:19-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.
Edited copy of a member (5 corresponding lines) Dayflow/Dayflow/Views/UI/Flow/FlowEnterView.swift:218— Dayflow/Dayflow/Views/UI/Flow/FlowEnterView.swift:218-222 | Dayflow/Dayflow/Views/UI/Flow/FlowOverlayView.swift:328-332 — 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) Dayflow/Dayflow/Views/Components/DayGoalFlowView.swift:312— Dayflow/Dayflow/Views/Components/DayGoalFlowView.swift:312-316 | Dayflow/Dayflow/Views/Components/DaySummaryView.swift:598-604 — 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) Dayflow/Dayflow/Core/AI/CodexProvider+ActivityCards.swift:158— Dayflow/Dayflow/Core/AI/CodexProvider+ActivityCards.swift:158-162 | Dayflow/Dayflow/Core/AI/CodexProvider+Transcription.swift:6-10 — 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) Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefIntroView.swift:102— Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefIntroView.swift:102-106 | Dayflow/Dayflow/Views/UI/WhatsNewView.swift:1415-1419 — 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) Dayflow/Dayflow/Views/UI/Settings/SettingsAccountSection.swift:967— Dayflow/Dayflow/Views/UI/Settings/SettingsAccountSection.swift:967-972 | Dayflow/Dayflow/Views/UI/Settings/SettingsComponents.swift:401-405 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×7
Edited copy of a member (27 corresponding lines) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyFocusHeatmapSection.swift:183— Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyFocusHeatmapSection.swift:183-209 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyWorkflowSection.swift:144-177 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Prompting.swift:4— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Prompting.swift:4-30 | Dayflow/Dayflow/Core/AI/TimelineOutputSupport.swift:49-77 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) Dayflow/Dayflow/Core/Recording/StorageManager+TimelineReview.swift:210— Dayflow/Dayflow/Core/Recording/StorageManager+TimelineReview.swift:210-240 | Dayflow/Dayflow/Views/UI/TimelineReviewOverlay.swift:642-668 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) Dayflow/Dayflow/System/DayflowAuthManager.swift:632— Dayflow/Dayflow/System/DayflowAuthManager.swift:632-658 | Dayflow/Dayflow/System/DayflowAuthManager.swift:734-763 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) Dayflow/Dayflow/Core/AgentAccess/CodexMCPRegistration.swift:62— Dayflow/Dayflow/Core/AgentAccess/CodexMCPRegistration.swift:62-91 | Dayflow/Dayflow/Core/AgentAccess/CodexMCPRegistration.swift:93-119 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) Dayflow/Dayflow/Views/UI/Settings/SettingsAgentAccessTabView.swift:369— Dayflow/Dayflow/Views/UI/Settings/SettingsAgentAccessTabView.swift:369-396 | Dayflow/Dayflow/Views/UI/Settings/SettingsAgentAccessTabView.swift:398-424 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.swift:258— Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.swift:258-291 | Dayflow/Dayflow/Core/AI/ClaudeProvider+Transcription.swift:178-204 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×7
Edited copy of a member (15 corresponding lines) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyFocusHeatmapSection.swift:211— Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyFocusHeatmapSection.swift:211-226 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyWorkflowSection.swift:242-256 — 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) Dayflow/Dayflow/Views/UI/ProgressRingView.swift:408— Dayflow/Dayflow/Views/UI/ProgressRingView.swift:408-422 | Dayflow/Dayflow/Views/UI/ProgressRingView.swift:446-461 — 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) Dayflow/Dayflow/Views/UI/CanvasTimelineDataView.swift:803— Dayflow/Dayflow/Views/UI/CanvasTimelineDataView.swift:803-817 | Dayflow/Dayflow/Views/UI/MainView/WeekTimelineGridView.swift:810-824 — 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) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyContextChartsSection.swift:105— Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyContextChartsSection.swift:105-121 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyContextShiftComparisonSection.swift:75-89 — 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) Dayflow/Dayflow/Views/Components/DaySummaryView.swift:792— Dayflow/Dayflow/Views/Components/DaySummaryView.swift:792-807 | Dayflow/Dayflow/Views/Components/DaySummaryView.swift:809-823 — 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) Dayflow/Dayflow/Views/UI/PausePillView.swift:205— Dayflow/Dayflow/Views/UI/PausePillView.swift:205-219 | Dayflow/Dayflow/Views/UI/PausePillView.swift:229-243 — 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) Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeVideoIntroStep.swift:159— Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeVideoIntroStep.swift:159-173 | Dayflow/Dayflow/Views/Onboarding/VideoLaunchView.swift:140-161 — 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 (8 corresponding lines) · ×7
Edited copy of a member (8 corresponding lines) Dayflow/Dayflow/Core/DailyBrief/DailyBriefStore.swift:1130— Dayflow/Dayflow/Core/DailyBrief/DailyBriefStore.swift:1130-1139 | Dayflow/Dayflow/Core/DailyBrief/DailyBriefStore.swift:1226-1233 — 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) Dayflow/Dayflow/System/DayflowAuthManager.swift:551— Dayflow/Dayflow/System/DayflowAuthManager.swift:551-558 | Dayflow/Dayflow/System/DayflowAuthManager.swift:562-569 — 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) Dayflow/Dayflow/Views/UI/MainView/Support.swift:215— Dayflow/Dayflow/Views/UI/MainView/Support.swift:215-222 | Dayflow/Dayflow/Views/UI/MainView/Support.swift:224-231 — 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) Dayflow/Dayflow/Core/Weekly/WeeklyDonutBuilder.swift:145— Dayflow/Dayflow/Core/Weekly/WeeklyDonutBuilder.swift:145-152 | Dayflow/Dayflow/Core/Weekly/WeeklyOverviewBuilder.swift:439-451 — 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) Dayflow/Dayflow/Core/DailyBrief/DailyBriefGenerator.swift:869— Dayflow/Dayflow/Core/DailyBrief/DailyBriefGenerator.swift:869-876 | Dayflow/Dayflow/Core/DailyBrief/DailyBriefGenerator.swift:1070-1077 — 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) Dayflow/Dayflow/Core/AI/CodexPromptPreferences.swift:12— Dayflow/Dayflow/Core/AI/CodexPromptPreferences.swift:12-23 | Dayflow/Dayflow/Core/AI/ClaudePromptDefaults.swift:10-17 — 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) Dayflow/Dayflow/Views/UI/Flow/FlowWebView.swift:502— Dayflow/Dayflow/Views/UI/Flow/FlowWebView.swift:502-509 | Dayflow/Dayflow/Views/UI/SupportChatWebView.swift:631-639 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×7
Edited copy of a member (6 corresponding lines) Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:210— Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:210-220 | Dayflow/Dayflow/Views/UI/Agents/AgentThreadOpener.swift:210-215 — 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) Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketDaybreakHeader.swift:235— Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketDaybreakHeader.swift:235-240 | Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketSummaryCard.swift:270-275 — 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) Dayflow/Dayflow/Core/Weekly/WeeklyDashboardBuilder+HeatmapWorkflow.swift:523— Dayflow/Dayflow/Core/Weekly/WeeklyDashboardBuilder+HeatmapWorkflow.swift:523-531 | Dayflow/Dayflow/Core/Weekly/WeeklyOverviewBuilder.swift:504-509 — 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) Dayflow/Dayflow/Core/Weekly/WeeklyDashboardBuilder.swift:513— Dayflow/Dayflow/Core/Weekly/WeeklyDashboardBuilder.swift:513-520 | Dayflow/Dayflow/Views/UI/Agents/AgentThreadOpener.swift:232-237 — 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) Dayflow/Dayflow/Models/DayGoalPlan.swift:47— Dayflow/Dayflow/Models/DayGoalPlan.swift:47-52 | Dayflow/Dayflow/Views/Components/CategoryDonutChart.swift:26-31 — 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) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyFocusHeatmapSection.swift:75— Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyFocusHeatmapSection.swift:75-80 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyWorkflowSection.swift:71-76 — 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) Dayflow/Dayflow/Core/Recording/BrowserPrivacyPreferences.swift:49— Dayflow/Dayflow/Core/Recording/BrowserPrivacyPreferences.swift:49-54 | Dayflow/Dayflow/Core/Recording/RecordingPrivacyPreferences.swift:78-83 — 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 (21 corresponding lines) · ×6
Edited copy of a member (21 corresponding lines) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Upload.swift:129— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Upload.swift:129-152 | Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Upload.swift:249-269 — 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) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyDonutSection.swift:44— Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyDonutSection.swift:44-73 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyTreemapSection.swift:36-56 — 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) Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Summaries.swift:42— Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Summaries.swift:42-62 | Dayflow/Dayflow/Core/AI/OllamaProvider+Summaries.swift:260-290 — 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) Dayflow/Dayflow/Views/UI/Agents/AgentsOverviewView.swift:138— Dayflow/Dayflow/Views/UI/Agents/AgentsOverviewView.swift:138-164 | Dayflow/Dayflow/Views/UI/Agents/AgentsView.swift:234-254 — 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) Dayflow/Dayflow/Views/UI/Weekly/WeeklyView.swift:717— Dayflow/Dayflow/Views/UI/Weekly/WeeklyView.swift:717-741 | Dayflow/Dayflow/Views/UI/Weekly/WeeklyView.swift:822-842 — 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) Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:277— Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:277-297 | Dayflow/Dayflow/Core/AgentAccess/CodexMCPRegistration.swift:238-258 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×6
Edited copy of a member (7 corresponding lines) Dayflow/Dayflow/Core/Recording/BrowserPrivacyPreferences.swift:56— Dayflow/Dayflow/Core/Recording/BrowserPrivacyPreferences.swift:56-64 | Dayflow/Dayflow/Core/Recording/RecordingPrivacyPreferences.swift:239-245 — 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) Dayflow/Dayflow/Views/UI/CanvasTimelineDataView.swift:783— Dayflow/Dayflow/Views/UI/CanvasTimelineDataView.swift:783-789 | Dayflow/Dayflow/Views/UI/MainView/WeekTimelineGridView.swift:779-785 — 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) Dayflow/Dayflow/Core/DailyBrief/DailyBriefGenerator.swift:762— Dayflow/Dayflow/Core/DailyBrief/DailyBriefGenerator.swift:762-771 | tools/dayflow-cli/Sources/dayflow/MCPServer.swift:96-102 — 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) Dayflow/Dayflow/Views/UI/TimelineReviewPlaybackModels.swift:80— Dayflow/Dayflow/Views/UI/TimelineReviewPlaybackModels.swift:80-86 | Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:552-559 — 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) Dayflow/Dayflow/Views/UI/Flow/FlowWebView.swift:511— Dayflow/Dayflow/Views/UI/Flow/FlowWebView.swift:511-517 | Dayflow/Dayflow/Views/UI/SupportChatWebView.swift:641-648 — 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) Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:283— Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:283-289 | Dayflow/Dayflow/Views/UI/TimelineReviewChrome.swift:33-39 — 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.
Duplicated block (11 lines × 3) Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:420— Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:420-430 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:610-620 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:778-788 — 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 `Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:420` 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 (11 lines × 3) Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Frames.swift:310— Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Frames.swift:310-320 | Dayflow/Dayflow/Core/AI/OllamaProvider+Transcription.swift:196-206 | Dayflow/Dayflow/Core/AI/OllamaProvider+Transcription.swift:279-289 — 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 `Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Frames.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Dayflow/Dayflow/Core/AI/OllamaProvider+Transcription.swift:192` calls `max` and `Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Frames.swift:308` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 3) Dayflow/Dayflow/Core/Flow/FlowEarlyBirdController.swift:146— Dayflow/Dayflow/Core/Flow/FlowEarlyBirdController.swift:146-156 | Dayflow/Dayflow/Core/Flow/FlowOverlayController.swift:113-123 | Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefMenuBarNotice.swift:140-150 — 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 `Dayflow/Dayflow/Core/Flow/FlowEarlyBirdController.swift:146` 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 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 (11 lines × 3) Dayflow/Dayflow/Core/Recording/ScreenRecorder.swift:960— Dayflow/Dayflow/Core/Recording/ScreenRecorder.swift:960-970 | Dayflow/Dayflow/Core/Recording/ScreenRecorder.swift:1001-1011 | Dayflow/Dayflow/Core/Recording/ScreenRecorder.swift:1042-1052 — 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 `Dayflow/Dayflow/Core/Recording/ScreenRecorder.swift:960` 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.
Duplicated block (11 lines × 3) Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:807— Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:807-817 | Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeFlow.swift:212-222 | Dayflow/Dayflow/Views/UI/Agents/AgentsView.swift:167-177 — 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 `Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:807` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `8` in one and `10` 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 (11 lines × 3) Dayflow/Dayflow/Views/UI/Settings/SettingsAccountSection.swift:157— Dayflow/Dayflow/Views/UI/Settings/SettingsAccountSection.swift:157-167 | Dayflow/Dayflow/Views/UI/Settings/SettingsBrowserPrivacySection.swift:86-96 | Dayflow/Dayflow/Views/UI/Settings/SettingsBrowserPrivacySection.swift:114-124 — 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 `Dayflow/Dayflow/Views/UI/Settings/SettingsAccountSection.swift:157` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `alignment` to `.trailing` in one and `.leading` 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.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×5
Edited copy of a member (22 corresponding lines) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyComponents.swift:443— Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyComponents.swift:443-464 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyComponents.swift:466-492 — 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) Dayflow/Dayflow/Views/UI/CanvasTimelineDataView.swift:289— Dayflow/Dayflow/Views/UI/CanvasTimelineDataView.swift:289-319 | Dayflow/Dayflow/Views/UI/MainView/WeekTimelineGridView.swift:354-375 — 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) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyContextChartsSection.swift:123— Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyContextChartsSection.swift:123-144 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyContextShiftComparisonSection.swift:91-112 — 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) Dayflow/Dayflow/Views/Components/CategoryPickerOverlay.swift:212— Dayflow/Dayflow/Views/Components/CategoryPickerOverlay.swift:212-236 | Dayflow/Dayflow/Views/UI/MainView/TabFilterBar.swift:77-98 — 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) Dayflow/Dayflow/Core/Recording/StorageFileManagerExtensions.swift:4— Dayflow/Dayflow/Core/Recording/StorageFileManagerExtensions.swift:4-29 | Dayflow/Dayflow/Views/UI/Settings/StorageSettingsViewModel.swift:239-260 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×5
Edited copy of a member (17 corresponding lines) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyApplicationInteractionsSection.swift:188— Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyApplicationInteractionsSection.swift:188-204 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyApplicationInteractionsSection.swift:235-251 — 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) Dayflow/Dayflow/Views/Components/CategoryDonutChart.swift:187— Dayflow/Dayflow/Views/Components/CategoryDonutChart.swift:187-203 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyDonutSection.swift:216-233 — 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) Dayflow/Dayflow/Core/Surveys/SurveyEventReporter.swift:94— Dayflow/Dayflow/Core/Surveys/SurveyEventReporter.swift:94-110 | Dayflow/Dayflow/Views/UI/WhatsNewView.swift:1231-1247 — 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) Dayflow/Dayflow/Views/UI/CanvasTimelineDataView.swift:833— Dayflow/Dayflow/Views/UI/CanvasTimelineDataView.swift:833-850 | Dayflow/Dayflow/Views/UI/MainView/WeekTimelineGridView.swift:855-871 — 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) Dayflow/Dayflow/Core/AI/ChatService.swift:497— Dayflow/Dayflow/Core/AI/ChatService.swift:497-513 | Dayflow/Dayflow/Core/AI/ChatService.swift:515-531 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×5
Edited copy of a member (11 corresponding lines) Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefPageView.swift:440— Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefPageView.swift:440-450 | Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefPageView.swift:453-464 — 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) Dayflow/Dayflow/Views/UI/CanvasTimelineDataView.swift:112— Dayflow/Dayflow/Views/UI/CanvasTimelineDataView.swift:112-122 | Dayflow/Dayflow/Views/UI/MainView/WeekTimelineGridView.swift:694-710 — 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) Dayflow/Dayflow/Core/AI/LLMProviderRouting.swift:35— Dayflow/Dayflow/Core/AI/LLMProviderRouting.swift:35-45 | Dayflow/Dayflow/Core/AI/LLMProviderRouting.swift:47-57 — 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) Dayflow/Dayflow/Views/UI/SupportChatWebView.swift:617— Dayflow/Dayflow/Views/UI/SupportChatWebView.swift:617-629 | Dayflow/Dayflow/Views/UI/WhatsNewView.swift:1513-1523 — 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) Dayflow/Dayflow/Core/Recording/StorageManager+DailyStandup.swift:50— Dayflow/Dayflow/Core/Recording/StorageManager+DailyStandup.swift:50-61 | Dayflow/Dayflow/Core/Recording/StorageManager+Screenshots.swift:58-68 — 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.
Duplicated block (15 lines × 2) Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:417— Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:417-431 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:607-621 — 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 `Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:417` 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 (15 lines × 2) Dayflow/Dayflow/Core/AI/LLMLogger.swift:39— Dayflow/Dayflow/Core/AI/LLMLogger.swift:39-53 | Dayflow/Dayflow/Core/AI/LLMLogger.swift:69-83 — 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 `Dayflow/Dayflow/Core/AI/LLMLogger.swift:39` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `http` to `LLMHTTPInfo` in one and `LLMHTTPInfo?` 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 (15 lines × 2) Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:833— Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:833-847 | Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:891-905 — 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 `Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:833` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) Dayflow/Dayflow/Views/Onboarding/LLMProviderSetupCLI.swift:30— Dayflow/Dayflow/Views/Onboarding/LLMProviderSetupCLI.swift:30-44 | Dayflow/Dayflow/Views/Onboarding/LLMProviderSetupCLI.swift:88-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 (15 lines × 2) Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefSections.swift:312— Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefSections.swift:312-326 | Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefSections.swift:603-617 — 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 `Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefSections.swift:312` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:383— Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:383-392 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:563-572 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:757-766 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (10 lines × 3) Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:609— Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:609-618 | Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:682-691 | Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeRoleSelectionStep.swift:27-36 — before extracting anything, compare `Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift` and `Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeRoleSelectionStep.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:609` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:619` calls `lineSpacing` and `Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:692` 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 (10 lines × 3) Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefPageView.swift:850— Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefPageView.swift:850-859 | Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefSections.swift:315-324 | Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefSections.swift:606-615 — 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 `Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefPageView.swift:850` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) Dayflow/Dayflow/Views/UI/Settings/SettingsReferralProgramCard.swift:267— Dayflow/Dayflow/Views/UI/Settings/SettingsReferralProgramCard.swift:267-276 | Dayflow/Dayflow/Views/UI/Settings/SettingsReferralProgramCard.swift:299-308 | Dayflow/Dayflow/Views/UI/Settings/SettingsReferralProgramCard.swift:338-347 — 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 `Dayflow/Dayflow/Views/UI/Settings/SettingsReferralProgramCard.swift:267` 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, `Dayflow/Dayflow/Views/UI/Settings/SettingsReferralProgramCard.swift:277` calls `textSelection` and `Dayflow/Dayflow/Views/UI/Settings/SettingsReferralProgramCard.swift:309` 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 (10 lines × 3) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyApplicationInteractionsSection.swift:514— Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyApplicationInteractionsSection.swift:514-523 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyInteractionGraphModels.swift:8-17 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyInteractionGraphModels.swift:19-28 — 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, `Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyInteractionGraphModels.swift:31` calls `Color` and `Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyApplicationInteractionsSection.swift:524` 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 lines × 3) Dayflow/Dayflow/Views/Components/LongestFocusCard.swift:259— Dayflow/Dayflow/Views/Components/LongestFocusCard.swift:259-264 | Dayflow/Dayflow/Views/Components/LongestFocusCard.swift:266-271 | Dayflow/Dayflow/Views/Components/LongestFocusCard.swift:273-278 — 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 `Dayflow/Dayflow/Views/Components/LongestFocusCard.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.
Duplicated block (6 lines × 3) Dayflow/Dayflow/Views/UI/Agents/AgentsBriefingView.swift:77— Dayflow/Dayflow/Views/UI/Agents/AgentsBriefingView.swift:77-82 | Dayflow/Dayflow/Views/UI/Agents/AgentsCardsView.swift:104-109 | Dayflow/Dayflow/Views/UI/Agents/AgentsCardsView.swift:128-133 — 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 `Dayflow/Dayflow/Views/UI/Agents/AgentsBriefingView.swift:77` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) Dayflow/Dayflow/Utilities/DayflowTheme.swift:242— Dayflow/Dayflow/Utilities/DayflowTheme.swift:242-247 | Dayflow/Dayflow/Utilities/DayflowTheme.swift:252-257 | Dayflow/Dayflow/Views/Onboarding/OnboardingBackdrop.swift:17-22 — 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 `Dayflow/Dayflow/Utilities/DayflowTheme.swift:242` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeChooseProviderStep.swift:320— Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeChooseProviderStep.swift:320-325 | Dayflow/Dayflow/Views/UI/Agents/AgentsBriefingView.swift:76-81 | Dayflow/Dayflow/Views/UI/Agents/AgentsCardsView.swift:103-108 — 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 `Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeChooseProviderStep.swift:320` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) tools/dayflow-cli/Sources/dayflow/MCPServer.swift:380— tools/dayflow-cli/Sources/dayflow/MCPServer.swift:380-385 | tools/dayflow-cli/Sources/dayflow/MCPServer.swift:436-441 | tools/dayflow-cli/Sources/dayflow/main.swift:287-292 — 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 `tools/dayflow-cli/Sources/dayflow/MCPServer.swift:380` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×4
Edited copy of a member (25 corresponding lines) Dayflow/Dayflow/Views/Onboarding/Prototype/DayflowProOnboardingSignIn.swift:262— Dayflow/Dayflow/Views/Onboarding/Prototype/DayflowProOnboardingSignIn.swift:262-286 | Dayflow/Dayflow/Views/Onboarding/Prototype/DayflowProOnboardingSignIn.swift:325-349 — 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.
Edited copy of a member (25 corresponding lines) Dayflow/Dayflow/Core/AI/ClaudeStrictJSONParser.swift:83— Dayflow/Dayflow/Core/AI/ClaudeStrictJSONParser.swift:83-109 | Dayflow/Dayflow/Core/AI/ClaudeStrictJSONParser.swift:112-136 — 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.
Edited copy of a member (25 corresponding lines) Dayflow/Dayflow/Views/Onboarding/Prototype/DayflowProOnboardingSignIn.swift:512— Dayflow/Dayflow/Views/Onboarding/Prototype/DayflowProOnboardingSignIn.swift:512-539 | Dayflow/Dayflow/Views/Onboarding/Prototype/DayflowProOnboardingSignIn.swift:541-565 — 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.
Edited copy of a member (25 corresponding lines) Dayflow/Dayflow/Core/AI/LLMService.swift:1162— Dayflow/Dayflow/Core/AI/LLMService.swift:1162-1186 | Dayflow/Dayflow/Core/Analysis/IdleBatchClassifier.swift:110-135 — 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· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×4
Members sharing a duplicated core (5 members, 50+ identical tokens) Dayflow/Dayflow/Core/AI/OllamaProvider+Summaries.swift:81— Dayflow/Dayflow/Core/AI/OllamaProvider+Summaries.swift:81-195 | Dayflow/Dayflow/Core/AI/OllamaProvider+Summaries.swift:197-258 | Dayflow/Dayflow/Core/AI/OllamaProvider+Summaries.swift:292-387 | Dayflow/Dayflow/Core/AI/OllamaProvider+Summaries.swift:389-506 | Dayflow/Dayflow/Core/AI/OllamaProvider+Transcription.swift:299-450 — 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.
Members sharing a duplicated core (5 members, 50+ identical tokens) Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:387— Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:387-435 | Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:476-553 | Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:555-617 | Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:803-847 | Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:851-905 — 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.
Members sharing a duplicated core (5 members, 50+ identical tokens) Dayflow/Dayflow/Views/Components/CategoryPickerOverlay.swift:256— Dayflow/Dayflow/Views/Components/CategoryPickerOverlay.swift:256-282 | Dayflow/Dayflow/Views/Components/DayCategorySelectionEditor.swift:111-137 | Dayflow/Dayflow/Views/Components/DayGoalSetupComponents.swift:359-382 | Dayflow/Dayflow/Views/UI/ChatStylesAndDebug.swift:132-154 | Dayflow/Dayflow/Views/UI/Settings/SettingsBrowserPrivacySection.swift:184-203 — 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.
Members sharing a duplicated core (5 members, 50+ identical tokens) Dayflow/Dayflow/Views/UI/MainView/ActivityCard.swift:562— Dayflow/Dayflow/Views/UI/MainView/ActivityCard.swift:562-637 | Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:162-219 | Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:220-275 | Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:613-839 | Dayflow/Dayflow/Views/UI/VideoThumbnailView.swift:83-137 — 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 (23 corresponding lines) · ×4
Edited copy of a member (23 corresponding lines) Dayflow/Dayflow/Views/UI/Settings/SettingsAccountSection.swift:1027— Dayflow/Dayflow/Views/UI/Settings/SettingsAccountSection.swift:1027-1049 | Dayflow/Dayflow/Views/UI/Settings/SettingsAccountSection.swift:1057-1079 — 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) Dayflow/Dayflow/Core/Recording/StorageManager+TimelineReview.swift:242— Dayflow/Dayflow/Core/Recording/StorageManager+TimelineReview.swift:242-271 | Dayflow/Dayflow/Views/UI/TimelineReviewOverlay.swift:670-692 — 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) Dayflow/Dayflow/Views/UI/Settings/SettingsComponents.swift:100— Dayflow/Dayflow/Views/UI/Settings/SettingsComponents.swift:100-122 | Dayflow/Dayflow/Views/UI/Settings/SettingsComponents.swift:156-183 — 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) Dayflow/Dayflow/Core/Recording/StorageManager+Observations.swift:49— Dayflow/Dayflow/Core/Recording/StorageManager+Observations.swift:49-76 | Dayflow/Dayflow/Core/Recording/StorageManager+Observations.swift:129-151 — 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 (18 corresponding lines) · ×4
Edited copy of a member (18 corresponding lines) Dayflow/Dayflow/Views/UI/Agents/AgentThreadCardView.swift:415— Dayflow/Dayflow/Views/UI/Agents/AgentThreadCardView.swift:415-432 | Dayflow/Dayflow/Views/UI/Agents/AgentsBriefingView.swift:88-106 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) Dayflow/Dayflow/Views/UI/Settings/SettingsAccountSection.swift:745— Dayflow/Dayflow/Views/UI/Settings/SettingsAccountSection.swift:745-762 | Dayflow/Dayflow/Views/UI/Settings/SettingsAccountSection.swift:832-851 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) Dayflow/Dayflow/Core/AI/ClaudePromptDefaults.swift:30— Dayflow/Dayflow/Core/AI/ClaudePromptDefaults.swift:30-51 | Dayflow/Dayflow/Core/AI/CodexPromptPreferences.swift:38-55 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) Dayflow/Dayflow/Views/Onboarding/Prototype/DayflowProOnboardingSignIn.swift:567— Dayflow/Dayflow/Views/Onboarding/Prototype/DayflowProOnboardingSignIn.swift:567-586 | Dayflow/Dayflow/Views/Onboarding/Prototype/DayflowProOnboardingSignIn.swift:694-711 — 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 (13 corresponding lines) · ×4
Edited copy of a member (13 corresponding lines) Dayflow/Dayflow/Views/UI/Settings/SettingsAccountSection.swift:299— Dayflow/Dayflow/Views/UI/Settings/SettingsAccountSection.swift:299-311 | Dayflow/Dayflow/Views/UI/Settings/SettingsAccountSection.swift:313-325 — 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) Dayflow/Dayflow/Core/Recording/StorageManager+Chunks.swift:12— Dayflow/Dayflow/Core/Recording/StorageManager+Chunks.swift:12-25 | Dayflow/Dayflow/Core/Recording/StorageManager+Chunks.swift:27-39 — 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) Dayflow/Dayflow/Core/Flow/FlowEarlyBirdController.swift:110— Dayflow/Dayflow/Core/Flow/FlowEarlyBirdController.swift:110-122 | Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefMenuBarNotice.swift:114-132 — 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) tools/dayflow-cli/Sources/dayflow/Queries.swift:89— tools/dayflow-cli/Sources/dayflow/Queries.swift:89-101 | tools/dayflow-cli/Sources/dayflow/Queries.swift:103-115 — 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 (4 corresponding lines) · ×4
Edited copy of a member (4 corresponding lines) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Logging.swift:58— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Logging.swift:58-61 | Dayflow/Dayflow/Core/AI/OllamaProvider.swift:95-98 — 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) Dayflow/Dayflow/Views/Components/DayGoalHeader.swift:847— Dayflow/Dayflow/Views/Components/DayGoalHeader.swift:847-850 | Dayflow/Dayflow/Views/Onboarding/Prototype/DayflowProOnboardingSignIn.swift:42-45 — 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) Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshowPlayback.swift:331— Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshowPlayback.swift:331-336 | Dayflow/Dayflow/Views/UI/TimelineReviewFrameLoading.swift:170-173 — 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) Dayflow/Dayflow/Core/AI/GeminiPromptPreferences.swift:31— Dayflow/Dayflow/Core/AI/GeminiPromptPreferences.swift:31-34 | Dayflow/Dayflow/Core/AI/OllamaPromptPreferences.swift:29-32 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (3 corresponding lines) · ×4
Edited copy of a member (3 corresponding lines) Dayflow/Dayflow/Menu/FlowMenuBarViews.swift:433— Dayflow/Dayflow/Menu/FlowMenuBarViews.swift:433-435 | Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketDaybreakHeader.swift:96-98 — 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) Dayflow/Dayflow/Views/UI/ChatScrollSupport.swift:250— Dayflow/Dayflow/Views/UI/ChatScrollSupport.swift:250-252 | Dayflow/Dayflow/Views/UI/MainView/WeekTimelineActivityCard.swift:6-8 — 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) Dayflow/Dayflow/Core/AI/ClaudeOutputValidator.swift:532— Dayflow/Dayflow/Core/AI/ClaudeOutputValidator.swift:532-534 | Dayflow/Dayflow/Core/AI/ClaudeTranscriptionInputBuilder.swift:494-501 — 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) Dayflow/Dayflow/Core/PrivacyShield/PIIText.swift:125— Dayflow/Dayflow/Core/PrivacyShield/PIIText.swift:125-129 | Dayflow/Dayflow/Core/Recording/AccessibilityLogCondenser.swift:324-326 — 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.
Duplicated block (13–14 lines × 2) Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:421— Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:421-433 | Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:601-614 — 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 `Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:421` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–14 lines × 2) Dayflow/Dayflow/Views/UI/CanvasTimelineDataView.swift:910— Dayflow/Dayflow/Views/UI/CanvasTimelineDataView.swift:910-923 | Dayflow/Dayflow/Views/UI/MainView/Layout+Panels.swift:193-205 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13–14 lines × 2) Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketDaybreakHeader.swift:107— Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketDaybreakHeader.swift:107-120 | Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketDaybreakHeader.swift:148-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. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketDaybreakHeader.swift:107` 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 (13–14 lines × 2) Dayflow/Dayflow/Views/UI/MainView/DateNavigationControls.swift:27— Dayflow/Dayflow/Views/UI/MainView/DateNavigationControls.swift:27-39 | Dayflow/Dayflow/Views/UI/MainView/DateNavigationControls.swift:63-76 — 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 `Dayflow/Dayflow/Views/UI/MainView/DateNavigationControls.swift:27` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12–13 lines × 2) Dayflow/Dayflow/Core/AI/DailyRecapGenerator.swift:318— Dayflow/Dayflow/Core/AI/DailyRecapGenerator.swift:318-330 | Dayflow/Dayflow/Core/AI/DailyRecapScheduler.swift:385-396 — 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 `Dayflow/Dayflow/Core/AI/DailyRecapGenerator.swift:318` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12–13 lines × 2) Dayflow/Dayflow/Views/Components/DayGoalSetupComponents.swift:370— Dayflow/Dayflow/Views/Components/DayGoalSetupComponents.swift:370-382 | Dayflow/Dayflow/Views/UI/ChatStylesAndDebug.swift:143-154 — 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 `Dayflow/Dayflow/Views/Components/DayGoalSetupComponents.swift:370` 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 (12–13 lines × 2) Dayflow/Dayflow/Views/UI/MainView/DateNavigationControls.swift:86— Dayflow/Dayflow/Views/UI/MainView/DateNavigationControls.swift:86-97 | Dayflow/Dayflow/Views/UI/MainView/Support.swift:197-209 — 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 (12–13 lines × 2) Dayflow/Dayflow/Views/UI/WhatsNewView.swift:491— Dayflow/Dayflow/Views/UI/WhatsNewView.swift:491-503 | Dayflow/Dayflow/Views/UI/WhatsNewView.swift:622-633 — 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 `Dayflow/Dayflow/Views/UI/WhatsNewView.swift:491` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–12 lines × 2) Dayflow/Dayflow/Core/AI/CodexProvider+Transcription.swift:98— Dayflow/Dayflow/Core/AI/CodexProvider+Transcription.swift:98-108 | Dayflow/Dayflow/Core/AI/CodexProvider+Transcription.swift:202-213 — 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 `Dayflow/Dayflow/Core/AI/CodexProvider+Transcription.swift:98` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11–12 lines × 2) Dayflow/Dayflow/Views/UI/MainView/ActivityCard.swift:568— Dayflow/Dayflow/Views/UI/MainView/ActivityCard.swift:568-578 | Dayflow/Dayflow/Views/UI/VideoThumbnailView.swift:93-104 — 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 `Dayflow/Dayflow/Views/UI/MainView/ActivityCard.swift:568` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–12 lines × 2) Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshowPlayback.swift:264— Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshowPlayback.swift:264-274 | Dayflow/Dayflow/Views/UI/TimelineReviewFrameLoading.swift:92-103 — 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 `Dayflow/Dayflow/Views/UI/TimelineReviewFrameLoading.swift:92` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–12 lines × 2) tools/dayflow-cli/Sources/dayflow/MCPServer.swift:432— tools/dayflow-cli/Sources/dayflow/MCPServer.swift:432-443 | tools/dayflow-cli/Sources/dayflow/main.swift:283-293 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `tools/dayflow-cli/Sources/dayflow/MCPServer.swift:432` 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 (7 lines × 3) Dayflow/Dayflow/Core/Recording/StorageManager+Maintenance.swift:60— Dayflow/Dayflow/Core/Recording/StorageManager+Maintenance.swift:60-66 | Dayflow/Dayflow/Core/Recording/StorageManager+Maintenance.swift:216-222 | Dayflow/Dayflow/Core/Recording/StorageManager+Maintenance.swift:257-263 — 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 `Dayflow/Dayflow/Core/Recording/StorageManager+Maintenance.swift:60` 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 × 3) Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:399— Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:399-405 | Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:512-520 | Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:575-583 — 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 `Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:399` 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 × 3) Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:419— Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:419-425 | Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:536-542 | Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:599-605 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7 lines × 3) Dayflow/Dayflow/Core/Weekly/WeeklyDashboardBuilder.swift:490— Dayflow/Dayflow/Core/Weekly/WeeklyDashboardBuilder.swift:490-497 | Dayflow/Dayflow/Core/Weekly/WeeklyDonutBuilder.swift:166-173 | Dayflow/Dayflow/Core/Weekly/WeeklyOverviewBuilder.swift:459-465 — before extracting anything, compare `Dayflow/Dayflow/Core/Weekly/WeeklyDonutBuilder.swift` and `Dayflow/Dayflow/Core/Weekly/WeeklyOverviewBuilder.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 66 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 `Dayflow/Dayflow/Core/Weekly/WeeklyDashboardBuilder.swift:490` 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.
No assertions: testWeeklyDashboardSnapshotIsSendableForBackgroundLoading Dayflow/DayflowTests/WeeklyDashboardBuilderTests.swift:29— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testLaunchPerformance Dayflow/DayflowUITests/DayflowUITests.swift:32— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testLaunch Dayflow/DayflowUITests/DayflowUITestsLaunchTests.swift:18— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
D4 · Code Duplication· Edited copy of a member (38 corresponding lines) · ×3
Edited copy of a member (38 corresponding lines) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:870— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:870-916 | Dayflow/Dayflow/Core/AI/TimelineOutputSupport.swift:247-284 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (38 corresponding lines) Dayflow/Dayflow/Core/Recording/StorageManager+Reprocessing.swift:6— Dayflow/Dayflow/Core/Recording/StorageManager+Reprocessing.swift:6-57 | Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:7-44 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (38 corresponding lines) Dayflow/Dayflow/Core/AI/ClaudeProvider+Prompts.swift:119— Dayflow/Dayflow/Core/AI/ClaudeProvider+Prompts.swift:119-156 | Dayflow/Dayflow/Core/AI/CodexProvider+Prompts.swift:83-127 — 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 (34 corresponding lines) · ×3
Edited copy of a member (34 corresponding lines) Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:719— Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:719-752 | Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:763-800 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (34 corresponding lines) Dayflow/Dayflow/Views/Components/ReferralSurveyView.swift:136— Dayflow/Dayflow/Views/Components/ReferralSurveyView.swift:136-169 | Dayflow/Dayflow/Views/UI/WhatsNewView.swift:469-506 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (34 corresponding lines) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+DashboardStreaming.swift:336— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+DashboardStreaming.swift:336-381 | Dayflow/Dayflow/Core/Flow/FlowDistractionAgent.swift:1293-1326 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×3
Edited copy of a member (26 corresponding lines) Dayflow/Dayflow/Views/Components/DaySummaryView.swift:614— Dayflow/Dayflow/Views/Components/DaySummaryView.swift:614-639 | Dayflow/Dayflow/Views/Components/DaySummaryView.swift:641-666 — 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) Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Networking.swift:130— Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Networking.swift:130-157 | Dayflow/Dayflow/Core/AI/OllamaProvider.swift:232-257 — 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) Dayflow/Dayflow/Core/AI/DailyRecapScheduler.swift:304— Dayflow/Dayflow/Core/AI/DailyRecapScheduler.swift:304-332 | Dayflow/Dayflow/Views/UI/DailyView+Workflow.swift:382-407 — 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 (19 corresponding lines) · ×3
Edited copy of a member (19 corresponding lines) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyContextChartsSection.swift:190— Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyContextChartsSection.swift:190-208 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyContextChartsSection.swift:494-514 — 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) Dayflow/Dayflow/System/DayflowAuthManager.swift:612— Dayflow/Dayflow/System/DayflowAuthManager.swift:612-630 | Dayflow/Dayflow/System/DayflowAuthManager.swift:660-679 — 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) Dayflow/Dayflow/Core/Weekly/WeeklyDashboardModels.swift:56— Dayflow/Dayflow/Core/Weekly/WeeklyDashboardModels.swift:56-74 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyTreemapModels.swift:44-66 — 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, 14+ corresponding lines) · ×3
Edited copies of one member (3 members, 14+ corresponding lines) Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Networking.swift:277— Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Networking.swift:277-290 | Dayflow/Dayflow/Core/AI/OllamaProvider+Transcription.swift:68-89 | Dayflow/Dayflow/Core/AI/TimelineOutputSupport.swift:7-30 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 14+ corresponding lines) Dayflow/Dayflow/Core/Recording/StorageManager+Screenshots.swift:103— Dayflow/Dayflow/Core/Recording/StorageManager+Screenshots.swift:103-117 | Dayflow/Dayflow/Core/Recording/StorageManager+Screenshots.swift:142-156 | Dayflow/Dayflow/Core/Recording/StorageManager+Screenshots.swift:158-171 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 14+ corresponding lines) Dayflow/Dayflow/Views/Components/DaySummaryView.swift:751— Dayflow/Dayflow/Views/Components/DaySummaryView.swift:751-766 | Dayflow/Dayflow/Views/Components/DaySummaryView.swift:825-838 | Dayflow/Dayflow/Views/Components/DaySummaryView.swift:840-855 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 4+ corresponding lines) · ×3
Edited copies of one member (4 members, 4+ corresponding lines) Dayflow/Dayflow/Core/Recording/RecordingPrivacyPlaceholder.swift:100— Dayflow/Dayflow/Core/Recording/RecordingPrivacyPlaceholder.swift:100-103 | Dayflow/Dayflow/Core/Weekly/WeeklyDashboardBuilder.swift:429-432 | Dayflow/Dayflow/Core/Weekly/WeeklyDonutBuilder.swift:183-186 | Dayflow/Dayflow/Core/Weekly/WeeklyOverviewBuilder.swift:453-456 — 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) Dayflow/Dayflow/Core/Weekly/WeeklyDashboardBuilder.swift:485— Dayflow/Dayflow/Core/Weekly/WeeklyDashboardBuilder.swift:485-488 | Dayflow/Dayflow/Core/Weekly/WeeklyDonutBuilder.swift:178-181 | Dayflow/Dayflow/Core/Weekly/WeeklyOverviewBuilder.swift:469-472 | Dayflow/Dayflow/Views/UI/DailyWorkflowComputation.swift:459-462 — 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) Dayflow/Dayflow/Core/AgentAccess/AgentClientRegistration.swift:63— Dayflow/Dayflow/Core/AgentAccess/AgentClientRegistration.swift:63-66 | Dayflow/Dayflow/Core/AgentAccess/AgentUsageTelemetryQueue.swift:68-71 | Dayflow/Dayflow/Core/PrivacyShield/PrivacyShieldModelStore.swift:37-40 | tools/dayflow-cli/Sources/dayflow/AgentUsageTelemetry.swift:55-58 — 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.
Duplicated block (29 lines × 2) Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.swift:176— Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.swift:176-204 | Dayflow/Dayflow/Core/AI/CodexProvider+Timeline.swift:190-218 — before extracting anything, compare `Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.swift` and `Dayflow/Dayflow/Core/AI/CodexProvider+Timeline.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 110 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 `Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.swift:176` 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 (29 lines × 2) Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:458— Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:458-486 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:816-844 — 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 `Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:458` 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 (29 lines × 2) Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:512— Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:512-540 | Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:575-603 — 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 `Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:512` 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 (20–21 lines × 2) Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:1407— Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:1407-1427 | Dayflow/Dayflow/Core/AI/ClaudeStrictJSONParser.swift:268-287 — 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 (20–21 lines × 2) Dayflow/Dayflow/Core/AI/DailyRecapGenerator.swift:296— Dayflow/Dayflow/Core/AI/DailyRecapGenerator.swift:296-316 | Dayflow/Dayflow/Core/AI/DailyRecapScheduler.swift:363-382 — 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 (20–21 lines × 2) Dayflow/Dayflow/Views/UI/Settings/SettingsProvidersTabView.swift:296— Dayflow/Dayflow/Views/UI/Settings/SettingsProvidersTabView.swift:296-315 | Dayflow/Dayflow/Views/UI/Settings/SettingsProvidersTabView.swift:327-347 — 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 `Dayflow/Dayflow/Views/UI/Settings/SettingsProvidersTabView.swift:327` 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 first that the copies are not typed on the same thing: the declarations holding them bind `title` to `String(localized: "Upgrade account")` in one and `String(localized: "Edit configuration")` 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 (19 lines × 2) Dayflow/Dayflow/Core/AI/ClaudeProvider+ActivityCards.swift:186— Dayflow/Dayflow/Core/AI/ClaudeProvider+ActivityCards.swift:186-204 | Dayflow/Dayflow/Core/AI/CodexProvider+ActivityCards.swift:72-90 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Core/AI/ClaudeProvider+ActivityCards.swift:186` 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 (19 lines × 2) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:199— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:199-217 | Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:219-237 — 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 `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:199` 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 (19 lines × 2) Dayflow/Dayflow/Core/Thumbnails/ScreenshotThumbnailCache.swift:35— Dayflow/Dayflow/Core/Thumbnails/ScreenshotThumbnailCache.swift:35-53 | Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:395-413 — 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 `Dayflow/Dayflow/Core/Thumbnails/ScreenshotThumbnailCache.swift:35` 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 (18 lines × 2) Dayflow/Dayflow/Core/AI/AgentCLISupport+Parsing.swift:201— Dayflow/Dayflow/Core/AI/AgentCLISupport+Parsing.swift:201-218 | Dayflow/Dayflow/Core/AI/AgentCLISupport+Transcription.swift:84-101 — 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 `Dayflow/Dayflow/Core/AI/AgentCLISupport+Parsing.swift:201` 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 (18 lines × 2) Dayflow/Dayflow/Core/AI/ClaudeProvider+Prompts.swift:7— Dayflow/Dayflow/Core/AI/ClaudeProvider+Prompts.swift:7-24 | Dayflow/Dayflow/Core/AI/CodexProvider+Prompts.swift:11-28 — 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 `Dayflow/Dayflow/Core/AI/ClaudeProvider+Prompts.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.
Duplicated block (18 lines × 2) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyContextChartsSection.swift:169— Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyContextChartsSection.swift:169-186 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyContextShiftComparisonSection.swift:137-154 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyContextChartsSection.swift:169` 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 (17–18 lines × 2) Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:804— Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:804-821 | Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:908-924 — 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 `Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:804` 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, `Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:925` calls `removeAll` and `Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:822` 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 (17–18 lines × 2) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:315— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:315-332 | Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift:241-257 — before extracting anything, compare `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift` and `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 320 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 `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:315` 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 (17–18 lines × 2) Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketCardContent.swift:245— Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketCardContent.swift:245-262 | Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketListView.swift:172-188 — 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 `Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketCardContent.swift:245` 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 (17 lines × 2) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Prompting.swift:50— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Prompting.swift:50-66 | Dayflow/Dayflow/Core/AI/TimelineOutputSupport.swift:97-113 — before extracting anything, compare `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Prompting.swift` and `Dayflow/Dayflow/Core/AI/TimelineOutputSupport.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 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 (17 lines × 2) Dayflow/Dayflow/Views/Components/DayDistractionSummarySection.swift:52— Dayflow/Dayflow/Views/Components/DayDistractionSummarySection.swift:52-68 | Dayflow/Dayflow/Views/Components/DayFocusSummarySection.swift:48-64 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Views/Components/DayDistractionSummarySection.swift:52` 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 (17 lines × 2) Dayflow/Dayflow/Views/UI/ChatCharts.swift:404— Dayflow/Dayflow/Views/UI/ChatCharts.swift:404-420 | Dayflow/Dayflow/Views/UI/ChatCharts.swift:439-455 — 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 `Dayflow/Dayflow/Views/UI/ChatCharts.swift:404` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–10 lines × 2) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:918— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:918-927 | Dayflow/Dayflow/Core/AI/TimelineOutputSupport.swift:286-293 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8–10 lines × 2) Dayflow/Dayflow/Views/Onboarding/Prototype/DayflowProOnboardingSignIn.swift:230— Dayflow/Dayflow/Views/Onboarding/Prototype/DayflowProOnboardingSignIn.swift:230-239 | Dayflow/Dayflow/Views/Onboarding/Prototype/DayflowProOnboardingSignIn.swift:354-361 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8–10 lines × 2) Dayflow/Dayflow/Views/UI/Settings/SettingsAccountSection.swift:611— Dayflow/Dayflow/Views/UI/Settings/SettingsAccountSection.swift:611-618 | Dayflow/Dayflow/Views/UI/Settings/SettingsAccountSection.swift:697-706 — 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 `Dayflow/Dayflow/Views/UI/Settings/SettingsAccountSection.swift:611` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `12` in one and `4` 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, `Dayflow/Dayflow/Views/UI/Settings/SettingsAccountSection.swift:696` calls `HStack` and `Dayflow/Dayflow/Views/UI/Settings/SettingsAccountSection.swift:610` 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–8 lines × 2) Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Summaries.swift:64— Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Summaries.swift:64-71 | Dayflow/Dayflow/Core/AI/OllamaProvider+Summaries.swift:82-88 — 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 `Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Summaries.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–8 lines × 2) Dayflow/Dayflow/Core/Recording/StorageManager+Maintenance.swift:77— Dayflow/Dayflow/Core/Recording/StorageManager+Maintenance.swift:77-84 | Dayflow/Dayflow/Core/Recording/StorageManager+Maintenance.swift:102-108 — 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 `Dayflow/Dayflow/Core/Recording/StorageManager+Maintenance.swift:77` 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) Dayflow/Dayflow/Views/Onboarding/ChatCLITestView.swift:154— Dayflow/Dayflow/Views/Onboarding/ChatCLITestView.swift:154-161 | Dayflow/Dayflow/Views/Onboarding/ChatCLITestView.swift:254-260 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Views/Onboarding/ChatCLITestView.swift:254` 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.
Low contrast colour pair in CSS (2.0:1) Dayflow/Dayflow/Resources/DailyBriefIntro.html:70— `.next-btn` sets color: #fff on background-color: #ff9f6f — 2.0:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
Low contrast colour pair in CSS (2.0:1) scripts/daily_brief_intro/src/intro.css:59— `.next-btn` sets color: #fff on background-color: #ff9f6f — 2.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
D4 · Code Duplication· Edited copy of a member (29 corresponding lines) · ×2
Edited copy of a member (29 corresponding lines) Dayflow/Dayflow/Views/UI/ProgressRingView.swift:298— Dayflow/Dayflow/Views/UI/ProgressRingView.swift:298-326 | Dayflow/Dayflow/Views/UI/ProgressRingView.swift:330-364 — 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.
Edited copy of a member (29 corresponding lines) Dayflow/Dayflow/Core/AI/AgentCLISupport+Parsing.swift:339— Dayflow/Dayflow/Core/AI/AgentCLISupport+Parsing.swift:339-378 | Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:1464-1492 — 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 (31 corresponding lines) · ×2
Edited copy of a member (31 corresponding lines) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyInteractionGraphGlyphs.swift:149— Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyInteractionGraphGlyphs.swift:149-189 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyInteractionGraphGlyphs.swift:212-242 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) tools/dayflow-cli/Sources/dayflow/MCPServer.swift:413— tools/dayflow-cli/Sources/dayflow/MCPServer.swift:413-443 | tools/dayflow-cli/Sources/dayflow/main.swift:260-300 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (35 corresponding lines) · ×2
Edited copy of a member (35 corresponding lines) Dayflow/Dayflow/Core/AI/ChatToolExecutor.swift:130— Dayflow/Dayflow/Core/AI/ChatToolExecutor.swift:130-164 | Dayflow/Dayflow/Core/AI/ChatToolExecutor.swift:168-207 — 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.
Edited copy of a member (35 corresponding lines) Dayflow/Dayflow/Views/UI/PausePillView.swift:363— Dayflow/Dayflow/Views/UI/PausePillView.swift:363-397 | Dayflow/Dayflow/Views/UI/PausePillView.swift:464-503 — 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 copy of a member (32 corresponding lines) · ×2
Edited copy of a member (32 corresponding lines) Dayflow/Dayflow/Views/Components/DayGoalFlowView.swift:472— Dayflow/Dayflow/Views/Components/DayGoalFlowView.swift:472-516 | Dayflow/Dayflow/Views/Components/DayGoalFlowView.swift:518-549 — 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.
Edited copy of a member (32 corresponding lines) Dayflow/Dayflow/Views/Components/DayDistractionSummarySection.swift:34— Dayflow/Dayflow/Views/Components/DayDistractionSummarySection.swift:34-68 | Dayflow/Dayflow/Views/Components/DayFocusSummarySection.swift:33-64 — 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 (30 corresponding lines) · ×2
Edited copy of a member (30 corresponding lines) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyContextChartsSection.swift:71— Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyContextChartsSection.swift:71-103 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyContextChartsSection.swift:380-409 — 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.
Edited copy of a member (30 corresponding lines) Dayflow/Dayflow/Views/UI/Weekly/WeeklyView.swift:770— Dayflow/Dayflow/Views/UI/Weekly/WeeklyView.swift:770-806 | Dayflow/Dayflow/Views/UI/Weekly/WeeklyView.swift:844-873 — 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 (3 members, 19+ corresponding lines) · ×2
Edited copies of one member (3 members, 19+ corresponding lines) Dayflow/Dayflow/Core/AI/ChatMetadataParser.swift:35— Dayflow/Dayflow/Core/AI/ChatMetadataParser.swift:35-53 | Dayflow/Dayflow/Core/AI/ChatMetadataParser.swift:55-75 | Dayflow/Dayflow/Core/AI/ChatMetadataParser.swift:77-97 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 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, 19+ corresponding lines) Dayflow/Dayflow/Views/UI/TimelineDataModels.swift:51— Dayflow/Dayflow/Views/UI/TimelineDataModels.swift:51-69 | Dayflow/Dayflow/Views/UI/TimelineDataModels.swift:71-89 | Dayflow/Dayflow/Views/UI/TimelineDataModels.swift:91-109 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×2
Edited copy of a member (12 corresponding lines) Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:628— Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:628-640 | Dayflow/Dayflow/Views/UI/ScrubberView.swift:313-324 — 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) Dayflow/Dayflow/Core/AI/ClaudeProvider+Text.swift:4— Dayflow/Dayflow/Core/AI/ClaudeProvider+Text.swift:4-15 | Dayflow/Dayflow/Core/AI/CodexProvider+Text.swift:4-15 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 12+ corresponding lines) · ×2
Edited copies of one member (3 members, 12+ corresponding lines) Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefPageView.swift:128— Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefPageView.swift:128-143 | Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefSavedView.swift:145-156 | Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefSections.swift:933-945 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeFlow.swift:300— Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeFlow.swift:300-311 | Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeFlow.swift:313-324 | Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeFlow.swift:326-337 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 8+ corresponding lines) · ×2
Edited copies of one member (5 members, 8+ corresponding lines) Dayflow/Dayflow/Views/Components/CategoryDonutChart.swift:46— Dayflow/Dayflow/Views/Components/CategoryDonutChart.swift:46-58 | Dayflow/Dayflow/Views/Components/DayGoalReviewComponents.swift:160-171 | Dayflow/Dayflow/Views/Components/TimelineReviewSummaryCard.swift:269-281 | Dayflow/Dayflow/Views/UI/TimelineReviewChrome.swift:343-350 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyOverviewSection.swift:172-183 — 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.
Edited copies of one member (5 members, 8+ corresponding lines) Dayflow/Dayflow/Views/UI/CanvasActivityCard.swift:250— Dayflow/Dayflow/Views/UI/CanvasActivityCard.swift:250-257 | Dayflow/Dayflow/Views/UI/DailyStandupComponents.swift:7-14 | Dayflow/Dayflow/Views/UI/MainView/Layout+Panels.swift:550-557 | Dayflow/Dayflow/Views/UI/PausePillView.swift:649-656 | Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:402-410 — 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 (3 members, 10+ corresponding lines) · ×2
Edited copies of one member (3 members, 10+ corresponding lines) Dayflow/Dayflow/Views/UI/BugReportView.swift:181— Dayflow/Dayflow/Views/UI/BugReportView.swift:181-190 | Dayflow/Dayflow/Views/UI/GettingStarted/GettingStartedChecklistCard.swift:260-270 | Dayflow/Dayflow/Views/UI/MainView/TimelineCalendarPopover.swift:123-136 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 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, 10+ corresponding lines) Dayflow/Dayflow/Core/AI/LLMTypes.swift:107— Dayflow/Dayflow/Core/AI/LLMTypes.swift:107-117 | REDACTED:829-838 | REDACTED:848-857 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 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.
Duplicated block (26–27 lines × 2) Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift:659— Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift:659-685 | Dayflow/Dayflow/Views/Onboarding/SetupContinueButton.swift:51-76 — 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 `Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift:659` 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 (26–27 lines × 2) Dayflow/Dayflow/Core/AI/DailyRecapGenerator.swift:268— Dayflow/Dayflow/Core/AI/DailyRecapGenerator.swift:268-294 | Dayflow/Dayflow/Core/AI/DailyRecapScheduler.swift:335-360 — 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 (26 lines × 2) Dayflow/Dayflow/Core/AI/ClaudeProvider+ActivityCards.swift:130— Dayflow/Dayflow/Core/AI/ClaudeProvider+ActivityCards.swift:130-155 | Dayflow/Dayflow/Core/AI/ClaudeProvider+Transcription.swift:151-176 — before extracting anything, compare `Dayflow/Dayflow/Core/AI/ClaudeProvider+ActivityCards.swift` and `Dayflow/Dayflow/Core/AI/ClaudeProvider+Transcription.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 57 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 `Dayflow/Dayflow/Core/AI/ClaudeProvider+ActivityCards.swift:130` 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 (26 lines × 2) Dayflow/Dayflow/Views/Components/CategoryPickerOverlay.swift:257— Dayflow/Dayflow/Views/Components/CategoryPickerOverlay.swift:257-282 | Dayflow/Dayflow/Views/Components/DayCategorySelectionEditor.swift:112-137 — before extracting anything, compare `Dayflow/Dayflow/Views/Components/CategoryPickerOverlay.swift` and `Dayflow/Dayflow/Views/Components/DayCategorySelectionEditor.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (23–24 lines × 2) Dayflow/Dayflow/Core/Analysis/AnalysisManager.swift:156— Dayflow/Dayflow/Core/Analysis/AnalysisManager.swift:156-179 | Dayflow/Dayflow/Core/Analysis/AnalysisManager.swift:293-315 — 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 `Dayflow/Dayflow/Core/Analysis/AnalysisManager.swift:156` 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 (23–24 lines × 2) Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:222— Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:222-244 | Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:661-684 — 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 `Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:222` 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 (21 lines × 2) Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Frames.swift:49— Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Frames.swift:49-69 | Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Frames.swift:82-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 (21 lines × 2) Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:732— Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:732-752 | Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:780-800 — 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 `Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:732` 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, `Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:776` calls `IN` and `Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:728` 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 (19 lines × 3) Dayflow/Dayflow/Core/AI/ClaudeProvider+ActivityCards.swift:107— Dayflow/Dayflow/Core/AI/ClaudeProvider+ActivityCards.swift:107-125 | Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.swift:128-146 | Dayflow/Dayflow/Core/AI/ClaudeProvider+Transcription.swift:114-132 — before extracting anything, compare `Dayflow/Dayflow/Core/AI/ClaudeProvider+ActivityCards.swift` and `Dayflow/Dayflow/Core/AI/ClaudeProvider+Transcription.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 57 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 first that the copies are not typed on the same thing: the declarations holding them bind `batchId` to `Int64? ) async throws -> (cards: [ActivityCardData]` in one and `Int64? ) async throws -> ( cards: [ActivityCardData]` 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 (19 lines × 3) Dayflow/Dayflow/Views/Components/CategoryPickerOverlay.swift:288— Dayflow/Dayflow/Views/Components/CategoryPickerOverlay.swift:288-306 | Dayflow/Dayflow/Views/Components/DayCategorySelectionEditor.swift:143-161 | Dayflow/Dayflow/Views/Components/DayGoalSetupComponents.swift:388-406 — before extracting anything, compare `Dayflow/Dayflow/Views/Components/CategoryPickerOverlay.swift` and `Dayflow/Dayflow/Views/Components/DayCategorySelectionEditor.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 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 `Dayflow/Dayflow/Views/Components/CategoryPickerOverlay.swift:288` 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 (17–19 lines × 2) Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:401— Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:401-417 | Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:516-534 — 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 `Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:401` 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 (17–19 lines × 2) Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:815— Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:815-831 | Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:871-889 — 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 `Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:815` 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–18 lines × 2) Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.swift:276— Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.swift:276-291 | Dayflow/Dayflow/Core/AI/ClaudeProvider+Transcription.swift:187-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. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.swift:276` 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 (16–18 lines × 2) Dayflow/Dayflow/Core/AI/DailyRecapScheduler.swift:170— Dayflow/Dayflow/Core/AI/DailyRecapScheduler.swift:170-187 | Dayflow/Dayflow/Views/UI/DailyView+Standup.swift:357-372 — 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 `Dayflow/Dayflow/Core/AI/DailyRecapScheduler.swift:170` 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 (17 lines × 3) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:261— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:261-277 | Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Text.swift:90-106 | Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift:193-209 — before extracting anything, compare `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift` and `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Text.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 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 `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:261` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 3) Dayflow/Dayflow/Core/Thumbnails/ScreenshotThumbnailCache.swift:36— Dayflow/Dayflow/Core/Thumbnails/ScreenshotThumbnailCache.swift:36-52 | Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:396-412 | Dayflow/Dayflow/Views/UI/ScrubberView.swift:47-63 — before extracting anything, compare `Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift` and `Dayflow/Dayflow/Views/UI/ScrubberView.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Core/Thumbnails/ScreenshotThumbnailCache.swift:36` 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 first that the copies are not typed on the same thing: the declarations holding them bind `completion` to `@escaping (NSImage?) -> Void` in one and `@escaping (Int, [NSImage]) -> Void` 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 (15–17 lines × 2) Dayflow/Dayflow/Core/AI/CodexProvider+Timeline.swift:95— Dayflow/Dayflow/Core/AI/CodexProvider+Timeline.swift:95-111 | Dayflow/Dayflow/Core/AI/CodexProvider+Transcription.swift:111-125 — 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 `batchId` to `Int64? ) async throws -> ( cards: [ActivityCardData]` in one and `Int64? ) async throws -> (observations: [Observation]` 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 (15–17 lines × 2) Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:383— Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:383-397 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:563-579 — 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 `Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:383` 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 (16 lines × 3) Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:644— Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:644-659 | Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:717-732 | Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeRoleSelectionStep.swift:104-119 — before extracting anything, compare `Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift` and `Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeRoleSelectionStep.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:644` 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 (16 lines × 3) Dayflow/Dayflow/Views/UI/DailyView+Workflow.swift:471— Dayflow/Dayflow/Views/UI/DailyView+Workflow.swift:471-486 | Dayflow/Dayflow/Views/UI/MainView/Layout+TimelineHeader.swift:82-97 | Dayflow/Dayflow/Views/UI/Weekly/WeeklyHeader.swift:64-79 — 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 `Dayflow/Dayflow/Views/UI/DailyView+Workflow.swift:471` 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 (16 lines × 2) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+DashboardStreaming.swift:344— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+DashboardStreaming.swift:344-359 | Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Logging.swift:76-91 — 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 `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+DashboardStreaming.swift:344` 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 (16 lines × 2) Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:611— Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:611-626 | Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeRoleSelectionStep.swift:29-44 — before extracting anything, compare `Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift` and `Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeRoleSelectionStep.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:611` 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–12 lines × 2) Dayflow/Dayflow/Core/AI/OllamaProvider+Transcription.swift:69— Dayflow/Dayflow/Core/AI/OllamaProvider+Transcription.swift:69-78 | Dayflow/Dayflow/Core/AI/TimelineOutputSupport.swift:7-18 — 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 `Dayflow/Dayflow/Core/AI/OllamaProvider+Transcription.swift:69` 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.
Duplicated block (10–12 lines × 2) Dayflow/Dayflow/Views/Onboarding/HowItWorksView.swift:86— Dayflow/Dayflow/Views/Onboarding/HowItWorksView.swift:86-95 | Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeFlow.swift:232-243 — 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 `Dayflow/Dayflow/Views/Onboarding/HowItWorksView.swift:86` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 4) Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:235— Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:235-244 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:417-428 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:607-618 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:775-786 — 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 `Dayflow/Dayflow/Core/AI/DayflowBackendProvider.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.
Duplicated block (10 lines × 4) Dayflow/Dayflow/Views/Components/CategoryPickerOverlay.swift:284— Dayflow/Dayflow/Views/Components/CategoryPickerOverlay.swift:284-293 | Dayflow/Dayflow/Views/Components/DayCategorySelectionEditor.swift:139-148 | Dayflow/Dayflow/Views/Components/DayGoalSetupComponents.swift:384-393 | Dayflow/Dayflow/Views/UI/ChatStylesAndDebug.swift:156-165 — before extracting anything, compare `Dayflow/Dayflow/Views/Components/CategoryPickerOverlay.swift` and `Dayflow/Dayflow/Views/Components/DayCategorySelectionEditor.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 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 `Dayflow/Dayflow/Views/Components/CategoryPickerOverlay.swift:284` 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 × 4) Dayflow/Dayflow/Core/Recording/ScreenRecorder.swift:973— Dayflow/Dayflow/Core/Recording/ScreenRecorder.swift:973-981 | Dayflow/Dayflow/Core/Recording/ScreenRecorder.swift:999-1007 | Dayflow/Dayflow/Core/Recording/ScreenRecorder.swift:1014-1022 | Dayflow/Dayflow/Core/Recording/ScreenRecorder.swift:1040-1048 — 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 `Dayflow/Dayflow/Core/Recording/ScreenRecorder.swift:973` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 4) Dayflow/Dayflow/Views/UI/MainView/ActivityCard.swift:599— Dayflow/Dayflow/Views/UI/MainView/ActivityCard.swift:599-607 | Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:186-194 | Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:673-681 | Dayflow/Dayflow/Views/UI/VideoThumbnailView.swift:112-120 — 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.
Duplicated block (8 lines × 4) Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:328— Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:328-335 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:512-519 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:707-714 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:857-864 — 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 `Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:328` 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 × 4) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift:620— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift:620-627 | Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Networking.swift:268-275 | Dayflow/Dayflow/Core/AI/OllamaProvider.swift:259-266 | Dayflow/Dayflow/Core/AI/TimelineOutputSupport.swift:32-39 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Networking.swift:265` calls `AppSites` and `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift:616` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 3) Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:527— Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:527-534 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:724-731 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:872-879 — 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 `Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:527` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 3) REDACTED:240— REDACTED:240-247 | Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:826-833 | Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeFlow.swift:248-255 — 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 `REDACTED:240` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (7 lines × 4) Dayflow/Dayflow/Views/UI/Agents/AgentsOverviewView.swift:295— Dayflow/Dayflow/Views/UI/Agents/AgentsOverviewView.swift:295-301 | Dayflow/Dayflow/Views/UI/Settings/SettingsProvidersTabView.swift:691-697 | Dayflow/Dayflow/Views/UI/SettingsView.swift:216-222 | Dayflow/Dayflow/Views/UI/WhatsNewView.swift:970-976 — 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 `spacing` to `6` in one and `4` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7 lines × 4) Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:204— Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:204-210 | Dayflow/Dayflow/Views/UI/TimelineReviewChrome.swift:16-22 | Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:254-260 | Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:699-705 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:204` 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.
AC3 · Page structure· Page without a main landmark · ×1
Page without a main landmark Dayflow/Dayflow/Resources/DailyBriefIntro.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
AC4 · Keyboard semantics· Modal dialog does not manage focus · ×1
Modal dialog does not manage focus Dayflow/Dayflow/Resources/DailyBriefIntro.html:354— This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
Condenser.renderItems (cyclomatic 212) Dayflow/Dayflow/Core/Recording/AccessibilityLogCondenser.swift:866— Condenser.renderItems has cyclomatic complexity 212 (threshold 15). Of this number, 205 points are the body's own statements and 7 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. This file is where this pass's cyclomatic complexity CONCENTRATES: Dayflow/Dayflow/Core/Recording/AccessibilityLogCondenser.swift holds 5 of the 82 methods over the threshold — including the worst — and 235 of the 885 points over it (27%), 3.9× the next-largest file (Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift at 60). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
ChatCLIProcessRunner.executeStreaming (cyclomatic 52) Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:677— ChatCLIProcessRunner.executeStreaming has cyclomatic complexity 52 (threshold 15). Of this number, 42 points are the body's own statements and 10 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.
DailyWorkflowComputation.swift.computeDailyWorkflow (cyclomatic 50) Dayflow/Dayflow/Views/UI/DailyWorkflowComputation.swift:8— DailyWorkflowComputation.swift.computeDailyWorkflow 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.
ChatService.processConversation (cyclomatic 49) Dayflow/Dayflow/Core/AI/ChatService.swift:172— ChatService.processConversation has cyclomatic complexity 49 (threshold 15). Of this number, 37 points are the body's own statements and 12 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.
Coordinator.handle (cyclomatic 41) Dayflow/Dayflow/Views/UI/Flow/FlowWebView.swift:150— Coordinator.handle has cyclomatic complexity 41 (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.
LLMService.processBatch (cyclomatic 40) Dayflow/Dayflow/Core/AI/LLMService.swift:650— LLMService.processBatch 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.
AccessibilityTreeReader.snapshot::walk (cyclomatic 39) Dayflow/Dayflow/Core/Recording/AccessibilityTreeReader.swift:130— AccessibilityTreeReader.snapshot::walk 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.
Condenser.submitLine (cyclomatic 36) Dayflow/Dayflow/Core/Recording/AccessibilityLogCondenser.swift:1409— Condenser.submitLine 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. This file is where this pass's cyclomatic complexity CONCENTRATES: Dayflow/Dayflow/Core/Recording/AccessibilityLogCondenser.swift holds 5 of the 82 methods over the threshold — including the worst — and 235 of the 885 points over it (27%), 3.9× the next-largest file (Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift at 60). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
GeminiDirectProvider.geminiTranscribeRequest (cyclomatic 34) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift:259— GeminiDirectProvider.geminiTranscribeRequest 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.
ChatChartSpec.parse (cyclomatic 34) Dayflow/Dayflow/Views/UI/ChatCharts.swift:63— ChatChartSpec.parse 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.
DebugLogFormatter.makeLog (cyclomatic 33) Dayflow/Dayflow/Utilities/DebugLogFormatter.swift:44— DebugLogFormatter.makeLog 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.
ChatCLIProcessRunner.run (cyclomatic 31) Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:1531— ChatCLIProcessRunner.run 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.
GeminiDirectProvider.geminiCardsRequest (cyclomatic 31) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:334— GeminiDirectProvider.geminiCardsRequest 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.
SettingsProvidersTabView.routingRow (cyclomatic 30) Dayflow/Dayflow/Views/UI/Settings/SettingsProvidersTabView.swift:243— SettingsProvidersTabView.routingRow 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.
FlowSessionTimeline.apply (cyclomatic 29) Dayflow/Dayflow/Core/Flow/FlowSessionTimeline.swift:163— FlowSessionTimeline.apply 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.
VideoPlayerModal.body (cyclomatic 29) Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:613— VideoPlayerModal.body 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.
DailyBriefGenerator.cleaned (cyclomatic 28) Dayflow/Dayflow/Core/DailyBrief/DailyBriefGenerator.swift:1181— DailyBriefGenerator.cleaned has cyclomatic complexity 28 (threshold 15). 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: 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.
Condenser.handle (cyclomatic 28) Dayflow/Dayflow/Core/Recording/AccessibilityLogCondenser.swift:1501— Condenser.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. This file is where this pass's cyclomatic complexity CONCENTRATES: Dayflow/Dayflow/Core/Recording/AccessibilityLogCondenser.swift holds 5 of the 82 methods over the threshold — including the worst — and 235 of the 885 points over it (27%), 3.9× the next-largest file (Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift at 60). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
DocketDeckView.handleWheel (cyclomatic 28) Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketDeckView.swift:521— DocketDeckView.handleWheel 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.
ClaudeProvider.validateClaudeCardPolicy (cyclomatic 27) Dayflow/Dayflow/Core/AI/ClaudeProvider+ActivityCards.swift:326— ClaudeProvider.validateClaudeCardPolicy 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.
PIIMaskRules.unmaskPlainGuesses (cyclomatic 27) Dayflow/Dayflow/Core/PrivacyShield/PIIMaskRules.swift:271— PIIMaskRules.unmaskPlainGuesses has cyclomatic complexity 27 (threshold 15). Of this number, 22 points are the body's own statements and 5 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.
WeeklyInteractionGraphLayoutBuilder.guidePoint (cyclomatic 27) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyInteractionGraphLayout.swift:576— WeeklyInteractionGraphLayoutBuilder.guidePoint 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.
TimelineActivityLoader.resolveDisplaySegments (cyclomatic 26) Dayflow/Dayflow/Views/UI/MainView/TimelineActivityLoader.swift:185— TimelineActivityLoader.resolveDisplaySegments 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.
AgentCLISupporting.parseCards (cyclomatic 25) Dayflow/Dayflow/Core/AI/AgentCLISupport+Parsing.swift:89— AgentCLISupporting.parseCards has cyclomatic complexity 25 (threshold 15). Of this number, 20 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.
CodexProvider.transcribeScreenshots (cyclomatic 25) Dayflow/Dayflow/Core/AI/CodexProvider+Transcription.swift:12— CodexProvider.transcribeScreenshots 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.
GeminiDirectProvider.validateTimeCoverage (cyclomatic 25) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:744— GeminiDirectProvider.validateTimeCoverage 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.
TimelineOutputSupporting.validateTimeCoverage (cyclomatic 25) Dayflow/Dayflow/Core/AI/TimelineOutputSupport.swift:147— TimelineOutputSupporting.validateTimeCoverage 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.
FlowDistractionAgent.tick (cyclomatic 25) Dayflow/Dayflow/Core/Flow/FlowDistractionAgent.swift:586— FlowDistractionAgent.tick 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.
DayflowButton.body (cyclomatic 25) Dayflow/Dayflow/Views/Components/DayflowButton.swift:29— DayflowButton.body 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.
LLMProviderSetupView.currentStepContent (cyclomatic 25) REDACTED:200— LLMProviderSetupView.currentStepContent 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.
DailyBriefDebugStats.lines (cyclomatic 25) Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefPageView.swift:671— DailyBriefDebugStats.lines 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.
ClaudeOutputValidator.validateActivityCards (cyclomatic 23) Dayflow/Dayflow/Core/AI/ClaudeOutputValidator.swift:96— ClaudeOutputValidator.validateActivityCards 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.
FlowDistractionAgent.handle (cyclomatic 23) Dayflow/Dayflow/Core/Flow/FlowDistractionAgent.swift:846— FlowDistractionAgent.handle 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.
ColorOrganizerRoot.contentCard (cyclomatic 23) Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift:126— ColorOrganizerRoot.contentCard 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.
ChatCLITestView.runTest (cyclomatic 23) Dayflow/Dayflow/Views/Onboarding/ChatCLITestView.swift:108— ChatCLITestView.runTest 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.
AgentCLISupporting.parseSegments (cyclomatic 22) Dayflow/Dayflow/Core/AI/AgentCLISupport+Transcription.swift:6— AgentCLISupporting.parseSegments 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.
DailyBriefGenerator.writeTranscript (cyclomatic 22) Dayflow/Dayflow/Core/DailyBrief/DailyBriefGenerator.swift:982— DailyBriefGenerator.writeTranscript 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.
DailyView.regenerateStandupFromTimeline (cyclomatic 22) Dayflow/Dayflow/Views/UI/DailyView+Standup.swift:264— DailyView.regenerateStandupFromTimeline 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.
GeminiDirectProvider.generateText (cyclomatic 21) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Text.swift:6— GeminiDirectProvider.generateText 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.
PIIMaskRules.maskLabeledPasswords (cyclomatic 21) Dayflow/Dayflow/Core/PrivacyShield/PIIMaskRules.swift:359— PIIMaskRules.maskLabeledPasswords 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.
ScreenRecorder.registerForSleepAndLock (cyclomatic 21) Dayflow/Dayflow/Core/Recording/ScreenRecorder.swift:915— ScreenRecorder.registerForSleepAndLock 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.
DocketDeckView.card (cyclomatic 21) Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketDeckView.swift:224— DocketDeckView.card 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.
DocketHandoffDirector.paste (cyclomatic 21) Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketHandoffTransition.swift:155— DocketHandoffDirector.paste has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
AgentCLISupporting.stripOSCEscapes (cyclomatic 20) Dayflow/Dayflow/Core/AI/AgentCLISupport+Parsing.swift:11— AgentCLISupporting.stripOSCEscapes 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.
ChatCLIProcessRunner.parseCodexEvent (cyclomatic 20) Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:1033— ChatCLIProcessRunner.parseCodexEvent 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.
BrowserWindowInspector.collect (cyclomatic 20) Dayflow/Dayflow/Core/Recording/BrowserWindowInspector.swift:147— BrowserWindowInspector.collect 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.
OnboardingFlow.body (cyclomatic 20) Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:44— OnboardingFlow.body has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CanvasActivityCard.body (cyclomatic 20) Dayflow/Dayflow/Views/UI/CanvasActivityCard.swift:93— CanvasActivityCard.body has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ClaudeTranscriptionInputBuilder.selectedOCRText (cyclomatic 19) Dayflow/Dayflow/Core/AI/ClaudeTranscriptionInputBuilder.swift:243— ClaudeTranscriptionInputBuilder.selectedOCRText 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.
CodexProvider.generateActivityCards (cyclomatic 19) Dayflow/Dayflow/Core/AI/CodexProvider+ActivityCards.swift:7— CodexProvider.generateActivityCards 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.
GeminiDirectProvider.generateActivityCards (cyclomatic 19) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:4— GeminiDirectProvider.generateActivityCards 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.
LLMService.makeBatchProvider (cyclomatic 19) Dayflow/Dayflow/Core/AI/LLMService.swift:226— LLMService.makeBatchProvider 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.
OllamaProvider.callChatAPI (cyclomatic 19) Dayflow/Dayflow/Core/AI/OllamaProvider+Networking.swift:70— OllamaProvider.callChatAPI 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.
AccessibilityRecorder.handle (cyclomatic 19) Dayflow/Dayflow/Core/Recording/AccessibilityRecorder.swift:245— AccessibilityRecorder.handle 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.
VideoProcessingService.generateVideoFromScreenshots (cyclomatic 19) Dayflow/Dayflow/Core/Recording/VideoProcessingService.swift:129— VideoProcessingService.generateVideoFromScreenshots 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.
PausePillView.pill (cyclomatic 19) Dayflow/Dayflow/Views/UI/PausePillView.swift:128— PausePillView.pill 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.
Coordinator.startMonitoring (cyclomatic 19) Dayflow/Dayflow/Views/UI/TimelineReviewChrome.swift:448— Coordinator.startMonitoring 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.
ActivityCard.activityDetails (cyclomatic 19) Dayflow/Dayflow/Views/UI/MainView/ActivityCard.swift:173— ActivityCard.activityDetails 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.
WeekTimelineActivityCard.cardCanvas (cyclomatic 19) Dayflow/Dayflow/Views/UI/MainView/WeekTimelineActivityCard.swift:129— WeekTimelineActivityCard.cardCanvas 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.
FlowDistractionAgent.start (cyclomatic 18) Dayflow/Dayflow/Core/Flow/FlowDistractionAgent.swift:253— FlowDistractionAgent.start 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.
Condenser.newText (cyclomatic 18) Dayflow/Dayflow/Core/Recording/AccessibilityLogCondenser.swift:790— Condenser.newText has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This file is where this pass's cyclomatic complexity CONCENTRATES: Dayflow/Dayflow/Core/Recording/AccessibilityLogCondenser.swift holds 5 of the 82 methods over the threshold — including the worst — and 235 of the 885 points over it (27%), 3.9× the next-largest file (Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift at 60). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
AppDelegate.applicationDidFinishLaunching (cyclomatic 17) Dayflow/Dayflow/App/AppDelegate.swift:65— AppDelegate.applicationDidFinishLaunching 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.
DayflowApp.body (cyclomatic 17) Dayflow/Dayflow/App/DayflowApp.swift:293— DayflowApp.body has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ChatCLIProcessRunner.parseClaudeEvent (cyclomatic 17) Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:1082— ChatCLIProcessRunner.parseClaudeEvent 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.
DailyRecapScheduler.runCheck (cyclomatic 17) Dayflow/Dayflow/Core/AI/DailyRecapScheduler.swift:71— DailyRecapScheduler.runCheck 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.
TimelineFailureClassifier.providerName (cyclomatic 17) Dayflow/Dayflow/Core/AI/TimelineFailureClassifier.swift:481— TimelineFailureClassifier.providerName 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. This is NOT this file's highest cyclomatic complexity: TimelineFailureClassification.cardMessage (cyclomatic 18) 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.
DailyBriefGenerator.generate (cyclomatic 17) Dayflow/Dayflow/Core/DailyBrief/DailyBriefGenerator.swift:143— DailyBriefGenerator.generate 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.
ColorAssignmentCard.body (cyclomatic 17) Dayflow/Dayflow/Views/Components/CategorySetupCards.swift:210— ColorAssignmentCard.body has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DayflowSurfaceButton.body (cyclomatic 17) Dayflow/Dayflow/Views/Components/DayflowSurfaceButton.swift:34— DayflowSurfaceButton.body has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ChatView.betaLockScreen (cyclomatic 17) Dayflow/Dayflow/Views/UI/ChatView+Content.swift:471— ChatView.betaLockScreen 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.
FilmstripGenerator.generate (cyclomatic 17) Dayflow/Dayflow/Views/UI/ScrubberView.swift:39— FilmstripGenerator.generate 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.
ClaudeTranscriptionInputBuilder.makeFeatures (cyclomatic 16) Dayflow/Dayflow/Core/AI/ClaudeTranscriptionInputBuilder.swift:554— ClaudeTranscriptionInputBuilder.makeFeatures 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.
DayflowBackendProvider.generateTimeline (cyclomatic 16) Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:560— DayflowBackendProvider.generateTimeline 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.
GeminiDirectProvider.decodeDashboardSSEChunkObjects (cyclomatic 16) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+DashboardStreaming.swift:280— GeminiDirectProvider.decodeDashboardSSEChunkObjects 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.
OneStepTimelineObservations.make (cyclomatic 16) Dayflow/Dayflow/Core/AI/OneStepTimelineSupport.swift:102— OneStepTimelineObservations.make has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong 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.
TimelineOutputSupporting.validateSegments (cyclomatic 16) Dayflow/Dayflow/Core/AI/TimelineOutputSupport.swift:295— TimelineOutputSupporting.validateSegments 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.
AnalysisManager.queueLLMRequest (cyclomatic 16) Dayflow/Dayflow/Core/Analysis/AnalysisManager.swift:533— AnalysisManager.queueLLMRequest 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.
FlowDistractionAgent.finishTick (cyclomatic 16) Dayflow/Dayflow/Core/Flow/FlowDistractionAgent.swift:719— FlowDistractionAgent.finishTick 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.
ScreenRecorder.setupCapture (cyclomatic 16) Dayflow/Dayflow/Core/Recording/ScreenRecorder.swift:273— ScreenRecorder.setupCapture 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.
WhatsNewView.body (cyclomatic 16) Dayflow/Dayflow/Views/UI/WhatsNewView.swift:226— WhatsNewView.body has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
WeeklySankeyModelFactory.build (cyclomatic 16) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyModelFactory.swift:263— WeeklySankeyModelFactory.build 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.
AccessibilityLogCondenser.swift.mergingShortRuns::closeRun (cyclomatic 16) Dayflow/Dayflow/Core/Recording/AccessibilityLogCondenser.swift:581— AccessibilityLogCondenser.swift.mergingShortRuns::closeRun 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. This file is where this pass's cyclomatic complexity CONCENTRATES: Dayflow/Dayflow/Core/Recording/AccessibilityLogCondenser.swift holds 5 of the 82 methods over the threshold — including the worst — and 235 of the 885 points over it (27%), 3.9× the next-largest file (Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift at 60). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
TodoComment Dayflow/Dayflow/Core/AI/OllamaProvider.swift:87— // TODO: Remove this when observation generation is fixed upstream — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
Condenser.renderItems (cognitive 356) Dayflow/Dayflow/Core/Recording/AccessibilityLogCondenser.swift:866— Condenser.renderItems has cognitive complexity 356 (threshold 15). Drivers by points: if/else 96 (221 pts), boolean chains 111, ternaries 7 (23 pts), loops 1 (nesting depth added 141). Of this number, 345 points are the body's own statements and 11 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.
DailyWorkflowComputation.swift.computeDailyWorkflow (cognitive 112) Dayflow/Dayflow/Views/UI/DailyWorkflowComputation.swift:8— DailyWorkflowComputation.swift.computeDailyWorkflow has cognitive complexity 112 (threshold 15). Drivers by points: if/else 33 (84 pts), loops 10 (17 pts), boolean chains 8, ternaries 2 (3 pts) (nesting depth added 59). 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.
LLMService.processBatch (cognitive 80) Dayflow/Dayflow/Core/AI/LLMService.swift:650— LLMService.processBatch has cognitive complexity 80 (threshold 15). Drivers by points: if/else 20 (49 pts), boolean chains 12, error handling 5 (11 pts), loops 2 (4 pts), ternaries 2 (4 pts) (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CodexProvider.transcribeScreenshots (cognitive 73) Dayflow/Dayflow/Core/AI/CodexProvider+Transcription.swift:12— CodexProvider.transcribeScreenshots has cognitive complexity 73 (threshold 15). Drivers by points: if/else 17 (54 pts), error handling 3 (6 pts), loops 2 (5 pts), ternaries 1 (5 pts), boolean chains 3 (nesting depth added 47). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatService.processConversation (cognitive 71) Dayflow/Dayflow/Core/AI/ChatService.swift:172— ChatService.processConversation has cognitive complexity 71 (threshold 15). Drivers by points: if/else 26 (49 pts), boolean chains 16, match/switch 1 (3 pts), loops 1 (2 pts), error handling 1 (nesting depth added 26). Of this number, 58 points are the body's own statements and 13 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.
DebugLogFormatter.makeLog (cognitive 70) Dayflow/Dayflow/Utilities/DebugLogFormatter.swift:44— DebugLogFormatter.makeLog has cognitive complexity 70 (threshold 15). Drivers by points: if/else 23 (55 pts), boolean chains 9, loops 3 (6 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.
ChatCLIProcessRunner.executeStreaming (cognitive 65) Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:677— ChatCLIProcessRunner.executeStreaming has cognitive complexity 65 (threshold 15). Drivers by points: if/else 36 (63 pts), boolean chains 9, loops 5 (8 pts), ternaries 3 (7 pts), match/switch 1 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (ChatCLIProcessRunner.executeStreaming::drainBufferedLines) 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.
GeminiDirectProvider.geminiTranscribeRequest (cognitive 64) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift:259— GeminiDirectProvider.geminiTranscribeRequest has cognitive complexity 64 (threshold 15). Drivers by points: if/else 22 (54 pts), boolean chains 6, match/switch 1 (3 pts), error handling 1 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TimelineActivityLoader.resolveDisplaySegments (cognitive 58) Dayflow/Dayflow/Views/UI/MainView/TimelineActivityLoader.swift:185— TimelineActivityLoader.resolveDisplaySegments has cognitive complexity 58 (threshold 15). Drivers by points: if/else 13 (33 pts), ternaries 2 (10 pts), boolean chains 8, loops 4 (7 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GeminiDirectProvider.geminiCardsRequest (cognitive 57) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:334— GeminiDirectProvider.geminiCardsRequest has cognitive complexity 57 (threshold 15). Drivers by points: if/else 18 (46 pts), boolean chains 7, match/switch 1 (3 pts), error handling 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GeminiDirectProvider.validateTimeCoverage (cognitive 55) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:744— GeminiDirectProvider.validateTimeCoverage has cognitive complexity 55 (threshold 15). Drivers by points: if/else 13 (32 pts), loops 9 (20 pts), boolean chains 3 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TimelineOutputSupporting.validateTimeCoverage (cognitive 55) Dayflow/Dayflow/Core/AI/TimelineOutputSupport.swift:147— TimelineOutputSupporting.validateTimeCoverage has cognitive complexity 55 (threshold 15). Drivers by points: if/else 13 (32 pts), loops 9 (20 pts), boolean chains 3 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatCLITestView.runTest (cognitive 52) Dayflow/Dayflow/Views/Onboarding/ChatCLITestView.swift:108— ChatCLITestView.runTest has cognitive complexity 52 (threshold 15). Drivers by points: if/else 21 (42 pts), ternaries 3 (8 pts), error handling 1, match/switch 1 (nesting depth added 26). 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.
WeeklyInteractionGraphLayoutBuilder.guidePoint (cognitive 51) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyInteractionGraphLayout.swift:576— WeeklyInteractionGraphLayoutBuilder.guidePoint has cognitive complexity 51 (threshold 15). Drivers by points: ternaries 15 (42 pts), match/switch 3 (5 pts), if/else 2 (4 pts) (nesting depth added 31). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ChatChartSpec.parse (cognitive 50) Dayflow/Dayflow/Views/UI/ChatCharts.swift:63— ChatChartSpec.parse has cognitive complexity 50 (threshold 15). Drivers by points: if/else 21 (40 pts), boolean chains 7, loops 1 (2 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.
OllamaProvider.callChatAPI (cognitive 47) Dayflow/Dayflow/Core/AI/OllamaProvider+Networking.swift:70— OllamaProvider.callChatAPI has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (37 pts), error handling 2 (5 pts), boolean chains 4, loops 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.
AgentCLISupporting.stripOSCEscapes (cognitive 46) Dayflow/Dayflow/Core/AI/AgentCLISupport+Parsing.swift:11— AgentCLISupporting.stripOSCEscapes has cognitive complexity 46 (threshold 15). Drivers by points: if/else 7 (26 pts), boolean chains 10, loops 3 (10 pts) (nesting depth added 26). 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.
DailyBriefGenerator.writeTranscript (cognitive 46) Dayflow/Dayflow/Core/DailyBrief/DailyBriefGenerator.swift:982— DailyBriefGenerator.writeTranscript has cognitive complexity 46 (threshold 15). Drivers by points: if/else 12 (29 pts), loops 3 (7 pts), match/switch 2 (6 pts), ternaries 1 (4 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AccessibilityTreeReader.snapshot::walk (cognitive 46) Dayflow/Dayflow/Core/Recording/AccessibilityTreeReader.swift:130— AccessibilityTreeReader.snapshot::walk has cognitive complexity 46 (threshold 15). Drivers by points: if/else 17 (23 pts), boolean chains 17, ternaries 3 (5 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.
AgentCLISupporting.parseCards (cognitive 44) Dayflow/Dayflow/Core/AI/AgentCLISupport+Parsing.swift:89— AgentCLISupporting.parseCards has cognitive complexity 44 (threshold 15). Drivers by points: if/else 19 (39 pts), boolean chains 4, loops 1 (nesting depth added 20). Of this number, 35 points are the body's own statements and 9 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.
Condenser.submitLine (cognitive 44) Dayflow/Dayflow/Core/Recording/AccessibilityLogCondenser.swift:1409— Condenser.submitLine has cognitive complexity 44 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 15, ternaries 4 (6 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.
ChatCLIProcessRunner.run (cognitive 42) Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:1531— ChatCLIProcessRunner.run has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (19 pts), loops 4 (9 pts), boolean chains 8, ternaries 3 (5 pts), match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FlowSessionTimeline.apply (cognitive 39) Dayflow/Dayflow/Core/Flow/FlowSessionTimeline.swift:163— FlowSessionTimeline.apply has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 5 (10 pts), boolean chains 9, loops 5 (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.
Coordinator.handle (cognitive 39) Dayflow/Dayflow/Views/UI/Flow/FlowWebView.swift:150— Coordinator.handle has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 10, match/switch 2 (3 pts), ternaries 1 (3 pts), loops 1 (2 pts) (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SettingsProvidersTabView.routingRow (cognitive 38) Dayflow/Dayflow/Views/UI/Settings/SettingsProvidersTabView.swift:243— SettingsProvidersTabView.routingRow has cognitive complexity 38 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 14, 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.
VideoPlayerModal.body (cognitive 37) Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:613— VideoPlayerModal.body has cognitive complexity 37 (threshold 15). Drivers by points: if/else 19 (25 pts), boolean chains 8, ternaries 4 (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.
GeminiDirectProvider.generateText (cognitive 36) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Text.swift:6— GeminiDirectProvider.generateText has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (22 pts), boolean chains 11, error handling 1 (2 pts), loops 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.
PIIMaskRules.unmaskPlainGuesses (cognitive 36) Dayflow/Dayflow/Core/PrivacyShield/PIIMaskRules.swift:271— PIIMaskRules.unmaskPlainGuesses has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 14, if/else 7 (12 pts), loops 6 (10 pts) (nesting depth added 9). Of this number, 27 points are the body's own statements and 9 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.
ClaudeProvider.validateClaudeCardPolicy (cognitive 35) Dayflow/Dayflow/Core/AI/ClaudeProvider+ActivityCards.swift:326— ClaudeProvider.validateClaudeCardPolicy has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 12, loops 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.
GeminiDirectProvider.generateActivityCards (cognitive 35) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:4— GeminiDirectProvider.generateActivityCards has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (25 pts), boolean chains 7, error handling 1 (2 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CodexProvider.generateActivityCards (cognitive 34) Dayflow/Dayflow/Core/AI/CodexProvider+ActivityCards.swift:7— CodexProvider.generateActivityCards has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (25 pts), boolean chains 5, error handling 1 (2 pts), loops 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.
FlowDistractionAgent.tick (cognitive 34) Dayflow/Dayflow/Core/Flow/FlowDistractionAgent.swift:586— FlowDistractionAgent.tick has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 7, ternaries 1 (4 pts), match/switch 1 (2 pts), error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DocketDeckView.handleWheel (cognitive 34) Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketDeckView.swift:521— DocketDeckView.handleWheel has cognitive complexity 34 (threshold 15). Drivers by points: if/else 17 (24 pts), boolean chains 10 (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.
GeminiDirectProvider.uploadAndAwait (cognitive 33) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Upload.swift:4— GeminiDirectProvider.uploadAndAwait has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (21 pts), error handling 2 (6 pts), loops 3 (5 pts), boolean chains 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.
Condenser.handle (cognitive 33) Dayflow/Dayflow/Core/Recording/AccessibilityLogCondenser.swift:1501— Condenser.handle has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 9, 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.
PIIMaskRules.maskLabeledPasswords (cognitive 32) Dayflow/Dayflow/Core/PrivacyShield/PIIMaskRules.swift:359— PIIMaskRules.maskLabeledPasswords has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 11, loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DailyView.regenerateStandupFromTimeline (cognitive 32) Dayflow/Dayflow/Views/UI/DailyView+Standup.swift:264— DailyView.regenerateStandupFromTimeline has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (24 pts), ternaries 7, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClaudeOutputValidator.validateActivityCards (cognitive 31) Dayflow/Dayflow/Core/AI/ClaudeOutputValidator.swift:96— ClaudeOutputValidator.validateActivityCards has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 8, loops 4 (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.
DailyBriefGenerator.cleaned (cognitive 31) Dayflow/Dayflow/Core/DailyBrief/DailyBriefGenerator.swift:1181— DailyBriefGenerator.cleaned has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 6, ternaries 5, loops 3, error handling 1 (2 pts) (nesting depth added 4). Of this number, 25 points are the body's own statements and 6 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.
ScreenRecorder.setupCapture (cognitive 31) Dayflow/Dayflow/Core/Recording/ScreenRecorder.swift:273— ScreenRecorder.setupCapture has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (30 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.
LLMProviderSetupView.currentStepContent (cognitive 31) REDACTED:200— LLMProviderSetupView.currentStepContent has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (26 pts), match/switch 2 (3 pts), boolean chains 2 (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.
AgentCLISupporting.parseSegments (cognitive 30) Dayflow/Dayflow/Core/AI/AgentCLISupport+Transcription.swift:6— AgentCLISupporting.parseSegments has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 10, error handling 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.
OllamaProvider.generateActivityCards (cognitive 30) Dayflow/Dayflow/Core/AI/OllamaProvider.swift:100— OllamaProvider.generateActivityCards has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (28 pts), boolean chains 2 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
CanvasActivityCard.body (cognitive 30) Dayflow/Dayflow/Views/UI/CanvasActivityCard.swift:93— CanvasActivityCard.body has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (15 pts), ternaries 10 (13 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.
FlowDistractionAgent.handle (cognitive 29) Dayflow/Dayflow/Core/Flow/FlowDistractionAgent.swift:846— FlowDistractionAgent.handle has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 7, 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.
Condenser.newText (cognitive 29) Dayflow/Dayflow/Core/Recording/AccessibilityLogCondenser.swift:790— Condenser.newText has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 3, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClaudeTranscriptionInputBuilder.selectedOCRText (cognitive 28) Dayflow/Dayflow/Core/AI/ClaudeTranscriptionInputBuilder.swift:243— ClaudeTranscriptionInputBuilder.selectedOCRText has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 4, ternaries 2 (3 pts), loops 2 (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.
AccessibilityRecorder.handle (cognitive 28) Dayflow/Dayflow/Core/Recording/AccessibilityRecorder.swift:245— AccessibilityRecorder.handle has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (19 pts), ternaries 2 (5 pts), boolean chains 3, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GeminiDirectProvider.extractJSONObjectStrings (cognitive 27) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+DashboardStreaming.swift:336— GeminiDirectProvider.extractJSONObjectStrings has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (22 pts), match/switch 1 (3 pts), boolean chains 1, 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.
GeminiDirectProvider.transcribeVideoData (cognitive 27) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift:14— GeminiDirectProvider.transcribeVideoData has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (19 pts), boolean chains 5, error handling 1 (2 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.
DayflowButton.body (cognitive 27) Dayflow/Dayflow/Views/Components/DayflowButton.swift:29— DayflowButton.body has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 20, if/else 6 (7 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ColorOrganizerRoot.contentCard (cognitive 27) Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift:126— ColorOrganizerRoot.contentCard has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 17 (20 pts), if/else 6 (7 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
DailyBriefDebugStats.lines (cognitive 27) Dayflow/Dayflow/Views/UI/DailyBrief/DailyBriefPageView.swift:671— DailyBriefDebugStats.lines has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17 (18 pts), ternaries 4 (6 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.
StorageManager.performPurgeIfNeeded (cognitive 26) Dayflow/Dayflow/Core/Recording/StorageManager+Maintenance.swift:430— StorageManager.performPurgeIfNeeded has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 2 (7 pts), boolean chains 1, error handling 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.
PausePillView.pill (cognitive 26) Dayflow/Dayflow/Views/UI/PausePillView.swift:128— PausePillView.pill has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 9 (13 pts), if/else 9 (11 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.
TimelineActivityLoader.recordingProjectionWindow (cognitive 26) Dayflow/Dayflow/Views/UI/MainView/TimelineActivityLoader.swift:285— TimelineActivityLoader.recordingProjectionWindow has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 2 (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.
SquarifiedTreemapLayout.squarify (cognitive 26) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyTreemapLayout.swift:96— SquarifiedTreemapLayout.squarify has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 5, loops 3 (5 pts), ternaries 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LLMService.makeBatchProvider (cognitive 25) Dayflow/Dayflow/Core/AI/LLMService.swift:226— LLMService.makeBatchProvider has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (18 pts), error handling 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CodexProvider.generateTimeline (cognitive 24) Dayflow/Dayflow/Core/AI/CodexProvider+Timeline.swift:17— CodexProvider.generateTimeline has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (13 pts), error handling 3 (8 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DailyRecapGenerator.extractFirstJSONObject (cognitive 24) Dayflow/Dayflow/Core/AI/DailyRecapGenerator.swift:682— DailyRecapGenerator.extractFirstJSONObject has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GeminiDirectProvider.decodeDashboardSSEChunkObjects (cognitive 24) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+DashboardStreaming.swift:280— GeminiDirectProvider.decodeDashboardSSEChunkObjects has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 2, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VideoProcessingService.generateVideoFromScreenshots (cognitive 24) Dayflow/Dayflow/Core/Recording/VideoProcessingService.swift:129— VideoProcessingService.generateVideoFromScreenshots has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (19 pts), loops 2 (3 pts), ternaries 2 (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.
ActivityCard.activityDetails (cognitive 24) Dayflow/Dayflow/Views/UI/MainView/ActivityCard.swift:173— ActivityCard.activityDetails has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 9 (12 pts), if/else 9 (10 pts), boolean chains 2 (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.
WeeklySankeyModelFactory.placeLabels (cognitive 24) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyModelFactory.swift:537— WeeklySankeyModelFactory.placeLabels has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (10 pts), boolean chains 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ChatCLIProcessRunner.executeStreaming::drainBufferedLines (cognitive 23) Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:791— ChatCLIProcessRunner.executeStreaming::drainBufferedLines has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 1, 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. This shape REPEATS in the file: one other method here (ChatCLIProcessRunner.executeStreaming) 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.
FlowDistractionAgent.start (cognitive 23) Dayflow/Dayflow/Core/Flow/FlowDistractionAgent.swift:253— FlowDistractionAgent.start has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (14 pts), error handling 2 (3 pts), match/switch 1 (3 pts), loops 1 (2 pts), ternaries 1 (nesting depth added 7). 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.
BrowserWindowInspector.collect (cognitive 23) Dayflow/Dayflow/Core/Recording/BrowserWindowInspector.swift:147— BrowserWindowInspector.collect has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 4, 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.
ChatCLIProcessRunner.parseCodexEvent (cognitive 22) Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:1033— ChatCLIProcessRunner.parseCodexEvent has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (14 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.
ChatToolExecutor.formatTimelineCardsForLLM (cognitive 22) Dayflow/Dayflow/Core/AI/ChatToolExecutor.swift:211— ChatToolExecutor.formatTimelineCardsForLLM has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClaudeProvider.transcribeScreenshots (cognitive 22) Dayflow/Dayflow/Core/AI/ClaudeProvider+Transcription.swift:12— ClaudeProvider.transcribeScreenshots has cognitive complexity 22 (threshold 15). Drivers by points: if/else 3 (9 pts), ternaries 2 (6 pts), error handling 3 (5 pts), loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AnalysisManager.queueLLMRequest (cognitive 22) Dayflow/Dayflow/Core/Analysis/AnalysisManager.swift:533— AnalysisManager.queueLLMRequest has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2 (5 pts), boolean chains 3, 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.
PIIModelRunner.scores (cognitive 22) Dayflow/Dayflow/Core/PrivacyShield/PIIModelRunner.swift:33— PIIModelRunner.scores has cognitive complexity 22 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 3 (10 pts), boolean chains 1 (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
Condenser.resolveSubmits (cognitive 22) Dayflow/Dayflow/Core/Recording/AccessibilityLogCondenser.swift:1342— Condenser.resolveSubmits has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 8, 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.
Condenser.sentBubble (cognitive 22) Dayflow/Dayflow/Core/Recording/AccessibilityLogCondenser.swift:1368— Condenser.sentBubble has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AppDelegate.applicationDidFinishLaunching (cognitive 21) Dayflow/Dayflow/App/AppDelegate.swift:65— AppDelegate.applicationDidFinishLaunching has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 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.
ChatCLIProcessRunner.parseClaudeEvent (cognitive 21) Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:1082— ChatCLIProcessRunner.parseClaudeEvent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 9 (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.
ClaudeOutputValidator.validateTranscriptionSegments (cognitive 21) Dayflow/Dayflow/Core/AI/ClaudeOutputValidator.swift:210— ClaudeOutputValidator.validateTranscriptionSegments has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OneStepTimelineObservations.make (cognitive 21) Dayflow/Dayflow/Core/AI/OneStepTimelineSupport.swift:102— OneStepTimelineObservations.make has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 7, loops 3 (5 pts), ternaries 1 (nesting depth added 6). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FlowDistractionAgent.jsonObjects (cognitive 21) Dayflow/Dayflow/Core/Flow/FlowDistractionAgent.swift:1293— FlowDistractionAgent.jsonObjects has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FaviconContrast.pixelSamples (cognitive 21) Dayflow/Dayflow/Core/Net/FaviconService.swift:519— FaviconContrast.pixelSamples has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AccessibilityLogStore.prune (cognitive 21) Dayflow/Dayflow/Core/Recording/AccessibilityLogStore.swift:112— AccessibilityLogStore.prune has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatCLITestView.body (cognitive 21) Dayflow/Dayflow/Views/Onboarding/ChatCLITestView.swift:18— ChatCLITestView.body has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 5 (8 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.
ChatContentParser.blocks (cognitive 21) Dayflow/Dayflow/Views/UI/ChatCharts.swift:289— ChatContentParser.blocks has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 1, loops 1, ternaries 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.
DocketHandoffDirector.typeIn (cognitive 21) Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketHandoffTransition.swift:641— DocketHandoffDirector.typeIn has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (4 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.
TelemetryErrorSanitizer.balancedJSONEnd (cognitive 20) Dayflow/Dayflow/System/AnalyticsService.swift:153— TelemetryErrorSanitizer.balancedJSONEnd has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatCLIProcessRunner.balancedJSONEnd (cognitive 20) Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:1429— ChatCLIProcessRunner.balancedJSONEnd has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatService.parseAssistantMetadata (cognitive 20) Dayflow/Dayflow/Core/AI/ChatService.swift:660— ChatService.parseAssistantMetadata 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.
ClaudeProvider.balancedJSONEnd (cognitive 20) Dayflow/Dayflow/Core/AI/ClaudeStrictJSONParser.swift:289— ClaudeProvider.balancedJSONEnd has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DayflowBackendProvider.generateTimeline (cognitive 20) Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:560— DayflowBackendProvider.generateTimeline has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, error handling 2 (3 pts), 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.
GeminiDirectProvider.extractFirstJSONObject (cognitive 20) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Logging.swift:65— GeminiDirectProvider.extractFirstJSONObject has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TimelineOutputSupporting.validateSegments (cognitive 20) Dayflow/Dayflow/Core/AI/TimelineOutputSupport.swift:295— TimelineOutputSupporting.validateSegments has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 5, 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.
DailyBriefGenerator.runStats (cognitive 20) Dayflow/Dayflow/Core/DailyBrief/DailyBriefGenerator.swift:1081— DailyBriefGenerator.runStats has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (5 pts), ternaries 3 (4 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.
DailyBriefStore.finishRun (cognitive 20) Dayflow/Dayflow/Core/DailyBrief/DailyBriefStore.swift:450— DailyBriefStore.finishRun has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (6 pts), boolean chains 5, 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.
FlowDistractionAgent.finishTick (cognitive 20) Dayflow/Dayflow/Core/Flow/FlowDistractionAgent.swift:719— FlowDistractionAgent.finishTick 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.
ScreenRecorder.captureScreenshot (cognitive 20) Dayflow/Dayflow/Core/Recording/ScreenRecorder.swift:570— ScreenRecorder.captureScreenshot has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), 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.
ScreenRecorder.registerForSleepAndLock (cognitive 20) Dayflow/Dayflow/Core/Recording/ScreenRecorder.swift:915— ScreenRecorder.registerForSleepAndLock has cognitive complexity 20 (threshold 15). Drivers by points: if/else 19, boolean chains 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.
WeeklyOverviewBuilder.longestFocusSummary (cognitive 20) Dayflow/Dayflow/Core/Weekly/WeeklyOverviewBuilder.swift:282— WeeklyOverviewBuilder.longestFocusSummary has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (3 pts), boolean chains 2 (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.
Coordinator.startMonitoring (cognitive 20) Dayflow/Dayflow/Views/UI/TimelineReviewChrome.swift:448— Coordinator.startMonitoring has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (15 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.
DocketDeckView.card (cognitive 20) Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketDeckView.swift:224— DocketDeckView.card has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 11, boolean chains 5, if/else 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.
DayflowApp.body (cognitive 19) Dayflow/Dayflow/App/DayflowApp.swift:293— DayflowApp.body has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 3 (5 pts), boolean chains 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.
GeminiDirectProvider.processDashboardSSEChunkObject (cognitive 19) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+DashboardStreaming.swift:228— GeminiDirectProvider.processDashboardSSEChunkObject has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 4, 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.
AnalysisManager.reprocessDay (cognitive 19) Dayflow/Dayflow/Core/Analysis/AnalysisManager.swift:105— AnalysisManager.reprocessDay has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 4 (6 pts), match/switch 1 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DailyBriefGenerator.generate (cognitive 19) Dayflow/Dayflow/Core/DailyBrief/DailyBriefGenerator.swift:143— DailyBriefGenerator.generate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), match/switch 2 (5 pts), loops 3, ternaries 2, 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.
PrivacyShield.prepare (cognitive 19) Dayflow/Dayflow/Core/PrivacyShield/PrivacyShield.swift:248— PrivacyShield.prepare has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (8 pts), boolean chains 5, error handling 2 (4 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OnboardingFlow.body (cognitive 19) Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:44— OnboardingFlow.body has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 2 (3 pts), boolean chains 2, 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.
FilmstripGenerator.generate (cognitive 19) Dayflow/Dayflow/Views/UI/ScrubberView.swift:39— FilmstripGenerator.generate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 4, error handling 1, 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, 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.
SpinnerNSView.precomputeAnimations (cognitive 19) Dayflow/Dayflow/Views/UI/TimelineThinkingSpinner.swift:206— SpinnerNSView.precomputeAnimations has cognitive complexity 19 (threshold 15). Drivers by points: loops 8 (11 pts), if/else 5 (6 pts), ternaries 1 (2 pts) (nesting depth added 5). 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, 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.
TimelineCalendarPopover.daysToDisplay (cognitive 19) Dayflow/Dayflow/Views/UI/MainView/TimelineCalendarPopover.swift:256— TimelineCalendarPopover.daysToDisplay has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (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.
WeekTimelineActivityCard.cardCanvas (cognitive 19) Dayflow/Dayflow/Views/UI/MainView/WeekTimelineActivityCard.swift:129— WeekTimelineActivityCard.cardCanvas has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 14 (15 pts), if/else 3, boolean chains 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.
WeeklyInteractionGraphLayoutBuilder.layout (cognitive 19) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyInteractionGraphLayout.swift:35— WeeklyInteractionGraphLayoutBuilder.layout has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 4, loops 3 (4 pts), ternaries 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.
WeeklySankeyModelFactory.build (cognitive 19) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyModelFactory.swift:263— WeeklySankeyModelFactory.build has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (8 pts), loops 4 (6 pts), boolean chains 3, ternaries 2 (nesting depth added 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.
ChatCLIProcessRunner.stripANSIEscapes (cognitive 18) Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:1109— ChatCLIProcessRunner.stripANSIEscapes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 2 (5 pts), boolean chains 3 (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.
DailyRecapScheduler.runCheck (cognitive 18) Dayflow/Dayflow/Core/AI/DailyRecapScheduler.swift:71— DailyRecapScheduler.runCheck has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 6, 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.
GemmaBackupProvider.appendCard (cognitive 18) Dayflow/Dayflow/Core/AI/GemmaBackupProvider.swift:174— GemmaBackupProvider.appendCard has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 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.
PIIMaskRules.trimMaskedEdges (cognitive 18) Dayflow/Dayflow/Core/PrivacyShield/PIIMaskRules.swift:105— PIIMaskRules.trimMaskedEdges has cognitive complexity 18 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 2 (4 pts), boolean chains 3 (nesting depth added 7). 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.
PIIMaskRules.maskSeedPhrases (cognitive 18) Dayflow/Dayflow/Core/PrivacyShield/PIIMaskRules.swift:577— PIIMaskRules.maskSeedPhrases has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 6, if/else 5 (6 pts), loops 3 (6 pts) (nesting depth added 4). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to one function item inside it that branches (finish). 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.
StorageManager.cleanupRecordingStragglers (cognitive 18) Dayflow/Dayflow/Core/Recording/StorageManager+Maintenance.swift:514— StorageManager.cleanupRecordingStragglers has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DayflowSurfaceButton.body (cognitive 18) Dayflow/Dayflow/Views/Components/DayflowSurfaceButton.swift:34— DayflowSurfaceButton.body has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 13 (14 pts), if/else 4 (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.
LocalLLMTestView.runTest (cognitive 18) Dayflow/Dayflow/Views/Onboarding/LocalLLMTestView.swift:174— LocalLLMTestView.runTest has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 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.
FlowOverlayView.updateCreature (cognitive 18) Dayflow/Dayflow/Views/UI/Flow/FlowOverlayView.swift:105— FlowOverlayView.updateCreature has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 2 (3 pts), boolean chains 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.
DocketHandoffDirector.paste (cognitive 18) Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketHandoffTransition.swift:155— DocketHandoffDirector.paste has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 8, 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.
AccessibilityLogCondenser.swift.mergingShortRuns::closeRun (cognitive 18) Dayflow/Dayflow/Core/Recording/AccessibilityLogCondenser.swift:581— AccessibilityLogCondenser.swift.mergingShortRuns::closeRun has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 12, if/else 3 (4 pts), ternaries 1 (2 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.
ClaudeProvider.generateTimeline (cognitive 17) Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.swift:17— ClaudeProvider.generateTimeline has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 2 (6 pts), if/else 2 (5 pts), error handling 2 (4 pts), loops 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.
DayflowBackendProvider.transcribeScreenshots (cognitive 17) Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:380— DayflowBackendProvider.transcribeScreenshots has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, error handling 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.
GeminiDirectProvider.validateTimeline (cognitive 17) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:870— GeminiDirectProvider.validateTimeline has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 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.
GeminiDirectProvider.logGeminiFailure (cognitive 17) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Logging.swift:18— GeminiDirectProvider.logGeminiFailure has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (17 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.
TimelineOutputSupporting.validateTimeline (cognitive 17) Dayflow/Dayflow/Core/AI/TimelineOutputSupport.swift:247— TimelineOutputSupporting.validateTimeline has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 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.
PIIMaskRules.unmaskOrphanDomains (cognitive 17) Dayflow/Dayflow/Core/PrivacyShield/PIIMaskRules.swift:155— PIIMaskRules.unmaskOrphanDomains has cognitive complexity 17 (threshold 15). Drivers by points: if/else 2 (6 pts), loops 3 (6 pts), boolean chains 5 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StorageManager.replaceTimelineCardsInRange (cognitive 17) Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:977— StorageManager.replaceTimelineCardsInRange has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, 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.
ColorAssignmentCard.body (cognitive 17) Dayflow/Dayflow/Views/Components/CategorySetupCards.swift:210— ColorAssignmentCard.body has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 9 (10 pts), if/else 6, boolean chains 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.
ChatView.betaLockScreen (cognitive 17) Dayflow/Dayflow/Views/UI/ChatView+Content.swift:471— ChatView.betaLockScreen has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, ternaries 5, if/else 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.
DailyView.refreshStandupDraftIfNeeded (cognitive 17) Dayflow/Dayflow/Views/UI/DailyView+Standup.swift:597— DailyView.refreshStandupDraftIfNeeded 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.
AgentPlaybackHost.receive (cognitive 17) Dayflow/Dayflow/Views/UI/Agents/AgentPlaybackView.swift:403— AgentPlaybackHost.receive has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 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.
DocketFeedbackRow.source (cognitive 17) Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketCardContent.swift:639— DocketFeedbackRow.source has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 3 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DocketTransitionView.body (cognitive 17) Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketHandoffTransition.swift:1197— DocketTransitionView.body has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (12 pts), match/switch 2 (4 pts), boolean chains 1 (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.
StoragePathMigrator.relocateDirectoryContents (cognitive 16) Dayflow/Dayflow/Utilities/StoragePathMigrator.swift:63— StoragePathMigrator.relocateDirectoryContents has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 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.
ChatCLIProcessRunner.parseCodexJSONOutput (cognitive 16) Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:1314— ChatCLIProcessRunner.parseCodexJSONOutput 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.
DayflowBackendProvider.generateDaily (cognitive 16) Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:228— DayflowBackendProvider.generateDaily has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, error handling 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.
TimelineFailureClassifier.providerName (cognitive 16) Dayflow/Dayflow/Core/AI/TimelineFailureClassifier.swift:481— TimelineFailureClassifier.providerName has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 11, if/else 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.
DailyBriefGenerator.runStructuredClaude (cognitive 16) Dayflow/Dayflow/Core/DailyBrief/DailyBriefGenerator.swift:890— DailyBriefGenerator.runStructuredClaude has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 6, error handling 2 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ScreenRecorder.refreshDisplay (cognitive 16) Dayflow/Dayflow/Core/Recording/ScreenRecorder.swift:798— ScreenRecorder.refreshDisplay has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 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.
StorageManager.saveTimelineCardShell (cognitive 16) Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:67— StorageManager.saveTimelineCardShell has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 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.
ActivityCard.titleView (cognitive 16) Dayflow/Dayflow/Views/UI/MainView/ActivityCard.swift:312— ActivityCard.titleView has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 3 (6 pts), boolean chains 4 (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.
TimelineActivityLoader.buildActivities (cognitive 16) Dayflow/Dayflow/Views/UI/MainView/TimelineActivityLoader.swift:95— TimelineActivityLoader.buildActivities has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FunctionTooLong: DailyWorkflowComputation.swift.computeDailyWorkflow Dayflow/Dayflow/Views/UI/DailyWorkflowComputation.swift:8— FunctionTooLong — computeDailyWorkflow runs 274 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 174 over it, 2.74× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication· Near-duplicate member family (4 members, 51 shared lines) · ×1
Near-duplicate member family (4 members, 51 shared lines) Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:228— Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:228-362 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:380-555 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:560-752 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:754-900 — These 4 members are variants of one another: a block of 51 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Near-duplicate member pair (222 shared lines) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:334— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:334-614 | Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift:259-568 — These two members are variants of one another: 222 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (72 shared lines) Dayflow/Dayflow/Core/Analysis/AnalysisManager.swift:105— Dayflow/Dayflow/Core/Analysis/AnalysisManager.swift:105-238 | Dayflow/Dayflow/Core/Analysis/AnalysisManager.swift:240-369 — These two members are variants of one another: 72 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (64 shared lines) Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.swift:17— Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.swift:17-172 | Dayflow/Dayflow/Core/AI/CodexProvider+Timeline.swift:17-167 — These two members are variants of one another: 64 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (57 shared lines) Dayflow/Dayflow/Core/AI/ClaudeProvider+ActivityCards.swift:39— Dayflow/Dayflow/Core/AI/ClaudeProvider+ActivityCards.swift:39-155 | Dayflow/Dayflow/Core/AI/ClaudeProvider+Transcription.swift:12-176 — These two members are variants of one another: 57 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Edited copy of a member (177 corresponding lines) · ×1
Edited copy of a member (177 corresponding lines) Dayflow/Dayflow/Core/AI/ChatPromptBuilder.swift:31— Dayflow/Dayflow/Core/AI/ChatPromptBuilder.swift:31-207 | Dayflow/Dayflow/Core/AI/ChatPromptBuilder.swift:209-385 — These two members are one piece of code written twice and then edited apart: 177 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (199 corresponding lines) · ×1
Edited copy of a member (199 corresponding lines) Dayflow/Dayflow/Utilities/DayflowTheme.swift:235— Dayflow/Dayflow/Utilities/DayflowTheme.swift:235-439 | Dayflow/Dayflow/Utilities/DayflowTheme.swift:450-648 — These two members are one piece of code written twice and then edited apart: 199 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (111 corresponding lines) · ×1
Edited copy of a member (111 corresponding lines) Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:510— Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:510-620 | Dayflow/Dayflow/Views/UI/ScrubberView.swift:189-306 — These two members are one piece of code written twice and then edited apart: 111 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (91 corresponding lines) · ×1
Edited copy of a member (91 corresponding lines) Dayflow/Dayflow/Core/Recording/StorageManager.swift:274— Dayflow/Dayflow/Core/Recording/StorageManager.swift:274-364 | Dayflow/Dayflow/Core/Recording/StorageManager.swift:366-456 — These two members are one piece of code written twice and then edited apart: 91 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (99 corresponding lines) · ×1
Edited copy of a member (99 corresponding lines) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:744— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:744-868 | Dayflow/Dayflow/Core/AI/TimelineOutputSupport.swift:147-245 — These two members are one piece of code written twice and then edited apart: 99 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (82 corresponding lines) · ×1
Edited copy of a member (82 corresponding lines) Dayflow/Dayflow/Views/UI/MainView/TimelineActivityLoader.swift:95— Dayflow/Dayflow/Views/UI/MainView/TimelineActivityLoader.swift:95-183 | Dayflow/Dayflow/Views/UI/TimelineReviewTypes.swift:160-241 — These two members are one piece of code written twice and then edited apart: 82 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (52 corresponding lines) · ×1
Edited copy of a member (52 corresponding lines) Dayflow/Dayflow/Core/AI/ClaudeProvider+Text.swift:55— Dayflow/Dayflow/Core/AI/ClaudeProvider+Text.swift:55-106 | Dayflow/Dayflow/Core/AI/CodexProvider+Text.swift:55-106 — These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (83 corresponding lines) · ×1
Edited copy of a member (83 corresponding lines) Dayflow/Dayflow/Core/AI/GemmaBackupProvider.swift:174— Dayflow/Dayflow/Core/AI/GemmaBackupProvider.swift:174-256 | Dayflow/Dayflow/Core/AI/OllamaProvider.swift:100-210 — These two members are one piece of code written twice and then edited apart: 83 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (70 corresponding lines) · ×1
Edited copy of a member (70 corresponding lines) Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Frames.swift:204— Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Frames.swift:204-273 | Dayflow/Dayflow/Core/AI/OllamaProvider+Transcription.swift:161-238 — These two members are one piece of code written twice and then edited apart: 70 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (43 corresponding lines) · ×1
Edited copy of a member (43 corresponding lines) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyContextChartsSection.swift:146— Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyContextChartsSection.swift:146-188 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyContextShiftComparisonSection.swift:114-156 — 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 (48 corresponding lines) · ×1
Edited copy of a member (48 corresponding lines) Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.swift:176— Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.swift:176-223 | Dayflow/Dayflow/Core/AI/CodexProvider+Timeline.swift:190-252 — 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 (51 corresponding lines) · ×1
Edited copy of a member (51 corresponding lines) Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift:438— Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift:438-488 | Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift:534-596 — 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· Edited copy of a member (54 corresponding lines) · ×1
Edited copy of a member (54 corresponding lines) Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Frames.swift:275— Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Frames.swift:275-328 | Dayflow/Dayflow/Core/AI/OllamaProvider+Transcription.swift:240-297 — These two members are one piece of code written twice and then edited apart: 54 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (62 corresponding lines) · ×1
Edited copy of a member (62 corresponding lines) Dayflow/Dayflow/Views/Components/CategoryDonutChart.swift:96— Dayflow/Dayflow/Views/Components/CategoryDonutChart.swift:96-166 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyDonutSection.swift:128-189 — These two members are one piece of code written twice and then edited apart: 62 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (55 corresponding lines) · ×1
Edited copy of a member (55 corresponding lines) Dayflow/Dayflow/Core/AI/ClaudeProvider+Prompts.swift:7— Dayflow/Dayflow/Core/AI/ClaudeProvider+Prompts.swift:7-78 | Dayflow/Dayflow/Core/AI/CodexProvider+Prompts.swift:11-65 — These two members are one piece of code written twice and then edited apart: 55 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (46 corresponding lines) · ×1
Edited copy of a member (46 corresponding lines) Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift:640— Dayflow/Dayflow/Views/Components/TimelineCardColorPicker.swift:640-685 | Dayflow/Dayflow/Views/Onboarding/SetupContinueButton.swift:28-76 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (61 corresponding lines) · ×1
Edited copy of a member (61 corresponding lines) Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Summaries.swift:276— Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Summaries.swift:276-336 | Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Summaries.swift:338-403 — These two members are one piece of code written twice and then edited apart: 61 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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) Dayflow/Dayflow/Views/UI/ChatCharts.swift:476— Dayflow/Dayflow/Views/UI/ChatCharts.swift:476-516 | Dayflow/Dayflow/Views/UI/ChatCharts.swift:518-558 — 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 copies of one member (3 members, 36+ corresponding lines) · ×1
Edited copies of one member (3 members, 36+ corresponding lines) Dayflow/Dayflow/Views/UI/DailyView+Workflow.swift:451— Dayflow/Dayflow/Views/UI/DailyView+Workflow.swift:451-486 | Dayflow/Dayflow/Views/UI/MainView/Layout+TimelineHeader.swift:62-97 | Dayflow/Dayflow/Views/UI/Weekly/WeeklyHeader.swift:44-79 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 36 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 (36 corresponding lines) · ×1
Edited copy of a member (36 corresponding lines) Dayflow/Dayflow/Core/Recording/StorageManager+Reprocessing.swift:59— Dayflow/Dayflow/Core/Recording/StorageManager+Reprocessing.swift:59-97 | Dayflow/Dayflow/Core/Recording/StorageManager+Reprocessing.swift:156-191 — 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 (24 corresponding lines) · ×1
Edited copy of a member (24 corresponding lines) Dayflow/Dayflow/Views/UI/Settings/SettingsReferralProgramCard.swift:286— Dayflow/Dayflow/Views/UI/Settings/SettingsReferralProgramCard.swift:286-309 | Dayflow/Dayflow/Views/UI/Settings/SettingsReferralProgramCard.swift:317-348 — 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 (33 corresponding lines) · ×1
Edited copy of a member (33 corresponding lines) Dayflow/Dayflow/Core/Recording/StorageManager+DailyStandup.swift:63— Dayflow/Dayflow/Core/Recording/StorageManager+DailyStandup.swift:63-99 | Dayflow/Dayflow/Core/Recording/StorageManager+DailyStandup.swift:101-133 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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, 21+ corresponding lines) · ×1
Edited copies of one member (3 members, 21+ corresponding lines) Dayflow/Dayflow/Views/UI/Settings/SettingsBrowserPrivacySection.swift:232— Dayflow/Dayflow/Views/UI/Settings/SettingsBrowserPrivacySection.swift:232-252 | Dayflow/Dayflow/Views/UI/Settings/SettingsComponents.swift:213-239 | Dayflow/Dayflow/Views/UI/Settings/SettingsComponents.swift:248-270 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 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, 18+ corresponding lines) · ×1
Edited copies of one member (4 members, 18+ corresponding lines) Dayflow/Dayflow/Core/Recording/StorageManager+Chunks.swift:56— Dayflow/Dayflow/Core/Recording/StorageManager+Chunks.swift:56-75 | Dayflow/Dayflow/Core/Recording/StorageManager+Chunks.swift:144-161 | Dayflow/Dayflow/Core/Recording/StorageManager+Chunks.swift:175-195 | Dayflow/Dayflow/Core/Recording/StorageManager+Observations.swift:25-47 — 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 copies of one member (3 members, 16+ corresponding lines) · ×1
Edited copies of one member (3 members, 16+ corresponding lines) Dayflow/Dayflow/Core/AI/DailyRecapGenerator.swift:401— Dayflow/Dayflow/Core/AI/DailyRecapGenerator.swift:401-424 | Dayflow/Dayflow/Core/AI/DailyRecapGenerator.swift:426-441 | Dayflow/Dayflow/Core/AI/DailyRecapGenerator.swift:488-507 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 9+ corresponding lines) · ×1
Edited copies of one member (3 members, 9+ corresponding lines) Dayflow/Dayflow/Core/PrivacyShield/PIIText.swift:84— Dayflow/Dayflow/Core/PrivacyShield/PIIText.swift:84-94 | Dayflow/Dayflow/Core/PrivacyShield/PIIText.swift:98-106 | Dayflow/Dayflow/Core/PrivacyShield/PIIText.swift:109-117 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 17+ corresponding lines) · ×1
Edited copies of one member (3 members, 17+ corresponding lines) Dayflow/Dayflow/Views/UI/GettingStarted/GettingStartedChecklistCard.swift:272— Dayflow/Dayflow/Views/UI/GettingStarted/GettingStartedChecklistCard.swift:272-288 | Dayflow/Dayflow/Views/UI/GettingStarted/GettingStartedTourView.swift:252-269 | Dayflow/Dayflow/Views/UI/GettingStarted/GettingStartedTourView.swift:271-287 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×1
Edited copy of a member (20 corresponding lines) Dayflow/Dayflow/Views/UI/Weekly/WeeklyView.swift:270— Dayflow/Dayflow/Views/UI/Weekly/WeeklyView.swift:270-289 | Dayflow/Dayflow/Views/UI/Weekly/WeeklyView.swift:291-310 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 11+ corresponding lines) · ×1
Edited copies of one member (3 members, 11+ corresponding lines) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyApplicationInteractionsSection.swift:72— Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyApplicationInteractionsSection.swift:72-86 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyContextChartsSection.swift:482-492 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyInteractionGraphGlyphs.swift:392-409 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 10+ corresponding lines) · ×1
Edited copies of one member (4 members, 10+ corresponding lines) Dayflow/Dayflow/Core/Thumbnails/ScreenshotThumbnailCache.swift:72— Dayflow/Dayflow/Core/Thumbnails/ScreenshotThumbnailCache.swift:72-82 | Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:436-445 | Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshowPlayback.swift:318-329 | Dayflow/Dayflow/Views/UI/ScrubberView.swift:145-154 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 5+ corresponding lines) · ×1
Edited copies of one member (3 members, 5+ corresponding lines) Dayflow/Dayflow/Core/Weekly/WeeklyDateRange.swift:14— Dayflow/Dayflow/Core/Weekly/WeeklyDateRange.swift:14-18 | Dayflow/Dayflow/Core/Weekly/WeeklyDateRange.swift:20-24 | Dayflow/Dayflow/Views/UI/MainView/TimelineShellModels.swift:94-98 — 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 (3 members, 8+ corresponding lines) · ×1
Edited copies of one member (3 members, 8+ corresponding lines) Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeChooseProviderStep.swift:256— Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeChooseProviderStep.swift:256-263 | Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeChooseProviderStep.swift:349-356 | Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeChooseProviderStep.swift:358-365 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 4+ corresponding lines) · ×1
Edited copies of one member (6 members, 4+ corresponding lines) Dayflow/Dayflow/Core/AI/ClaudePromptDefaults.swift:102— Dayflow/Dayflow/Core/AI/ClaudePromptDefaults.swift:102-105 | Dayflow/Dayflow/Core/AI/CodexPromptPreferences.swift:121-124 | Dayflow/Dayflow/Core/AI/DayflowEndpointPreferences.swift:41-44 | Dayflow/Dayflow/Core/AI/GeminiPromptPreferences.swift:162-165 | Dayflow/Dayflow/Core/AI/LegacyLLMProviderMigration.swift:190-193 | Dayflow/Dayflow/Core/AI/OllamaPromptPreferences.swift:96-99 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 7+ corresponding lines) · ×1
Edited copies of one member (3 members, 7+ corresponding lines) Dayflow/Dayflow/Core/Recording/StorageManager+DailyStandup.swift:135— Dayflow/Dayflow/Core/Recording/StorageManager+DailyStandup.swift:135-146 | Dayflow/Dayflow/Core/Recording/StorageManager+Screenshots.swift:49-55 | Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:175-185 — 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 (4 members, 3+ corresponding lines) · ×1
Edited copies of one member (4 members, 3+ corresponding lines) Dayflow/Dayflow/Core/AI/ClaudeProvider+ActivityCards.swift:33— Dayflow/Dayflow/Core/AI/ClaudeProvider+ActivityCards.swift:33-37 | Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.swift:7-9 | Dayflow/Dayflow/Core/AI/ClaudeProvider+Transcription.swift:6-10 | Dayflow/Dayflow/Core/AI/CodexProvider+Timeline.swift:7-9 — 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.
Duplicated block (77 lines × 2) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:538— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:538-614 | Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift:492-568 — before extracting anything, compare `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift` and `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 320 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 `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:538` 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 (63–73 lines × 2) Dayflow/Dayflow/Views/UI/MainView/TimelineActivityLoader.swift:111— Dayflow/Dayflow/Views/UI/MainView/TimelineActivityLoader.swift:111-183 | Dayflow/Dayflow/Views/UI/TimelineReviewTypes.swift:179-241 — 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 `Dayflow/Dayflow/Views/UI/MainView/TimelineActivityLoader.swift:111` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (51–65 lines × 2) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:781— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:781-845 | Dayflow/Dayflow/Core/AI/TimelineOutputSupport.swift:170-220 — 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 `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:781` 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 (55–58 lines × 2) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:389— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:389-443 | Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift:292-349 — before extracting anything, compare `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift` and `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 320 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 `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:389` 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 (63 lines × 2) Dayflow/Dayflow/Core/AI/ChatPromptBuilder.swift:32— Dayflow/Dayflow/Core/AI/ChatPromptBuilder.swift:32-94 | Dayflow/Dayflow/Core/AI/ChatPromptBuilder.swift:210-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. 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 (48–50 lines × 2) Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:563— Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:563-610 | Dayflow/Dayflow/Views/UI/ScrubberView.swift:245-294 — before extracting anything, compare `Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift` and `Dayflow/Dayflow/Views/UI/ScrubberView.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:563` 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 (43 lines × 2) Dayflow/Dayflow/Core/AI/ClaudeProvider+Text.swift:55— Dayflow/Dayflow/Core/AI/ClaudeProvider+Text.swift:55-97 | Dayflow/Dayflow/Core/AI/CodexProvider+Text.swift:55-97 — before extracting anything, compare `Dayflow/Dayflow/Core/AI/ClaudeProvider+Text.swift` and `Dayflow/Dayflow/Core/AI/CodexProvider+Text.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 86 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 `Dayflow/Dayflow/Core/AI/ClaudeProvider+Text.swift:55` 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 (36–39 lines × 2) Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.swift:34— Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.swift:34-72 | Dayflow/Dayflow/Core/AI/CodexProvider+Timeline.swift:33-68 — before extracting anything, compare `Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.swift` and `Dayflow/Dayflow/Core/AI/CodexProvider+Timeline.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 110 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 `Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.swift:34` 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. 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 (32–38 lines × 2) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:497— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:497-534 | Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift:457-488 — before extracting anything, compare `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift` and `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 320 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 `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:497` 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 (30–38 lines × 2) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:870— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:870-907 | Dayflow/Dayflow/Core/AI/TimelineOutputSupport.swift:247-276 — 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 `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:870` 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 (44–47 lines × 2) Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:516— Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:516-559 | Dayflow/Dayflow/Views/UI/ScrubberView.swift:195-241 — before extracting anything, compare `Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift` and `Dayflow/Dayflow/Views/UI/ScrubberView.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:516` 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 (26–35 lines × 2) Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:704— Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:704-729 | Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:1567-1601 — 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 `Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:704` 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, `Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:1603` calls `shellEscape` and `Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:730` 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 (34–35 lines × 2) Dayflow/Dayflow/Core/Analysis/AnalysisManager.swift:182— Dayflow/Dayflow/Core/Analysis/AnalysisManager.swift:182-215 | Dayflow/Dayflow/Core/Analysis/AnalysisManager.swift:318-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 `Dayflow/Dayflow/Core/Analysis/AnalysisManager.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 (33 lines × 2) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:269— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:269-301 | Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift:201-233 — before extracting anything, compare `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift` and `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 320 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 `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:269` 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 (78 lines × 2) Dayflow/Dayflow/Core/Recording/StorageManager.swift:287— Dayflow/Dayflow/Core/Recording/StorageManager.swift:287-364 | Dayflow/Dayflow/Core/Recording/StorageManager.swift:379-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. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Core/Recording/StorageManager.swift:287` 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 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 (28 lines × 2) Dayflow/Dayflow/Core/AI/ClaudeProvider+Text.swift:17— Dayflow/Dayflow/Core/AI/ClaudeProvider+Text.swift:17-44 | Dayflow/Dayflow/Core/AI/CodexProvider+Text.swift:17-44 — before extracting anything, compare `Dayflow/Dayflow/Core/AI/ClaudeProvider+Text.swift` and `Dayflow/Dayflow/Core/AI/CodexProvider+Text.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 86 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 (8–26 lines × 3) Dayflow/Dayflow/Views/Onboarding/ProviderSetupState.swift:127— Dayflow/Dayflow/Views/Onboarding/ProviderSetupState.swift:127-138 | Dayflow/Dayflow/Views/Onboarding/ProviderSetupState.swift:154-179 | Dayflow/Dayflow/Views/Onboarding/ProviderSetupState.swift:195-202 — 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 `Dayflow/Dayflow/Views/Onboarding/ProviderSetupState.swift:127` 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 (21–26 lines × 2) Dayflow/Dayflow/Core/Recording/StorageManager+TimelineReview.swift:246— Dayflow/Dayflow/Core/Recording/StorageManager+TimelineReview.swift:246-271 | Dayflow/Dayflow/Views/UI/TimelineReviewOverlay.swift:672-692 — 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 `Dayflow/Dayflow/Core/Recording/StorageManager+TimelineReview.swift:246` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `segments` to `[TimelineReviewRatingSegment]` in one and `[CoverageSegment]` 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 (36–37 lines × 2) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:444— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:444-479 | Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift:371-407 — before extracting anything, compare `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift` and `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 320 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 `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:444` 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 (17–24 lines × 5) Dayflow/Dayflow/Core/AI/OllamaProvider+Summaries.swift:179— Dayflow/Dayflow/Core/AI/OllamaProvider+Summaries.swift:179-195 | Dayflow/Dayflow/Core/AI/OllamaProvider+Summaries.swift:242-258 | Dayflow/Dayflow/Core/AI/OllamaProvider+Summaries.swift:368-387 | Dayflow/Dayflow/Core/AI/OllamaProvider+Summaries.swift:490-506 | Dayflow/Dayflow/Core/AI/OllamaProvider+Transcription.swift:427-450 — there are 5 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 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Core/AI/OllamaProvider+Summaries.swift:179` 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 (21–24 lines × 2) Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Networking.swift:137— Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Networking.swift:137-157 | Dayflow/Dayflow/Core/AI/OllamaProvider.swift:234-257 — 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 `Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Networking.swift:137` 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 (19–24 lines × 2) Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeVideoIntroStep.swift:80— Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeVideoIntroStep.swift:80-98 | Dayflow/Dayflow/Views/Onboarding/VideoLaunchView.swift:52-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 `Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeVideoIntroStep.swift:80` 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–23 lines × 4) Dayflow/Dayflow/Views/Onboarding/ProviderSetupState.swift:124— Dayflow/Dayflow/Views/Onboarding/ProviderSetupState.swift:124-136 | Dayflow/Dayflow/Views/Onboarding/ProviderSetupState.swift:150-172 | Dayflow/Dayflow/Views/Onboarding/ProviderSetupState.swift:192-200 | Dayflow/Dayflow/Views/Onboarding/ProviderSetupState.swift:226-239 — 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 `Dayflow/Dayflow/Views/Onboarding/ProviderSetupState.swift:124` 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, `Dayflow/Dayflow/Views/Onboarding/ProviderSetupState.swift:173` calls `String`, `information` and `Dayflow/Dayflow/Views/Onboarding/ProviderSetupState.swift:239` 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 (32 lines × 3) Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:1430— Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:1430-1461 | Dayflow/Dayflow/Core/AI/ClaudeStrictJSONParser.swift:290-321 | Dayflow/Dayflow/System/AnalyticsService.swift:154-185 — 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.
Duplicated block (16–23 lines × 2) Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:90— Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:90-112 | Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:117-132 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (22 lines × 3) Dayflow/Dayflow/Core/Recording/ScreenRecorder.swift:934— Dayflow/Dayflow/Core/Recording/ScreenRecorder.swift:934-955 | Dayflow/Dayflow/Core/Recording/ScreenRecorder.swift:975-996 | Dayflow/Dayflow/Core/Recording/ScreenRecorder.swift:1016-1037 — 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 `Dayflow/Dayflow/Core/Recording/ScreenRecorder.swift:934` 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.
Duplicated block (22–23 lines × 2) Dayflow/Dayflow/Core/AI/AgentCLISupport+Parsing.swift:99— Dayflow/Dayflow/Core/AI/AgentCLISupport+Parsing.swift:99-121 | Dayflow/Dayflow/Core/AI/AgentCLISupport+Parsing.swift:154-175 — 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 (21–22 lines × 2) Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:498— Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:498-519 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:694-714 — 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 `Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:498` 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 (17–21 lines × 3) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:486— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:486-506 | Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift:411-428 | Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift:447-463 — before extracting anything, compare `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift` and `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 320 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 `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:486` 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 (15–21 lines × 2) Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.swift:118— Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.swift:118-138 | Dayflow/Dayflow/Core/AI/CodexProvider+Timeline.swift:117-131 — before extracting anything, compare `Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.swift` and `Dayflow/Dayflow/Core/AI/CodexProvider+Timeline.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 110 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 `Dayflow/Dayflow/Core/AI/ClaudeProvider+Timeline.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. 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 (20 lines × 3) Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:536— Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:536-555 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:733-752 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:881-900 — 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 `Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:536` 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 (18–20 lines × 2) Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Networking.swift:293— Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Networking.swift:293-310 | Dayflow/Dayflow/Core/AI/OllamaProvider.swift:269-288 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. 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 (16–20 lines × 2) Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:125— Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:125-140 | Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:773-792 — 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 `Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:125` 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 (13–19 lines × 2) Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Frames.swift:279— Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Frames.swift:279-291 | Dayflow/Dayflow/Core/AI/OllamaProvider+Transcription.swift:243-261 — 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 `Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Frames.swift:279` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (20 lines × 2) Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:252— Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:252-271 | Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:697-716 — 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 `Dayflow/Dayflow/Views/UI/VideoPlayerModal.swift:252` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16–18 lines × 3) Dayflow/Dayflow/Views/Onboarding/Prototype/DayflowProOnboardingSignIn.swift:262— Dayflow/Dayflow/Views/Onboarding/Prototype/DayflowProOnboardingSignIn.swift:262-277 | Dayflow/Dayflow/Views/Onboarding/Prototype/DayflowProOnboardingSignIn.swift:288-305 | Dayflow/Dayflow/Views/Onboarding/Prototype/DayflowProOnboardingSignIn.swift:325-340 — 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 `Dayflow/Dayflow/Views/Onboarding/Prototype/DayflowProOnboardingSignIn.swift:262` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `scaled(10)` in one and `scaled(6)` 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, `Dayflow/Dayflow/Views/Onboarding/Prototype/DayflowProOnboardingSignIn.swift:322` calls `frame` and `Dayflow/Dayflow/Views/Onboarding/Prototype/DayflowProOnboardingSignIn.swift:259` 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 (14–18 lines × 2) Dayflow/Dayflow/Core/AI/GemmaBackupProvider.swift:239— Dayflow/Dayflow/Core/AI/GemmaBackupProvider.swift:239-252 | Dayflow/Dayflow/Core/AI/OllamaProvider.swift:175-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 `Dayflow/Dayflow/Core/AI/GemmaBackupProvider.swift:239` 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 (15–17 lines × 4) Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:276— Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:276-292 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:453-467 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:647-661 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:811-825 — 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 `Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:276` 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–17 lines × 2) Dayflow/Dayflow/Core/Weekly/WeeklyDonutBuilder.swift:77— Dayflow/Dayflow/Core/Weekly/WeeklyDonutBuilder.swift:77-93 | Dayflow/Dayflow/Core/Weekly/WeeklyOverviewBuilder.swift:117-124 — before extracting anything, compare `Dayflow/Dayflow/Core/Weekly/WeeklyDonutBuilder.swift` and `Dayflow/Dayflow/Core/Weekly/WeeklyOverviewBuilder.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 66 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. 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 (12–17 lines × 2) Dayflow/Dayflow/Views/Components/DayflowButton.swift:90— Dayflow/Dayflow/Views/Components/DayflowButton.swift:90-101 | Dayflow/Dayflow/Views/UI/MainView/WeekTimelineActivityCard.swift:198-214 — 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 `Dayflow/Dayflow/Views/Components/DayflowButton.swift:90` 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 (15–16 lines × 2) Dayflow/Dayflow/Core/AI/CodexProvider+Transcription.swift:18— Dayflow/Dayflow/Core/AI/CodexProvider+Transcription.swift:18-32 | Dayflow/Dayflow/Core/AI/OllamaProvider+Transcription.swift:463-478 — 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 `Dayflow/Dayflow/Core/AI/CodexProvider+Transcription.swift:18` 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 (14–16 lines × 2) Dayflow/Dayflow/Core/Analysis/AnalysisManager.swift:107— Dayflow/Dayflow/Core/Analysis/AnalysisManager.swift:107-120 | Dayflow/Dayflow/Core/Analysis/AnalysisManager.swift:242-257 — 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 `Dayflow/Dayflow/Core/Analysis/AnalysisManager.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. 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 (15 lines × 4) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:424— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:424-438 | Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:541-555 | Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift:329-343 | Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift:495-509 — before extracting anything, compare `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift` and `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 320 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–15 lines × 2) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+DashboardStreaming.swift:164— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+DashboardStreaming.swift:164-175 | Dayflow/Dayflow/Core/AI/GeminiDirectProvider+DashboardStreaming.swift:248-262 — 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 (23 lines × 2) Dayflow/Dayflow/Core/Recording/StorageManager+Reprocessing.swift:9— Dayflow/Dayflow/Core/Recording/StorageManager+Reprocessing.swift:9-31 | Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:479-501 — 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 (14–15 lines × 2) Dayflow/Dayflow/Views/UI/DailyView+Access.swift:162— Dayflow/Dayflow/Views/UI/DailyView+Access.swift:162-176 | Dayflow/Dayflow/Views/UI/Weekly/WeeklyView.swift:407-420 — 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 (14 lines × 4) Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Summaries.swift:123— Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Summaries.swift:123-136 | Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Summaries.swift:242-255 | Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Summaries.swift:303-316 | Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Summaries.swift:358-371 — 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 `Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Summaries.swift:123` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `batchId` to `Int64? ) async throws -> (SummaryResponse` in one and `Int64?) async throws -> ( TitleResponse` 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 (12–14 lines × 2) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift:598— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift:598-611 | Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Networking.swift:277-288 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Transcription.swift:598` 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 (10–14 lines × 3) Dayflow/Dayflow/Views/UI/DailyView+Standup.swift:333— Dayflow/Dayflow/Views/UI/DailyView+Standup.swift:333-345 | Dayflow/Dayflow/Views/UI/DailyView+Standup.swift:418-431 | Dayflow/Dayflow/Views/UI/DailyView+Standup.swift:501-510 — 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 `Dayflow/Dayflow/Views/UI/DailyView+Standup.swift:333` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Dayflow/Dayflow/Views/UI/DailyView+Standup.swift:349` calls `scheduleStandupRegenerateReset` and `Dayflow/Dayflow/Views/UI/DailyView+Standup.swift:435` 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 (12–13 lines × 4) Dayflow/Dayflow/Views/UI/WhatsNewView.swift:440— Dayflow/Dayflow/Views/UI/WhatsNewView.swift:440-452 | Dayflow/Dayflow/Views/UI/WhatsNewView.swift:576-588 | Dayflow/Dayflow/Views/UI/WhatsNewView.swift:696-707 | Dayflow/Dayflow/Views/UI/WhatsNewView.swift:753-765 — 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 `Dayflow/Dayflow/Views/UI/WhatsNewView.swift:440` 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, `Dayflow/Dayflow/Views/UI/WhatsNewView.swift:589` calls `disabled`, `opacity` and `Dayflow/Dayflow/Views/UI/WhatsNewView.swift:708` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 3) Dayflow/Dayflow/Core/AI/ChatMetadataParser.swift:36— Dayflow/Dayflow/Core/AI/ChatMetadataParser.swift:36-49 | Dayflow/Dayflow/Core/AI/ChatMetadataParser.swift:58-71 | Dayflow/Dayflow/Core/AI/ChatMetadataParser.swift:80-93 — 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 `Dayflow/Dayflow/Core/AI/ChatMetadataParser.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. 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–13 lines × 3) Dayflow/Dayflow/Views/UI/Settings/SettingsProvidersTabView.swift:396— Dayflow/Dayflow/Views/UI/Settings/SettingsProvidersTabView.swift:396-408 | Dayflow/Dayflow/Views/UI/Settings/SettingsProvidersTabView.swift:432-441 | Dayflow/Dayflow/Views/UI/Settings/SettingsProvidersTabView.swift:478-489 — 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 `Dayflow/Dayflow/Views/UI/Settings/SettingsProvidersTabView.swift:396` 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 (9–13 lines × 2) Dayflow/Dayflow/Core/Recording/StorageManager+Chunks.swift:67— Dayflow/Dayflow/Core/Recording/StorageManager+Chunks.swift:67-75 | Dayflow/Dayflow/Core/Recording/StorageManager+Chunks.swift:149-161 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Core/Recording/StorageManager+Chunks.swift:67` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 5) Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Frames.swift:153— Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Frames.swift:153-164 | Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Summaries.swift:125-136 | Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Summaries.swift:244-255 | Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Summaries.swift:305-316 | Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Summaries.swift:360-371 — there are 5 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 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Frames.swift:153` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `batchId` to `Int64? ) async throws -> (SummaryResponse` in one and `Int64?) async throws -> ( TitleResponse` 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 (12 lines × 4) Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:342— Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:342-353 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:536-547 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:733-744 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:881-892 — 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 `Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:342` 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, `Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:548` calls `capture` and `Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:354` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10–12 lines × 4) REDACTED:206— REDACTED:206-216 | REDACTED:327-337 | REDACTED:416-425 | REDACTED:610-621 — 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.
Duplicated block (9–12 lines × 2) Dayflow/Dayflow/System/DayflowAuthManager.swift:515— Dayflow/Dayflow/System/DayflowAuthManager.swift:515-526 | Dayflow/Dayflow/System/DayflowAuthManager.swift:613-621 — 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 `Dayflow/Dayflow/System/DayflowAuthManager.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.
Duplicated block (8–11 lines × 5) REDACTED:206— REDACTED:206-215 | REDACTED:312-319 | REDACTED:327-336 | REDACTED:416-424 | REDACTED:610-620 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — 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 `REDACTED:206` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `8` in one and `4` 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 after the matched lines, `REDACTED:623` calls `VStack`, `HStack` and `REDACTED:320` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 5) Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:649— Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:649-659 | Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:722-732 | Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:829-839 | Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeFlow.swift:251-261 | Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeRoleSelectionStep.swift:109-119 — there are 5 copies across 3 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 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:649` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–11 lines × 4) REDACTED:158— REDACTED:158-166 | Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:645-655 | Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:718-728 | Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeRoleSelectionStep.swift:105-115 — before extracting anything, compare `Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift` and `Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeRoleSelectionStep.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 85 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 (10–11 lines × 2) Dayflow/Dayflow/Views/Onboarding/HowItWorksView.swift:117— Dayflow/Dayflow/Views/Onboarding/HowItWorksView.swift:117-127 | REDACTED:677-686 — 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 `Dayflow/Dayflow/Views/Onboarding/HowItWorksView.swift:117` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (7–11 lines × 2) Dayflow/Dayflow/Views/UI/Flow/FlowOverlayView.swift:212— Dayflow/Dayflow/Views/UI/Flow/FlowOverlayView.swift:212-218 | Dayflow/Dayflow/Views/UI/Flow/FlowOverlayView.swift:251-261 — 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 `Dayflow/Dayflow/Views/UI/Flow/FlowOverlayView.swift:212` 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 × 6) Dayflow/Dayflow/Views/Onboarding/HowItWorksView.swift:116— Dayflow/Dayflow/Views/Onboarding/HowItWorksView.swift:116-125 | REDACTED:160-169 | REDACTED:184-193 | REDACTED:287-296 | REDACTED:676-685 | Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeChooseProviderStep.swift:384-393 — there are 6 copies across 3 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 `Dayflow/Dayflow/Views/Onboarding/HowItWorksView.swift:116` 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, `REDACTED:194` calls `disabled`, `opacity` and `Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeChooseProviderStep.swift:394` 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–10 lines × 4) Dayflow/Dayflow/Views/Components/ReferralSurveyView.swift:188— Dayflow/Dayflow/Views/Components/ReferralSurveyView.swift:188-197 | Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift:782-791 | Dayflow/Dayflow/Views/Onboarding/Prototype/DayflowProOnboardingSignIn.swift:143-149 | Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeRoleSelectionStep.swift:82-91 — before extracting anything, compare `Dayflow/Dayflow/Views/Onboarding/OnboardingFlow.swift` and `Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeRoleSelectionStep.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Views/Components/ReferralSurveyView.swift:188` 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 (8–10 lines × 4) Dayflow/Dayflow/Views/UI/Settings/SettingsAccountSection.swift:159— Dayflow/Dayflow/Views/UI/Settings/SettingsAccountSection.swift:159-166 | Dayflow/Dayflow/Views/UI/Settings/SettingsBrowserPrivacySection.swift:35-44 | Dayflow/Dayflow/Views/UI/Settings/SettingsBrowserPrivacySection.swift:88-95 | Dayflow/Dayflow/Views/UI/Settings/SettingsBrowserPrivacySection.swift:116-123 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Views/UI/Settings/SettingsAccountSection.swift:159` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `4` in one and `3` 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, `Dayflow/Dayflow/Views/UI/Settings/SettingsAccountSection.swift:158` calls `VStack` and `Dayflow/Dayflow/Views/UI/Settings/SettingsBrowserPrivacySection.swift:34` 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–10 lines × 4) Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:267— Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:267-270 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:440-449 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:642-645 | Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:798-807 — 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 `Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:440` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:449` calls `setValue` and `Dayflow/Dayflow/Core/AI/DayflowBackendProvider.swift:645` 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 (7–10 lines × 2) Dayflow/Dayflow/Core/Recording/StorageManager+Reprocessing.swift:62— Dayflow/Dayflow/Core/Recording/StorageManager+Reprocessing.swift:62-71 | Dayflow/Dayflow/Core/Recording/StorageManager+Reprocessing.swift:159-165 — 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 `Dayflow/Dayflow/Core/Recording/StorageManager+Reprocessing.swift:62` 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 (6–10 lines × 2) Dayflow/Dayflow/Views/Components/DayGoalReviewComponents.swift:162— Dayflow/Dayflow/Views/Components/DayGoalReviewComponents.swift:162-171 | Dayflow/Dayflow/Views/UI/TimelineReviewChrome.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. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Views/Components/DayGoalReviewComponents.swift:162` 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 lines × 5) Dayflow/Dayflow/Views/Components/CategoryPickerOverlay.swift:256— Dayflow/Dayflow/Views/Components/CategoryPickerOverlay.swift:256-264 | Dayflow/Dayflow/Views/Components/DayCategorySelectionEditor.swift:111-119 | Dayflow/Dayflow/Views/Components/DayGoalSetupComponents.swift:359-367 | Dayflow/Dayflow/Views/UI/ChatStylesAndDebug.swift:132-140 | Dayflow/Dayflow/Views/UI/Settings/SettingsBrowserPrivacySection.swift:184-192 — before extracting anything, compare `Dayflow/Dayflow/Views/Components/CategoryPickerOverlay.swift` and `Dayflow/Dayflow/Views/Components/DayCategorySelectionEditor.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 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 `Dayflow/Dayflow/Views/Components/CategoryPickerOverlay.swift:256` 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–10 lines × 4) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Prompting.swift:33— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Prompting.swift:33-41 | Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Networking.swift:234-243 | Dayflow/Dayflow/Core/AI/OllamaProvider.swift:213-222 | Dayflow/Dayflow/Core/AI/TimelineOutputSupport.swift:80-88 — before extracting anything, compare `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Prompting.swift` and `Dayflow/Dayflow/Core/AI/TimelineOutputSupport.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 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 `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Prompting.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. 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.
Duplicated block (8–9 lines × 3) Dayflow/Dayflow/Core/AI/ClaudeProvider+Prompts.swift:15— Dayflow/Dayflow/Core/AI/ClaudeProvider+Prompts.swift:15-22 | Dayflow/Dayflow/Core/AI/CodexProvider+Prompts.swift:19-26 | Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:10-18 — 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 (9 lines × 3) Dayflow/Dayflow/Views/UI/GitHubStarPromptCard.swift:160— Dayflow/Dayflow/Views/UI/GitHubStarPromptCard.swift:160-168 | Dayflow/Dayflow/Views/UI/MainView/Layout.swift:693-701 | Dayflow/Dayflow/Views/UI/SurveyPromptCard.swift:245-253 — 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 `Dayflow/Dayflow/Views/UI/GitHubStarPromptCard.swift:160` 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, `Dayflow/Dayflow/Views/UI/MainView/Layout.swift:692` calls `lineLimit` and `Dayflow/Dayflow/Views/UI/SurveyPromptCard.swift:244` 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 (7–8 lines × 4) Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:421— Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:421-427 | Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:601-607 | Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:837-844 | Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:895-902 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5–8 lines × 3) Dayflow/Dayflow/Views/Onboarding/ChatCLIDetectionViews.swift:300— Dayflow/Dayflow/Views/Onboarding/ChatCLIDetectionViews.swift:300-307 | Dayflow/Dayflow/Views/Onboarding/ChatCLIDetectionViews.swift:309-316 | Dayflow/Dayflow/Views/Onboarding/ChatCLIDetectionViews.swift:317-321 — 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 `Dayflow/Dayflow/Views/Onboarding/ChatCLIDetectionViews.swift:317` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Dayflow/Dayflow/Views/Onboarding/ChatCLIDetectionViews.swift:300` calls `Text` and `Dayflow/Dayflow/Views/Onboarding/ChatCLIDetectionViews.swift:317` 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) Dayflow/Dayflow/App/DayflowApp.swift:361— Dayflow/Dayflow/App/DayflowApp.swift:361-367 | Dayflow/Dayflow/App/DayflowApp.swift:372-377 — 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 `Dayflow/Dayflow/App/DayflowApp.swift:361` 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 (4–6 lines × 3) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:478— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:478-484 | Dayflow/Dayflow/Core/AI/GeminiDirectProvider+DashboardStreaming.swift:145-148 | Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Text.swift:60-65 — before extracting anything, compare `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift` and `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Text.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 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 `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:478` 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 (3–6 lines × 5) Dayflow/Dayflow/Utilities/DayflowTheme.swift:605— Dayflow/Dayflow/Utilities/DayflowTheme.swift:605-607 | Dayflow/Dayflow/Utilities/DayflowTheme.swift:626-628 | Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketCardContent.swift:196-198 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyComponents.swift:122-127 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyComponents.swift:148-153 — there are 5 copies across 3 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 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Dayflow/Dayflow/Utilities/DayflowTheme.swift:605` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Dayflow/Dayflow/Utilities/DayflowTheme.swift:609` calls `init`, `Color`, `opacity` and `Dayflow/Dayflow/Utilities/DayflowTheme.swift:630` 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) Dayflow/Dayflow/Core/Weekly/WeeklyDashboardBuilder.swift:491— Dayflow/Dayflow/Core/Weekly/WeeklyDashboardBuilder.swift:491-499 | Dayflow/Dayflow/Core/Weekly/WeeklyDonutBuilder.swift:166-176 | Dayflow/Dayflow/Core/Weekly/WeeklyOverviewBuilder.swift:459-467 | Dayflow/Dayflow/Views/UI/DailyWorkflowComputation.swift:406-410 — before extracting anything, compare `Dayflow/Dayflow/Core/Weekly/WeeklyDonutBuilder.swift` and `Dayflow/Dayflow/Core/Weekly/WeeklyOverviewBuilder.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 66 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 `Dayflow/Dayflow/Core/Weekly/WeeklyDashboardBuilder.swift:491` 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 `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 × 4) Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyModelFactory.swift:66— Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyModelFactory.swift:66-71 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyModelFactory.swift:79-84 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyModelFactory.swift:629-634 | Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyModelFactory.swift:636-641 — 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 `Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyModelFactory.swift:66` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyModelFactory.swift:635` calls `asset`, `WeeklySankeyAppInput` and `Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklySankeyModelFactory.swift:85` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (3–5 lines × 6) Dayflow/Dayflow/Core/AI/GeminiDirectProvider+DashboardStreaming.swift:147— Dayflow/Dayflow/Core/AI/GeminiDirectProvider+DashboardStreaming.swift:147-149 | Dayflow/Dayflow/Core/AI/GeminiDirectProvider+DashboardStreaming.swift:238-240 | Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Logging.swift:117-121 | Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Text.swift:65-69 | Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Networking.swift:91-95 | Dayflow/Dayflow/Utilities/GeminiAPIHelper.swift:220-222 — 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 `Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Logging.swift:117` 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 lines × 3) Dayflow/Dayflow/Core/AgentAccess/AgentBridgeServer.swift:32— Dayflow/Dayflow/Core/AgentAccess/AgentBridgeServer.swift:32-36 | Dayflow/Dayflow/Core/AgentAccess/AgentBridgeServer.swift:38-42 | tools/dayflow-cli/Sources/dayflow/Bridge.swift:20-24 — 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. 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.
Sync-over-async blocking Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:677— `executeStreaming` is async and calls .wait() — 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.
Duplicated predicate Dayflow/Dayflow/Models/DayGoalPlan.swift:110— `$0.isSystem == false && $0.isIdle == false` appears character-identically in 2 files — Dayflow/Dayflow/Models/DayGoalPlan.swift, Dayflow/Dayflow/Views/Components/DayGoalFlowView.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 Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:1453— `byte == UInt8(ascii: "}") || byte == UInt8(ascii: "]")` appears character-identically in 3 files — Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift, Dayflow/Dayflow/Core/AI/ClaudeStrictJSONParser.swift, Dayflow/Dayflow/System/AnalyticsService.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 Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:1413— `bytes[start] == UInt8(ascii: "{") || bytes[start] == UInt8(ascii: "[")` appears character-identically in 2 files — Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift, Dayflow/Dayflow/Core/AI/ClaudeStrictJSONParser.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 Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:131— `className.contains("TextField") || className.contains("TextEditor") || className.contains("TextInput")` appears character-identically in 2 files — Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift, Dayflow/Dayflow/Views/UI/VideoPlayerModal.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 Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Networking.swift:261— `cleanedPrimary == nil && cleanedSecondary == nil` appears character-identically in 2 files — Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Networking.swift, Dayflow/Dayflow/Core/AI/OllamaProvider+Summaries.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 Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:789— `coveredStart < inputRange.end && safetyCounter > 0` appears character-identically in 2 files — Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift, Dayflow/Dayflow/Core/AI/TimelineOutputSupport.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 Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeVideoIntroStep.swift:102— `currentSeconds >= totalSeconds - 0.3 && currentSeconds < totalSeconds` appears character-identically in 2 files — Dayflow/Dayflow/Views/Onboarding/Prototype/OnboardingPrototypeVideoIntroStep.swift, Dayflow/Dayflow/Views/Onboarding/VideoLaunchView.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 Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Summaries.swift:78— `descriptor.isIdle && description.isEmpty` appears character-identically in 2 files — Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Summaries.swift, Dayflow/Dayflow/Core/AI/OllamaProvider+Summaries.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 Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:907— `durationMinutes < 10 && index < cards.count - 1` appears character-identically in 2 files — Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift, Dayflow/Dayflow/Core/AI/TimelineOutputSupport.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 Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:138— `event.keyCode == 49 && event.modifierFlags.intersection(.deviceIndependentFlagsMask).isEmpty` appears character-identically in 2 files — Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift, Dayflow/Dayflow/Views/UI/VideoPlayerModal.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 Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketDeckView.swift:947— `event.phase == .ended || event.phase == .cancelled` appears character-identically in 2 files — Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketDeckView.swift, Dayflow/Dayflow/Views/UI/TimelineReviewChrome.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 Dayflow/Dayflow/Core/Weekly/WeeklyDashboardModels.swift:78— `hasNonEmpty(faviconPrimaryRaw) || hasNonEmpty(faviconSecondaryRaw) || hasNonEmpty(faviconPrimaryHost) || hasNonEmpty(faviconSecondaryHost)` appears character-identically in 2 files — Dayflow/Dayflow/Core/Weekly/WeeklyDashboardModels.swift, Dayflow/Dayflow/Views/UI/Weekly/Sections/WeeklyTreemapModels.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 Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:731— `merged.isEmpty || range.start > merged.last!.end + 1` appears character-identically in 2 files — Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift, Dayflow/Dayflow/Core/AI/TimelineOutputSupport.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 Dayflow/Dayflow/Models/DayGoalPlan.swift:115— `normalized == "distraction" || normalized == "distractions"` appears character-identically in 2 files — Dayflow/Dayflow/Models/DayGoalPlan.swift, Dayflow/Dayflow/Views/UI/DailyWorkflowComputation.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 Dayflow/Dayflow/Views/Components/CategoryPickerOverlay.swift:292— `origin.x > bounds.minX && origin.x + size.width > bounds.maxX` appears character-identically in 4 files — Dayflow/Dayflow/Views/Components/CategoryPickerOverlay.swift, Dayflow/Dayflow/Views/Components/DayCategorySelectionEditor.swift, Dayflow/Dayflow/Views/Components/DayGoalSetupComponents.swift, Dayflow/Dayflow/Views/UI/ChatStylesAndDebug.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 Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:796— `outputRange.start - flexibility <= coveredStart && coveredStart <= outputRange.end + flexibility` appears character-identically in 2 files — Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift, Dayflow/Dayflow/Core/AI/TimelineOutputSupport.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 Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:812— `outputRange.start > coveredStart && outputRange.start < nextCovered` appears character-identically in 2 files — Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift, Dayflow/Dayflow/Core/AI/TimelineOutputSupport.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 Dayflow/Dayflow/Views/Onboarding/ProviderSetupState.swift:251— `provider == .chatGPT || provider == .claude` appears character-identically in 2 files — Dayflow/Dayflow/Views/Onboarding/ProviderSetupState.swift, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift:127— `responder is NSTextField || responder is NSTextView || responder is NSText` appears character-identically in 2 files — Dayflow/Dayflow/Views/UI/MainView/ScreenshotSlideshow.swift, Dayflow/Dayflow/Views/UI/VideoPlayerModal.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 Dayflow/Dayflow/Views/Components/CategoryPickerOverlay.swift:267— `rowWidth > 0 && rowWidth + spacing + proposedWidth > maxWidth` appears character-identically in 2 files — Dayflow/Dayflow/Views/Components/CategoryPickerOverlay.swift, Dayflow/Dayflow/Views/Components/DayCategorySelectionEditor.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 Dayflow/Dayflow/Views/Components/DayGoalSetupComponents.swift:368— `rowWidth > 0 && rowWidth + spacing + size.width > maxWidth` appears character-identically in 2 files — Dayflow/Dayflow/Views/Components/DayGoalSetupComponents.swift, Dayflow/Dayflow/Views/UI/ChatStylesAndDebug.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 Dayflow/Dayflow/Views/UI/CanvasActivityCard.swift:132— `showTimelineAppIcons && (faviconPrimaryRaw != nil || faviconSecondaryRaw != nil)` appears character-identically in 2 files — Dayflow/Dayflow/Views/UI/CanvasActivityCard.swift, Dayflow/Dayflow/Views/UI/MainView/WeekTimelineActivityCard.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 Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Frames.swift:221— `startSeconds < -tolerance || endSeconds > videoDuration + tolerance` appears character-identically in 2 files — Dayflow/Dayflow/Core/AI/GemmaBackupProvider+Frames.swift, Dayflow/Dayflow/Core/AI/OllamaProvider+Transcription.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 Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:878— `startTime.contains("AM") || startTime.contains("PM")` appears character-identically in 2 files — Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift, Dayflow/Dayflow/Core/AI/TimelineOutputSupport.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 Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift:290— `strategy == .noRetry || attempt >= maxRetries - 1` appears character-identically in 2 files — Dayflow/Dayflow/Core/AI/GeminiDirectProvider+ActivityCards.swift, Dayflow/Dayflow/Core/AI/GeminiDirectProvider+Text.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.
Silent fallback default in catch Dayflow/Dayflow/Core/AI/LoginShellRunner.swift:51— `getCodexMCPServerNames` 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 Dayflow/Dayflow/Core/DailyBrief/DailyBriefThreadIndex.swift:317— `jsonLines` 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 Dayflow/Dayflow/Core/Recording/StorageManager+ChatHistory.swift:64— `fetchChatConversations` 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 Dayflow/Dayflow/Core/Recording/StorageManager+ChatHistory.swift:89— `fetchChatMessages` 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 Dayflow/Dayflow/Core/Recording/StorageManager+Chunks.swift:57— `fetchUnprocessedChunks` 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 Dayflow/Dayflow/Core/Recording/StorageManager+Chunks.swift:130— `fetchBatchLLMMetadata` 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 Dayflow/Dayflow/Core/Recording/StorageManager+Chunks.swift:145— `chunksForBatch` 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 Dayflow/Dayflow/Core/Recording/StorageManager+Chunks.swift:176— `fetchChunksInTimeRange` 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 Dayflow/Dayflow/Core/Recording/StorageManager+DailyStandup.swift:102— `fetchAllDailyStandups` 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 Dayflow/Dayflow/Core/Recording/StorageManager+DayGoals.swift:22— `countDistinctTimelineDays` turns every thrown error into `0` — 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 Dayflow/Dayflow/Core/Recording/StorageManager+DayGoals.swift:39— `consecutiveSkippedDayGoalCount` turns every thrown error into `0` — 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 Dayflow/Dayflow/Core/Recording/StorageManager+Observations.swift:26— `fetchObservations` 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 Dayflow/Dayflow/Core/Recording/StorageManager+Observations.swift:53— `fetchObservationsByTimeRange` 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 Dayflow/Dayflow/Core/Recording/StorageManager+Observations.swift:130— `fetchObservations` 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 Dayflow/Dayflow/Core/Recording/StorageManager+Reprocessing.swift:229— `countCompletedAnalysisBatchesForWeeklyAccess` turns every thrown error into `0` — 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 Dayflow/Dayflow/Core/Recording/StorageManager+Screenshots.swift:104— `fetchUnprocessedScreenshots` 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 Dayflow/Dayflow/Core/Recording/StorageManager+Screenshots.swift:143— `screenshotsForBatch` 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 Dayflow/Dayflow/Core/Recording/StorageManager+Screenshots.swift:159— `fetchScreenshotsInTimeRange` 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 Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:58— `countTimelineCards` turns every thrown error into `0` — 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 Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:389— `fetchTimelineCards` 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 Dayflow/Dayflow/Core/Recording/StorageManager+TimelineCards.swift:439— `allBatches` 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 Dayflow/Dayflow/Core/Recording/TimelapseStorageManager.swift:20— `currentUsageBytes` turns every thrown error into `0` — 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 Dayflow/Dayflow/Core/Recording/TimelapseStorageManager.swift:57— `entrySize` turns every thrown error into `0` — 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 Dayflow/Dayflow/Views/UI/DailyBrief/Docket/DocketHandoffTransition.swift:942— `capture` 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.
No ADRs found Dayflow/Dayflow.xcodeproj/project.pbxproj:1— No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `Dayflow/Dayflow.xcodeproj/project.pbxproj` makes this repository a deployable product (line 1).
D21 · Naming Consistency· `feedbackUrl` spells `Url` where 136 names in the project spell it `URL` · ×1
`feedbackUrl` spells `Url` where 136 names in the project spell it `URL` Dayflow/Dayflow/Core/DailyBrief/DailyBriefModels.swift:76— 136 of 139 names in project repository spell the token `URL` (136 of 139; unit: names in project repository containing `URL`). Peers: CodexFallbackContext.brokenConfigURL (Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:259); ChatCLIProcessRunner.defaultCodexConfigURL (Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:517); ChatCLIProcessRunner.invalidTransportConfigURL (Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:530); ChatCLIProcessRunner.invalidTransportConfigURL(fallbackConfigURL) (Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:530); ChatCLIProcessRunner.makeCodexFallbackContext(fallbackConfigURL) (Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:574). Rename to `feedbackURL`. [rule N6]
D21 · Naming Consistency· `imageUrl` spells `Url` where 136 names in the project spell it `URL` · ×1
`imageUrl` spells `Url` where 136 names in the project spell it `URL` Dayflow/Dayflow/Core/DailyBrief/DailyBriefModels.swift:124— 136 of 139 names in project repository spell the token `URL` (136 of 139; unit: names in project repository containing `URL`). Peers: CodexFallbackContext.brokenConfigURL (Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:259); ChatCLIProcessRunner.defaultCodexConfigURL (Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:517); ChatCLIProcessRunner.invalidTransportConfigURL (Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:530); ChatCLIProcessRunner.invalidTransportConfigURL(fallbackConfigURL) (Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:530); ChatCLIProcessRunner.makeCodexFallbackContext(fallbackConfigURL) (Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:574). Rename to `imageURL`. [rule N6]
D21 · Naming Consistency· `fileUrl` spells `Url` where 136 names in the project spell it `URL` · ×1
`fileUrl` spells `Url` where 136 names in the project spell it `URL` Dayflow/Dayflow/Models/AnalysisModels.swift:15— 136 of 139 names in project repository spell the token `URL` (136 of 139; unit: names in project repository containing `URL`). Peers: CodexFallbackContext.brokenConfigURL (Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:259); ChatCLIProcessRunner.defaultCodexConfigURL (Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:517); ChatCLIProcessRunner.invalidTransportConfigURL (Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:530); ChatCLIProcessRunner.invalidTransportConfigURL(fallbackConfigURL) (Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:530); ChatCLIProcessRunner.makeCodexFallbackContext(fallbackConfigURL) (Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift:574). Rename to `fileURL`. [rule N6]
D21 · Naming Consistency· `isApiKeyInput` spells `Api` where 21 names in the project spell it `API` · ×1
`isApiKeyInput` spells `Api` where 21 names in the project spell it `API` Dayflow/Dayflow/Views/Onboarding/ProviderSetupState.swift:503— 21 of 22 names in project repository spell the token `API` (21 of 22; unit: names in project repository containing `API`). Peers: OllamaProvider.callChatAPI (Dayflow/Dayflow/Core/AI/OllamaProvider+Networking.swift:70); OllamaProvider.callTextAPI (Dayflow/Dayflow/Core/AI/OllamaProvider+Networking.swift:255); OllamaProvider.customAPIKey (Dayflow/Dayflow/Core/AI/OllamaProvider.swift:33); repository.GeminiAPIHelper (Dayflow/Dayflow/Utilities/GeminiAPIHelper.swift:10); APIKeyInputView.cleanedAPIKey (Dayflow/Dayflow/Views/Onboarding/APIKeyInputView.swift:142). Rename to `isAPIKeyInput`. [rule N6]
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 1 of 3 project(s) overshoot their size bounds, lowering Project Cohesion to 3.3/10. The most over is `Dayflow` (124781 LoC, 1208 module-visible types across 33 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history)· Rotate the exposed credentials · ×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.
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) — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
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.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 59 file(s) — `Dayflow/Dayflow/Core/AI/AgentCLISupport+Parsing.swift`, `Dayflow/Dayflow/Core/AI/ChatCLIProcessRunner.swift`, `Dayflow/Dayflow/Core/AI/ClaudeTimelinePrompt.swift`, `Dayflow/Dayflow/Core/AI/CodexExecutableResolver.swift`, `Dayflow/Dayflow/Core/AI/CodexProvider.swift`, … (+54 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
provenance: not applicable — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
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.
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.
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.
Run 01a1d942-a309-7161-a1a8-201336bee41a · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 8 · Warnings: 978 · Recommendations: 60 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 14-11-2026 @ 08:53 UTC.
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.