Public report of uzairansaruzi/hermex, published 15 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, 15 November 2026, 02:22 UTC · Survey ID cd_828f4f2ba7954f54be7e5e3856f8bbb9
uzairansaruzi/hermex
Measured 15 November 2026, 02:21 UTC, at code version 1bc3ed3
Code coverage is not measured: Xcode and a simulator are needed to run it.
Test reliability is not measured: The suite is built by Xcode and needs an Apple platform to run.
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
Down 1 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: 159,765 lines of product code in 4 projects, tests not counted · Estimated rebuild effort: about 2.0 person-years · Weakest lens: Code Health, 52
Findings by how serious they are
6 critical1051 serious15 minor
15 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
15 November 2026, 02:21 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.
1069of 1072 findings point to an exact file and line, so you can open each one in the code. The other 3 concern the repository as a whole, such as missing documentation.
44dimensions across 7 lenses, read from 159,765 lines of product code in 4 projects.
uzairansaruzi/hermex falls short of our standard for production, held back most by its Code Health lens, the quality of the code itself. It scores 62 out of 100 and is rated Adequate, and five of its six critical findings are security problems in the build pipeline and in its automatic dependency updates.
Code Health, at 52, is the weakest lens and counts most in the score. The best first step for the work it takes is making the naming consistent, worth about 3 points. Adopting a type checker would lift Code Health itself, worth about 7 points. Raising Code Health to 70 would lift the score to about 68.
Four pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. One automatic update takes new releases before a bad one can be spotted. Pinning each tool to an exact version and setting a waiting period for automatic updates would close both risks. Moving the business rules into the object that owns the data would take care of the business object that only holds data.
The product code is 159,765 lines, about €290,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 Code Health rose from 52 to 70, the lowest score rated Strong, the score would rise from 62 to about 68.
Code composition: what the lines of code are
Product code 61%Tests 39%
New since the last survey: 444 findings
These 444 critical or serious findings weren't in the previous survey, on 29 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
God Classes · TooManyMethods: ScreenSession HermesMobile/Features/Screen/ScreenSession.swift
God Classes · TooManyMethods: View HermesLiveActivityWidget/AgentRunLiveActivityWidget.swift
God Classes · FileTooLong: Screen/ScreenSession.swift HermesMobile/Features/Screen/ScreenSession.swift
God Classes · FileTooLong: Hermes/HermesCall.swift HermesMobile/Networking/Hermes/HermesCall.swift
God Classes · MethodTooLong: HermesSessionListView.body HermesMobile/Features/SessionList/HermesSessionListView.swift
God Classes · TooManyMethods: HermesConnection HermesMobile/Networking/Hermes/HermesConnection.swift
God Classes · ClassTooLong: ChatTranscriptView HermesMobile/Features/Chat/ChatTranscriptView.swift
God Classes · ClassTooLong: ChatAttachmentCoordinator HermesMobile/Features/Chat/ChatAttachmentCoordinator.swift
God Classes · FileTooLong: Bots/BotConnectionView.swift HermesMobile/Features/Bots/BotConnectionView.swift
God Classes · MethodTooLong: HermesCall.admit HermesMobile/Networking/Hermes/HermesCall.swift
God Classes · ClassTooLong: MessageBubbleView HermesMobile/Features/Chat/MessageBubbleView.swift
God Classes · MethodTooLong: BotConnectionView.body HermesMobile/Features/Bots/BotConnectionView.swift
God Classes · TooManyMethods: HermexPushProvisioner HermesMobile/Features/Bots/HermexPushProvisioner.swift
God Classes · TooManyMethods: PluginsModel HermesMobile/Features/Settings/PluginsModel.swift
God Classes · FileTooLong: Hermes/HermesConnection.swift HermesMobile/Networking/Hermes/HermesConnection.swift
God Classes · FileTooLong: Shared/ModelPickerSheet.swift HermesMobile/Features/Shared/ModelPickerSheet.swift
God Classes · FileTooLong: Kanban/KanbanCardDetailView.swift HermesMobile/Features/Kanban/KanbanCardDetailView.swift
Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) HermesMobile/Features/Settings/DefaultProfilePickerView.swift
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) HermesMobile/Features/SessionList/SessionListViewModel.swift
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) HermesMobile/Features/SessionList/SessionListViewModel.swift
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) HermesMobile/Features/Settings/APIKeysView.swift
Code Duplication · Edited copy of a member (97 corresponding lines) HermesMobile/Features/Chat/ChatViewModel.swift
Code Duplication · Edited copy of a member (111 corresponding lines) HermesMobile/Features/Chat/TranscriptMediaView.swift
Code Duplication · Edited copy of a member (25 corresponding lines) HermesMobile/Features/Bots/BotCreateView.swift
Code Duplication · Edited copy of a member (29 corresponding lines) HermesMobile/Features/Kanban/KanbanCardDetailView.swift
Code Duplication · Edited copy of a member (40 corresponding lines) HermesMobile/Features/Chat/ChatViewModel.swift
Code Duplication · Edited copy of a member (49 corresponding lines) HermesMobile/Features/Chat/ChatViewModel.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: 104 findings
These 104 critical or serious findings were in the previous survey, on 29 October 2026, and are gone from this one. The first 100 are listed here.
Exception handling · Swallowed exception (caught, then discarded) HermesMobile/Features/Hermes/HermesConversation.swift
Exception handling · Swallowed exception (caught, then discarded) HermesMobile/Features/Chat/ChatAttachmentCoordinator.swift
Exception handling · Swallowed exception (caught, then discarded) HermesMobile/Features/Chat/ChatAttachmentCoordinator.swift
Exception handling · Swallowed exception (caught, then discarded) HermesMobile/Features/Chat/ChatAttachmentCoordinator.swift
Exception handling · Swallowed exception (caught, then discarded) HermesMobile/Features/Chat/ChatAttachmentCoordinator.swift
Exception handling · Swallowed exception (caught, then discarded) HermesMobile/Features/Chat/ChatComposerPresentation.swift
Exception handling · Swallowed exception (caught, then discarded) HermesMobile/Features/Chat/ChatStreamCoordinator.swift
Exception handling · Swallowed exception (caught, then discarded) HermesMobile/Features/Chat/ChatViewModel.swift
Exception handling · Swallowed exception (caught, then discarded) HermesMobile/Features/Chat/ChatViewModel.swift
Exception handling · Swallowed exception (caught, then discarded) HermesMobile/Features/Chat/CustomAttachmentPicker.swift
Exception handling · Swallowed exception (caught, then discarded) HermesMobile/Features/Chat/FilePathSearch.swift
Exception handling · Swallowed exception (caught, then discarded) HermesMobile/Features/Chat/FilePathSearch.swift
Exception handling · Swallowed exception (caught, then discarded) HermesMobile/Features/Chat/HermesChatSideTasks.swift
Exception handling · Swallowed exception (caught, then discarded) HermesMobile/Features/Chat/HermesDelegatedWork.swift
Exception handling · Swallowed exception (caught, then discarded) HermesMobile/Features/Chat/HermesDelegatedWork.swift
Exception handling · Swallowed exception (caught, then discarded) HermesMobile/Features/Chat/HermesSlashCommands.swift
Exception handling · Swallowed exception (caught, then discarded) HermesMobile/Features/Chat/InlineAudioPlayerView.swift
Exception handling · Swallowed exception (caught, then discarded) HermesMobile/Features/Bots/BotRoomReader.swift
Exception handling · Swallowed exception (caught, then discarded) HermesMobile/Features/Bots/BotRoomView.swift
Rebuild cost: about €290,000 · Estimate
Cost to rebuild
€97,000 to €490,000, for 1,617 to 5,130 hours of work, about 2.0 person-years for 1 to 4 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.9 at a score of 62. 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: 159,765 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 `isCLISession` spells `CLI` where 21 names in the project spell it `Cli` finding(s) in Naming Consistency — start with ChatViewModel.swift.
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with project.pbxproj.
Raises the score by about 3 points · Low effort · ADR Quality
3
Adopt a checker and raise it file by file: with Sorbet, `srb init` (or `bundle exec tapioca init`) commits `sorbet/config`, then move each file's sigil from `# typed: false` to `# typed: true` and on to `strict` as its methods get `sig`s — `spoom bump` does the moving; with Steep, write RBS signatures and `check` the product directories in the `Steepfile` under `D::Ruby.default` or `strict`, not `lenient`.
Then pay down the assertions rather than adding to them: each `T.must` is a nil the checker could not rule out — narrow it (`return unless x`, `x&.`, `if (y = x)`), make the attribute non-nilable and set it in `initialize`, or change the method so the nil cannot arrive.
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 €290,000 to build again, about 2.0 person-years of work. Its weakest lens is Code Health, at 52 (Adequate). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Resolve the 1 `isCLISession` spells `CLI` where 21 names in the project spell it `Cli` finding(s) in Naming Consistency. Of all the actions in this report, it raises the score most for the work it takes: about 3 points for low effort, because it clears the 1 Naming Consistency 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 7.1 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 2% to 5% on every change. The history of the code shows how much it changes: about 505,194 lines over the last 90 days, which is about 2,048,842 lines a year. At that pace, the extra work comes to an estimated 119.4 to 716.1 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.
At a glance — Code Health · 52% · Adequate · gated by X5 ·
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
6
High / Critical
Roadmap
Top priorities: Adopt a checker and raise it file by file: with Sorbet, `srb init` (or `bundle exec tapioca init`) commits `sorbet/config`, then move each file's sigil from `# typed: false` to `# typed: true` and on to `strict` as its methods get `sig`s — `spoom bump` does the moving; with Steep, write RBS signatures and `check` the product directories in the `Steepfile` under `D::Ruby.default` or `strict`, not `lenient`. Then pay down the assertions rather than adding to them: each `T.must` is a nil the checker could not rule out — narrow it (`return unless x`, `x&.`, `if (y = x)`), make the attribute non-nilable and set it in `initialize`, or change the method so the nil cannot arrive; Swallowed exception (caught, then discarded); Resolve the 1 No ADRs found finding(s) in ADR Quality — start with project.pbxproj.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 `isCLISession` spells `CLI` where 21 names in the project spell it `Cli` finding(s) in Naming Consistency — start with ChatViewModel.swift.
Adopt a checker and raise it file by file: with Sorbet, `srb init` (or `bundle exec tapioca init`) commits `sorbet/config`, then move each file's sigil from `# typed: false` to `# typed: true` and on to `strict` as its methods get `sig`s — `spoom bump` does the moving; with Steep, write RBS signatures and `check` the product directories in the `Steepfile` under `D::Ruby.default` or `strict`, not `lenient`. Then pay down the assertions rather than adding to them: each `T.must` is a nil the checker could not rule out — narrow it (`return unless x`, `x&.`, `if (y = x)`), make the attribute non-nilable and set it in `initialize`, or change the method so the nil cannot arrive.
Automate the release in CI — a deploy stage for a service (Helm/Kubernetes manifests or an equivalent rollout), or a tag-triggered publish job for an artifact — so releases are repeatable and reversible.
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.
Add a SAST step to CI running what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Bring the 3 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with HermesREST.request (cyclomatic 197), HermesCall.admit (cyclomatic 135), HermesCall.params (cyclomatic 122).
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 — 6
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 — 1051
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 — 15
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 15
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, 1069 of 1072 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.
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 (31 contributor(s) across 720 commit(s) sampled, automation and bot accounts excluded). One of them holds 92% of the history; the other 30 hold 0.3% 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.
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 — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
D26 Project Cohesion — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `(repository root)` (159765 LoC, 2213 module-visible types across 37 directories) is over its size bounds, and whether one unit is a coherent whole or a grab-bag is read from its type references: the parts of it that reach the rest only through its shared core. Those are read over the C#/VB code model, which this unit's source did not supply. Its size alone is no verdict on its cohesion, so none is published.
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. `HermesMobile/AppIntents/ProfileEntity.swift`, `HermesMobile/Auth/AppLock.swift`, `HermesMobile/Auth/AuthManager.swift`, `HermesMobile/Config/AppFont.swift`, `HermesMobile/Config/AppTheme.swift`, … (+64 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.
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: a native UI project (HermesMobile.xcodeproj/project.pbxproj). 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.
GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Python, Swift is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Python, Swift is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
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.
X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X2 Cancellation propagation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded, and no named async function in this repository's JavaScript/TypeScript, nor any Go, PHP or Dart function or Kotlin suspend function, makes a request that can be cancelled (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial; amphp; Dio; Ktor, OkHttp), so there is nothing to judge, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X25 Inert configuration knob — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X3 Exception handling — 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. 26 further occurrence(s) are not listed individually; the score already reflects all 66.
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.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
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.
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.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
DM4 Rich vs anemic domain model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of purity.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
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.
144 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was HermesREST.request at 197. A further 18 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 Endpoint.path at 129 — they are counted neither in the figure above nor in this dimension's score. 10 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: HermesMobile/Features/Chat/ProviderGlyph.swift (ProviderGlyphKind.resolve at 34), HermesMobile/Features/Screen/ScreenCanvas.swift (ScreenHardwareKeys.key at 31), HermesMobile/Features/Bots/BotProfileAppearance.swift (BotAvatarShape.localizedName at 30), HermesMobile/Networking/Bots/BotProtocol.swift (BotFailure.errorDescription at 24), HermesMobile/Features/Bots/BotAvatarLibrary.swift (BotAvatarShape.readyMade at 23), and 5 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 139 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 3 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with HermesREST.request (cyclomatic 197), HermesCall.admit (cyclomatic 135), HermesCall.params (cyclomatic 122). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 3 together lifts Cyclomatic Complexity from 5.3 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 244 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 HermesREST.request (cognitive 150). — Refactoring it lifts Cognitive Complexity from 5.5 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 Classes8.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 40 FileTooLong finding(s) in God Classes — start with ChatViewModel.swift, ChatView.swift, KanbanFeatureState.swift. — One of this dimension's main actionable groups (40 warning-level).
Resolve the 29 TooManyMethods finding(s) in God Classes — start with ChatViewModel.swift, APIClient.swift, KanbanFeatureState.swift. — One of this dimension's main actionable groups (29 warning-level).
Resolve the 23 ClassTooLong finding(s) in God Classes — start with ChatViewModel.swift, ChatView.swift, KanbanFeatureState.swift. — One of this dimension's main actionable groups (23 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.
122 duplicated block group(s) detected. 5.1 % of the production lines (8,123 of 159,765) are in a reported copy. A further 252 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.
Edited copy of a member (4 corresponding lines) · ×22HermesMobile/Features/Bots/BotCreateView.swift:250
Edited copy of a member (7 corresponding lines) · ×17HermesMobile/Push/PushRelayClient.swift:58
Edited copy of a member (3 corresponding lines) · ×15HermesMobile/Networking/Hermes/HermesSkillsClient.swift:106
Edited copy of a member (8 corresponding lines) · ×14HermesMobile/Features/Chat/ThinkingSliderLooks.swift:269
+ 97 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 22 Edited copy of a member (4 corresponding lines) finding(s) in Code Duplication — start with BotCreator.swift (2), BotCreateView.swift, HermesChatSettings.swift. — One of this dimension's main actionable groups (22 warning-level).
Resolve the 17 Edited copy of a member (7 corresponding lines) finding(s) in Code Duplication — start with PushRelayClient.swift, AppTheme.swift, HermesREST.swift. — One of this dimension's main actionable groups (17 warning-level).
Resolve the 15 Edited copy of a member (3 corresponding lines) finding(s) in Code Duplication — start with ChatHaptics.swift (5), HermesSkillsClient.swift, ScreenInput.swift. — One of this dimension's main actionable groups (15 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.
4 production modules (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, and main-sequence distance (abstractness) is not computed for these modules yet.
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 8 Low cohesion finding(s) in Cohesion (LCOM4) — start with PushAppDelegate.swift, ChatComposerTextInputView.swift, ChatViewModel.swift. — One of this dimension's main actionable groups (8 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.8 / 10Stronggated by 48 serious 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.
Resolve the 41 No assertions finding(s) in Test Quality — start with ScreenSessionTests.swift (12), SessionNavigationStateTests.swift (9), HermesChatTurnTests.swift (3). — One of this dimension's main actionable groups (41 warning-level).
Resolve the 7 Skipped test finding(s) in Test Quality — start with BotConnectionVersionTests.swift, CacheStoreTests.swift, ChatTranscriptRenderBudgetTests.swift. — One of this dimension's main actionable groups (7 warning-level).
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
0 outdated direct SwiftPM dependencies, 0 pinning defect(s). SwiftPM has no package registry: a dependency is a repository URL and its releases are that repository's semver tags, so currency is answered by listing tags rather than by querying an index. Only a newer tag on the SAME MAJOR is reported — a `from:` requirement admits everything below the next major and nothing above it, so a major crossing needs a Package.swift edit rather than an update, and naming the update as its remedy would be wrong. Whether any dependency is DEPRECATED or ABANDONED is not graded and cannot be: a repository publishes no such marker, and there is no registry that could carry one. Known CVEs in this dependency graph are D30's question.
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 8 SwiftPM package(s) use a banned license. SwiftPM has no package registry, so each package's licence is the one its repository declares: 7 of them read from the licence file the repository carries at the revision Package.resolved pins, and 1 — unpinned, or whose licence file could not be read or named — from api.deps.dev, which reports the licence the repository declares today. Graded: every package a committed Package.resolved pins, direct and transitive, and every declared dependency none pins. 1 of them declare no licence that matches a known SPDX licence; that is missing data, not a violation, and none of them is charged.
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.
Top hotspots: HermesMobile/Networking/Hermes/HermesREST.swift (51×197=10047); HermesMobile/Networking/Hermes/HermesCall.swift (37×135=4995); HermesMobile/Features/Chat/ChatViewModel.swift (104×40=4160) Repeated repair below the complexity floor: HermesMobile/Features/Chat/SlashCommandAutocompleteView.swift (6 of 10 changes were fixes); HermesMobile/Features/Chat/ChatAttachmentCoordinator.swift (5 of 9 changes were fixes); HermesMobile/Features/Hermes/HermesHome.swift (5 of 6 changes were fixes)
Resolve the 60 Hotspot finding(s) in Churn × Complexity Hotspots — start with HermesREST.swift, HermesCall.swift, ChatViewModel.swift. — One of this dimension's main actionable groups (60 warning-level).
Resolve the 11 Repeated repair finding(s) in Churn × Complexity Hotspots — start with SlashCommandAutocompleteView.swift, ChatAttachmentCoordinator.swift, HermesHome.swift. — One of this dimension's main actionable groups (11 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.
0 deducted task-comment markers across 159765 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
✓ On the Gold path — maintain.
Detailed fixes: d17_recommendation.md.
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 foundHermesMobile.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.
1 naming inconsistencies among 22 declarations measured against a convention their peers follow.
`isCLISession` spells `CLI` where 21 names in the project spell it `Cli`HermesMobile/Features/Chat/ChatViewModel.swift:732
What to do
Resolve the 1 `isCLISession` spells `CLI` where 21 names in the project spell it `Cli` finding(s) in Naming Consistency — start with ChatViewModel.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: 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 6 % 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: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
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).
6 finding(s): 0 critical, 5 high, 1 medium, 0 low. 4 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 17 file(s) — `HermesMobile/Auth/AppLock.swift` (line 207, line 208, line 209, …), `HermesMobile/Auth/AuthManager.swift` (line 165), `HermesMobile/Config/AppFont.swift` (line 250, line 251, line 252, …), `HermesMobile/Config/AppTheme.swift` (lines 127–130), `HermesMobile/Features/Chat/ChatView.swift` (line 2943), … (+12 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
What to do
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
No action in Static Analysis (SAST) — all 4 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (4 issue-level, 0 of them charged here).
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.
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 432 of the 459 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.
Resolve the 5 Change coupling finding(s) in Change Coupling — start with KanbanLabView.swift, GitWorkspaceViewModel.swift, ChatViewModel.swift. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 1 Change-coupling hub finding(s) in Change Coupling — start with ChatView.swift. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
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.
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.
Do you agree with this assessment?
DM4 · Rich vs anemic domain model7.5 / 10Strong✓ Tool-verified
Other · Domain Modelling — Whether domain entities own their behaviour — a data-only reference entity whose logic lives in a foreign service is anemic. Rich models enforce their own invariants.
Method: Roslyn (DDD-gated): entity method BODIES classified mutator-vs-query — only methods that mutate the entity's own declared state count as invariant-protecting behaviour, so a getter/passthrough doesn't rescue an anemic class. Deterministic, exhaustive over domain-layer entities.
Coverage: Population: entities by name/base convention; rich-vs-anemic judged by classifying each method body mutator-vs-query — logic-bearing domain types outside the convention are invisible.
`String` is a data-only reference entity whose behaviour is DELEGATED to a foreign utility (static methods that take it as their first parameter and hold its logic) — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants rather than being driven from outside. — HermesMobile/Models/ANSIEscapes.swift:8
What to do
Move delegated behaviour onto the domain entity (or make it a value object); keep invariants inside the type.
Other · Domain Modelling — Whether a reference entity protects its own invariants — a class whose identity is a computed content hash but whose hashed fields are publicly mutable bypasses that invariant. Encapsulated state keeps identity-bearing fields immutable.
Method: Roslyn (DDD-gated): entities scanned for publicly writable state — public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.
Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.
Other · Domain Modelling — Whether the domain layer stays free of infrastructure dependencies — a domain entity fused to a persistence ORM on its own declaration (active-record), or reaching a web-framework transport type in its own method, couples the domain to infrastructure. The clean-architecture dependency rule.
Method: Roslyn (DDD-gated): domain-layer types scanned for infrastructure usage in member SIGNATURES and inside method/accessor BODIES — resolved calls and object-creations into EF/Marten/HTTP/Mongo/Redis/message-bus types (not just a namespace allowlist). Deterministic, symbol-resolved, exhaustive over domain-layer bodies, DDD-native.
Coverage: Domain layer identified by NAMESPACE heuristic; infrastructure then resolved by symbol in member SIGNATURES and method/accessor BODIES — rename the layer and the check evaporates.
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.
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.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add CodeQL's Swift pack (Swift/Xcode) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 2 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. — REDACTED:24
What to do
Add a SAST step to CI running what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
No release automation was found in CI — neither a deploy stage (Helm/Kubernetes/compose manifests, an orchestrated rollout) nor a publish job that ships the built artifact. Releases appear to be run by hand, which is slower, less repeatable and harder to reverse.
What to do
Automate the release in CI — a deploy stage for a service (Helm/Kubernetes manifests or an equivalent rollout), or a tag-triggered publish job for an artifact — so releases are repeatable and reversible.
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.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
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. (×38) — HermesMobile/ContentView.swift:375, HermesMobile/Push/PushRegistrar.swift:582, HermesMobile/Push/PushRegistrar.swift:600, …
An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×2) — HermesMobile/Networking/Hermes/HermesBrowserSignIn.swift:55, HermesMobile/Features/SessionList/SessionListViewModel.swift:2173
Other · Code Health — Whether Ruby's type checker checks nil and is not undermined by assertions — a file Sorbet reads at `# typed: true` or above, or a Steep target `check`s under its default or strict diagnostics, is one where a method call on a `T.nilable(String)` / `String?` is an error, and each `T.must`, `#: as !nil` or `# steep:ignore NoMethod` is the author telling the checker a value cannot be nil.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
This repository commits no Sorbet configuration (`sorbet/config`) and no `Steepfile`, so nothing type-checks its 1 Ruby product file(s): a nilable value reaches a method call silently and raises `NoMethodError: undefined method … for nil` the first time it is nil. A `# typed:` sigil does nothing without a `sorbet/config` beside the code; a Steep run configured only on a command line is not something this check can read.
What to do
Adopt a checker and raise it file by file: with Sorbet, `srb init` (or `bundle exec tapioca init`) commits `sorbet/config`, then move each file's sigil from `# typed: false` to `# typed: true` and on to `strict` as its methods get `sig`s — `spoom bump` does the moving; with Steep, write RBS signatures and `check` the product directories in the `Steepfile` under `D::Ruby.default` or `strict`, not `lenient`. Then pay down the assertions rather than adding to them: each `T.must` is a nil the checker could not rule out — narrow it (`return unless x`, `x&.`, `if (y = x)`), make the attribute non-nilable and set it in `initialize`, or change the method so the nil cannot arrive.
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
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 — 9 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 73 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; 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 class in this Ruby code is a Rails controller, a Sinatra, Grape or Roda app, a Hanami action or a Rack app (an instance `call(env)`), so no request handler shares state 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.
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — no class or module declares an abstract method
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.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named property (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a SwiftData @Model, a Core Data, Realm, GRDB or Fluent type, a GRDB or SQLite.swift column, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (CoreData, SwiftData, GRDB, RealmSwift, SQLite, Firebase, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named property (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a SwiftData @Model, a Core Data, Realm, GRDB or Fluent type, a GRDB or SQLite.swift column, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (CoreData, SwiftData, GRDB, RealmSwift, SQLite, Firebase, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D11 Test Reliability — Test source is present (.swift) and this repository's suite is reachable only from an Apple platform: it ships HermesMobile.xcodeproj and no SwiftPM manifest, so it is built by Xcode rather than by `swift test`. The analyzer runs on Linux, where no simulator exists, so the suite was not re-run. Not scored: nothing was exercised.
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"]`.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .py, .rb, .swift, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D25 ADR Conformance — no ADRs to check
D26 Project Cohesion — D26 could not read how the parts of this repository's one build unit reference each other, so its cohesion was not measured. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — 69 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D36 Supply-chain Provenance & Signing — The CI pipeline publishes no artifact — no package publish, container push or release with files to download. Supply-chain provenance, signing and an SBOM describe a PUBLISHED artifact for the people who obtain it, so there is nothing to attest here; a deployment of the service itself publishes nothing for anyone else to verify. Add them to the release pipeline when this repo starts publishing artifacts (a package, a container image, or a release with downloadable files).
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 MEASURED: this repository's test suite is reachable only from an Apple platform — it ships HermesMobile.xcodeproj and no SwiftPM manifest, so it is built by Xcode rather than by `swift test`. The analyzer runs on Linux, where no simulator exists, so the suite was not run and no coverage was instrumented. Not scored.
DM1 Aggregate boundaries — not scored for Swift: the sidecar flattens array/collection types (a child COLLECTION = legitimate membership vs a single embedded aggregate is indistinguishable), and aggregate-vs-value-object classification cannot be told apart in source (every struct-holding-struct reads alike) — reported as guidance rather than measured
DM2 Strongly-typed ids — no in-repo typed-id idiom — primitive-obsession recorded as advisory DM8, DM2 not gated
DM3 Integration-event coupling — not scored for Swift: a cross-SwiftPM-target domain leak cannot be told apart in source from a legitimate shared-kernel/contracts module, and most repositories ship a single module — reported as guidance rather than measured
DM7 Repository granularity — not scored for Swift: 'a repository per CHILD entity' needs the aggregate-root structure, which is not source-resolvable — reported as guidance rather than measured
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript, Python, Ruby, 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 applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X12 Unreachable branch — X12 reached only 0% of this repository's production lines — swift (159,138 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X16 Unfloored truncation loop — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X21 Side-effecting pattern guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X25 Inert configuration knob — X25 reached only 0% of this repository's production lines — swift (159,138 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X27 Collection changed while being enumerated — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X29 Per-element action decided by a fixed element — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Ruby was read, and it logs through none: the standard library's Logger, which Rails.logger is, takes one finished message and no template arguments or fields (as log4net does in C#), so an interpolated message there loses nothing the API could have kept. The console gem (`Console.info`), SemanticLogger, Ougai and dry-logger would be judged.
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.
DM4 · Rich vs anemic domain model· Anemic domain model · ×1
Anemic domain model: String HermesMobile/Models/ANSIEscapes.swift:8— `String` is a data-only reference entity whose behaviour is DELEGATED to a foreign utility (static methods that take it as their first parameter and hold its logic) — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants rather than being driven from outside.
Hotspot: HermesMobile/Networking/Hermes/HermesREST.swift HermesMobile/Networking/Hermes/HermesREST.swift:410— HermesMobile/Networking/Hermes/HermesREST.swift changed 51 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 197 in HermesREST.request at line 410. 8 of those changes were fix/bug commits, and the other 43 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Networking/Hermes/HermesREST.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: HermesMobile/Networking/Hermes/HermesCall.swift HermesMobile/Networking/Hermes/HermesCall.swift:879— HermesMobile/Networking/Hermes/HermesCall.swift changed 37 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 135 in HermesCall.admit at line 879. 8 of those changes were fix/bug commits, and the other 29 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Networking/Hermes/HermesCall.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: HermesMobile/Features/Chat/ChatViewModel.swift HermesMobile/Features/Chat/ChatViewModel.swift:3358— HermesMobile/Features/Chat/ChatViewModel.swift changed 104 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in ChatViewModel.submitHermesPrompt at line 3358. 33 of those changes were fix/bug commits, and the other 71 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Features/Chat/ChatViewModel.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: HermesMobile/Features/Chat/ChatView.swift HermesMobile/Features/Chat/ChatView.swift:3065— HermesMobile/Features/Chat/ChatView.swift changed 133 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in ChatView.sendDraftMessage at line 3065. 35 of those changes were fix/bug commits, and the other 98 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Features/Chat/ChatView.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: HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:1363— HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift changed 52 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in HermesChatTurnCoordinator.apply at line 1363. 11 of those changes were fix/bug commits, and the other 41 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Features/Chat/HermesChatTurnCoordinator.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: HermesMobile/Features/Chat/ChatComposerView.swift HermesMobile/Features/Chat/ChatComposerView.swift:581— HermesMobile/Features/Chat/ChatComposerView.swift changed 56 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in MessageComposerView.composerWithLifecycle at line 581. 18 of those changes were fix/bug commits, and the other 38 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Features/Chat/ChatComposerView.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: HermesMobile/Features/SessionList/HermesSessionListView.swift HermesMobile/Features/SessionList/HermesSessionListView.swift:235— HermesMobile/Features/SessionList/HermesSessionListView.swift changed 49 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in HermesSessionListView.body at line 235. 17 of those changes were fix/bug commits, and the other 32 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Features/SessionList/HermesSessionListView.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: HermesMobile/Features/Chat/ChatTranscriptView.swift HermesMobile/Features/Chat/ChatTranscriptView.swift:819— HermesMobile/Features/Chat/ChatTranscriptView.swift changed 50 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in ChatTranscriptMessageBlock.== at line 819. 14 of those changes were fix/bug commits, and the other 36 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Features/Chat/ChatTranscriptView.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: HermesMobile/Features/SessionList/SessionListView.swift HermesMobile/Features/SessionList/SessionListView.swift:215— HermesMobile/Features/SessionList/SessionListView.swift changed 44 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in SessionListView.body at line 215. 14 of those changes were fix/bug commits, and the other 30 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Features/SessionList/SessionListView.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: HermesMobile/Features/Bots/BotRoomView.swift HermesMobile/Features/Bots/BotRoomView.swift:32— HermesMobile/Features/Bots/BotRoomView.swift changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in BotRoomView.body at line 32. 5 of those changes were fix/bug commits, and the other 17 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Features/Bots/BotRoomView.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: HermesMobile/Features/SessionList/SessionListViewModel.swift HermesMobile/Features/SessionList/SessionListViewModel.swift:1944— HermesMobile/Features/SessionList/SessionListViewModel.swift changed 36 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in SessionListViewModel.reloadHermes at line 1944. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Features/SessionList/SessionListViewModel.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: HermesMobile/Features/Bots/BotsInboxView.swift HermesMobile/Features/Bots/BotsInboxView.swift:173— HermesMobile/Features/Bots/BotsInboxView.swift changed 56 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in BotsInboxView.list 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Features/Bots/BotsInboxView.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: HermesMobile/Features/Bots/BotInbox.swift HermesMobile/Features/Bots/BotInbox.swift:360— HermesMobile/Features/Bots/BotInbox.swift changed 31 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in BotInbox.open at line 360. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Features/Bots/BotInbox.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: HermesMobile/Features/Chat/ChatStreamCoordinator.swift HermesMobile/Features/Chat/ChatStreamCoordinator.swift:802— HermesMobile/Features/Chat/ChatStreamCoordinator.swift changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in ChatStreamCoordinator.handle at line 802. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Features/Chat/ChatStreamCoordinator.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: HermesMobile/Features/Bots/BotConnectionView.swift HermesMobile/Features/Bots/BotConnectionView.swift:37— HermesMobile/Features/Bots/BotConnectionView.swift changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in BotConnectionView.body at line 37. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Features/Bots/BotConnectionView.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: HermesMobile/Networking/Hermes/HermesGateway.swift HermesMobile/Networking/Hermes/HermesGateway.swift:223— HermesMobile/Networking/Hermes/HermesGateway.swift changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in HermesGateway.send at line 223. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Networking/Hermes/HermesGateway.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: HermesMobile/Networking/Hermes/HermesConnection.swift HermesMobile/Networking/Hermes/HermesConnection.swift:243— HermesMobile/Networking/Hermes/HermesConnection.swift changed 32 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in HermesConnection.beginSignIn at line 243. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Networking/Hermes/HermesConnection.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: HermesMobile/ContentView.swift HermesMobile/ContentView.swift:156— HermesMobile/ContentView.swift changed 34 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in ContentView.handleOpenURL at line 156. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/ContentView.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: HermesMobile/Features/SessionList/SessionListComponents.swift HermesMobile/Features/SessionList/SessionListComponents.swift:1369— HermesMobile/Features/SessionList/SessionListComponents.swift changed 35 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in SessionRowContextMenu.body at line 1369. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Features/SessionList/SessionListComponents.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: HermesMobile/Features/Bots/BotRoomReader.swift HermesMobile/Features/Bots/BotRoomReader.swift:108— HermesMobile/Features/Bots/BotRoomReader.swift changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in BotRoomReader.open 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Features/Bots/BotRoomReader.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: HermesMobile/Features/Bots/BotConnection.swift HermesMobile/Features/Bots/BotConnection.swift:60— HermesMobile/Features/Bots/BotConnection.swift changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in BotConnection.address at line 60. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Features/Bots/BotConnection.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: HermesMobile/Networking/Endpoints.swift HermesMobile/Networking/Endpoints.swift:411— HermesMobile/Networking/Endpoints.swift changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in Endpoint.queryItems at line 411. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Networking/Endpoints.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: HermesMobile/Features/Kanban/KanbanFeatureState.swift HermesMobile/Features/Kanban/KanbanFeatureState.swift:2502— HermesMobile/Features/Kanban/KanbanFeatureState.swift changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in KanbanFeatureState.refreshBoard at line 2502. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Features/Kanban/KanbanFeatureState.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: HermesMobile/Features/Chat/ChatComposerTextInputView.swift HermesMobile/Features/Chat/ChatComposerTextInputView.swift:535— HermesMobile/Features/Chat/ChatComposerTextInputView.swift changed 25 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in Coordinator.syncFocus at line 535. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Features/Chat/ChatComposerTextInputView.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: HermesMobile/LiveActivities/AgentLiveActivityManager.swift HermesMobile/LiveActivities/AgentLiveActivityManager.swift:391— HermesMobile/LiveActivities/AgentLiveActivityManager.swift changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in AgentLiveActivityManager.update at line 391. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/LiveActivities/AgentLiveActivityManager.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.
No assertions: testRoomSearchHitScrollsToItsSequenceAndDoesNotFollowNewMessages HermesMobileTests/BotChatPresentationTests.swift:188— 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: testWarmRoomSearchShowsItsTargetBeforeRefreshing HermesMobileTests/BotChatPresentationTests.swift:192— 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: testAttachmentAndSettingsUpdatesDoNotDisturbEachOtherOrText HermesMobileTests/ChatDraftStoreTests.swift:463— 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: testQueuedMessagesMergeIntoEmptyDraft HermesMobileTests/ChatDraftStoreTests.swift:611— 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: testHandlersThatCaptureTheOwnerDoNotOutliveIt HermesMobileTests/ChatScrollPolicyTests.swift:343— 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: testAMissingSideSessionShowsTheResultUnavailable HermesMobileTests/HermesChatSideTaskTests.swift:433— 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: testAGapRebuildsFromTheSnapshot HermesMobileTests/HermesChatTurnTests.swift:1139— 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: testARebuildKeepsNewDeltasThatRepeatTheReply HermesMobileTests/HermesChatTurnTests.swift:1145— 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: testARebuildDropsOnlyTheDeltasAfterTheReplayedText HermesMobileTests/HermesChatTurnTests.swift:1155— 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: testAMovesConnectionWaitsForARefreshRetiredAfterItWasMade HermesMobileTests/HermesConnectionTests.swift:637— 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: testTheServersOwnConnectionWaitsForAMovesRefreshClosedAfterItWasMade HermesMobileTests/HermesConnectionTests.swift:647— 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: testPassiveReadCannotReplaceAFinishedUpdate HermesMobileTests/HermexPushProvisioningTests.swift:1448— 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: testPassiveReadCannotReplaceAFinishedRecheck HermesMobileTests/HermexPushProvisioningTests.swift:1452— 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: testPassiveReadCannotReplaceAFinishedRestart HermesMobileTests/HermexPushProvisioningTests.swift:1456— 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: testInlineCodeHeavyParagraphRendersOnAPhoneStack HermesMobileTests/MarkdownMathRendererTests.swift:964— 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: testBareURLParagraphRendersOnAPhoneStack HermesMobileTests/MarkdownMathRendererTests.swift:968— 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: testSchemelessWWWLinkParagraphRendersOnAPhoneStack HermesMobileTests/MarkdownMathRendererTests.swift:972— 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: testSSEClientForwardsHeartbeatComments HermesMobileTests/SSEClientTests.swift:97— 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: testSSEClientReportsTransportErrorWhenAnOpenStreamDrops HermesMobileTests/SSEClientTests.swift:121— 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: testSSEClientReportsTransportErrorWhenServerClosesStream HermesMobileTests/SSEClientTests.swift:151— 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: testAHostWithoutTheMethodsSaysSo HermesMobileTests/ScreenSessionTests.swift:116— 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: testObserveRefusedWithNoCodeReadsAsAStoppedScreen HermesMobileTests/ScreenSessionTests.swift:125— 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: testASpentTicketOpensAgainOnANewOne HermesMobileTests/ScreenSessionTests.swift:134— 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: testAScreenThatGoesAwayStopsAndABrokenStreamFails HermesMobileTests/ScreenSessionTests.swift:145— 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: testARefusedUpgradeStopsRetrying HermesMobileTests/ScreenSessionTests.swift:177— 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.
FileTooLong: Chat/ChatViewModel.swift HermesMobile/Features/Chat/ChatViewModel.swift— FileTooLong — 6096 significant lines (blank, comment-only and punctuation-only lines excluded), about 81% of them inside a single declaration: ChatViewModel (277-8181). The bar is 500 significant lines; this is 5596 over it, 12.19× 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: Chat/ChatView.swift HermesMobile/Features/Chat/ChatView.swift— FileTooLong — 3111 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: ChatView (288-4567). The bar is 500 significant lines; this is 2611 over it, 6.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.
FileTooLong: Kanban/KanbanFeatureState.swift HermesMobile/Features/Kanban/KanbanFeatureState.swift— FileTooLong — 2234 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: KanbanFeatureState (355-3040). The bar is 500 significant lines; this is 1734 over it, 4.47× 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: SessionList/SessionListViewModel.swift HermesMobile/Features/SessionList/SessionListViewModel.swift— FileTooLong — 1868 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: SessionListViewModel (81-2916). The bar is 500 significant lines; this is 1368 over it, 3.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: Kanban/KanbanLabView.swift HermesMobile/Features/Kanban/KanbanLabView.swift— FileTooLong — 1811 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1311 over it, 3.62× 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: SessionList/SessionListComponents.swift HermesMobile/Features/SessionList/SessionListComponents.swift— FileTooLong — 1486 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 986 over it, 2.97× 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: SessionList/SessionListView.swift HermesMobile/Features/SessionList/SessionListView.swift— FileTooLong — 1421 significant lines (blank, comment-only and punctuation-only lines excluded), about 72% of them inside a single declaration: SessionListView (90-1632). The bar is 500 significant lines; this is 921 over it, 2.84× 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: Chat/HermesChatTurnCoordinator.swift HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift— FileTooLong — 1302 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 802 over it, 2.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: Chat/ChatComposerView.swift HermesMobile/Features/Chat/ChatComposerView.swift— FileTooLong — 1219 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: MessageComposerView (152-1960). The bar is 500 significant lines; this is 719 over it, 2.44× 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: Chat/ComposerVoiceInputController.swift HermesMobile/Features/Chat/ComposerVoiceInputController.swift— FileTooLong — 1028 significant lines (blank, comment-only and punctuation-only lines excluded), about 68% of them inside a single declaration: ComposerVoiceInputController (16-1006). The bar is 500 significant lines; this is 528 over it, 2.06× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: Chat/MarkdownRenderer.swift HermesMobile/Features/Chat/MarkdownRenderer.swift— FileTooLong — 1015 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 515 over it, 2.03× 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: SessionList/HermesSessionListView.swift HermesMobile/Features/SessionList/HermesSessionListView.swift— FileTooLong — 998 significant lines (blank, comment-only and punctuation-only lines excluded), about 71% of them inside a single declaration: HermesSessionListView (35-1092). The bar is 500 significant lines; this is 498 over it, 2.00× 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: Chat/ChatTranscriptSupportingViews.swift HermesMobile/Features/Chat/ChatTranscriptSupportingViews.swift— FileTooLong — 938 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 438 over it, 1.88× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Persistence/ChatDraftStore.swift HermesMobile/Persistence/ChatDraftStore.swift— FileTooLong — 915 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 415 over it, 1.83× 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: Models/Kanban.swift HermesMobile/Models/Kanban.swift— FileTooLong — 912 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 412 over it, 1.82× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Chat/ChatTranscriptView.swift HermesMobile/Features/Chat/ChatTranscriptView.swift— FileTooLong — 891 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 391 over it, 1.78× 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: LiveActivities/AgentLiveActivityManager.swift HermesMobile/LiveActivities/AgentLiveActivityManager.swift— FileTooLong — 881 significant lines (blank, comment-only and punctuation-only lines excluded), about 73% of them inside a single declaration: AgentLiveActivityManager (182-1159). The bar is 500 significant lines; this is 381 over it, 1.76× 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: Chat/ChatStreamCoordinator.swift HermesMobile/Features/Chat/ChatStreamCoordinator.swift— FileTooLong — 880 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: ChatStreamCoordinator (148-1336). The bar is 500 significant lines; this is 380 over it, 1.76× 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: MoveToHermes/MoveToHermesView.swift HermesMobile/Features/MoveToHermes/MoveToHermesView.swift— FileTooLong — 815 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 315 over it, 1.63× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Chat/CustomAttachmentPicker.swift HermesMobile/Features/Chat/CustomAttachmentPicker.swift— FileTooLong — 742 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 242 over it, 1.48× 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: Models/Session.swift HermesMobile/Models/Session.swift— FileTooLong — 738 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 238 over it, 1.48× 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: Screen/ScreenSession.swift HermesMobile/Features/Screen/ScreenSession.swift— FileTooLong — 737 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 237 over it, 1.47× 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: Chat/TranscriptMediaView.swift HermesMobile/Features/Chat/TranscriptMediaView.swift— FileTooLong — 716 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 216 over it, 1.43× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Hermes/HermesCall.swift HermesMobile/Networking/Hermes/HermesCall.swift— FileTooLong — 708 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: HermesCall (17-1003). The bar is 500 significant lines; this is 208 over it, 1.42× 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: HermesMobile/ContentView.swift HermesMobile/ContentView.swift— FileTooLong — 695 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 195 over it, 1.39× 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.
Swallowed exception (caught, then discarded) HermesMobile/ContentView.swift:375— `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) HermesMobile/Push/PushRegistrar.swift:582— `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) HermesMobile/Push/PushRegistrar.swift:600— `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) HermesMobile/Persistence/ChatDraftStore.swift:1253— `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) HermesMobile/Networking/Hermes/HermesConnection.swift:223— `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) HermesMobile/Networking/Hermes/HermesConnection.swift:869— `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) HermesMobile/Networking/Hermes/HermesGateway.swift:183— `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) HermesMobile/Networking/Hermes/HermesGateway.swift:246— `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) HermesMobile/Networking/Hermes/HermesGateway.swift:458— `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) HermesMobile/Networking/Hermes/HermesGitClient.swift:383— `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) HermesMobile/Networking/Hermes/HermesKanbanClient.swift:396— `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) HermesMobile/Networking/Hermes/HermesSessionActions.swift:102— `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) HermesMobile/Networking/Bots/BotArtifactDownload.swift:74— `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) HermesMobile/LiveActivities/AgentLiveActivityManager.swift:883— `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) HermesMobile/Features/Workspace/FileBrowserViewModel.swift:303— `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) HermesMobile/Features/Workspace/GitWorkspaceViewModel.swift:219— `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) HermesMobile/Features/Shared/ActionToast.swift:149— `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) HermesMobile/Features/Shared/DelayedStatus.swift:101— `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) HermesMobile/Features/SessionList/SessionListView.swift:1244— `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) HermesMobile/Features/SessionList/SessionListViewModel.swift:2159— `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) HermesMobile/Features/Screen/ScreenSession.swift:656— `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) HermesMobile/Features/Screen/ScreenSession.swift:931— `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) HermesMobile/Features/Screen/ScreenSession.swift:952— `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) HermesMobile/Features/Screen/ScreenSession.swift:1006— `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) HermesMobile/Features/Screen/ScreenSession.swift:1012— `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.
TooManyMethods: ChatViewModel HermesMobile/Features/Chat/ChatViewModel.swift:275— TooManyMethods — 394 methods. The bar is 30 methods; this is 364 over it, 13.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: APIClient HermesMobile/Networking/APIClient.swift:3— TooManyMethods — 173 methods, declared across 17 files: Networking/APIClient+Kanban.swift (26), Networking/APIClient+Cron.swift (24), Networking/APIClient+Sessions.swift (22), Networking/APIClient+ServerPanels.swift (20), +13 more file(s). The bar is 30 methods; this is 143 over it, 5.77× 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: KanbanFeatureState HermesMobile/Features/Kanban/KanbanFeatureState.swift:353— TooManyMethods — 133 methods. The bar is 30 methods; this is 103 over it, 4.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SessionListViewModel HermesMobile/Features/SessionList/SessionListViewModel.swift:79— TooManyMethods — 133 methods. The bar is 30 methods; this is 103 over it, 4.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ChatView HermesMobile/Features/Chat/ChatView.swift:288— TooManyMethods — 121 methods. The bar is 30 methods; this is 91 over it, 4.03× 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: HermesChatTurnCoordinator HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:204— TooManyMethods — 103 methods. The bar is 30 methods; this is 73 over it, 3.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ReviewDiffCanvasView HermesMobile/Features/Workspace/ReviewDiff/ReviewDiffCanvasView.swift:51— TooManyMethods — 66 methods, declared across 3 files: ReviewDiff/ReviewDiffCanvasView.swift (31), ReviewDiff/ReviewDiffCanvasView+Drawing.swift (26), ReviewDiff/ReviewDiffCanvasView+Accessibility.swift (9). The bar is 30 methods; this is 36 over it, 2.20× 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: BotInbox HermesMobile/Features/Bots/BotInbox.swift:10— TooManyMethods — 61 methods. The bar is 30 methods; this is 31 over it, 2.03× 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: SessionListView HermesMobile/Features/SessionList/SessionListView.swift:89— TooManyMethods — 52 methods. The bar is 30 methods; this is 22 over it, 1.73× 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: ScreenSession HermesMobile/Features/Screen/ScreenSession.swift:297— TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ChatStreamCoordinator HermesMobile/Features/Chat/ChatStreamCoordinator.swift:146— TooManyMethods — 49 methods. The bar is 30 methods; this is 19 over it, 1.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: HermesGitClient HermesMobile/Networking/Hermes/HermesGitClient.swift:25— TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: View HermesLiveActivityWidget/AgentRunLiveActivityWidget.swift:684— TooManyMethods — 46 methods, declared across 24 files: Shared/AdaptiveGlassModifier.swift (7), SessionList/SessionListComponents.swift (5), Chat/PendingRequestSurfaces.swift (4), Chat/ChatScrollPolicy.swift (3), +20 more file(s). The bar is 30 methods; this is 16 over it, 1.53× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AuthManager HermesMobile/Auth/AuthManager.swift:4— TooManyMethods — 45 methods, declared across 2 files: Auth/AuthManager.swift (37), Auth/AuthManager+MoveToHermes.swift (8). The bar is 30 methods; this is 15 over it, 1.50× 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: AgentLiveActivityManager HermesMobile/LiveActivities/AgentLiveActivityManager.swift:181— TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ChatDraftStore HermesMobile/Persistence/ChatDraftStore.swift:623— TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ComposerVoiceInputController HermesMobile/Features/Chat/ComposerVoiceInputController.swift:14— 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: HermesChatRequests HermesMobile/Features/Chat/HermesChatRequests.swift:24— 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: ChatAttachmentCoordinator HermesMobile/Features/Chat/ChatAttachmentCoordinator.swift:26— TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: MessageComposerView HermesMobile/Features/Chat/ChatComposerView.swift:152— 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: ComposerChipTextView HermesMobile/Features/Chat/ComposerChipTextView.swift:6— TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: HermesConnection HermesMobile/Networking/Hermes/HermesConnection.swift:28— TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: MarkdownMathFormatter HermesMobile/Features/Chat/MarkdownMathFormatter.swift:3— TooManyMethods — 36 methods, declared across 3 files: Chat/MarkdownMathFormatter+Support.swift (16), Chat/MarkdownMathFormatter.swift (14), Chat/MarkdownMathFormatter+Environments.swift (6). The bar is 30 methods; this is 6 over it, 1.20× 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: BotRoomReader HermesMobile/Features/Bots/BotRoomReader.swift:9— TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: BotProfileEditor HermesMobile/Features/Bots/BotProfileEditor.swift:54— 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.
ClassTooLong: ChatViewModel HermesMobile/Features/Chat/ChatViewModel.swift:275— ClassTooLong — 4951 significant lines (blank, comment-only and punctuation-only lines excluded), 394 methods. The bar is 400 significant lines; this is 4551 over it, 12.38× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ChatView HermesMobile/Features/Chat/ChatView.swift:288— ClassTooLong — 2714 significant lines (blank, comment-only and punctuation-only lines excluded), 121 methods. The bar is 400 significant lines; this is 2314 over it, 6.79× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: KanbanFeatureState HermesMobile/Features/Kanban/KanbanFeatureState.swift:353— ClassTooLong — 1993 significant lines (blank, comment-only and punctuation-only lines excluded), 133 methods. The bar is 400 significant lines; this is 1593 over it, 4.98× 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: SessionListViewModel HermesMobile/Features/SessionList/SessionListViewModel.swift:79— ClassTooLong — 1816 significant lines (blank, comment-only and punctuation-only lines excluded), 133 methods. The bar is 400 significant lines; this is 1416 over it, 4.54× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: MessageComposerView HermesMobile/Features/Chat/ChatComposerView.swift:152— ClassTooLong — 1119 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods. The bar is 400 significant lines; this is 719 over it, 2.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: SessionListView HermesMobile/Features/SessionList/SessionListView.swift:89— ClassTooLong — 1017 significant lines (blank, comment-only and punctuation-only lines excluded), 52 methods. The bar is 400 significant lines; this is 617 over it, 2.54× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: KanbanStatusFocusView HermesMobile/Features/Kanban/KanbanLabView.swift:178— ClassTooLong — 1013 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 613 over it, 2.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: ChatStreamCoordinator HermesMobile/Features/Chat/ChatStreamCoordinator.swift:146— ClassTooLong — 776 significant lines (blank, comment-only and punctuation-only lines excluded), 49 methods. The bar is 400 significant lines; this is 376 over it, 1.94× 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: HermesSessionListView HermesMobile/Features/SessionList/HermesSessionListView.swift:35— ClassTooLong — 706 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 306 over it, 1.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ComposerVoiceInputController HermesMobile/Features/Chat/ComposerVoiceInputController.swift:14— ClassTooLong — 696 significant lines (blank, comment-only and punctuation-only lines excluded), 42 methods. The bar is 400 significant lines; this is 296 over it, 1.74× 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: HermesCall HermesMobile/Networking/Hermes/HermesCall.swift:17— ClassTooLong — 656 significant lines (blank, comment-only and punctuation-only lines excluded), 7 methods. The bar is 400 significant lines; this is 256 over it, 1.64× 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: AgentLiveActivityManager HermesMobile/LiveActivities/AgentLiveActivityManager.swift:181— ClassTooLong — 642 significant lines (blank, comment-only and punctuation-only lines excluded), 45 methods. The bar is 400 significant lines; this is 242 over it, 1.61× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Endpoint HermesMobile/Networking/Endpoints.swift:3— ClassTooLong — 585 significant lines (blank, comment-only and punctuation-only lines excluded), 3 methods. The bar is 400 significant lines; this is 185 over it, 1.46× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: HermesShareDraft HermesMobile/Features/Share/SharedDraftStore.swift:198— ClassTooLong — 516 significant lines (blank, comment-only and punctuation-only lines excluded), 45 methods. The bar is 400 significant lines; this is 116 over it, 1.29× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ModelPickerSheet HermesMobile/Features/Shared/ModelPickerSheet.swift:10— ClassTooLong — 491 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 91 over it, 1.23× 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: ComposerChipTextView HermesMobile/Features/Chat/ComposerChipTextView.swift:6— ClassTooLong — 486 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 86 over it, 1.22× 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: ChatDraftStore HermesMobile/Persistence/ChatDraftStore.swift:623— ClassTooLong — 483 significant lines (blank, comment-only and punctuation-only lines excluded), 43 methods. The bar is 400 significant lines; this is 83 over it, 1.21× 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: AuthManager HermesMobile/Auth/AuthManager.swift:4— ClassTooLong — 474 significant lines (blank, comment-only and punctuation-only lines excluded), 45 methods. The bar is 400 significant lines; this is 74 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.
ClassTooLong: ChatTranscriptView HermesMobile/Features/Chat/ChatTranscriptView.swift:23— ClassTooLong — 471 significant lines (blank, comment-only and punctuation-only lines excluded), 12 methods. The bar is 400 significant lines; this is 71 over it, 1.18× 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: KanbanCardDetailContent HermesMobile/Features/Kanban/KanbanCardDetailView.swift:30— ClassTooLong — 467 significant lines (blank, comment-only and punctuation-only lines excluded), 15 methods. The bar is 400 significant lines; this is 67 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ChatAttachmentCoordinator HermesMobile/Features/Chat/ChatAttachmentCoordinator.swift:26— ClassTooLong — 457 significant lines (blank, comment-only and punctuation-only lines excluded), 41 methods. The bar is 400 significant lines; this is 57 over it, 1.14× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: MessageBubbleView HermesMobile/Features/Chat/MessageBubbleView.swift:3— ClassTooLong — 439 significant lines (blank, comment-only and punctuation-only lines excluded), 12 methods. The bar is 400 significant lines; this is 39 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.
ClassTooLong: ToolCallGroup HermesMobile/Models/ToolCall.swift:119— ClassTooLong — 406 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 6 over it, 1.02× 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· Edited copy of a member (4 corresponding lines) · ×22
Edited copy of a member (4 corresponding lines) HermesMobile/Features/Bots/BotCreateView.swift:250— HermesMobile/Features/Bots/BotCreateView.swift:250-253 | HermesMobile/Features/Bots/BotProfileEditorView.swift:307-310 — 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) HermesMobile/Features/Chat/HermesChatSettings.swift:13— HermesMobile/Features/Chat/HermesChatSettings.swift:13-19 | HermesMobile/Features/Chat/HermesChatSettings.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) HermesMobile/Features/Chat/InAppBrowserPolicy.swift:8— HermesMobile/Features/Chat/InAppBrowserPolicy.swift:8-11 | HermesMobile/Features/Chat/TranscriptLinkPreview.swift:206-214 — 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) HermesMobile/Features/Bots/BotCreator.swift:152— HermesMobile/Features/Bots/BotCreator.swift:152-155 | HermesMobile/Features/Bots/BotProfileEditor.swift:235-238 — 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) HermesMobile/Features/Chat/ToolCallDisplayFormatter.swift:297— HermesMobile/Features/Chat/ToolCallDisplayFormatter.swift:297-300 | HermesMobile/Networking/APIError.swift:251-254 — 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) HermesMobile/Features/Chat/ChatComposerAttachmentStripView.swift:281— HermesMobile/Features/Chat/ChatComposerAttachmentStripView.swift:281-284 | HermesMobile/Features/Chat/MessageBubbleView.swift:887-890 — 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) HermesMobile/Features/Bots/BotCreator.swift:326— HermesMobile/Features/Bots/BotCreator.swift:326-329 | HermesMobile/Features/Bots/BotProfileEditor.swift:470-473 — 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) HermesMobile/Features/Chat/ComposerFileTrigger.swift:86— HermesMobile/Features/Chat/ComposerFileTrigger.swift:86-89 | HermesMobile/Features/Chat/ComposerSlashTrigger.swift:180-183 — 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) HermesMobile/Networking/APIClient+Memory.swift:204— HermesMobile/Networking/APIClient+Memory.swift:204-208 | HermesMobile/Networking/Hermes/HermesTurnOutcome.swift:73-76 — 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) HermesMobile/Features/Chat/HermesChatSideTasks.swift:433— HermesMobile/Features/Chat/HermesChatSideTasks.swift:433-436 | HermesMobile/Features/Chat/HermesSlashCommands.swift:167-170 — 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) HermesMobile/Features/Chat/DisplayMathView.swift:105— HermesMobile/Features/Chat/DisplayMathView.swift:105-110 | HermesMobile/Features/Chat/MarkdownDiffCodeBlock.swift:64-67 — 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) HermesMobile/Features/Workspace/FileTree.swift:114— HermesMobile/Features/Workspace/FileTree.swift:114-117 | HermesMobile/Models/ModelDisplayNames.swift:133-136 — 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) HermesMobile/Features/Chat/ChatHaptics.swift:158— HermesMobile/Features/Chat/ChatHaptics.swift:158-161 | HermesMobile/Features/SessionList/SessionHaptics.swift:33-36 — 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) HermesMobile/Models/ChatMessage.swift:529— HermesMobile/Models/ChatMessage.swift:529-535 | HermesMobile/Networking/CustomHeader.swift:112-115 — 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) HermesMobile/Features/Chat/ToolCallDiff.swift:359— HermesMobile/Features/Chat/ToolCallDiff.swift:359-362 | HermesMobile/Features/Chat/ToolCallSummaryFormatter.swift:482-485 — 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) HermesMobile/Features/Kanban/KanbanFeatureState.swift:2421— HermesMobile/Features/Kanban/KanbanFeatureState.swift:2421-2424 | HermesMobile/Features/Tasks/TaskDetailViewModel.swift:388-391 — 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) HermesMobile/Features/Tasks/TaskRunHistorySection.swift:157— HermesMobile/Features/Tasks/TaskRunHistorySection.swift:157-160 | HermesMobile/Features/Tasks/TaskRunOutputSheet.swift:76-79 — 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) HermesMobile/Features/Chat/ChatViewModel.swift:9710— HermesMobile/Features/Chat/ChatViewModel.swift:9710-9716 | HermesMobile/Features/Chat/InlineAudioPlayerView.swift:345-348 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) HermesMobile/Features/Settings/AddServerView.swift:519— HermesMobile/Features/Settings/AddServerView.swift:519-522 | HermesMobile/Features/Shared/SectionCard.swift:72-77 — 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) HermesMobile/Features/Chat/CameraPickerView.swift:524— HermesMobile/Features/Chat/CameraPickerView.swift:524-527 | HermesMobile/Features/Chat/CustomAttachmentPicker.swift:951-954 — 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) HermesMobile/Features/Chat/TranscriptMediaExportSupport.swift:96— HermesMobile/Features/Chat/TranscriptMediaExportSupport.swift:96-99 | HermesMobile/Features/Workspace/FilePreviewViewModel.swift:207-210 — 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) HermesMobile/Features/Bots/BotPendingRequest.swift:238— HermesMobile/Features/Bots/BotPendingRequest.swift:238-241 | HermesMobile/Models/Goal.swift:16-19 — 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.
MethodTooLong: Endpoint.path HermesMobile/Networking/Endpoints.swift:150— MethodTooLong — path runs 258 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 158 over it, 2.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: HermesCall.params HermesMobile/Networking/Hermes/HermesCall.swift:606— MethodTooLong — params runs 235 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 135 over it, 2.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SessionListView.body HermesMobile/Features/SessionList/SessionListView.swift:215— MethodTooLong — body runs 182 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 82 over it, 1.82× 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: MessageComposerView.composerWithLifecycle HermesMobile/Features/Chat/ChatComposerView.swift:581— MethodTooLong — composerWithLifecycle runs 181 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 81 over it, 1.81× 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: ChatView.messageComposer HermesMobile/Features/Chat/ChatView.swift:615— MethodTooLong — messageComposer runs 180 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 80 over it, 1.80× 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: ChatViewModel.loadMessages HermesMobile/Features/Chat/ChatViewModel.swift:2065— MethodTooLong — loadMessages runs 168 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 68 over it, 1.68× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Endpoint.queryItems HermesMobile/Networking/Endpoints.swift:411— MethodTooLong — queryItems 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: ChatView.messageContent HermesMobile/Features/Chat/ChatView.swift:2421— MethodTooLong — messageContent runs 137 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 37 over it, 1.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ChatTranscriptView.transcriptScrollContent HermesMobile/Features/Chat/ChatTranscriptView.swift:415— MethodTooLong — transcriptScrollContent 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: HermesSessionListView.body HermesMobile/Features/SessionList/HermesSessionListView.swift:235— MethodTooLong — body runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29× 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: BotRoomView.body HermesMobile/Features/Bots/BotRoomView.swift:32— MethodTooLong — body runs 127 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 27 over it, 1.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CronJobEditorSheet.body HermesMobile/Features/Tasks/CronJobEditorSheet.swift:82— MethodTooLong — body runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× 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: ChatView.chatContent HermesMobile/Features/Chat/ChatView.swift:1296— MethodTooLong — chatContent runs 118 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 18 over it, 1.18× 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: KanbanStatusFocusView.body HermesMobile/Features/Kanban/KanbanLabView.swift:207— MethodTooLong — body runs 115 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 15 over it, 1.15× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: HermesCall.admit HermesMobile/Networking/Hermes/HermesCall.swift:879— MethodTooLong — admit runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× 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: BotConnectionView.body HermesMobile/Features/Bots/BotConnectionView.swift:37— MethodTooLong — body runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× 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: ChatStreamCoordinator.performReconnectIfNeeded HermesMobile/Features/Chat/ChatStreamCoordinator.swift:484— MethodTooLong — performReconnectIfNeeded runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×17
Edited copy of a member (7 corresponding lines) HermesMobile/Push/PushRelayClient.swift:58— HermesMobile/Push/PushRelayClient.swift:58-69 | HermesMobile/Push/PushRelayClient.swift:78-84 — 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) HermesMobile/Config/AppTheme.swift:241— HermesMobile/Config/AppTheme.swift:241-252 | HermesMobile/Features/Bots/BotProfileAppearance.swift:517-523 — 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) HermesMobile/Networking/Hermes/HermesREST.swift:918— HermesMobile/Networking/Hermes/HermesREST.swift:918-925 | HermesMobile/Networking/Hermes/HermesREST.swift:935-941 — 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) HermesMobile/Features/Workspace/GitDiffView.swift:208— HermesMobile/Features/Workspace/GitDiffView.swift:208-214 | HermesMobile/Features/Workspace/SourceViewer/SourceFileSurface.swift:158-164 — 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) HermesMobile/Features/Chat/SlashCommandAutocompleteView.swift:461— HermesMobile/Features/Chat/SlashCommandAutocompleteView.swift:461-467 | HermesMobile/Features/Chat/SlashCommandAutocompleteView.swift:469-476 — 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) HermesMobile/Features/Settings/PluginDetailView.swift:67— HermesMobile/Features/Settings/PluginDetailView.swift:67-73 | HermesMobile/Features/Settings/PluginDetailView.swift:76-84 — 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) HermesMobile/Features/Chat/MarkdownRenderer.swift:1214— HermesMobile/Features/Chat/MarkdownRenderer.swift:1214-1226 | HermesMobile/Features/Workspace/SourceViewer/SourceHighlighter.swift:59-65 — 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) HermesMobile/Features/Bots/BotGeneratedAvatar.swift:106— HermesMobile/Features/Bots/BotGeneratedAvatar.swift:106-112 | HermesMobile/Features/Chat/ToolCallDiff.swift:294-301 — 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) HermesMobile/Features/Screen/ScreenView.swift:413— HermesMobile/Features/Screen/ScreenView.swift:413-419 | HermesMobile/Features/Workspace/SourceViewer/SourceFileSurface.swift:140-147 — 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) HermesMobile/Features/Chat/TranscriptLinkPreview.swift:155— HermesMobile/Features/Chat/TranscriptLinkPreview.swift:155-161 | HermesMobile/Features/Chat/TranscriptMedia.swift:688-694 — 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) HermesMobile/Features/Bots/BotProfileEditorView.swift:357— HermesMobile/Features/Bots/BotProfileEditorView.swift:357-364 | HermesMobile/Features/Bots/BotCreateView.swift:285-291 — 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) HermesMobile/Features/MoveToHermes/MoveToHermesReconcile.swift:302— HermesMobile/Features/MoveToHermes/MoveToHermesReconcile.swift:302-308 | HermesMobile/Models/Kanban.swift:246-260 — 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) HermesMobile/Features/Bots/BotProfileEditor.swift:213— HermesMobile/Features/Bots/BotProfileEditor.swift:213-220 | HermesMobile/Features/Bots/BotProfileEditor.swift:259-265 — 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) HermesMobile/Features/Chat/ChatView.swift:2784— HermesMobile/Features/Chat/ChatView.swift:2784-2790 | HermesMobile/Features/Chat/ChatViewModel.swift:9135-9141 — 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) HermesMobile/Networking/KanbanEventStreamClient.swift:94— HermesMobile/Networking/KanbanEventStreamClient.swift:94-102 | HermesMobile/Networking/SSEClient.swift:21-27 — 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) HermesMobile/Features/Chat/MarkdownMathFormatter.swift:165— HermesMobile/Features/Chat/MarkdownMathFormatter.swift:165-171 | HermesMobile/Features/Chat/MarkdownMathSegmenter.swift:293-299 — 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) HermesMobile/Features/SessionList/SessionListComponents.swift:1891— HermesMobile/Features/SessionList/SessionListComponents.swift:1891-1897 | HermesMobile/Features/Skills/SkillsViewModel.swift:93-99 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (3 corresponding lines) · ×15
Edited copy of a member (3 corresponding lines) HermesMobile/Networking/Hermes/HermesSkillsClient.swift:106— HermesMobile/Networking/Hermes/HermesSkillsClient.swift:106-108 | HermesMobile/Networking/Hermes/HermesWorkspaceFileClient.swift:156-158 — 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) HermesMobile/Features/Screen/ScreenInput.swift:52— HermesMobile/Features/Screen/ScreenInput.swift:52-54 | HermesMobile/Features/Screen/ScreenInput.swift:56-59 — 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) HermesMobile/Networking/APIClient+Cron.swift:263— HermesMobile/Networking/APIClient+Cron.swift:263-265 | HermesMobile/Networking/APIClient+Sessions.swift:22-27 — 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) HermesMobile/Features/Insights/InsightsView.swift:13— HermesMobile/Features/Insights/InsightsView.swift:13-15 | HermesMobile/Features/Skills/SkillsView.swift:13-15 — 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) HermesMobile/Features/Bots/BotCreator.swift:331— HermesMobile/Features/Bots/BotCreator.swift:331-333 | HermesMobile/Features/Bots/BotProfileEditor.swift:475-477 — 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) HermesMobile/Features/Bots/BotRoomView.swift:227— HermesMobile/Features/Bots/BotRoomView.swift:227-229 | HermesMobile/Features/Chat/ChatView.swift:4355-4363 — 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) HermesMobile/Features/Chat/ChatMotion.swift:42— HermesMobile/Features/Chat/ChatMotion.swift:42-44 | HermesMobile/Features/SessionList/SessionListComponents.swift:276-278 — 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) HermesMobile/Networking/Hermes/HermesConnectedAppsClient.swift:126— HermesMobile/Networking/Hermes/HermesConnectedAppsClient.swift:126-128 | HermesMobile/Networking/Hermes/HermesPluginsClient.swift:296-298 — 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) HermesMobile/Features/Chat/MarkdownMathFormatter.swift:142— HermesMobile/Features/Chat/MarkdownMathFormatter.swift:142-144 | HermesMobile/Networking/Hermes/HermesPluginCatalog.swift:200-202 — 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) HermesMobile/Features/Chat/ChatHaptics.swift:40— HermesMobile/Features/Chat/ChatHaptics.swift:40-42 | HermesMobile/Features/SessionList/SessionHaptics.swift:13-15 — 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) HermesMobile/Features/Chat/ChatHaptics.swift:76— HermesMobile/Features/Chat/ChatHaptics.swift:76-78 | HermesMobile/Features/SessionList/SessionHaptics.swift:25-27 — 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) HermesMobile/Features/Chat/ChatHaptics.swift:80— HermesMobile/Features/Chat/ChatHaptics.swift:80-82 | HermesMobile/Features/SessionList/SessionHaptics.swift:29-31 — 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) HermesMobile/Features/Chat/ChatHaptics.swift:110— HermesMobile/Features/Chat/ChatHaptics.swift:110-112 | HermesMobile/Features/SessionList/SessionHaptics.swift:17-19 — 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) HermesMobile/Features/Chat/ChatHaptics.swift:126— HermesMobile/Features/Chat/ChatHaptics.swift:126-128 | HermesMobile/Features/SessionList/SessionHaptics.swift:21-23 — 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) HermesMobile/Features/Chat/ChatMarkerMessageClassifier.swift:71— HermesMobile/Features/Chat/ChatMarkerMessageClassifier.swift:71-73 | HermesMobile/Features/Chat/ChatViewModel.swift:6597-6599 — 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 (7 lines × 2) HermesMobile/Features/Bots/BotPendingRequestCard.swift:313— HermesMobile/Features/Bots/BotPendingRequestCard.swift:313-319 | HermesMobile/Features/Chat/ClarificationRequestCard.swift:452-458 — 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 `HermesMobile/Features/Bots/BotPendingRequestCard.swift:313` 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) HermesMobile/Features/Chat/ChatTranscriptSupportingViews.swift:1221— HermesMobile/Features/Chat/ChatTranscriptSupportingViews.swift:1221-1227 | HermesMobile/Features/Chat/ChatTranscriptView.swift:1305-1311 — 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 `HermesMobile/Features/Chat/ChatTranscriptSupportingViews.swift:1221` 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, `HermesMobile/Features/Chat/ChatTranscriptView.swift:1304` calls `foregroundStyle` and `HermesMobile/Features/Chat/ChatTranscriptSupportingViews.swift:1220` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) HermesMobile/Features/Chat/ChatTranscriptSupportingViews.swift:1422— HermesMobile/Features/Chat/ChatTranscriptSupportingViews.swift:1422-1428 | HermesMobile/Features/Chat/ChatTranscriptSupportingViews.swift:1562-1568 — both copies are in the same file, so extract the 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 `HermesMobile/Features/Chat/ChatTranscriptSupportingViews.swift:1422` 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) HermesMobile/Features/Chat/FilePathAutocompleteView.swift:38— HermesMobile/Features/Chat/FilePathAutocompleteView.swift:38-44 | HermesMobile/Features/Chat/SlashCommandAutocompleteView.swift:54-60 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `HermesMobile/Features/Chat/FilePathAutocompleteView.swift:38` 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) HermesMobile/Features/Chat/MarkdownMathFormatter+Environments.swift:5— HermesMobile/Features/Chat/MarkdownMathFormatter+Environments.swift:5-11 | HermesMobile/Features/Chat/MarkdownMathFormatter+Environments.swift:19-25 — both copies are in the same file, so extract the 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 `HermesMobile/Features/Chat/MarkdownMathFormatter+Environments.swift:5` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) HermesMobile/Features/SessionList/HermesSessionListView.swift:810— HermesMobile/Features/SessionList/HermesSessionListView.swift:810-816 | HermesMobile/Features/SessionList/SessionListView.swift:954-962 — 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 `HermesMobile/Features/SessionList/HermesSessionListView.swift:810` 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) HermesMobile/Features/Settings/AddServerView.swift:236— HermesMobile/Features/Settings/AddServerView.swift:236-242 | HermesMobile/Features/Settings/AddServerView.swift:269-275 — both copies are in the same file, so extract the 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 `HermesMobile/Features/Settings/AddServerView.swift:236` 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) HermesMobile/Features/Settings/SettingsAboutPage.swift:189— HermesMobile/Features/Settings/SettingsAboutPage.swift:189-195 | HermesMobile/Features/Settings/SettingsDiagnosticsPage.swift:169-175 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `HermesMobile/Features/Settings/SettingsAboutPage.swift:186` calls `ToolbarItem`, `Button`, `String` and `HermesMobile/Features/Settings/SettingsDiagnosticsPage.swift:168` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) HermesMobile/Features/Shared/ModelPickerSheet.swift:798— HermesMobile/Features/Shared/ModelPickerSheet.swift:798-804 | HermesMobile/Features/Tasks/CronJobSkillsPicker.swift:194-200 — 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 `HermesMobile/Features/Shared/ModelPickerSheet.swift:798` 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) HermesMobile/Features/Workspace/GitCommitView.swift:329— HermesMobile/Features/Workspace/GitCommitView.swift:329-335 | HermesMobile/Features/Workspace/GitWorkspaceView.swift:367-373 — 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 `HermesMobile/Features/Workspace/GitCommitView.swift:329` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (7 lines × 2) HermesMobile/Persistence/CacheStore.swift:128— HermesMobile/Persistence/CacheStore.swift:128-134 | HermesMobile/Persistence/CacheStore.swift:208-214 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `HermesMobile/Persistence/CacheStore.swift:128` 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 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 (7 lines × 2) HermesMobile/Features/Kanban/KanbanCardDetailView.swift:471— HermesMobile/Features/Kanban/KanbanCardDetailView.swift:471-477 | HermesMobile/Features/Kanban/KanbanLabView.swift:1411-1417 — 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 `HermesMobile/Features/Kanban/KanbanCardDetailView.swift:471` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (7 lines × 2) HermesMobile/Networking/APIClient+Projects.swift:24— HermesMobile/Networking/APIClient+Projects.swift:24-30 | HermesMobile/Networking/APIClient+Sessions.swift:92-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.
Duplicated block (7 lines × 2) HermesMobile/Widgets/BotWidgetSnapshot.swift:58— HermesMobile/Widgets/BotWidgetSnapshot.swift:58-64 | HermesMobile/Widgets/ProviderLimitsSnapshot.swift:93-99 — 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) HermesMobile/Networking/Hermes/HermesREST.swift:633— HermesMobile/Networking/Hermes/HermesREST.swift:633-639 | HermesMobile/Networking/Hermes/HermesREST.swift:641-647 — both copies are in the same file, so extract the 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×14
Edited copy of a member (8 corresponding lines) HermesMobile/Features/Chat/ThinkingSliderLooks.swift:269— HermesMobile/Features/Chat/ThinkingSliderLooks.swift:269-281 | HermesMobile/Features/Chat/ThinkingSliderLooks.swift:545-552 — 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) HermesMobile/Widgets/BotWidgetSnapshot.swift:118— HermesMobile/Widgets/BotWidgetSnapshot.swift:118-125 | HermesMobile/Widgets/ProviderLimitsSnapshot.swift:166-174 — 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) HermesMobile/Models/Cron.swift:34— HermesMobile/Models/Cron.swift:34-42 | HermesMobile/Models/CronRunHistory.swift:198-205 — 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) HermesMobile/Networking/Hermes/HermesGitClient.swift:287— HermesMobile/Networking/Hermes/HermesGitClient.swift:287-294 | HermesMobile/Networking/Hermes/HermesGitClient.swift:298-305 — 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) HermesMobile/AppIntents/HermexAppIntents.swift:301— HermesMobile/AppIntents/HermexAppIntents.swift:301-308 | HermesMobile/Push/PushNotificationRouter.swift:193-200 — 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) HermesMobile/Features/Chat/ComposerChipRendering.swift:17— HermesMobile/Features/Chat/ComposerChipRendering.swift:17-24 | HermesMobile/Features/Chat/ComposerChipRendering.swift:38-46 — 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) HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:1969— HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:1969-1976 | HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:1981-1988 — 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) HermesMobile/Features/Bots/BotRoomView.swift:257— HermesMobile/Features/Bots/BotRoomView.swift:257-264 | HermesMobile/Features/Chat/ChatView.swift:4458-4472 — 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) HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:1246— HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:1246-1253 | HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:1261-1269 — 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) HermesMobile/Features/SessionList/SessionRowView.swift:564— HermesMobile/Features/SessionList/SessionRowView.swift:564-573 | HermesMobile/Features/Workspace/GitWorkspaceView.swift:297-304 — 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) HermesMobile/Features/Chat/ChatViewModel.swift:1943— HermesMobile/Features/Chat/ChatViewModel.swift:1943-1950 | HermesMobile/Features/Chat/ChatViewModel.swift:2020-2028 — 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) HermesMobile/Persistence/CacheStore+Hermes.swift:345— HermesMobile/Persistence/CacheStore+Hermes.swift:345-355 | HermesMobile/Persistence/CacheStore+Hermes.swift:360-367 — 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) HermesMobile/Features/Bots/BotPendingRequestCard.swift:186— HermesMobile/Features/Bots/BotPendingRequestCard.swift:186-193 | HermesMobile/Features/Chat/ApprovalRequestInset.swift:297-304 — 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) HermesMobile/Features/Chat/ChatMessageContextMenuView.swift:83— HermesMobile/Features/Chat/ChatMessageContextMenuView.swift:83-90 | HermesMobile/Features/Chat/ChatTranscriptSupportingViews.swift:363-375 — 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 (10 corresponding lines) · ×14
Edited copy of a member (10 corresponding lines) HermesMobile/Push/PushNotificationRouter.swift:51— HermesMobile/Push/PushNotificationRouter.swift:51-62 | HermesMobile/Push/PushNotificationRouter.swift:70-79 — 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) HermesMobile/Models/Kanban.swift:396— HermesMobile/Models/Kanban.swift:396-408 | HermesMobile/Models/Kanban.swift:543-552 — 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) HermesMobile/Features/Kanban/KanbanFeatureState.swift:1339— HermesMobile/Features/Kanban/KanbanFeatureState.swift:1339-1349 | HermesMobile/Features/Kanban/KanbanFeatureState.swift:1351-1360 — 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) HermesLiveActivityWidget/BotWidget.swift:11— HermesLiveActivityWidget/BotWidget.swift:11-21 | HermesLiveActivityWidget/ProviderLimitsWidget.swift:10-19 — 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) HermesMobile/Features/Chat/PendingRequestSurfaces.swift:104— HermesMobile/Features/Chat/PendingRequestSurfaces.swift:104-113 | HermesMobile/Features/Chat/PendingRequestSurfaces.swift:123-132 — 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) HermesMobile/Features/MoveToHermes/MoveToHermesReconcile.swift:325— HermesMobile/Features/MoveToHermes/MoveToHermesReconcile.swift:325-334 | HermesMobile/Features/MoveToHermes/MoveToHermesScan.swift:219-228 — 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) HermesMobile/Features/Chat/ChatComposerPresentation.swift:135— HermesMobile/Features/Chat/ChatComposerPresentation.swift:135-144 | HermesMobile/Features/Chat/CustomAttachmentPicker.swift:902-916 — 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) HermesMobile/Features/Kanban/KanbanCardDetailView.swift:656— HermesMobile/Features/Kanban/KanbanCardDetailView.swift:656-667 | HermesMobile/Features/Kanban/KanbanLabView.swift:1570-1579 — 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) HermesMobile/Persistence/CacheStore+Hermes.swift:157— HermesMobile/Persistence/CacheStore+Hermes.swift:157-168 | HermesMobile/Persistence/CacheStore+Hermes.swift:172-181 — 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) HermesMobile/Features/Kanban/KanbanCardDetailState.swift:278— HermesMobile/Features/Kanban/KanbanCardDetailState.swift:278-288 | HermesMobile/Features/Workspace/GitDiffView.swift:277-286 — 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) HermesMobile/Widgets/BotWidgetSnapshot.swift:102— HermesMobile/Widgets/BotWidgetSnapshot.swift:102-111 | HermesMobile/Widgets/ProviderLimitsSnapshot.swift:148-158 — 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) HermesMobile/Features/Workspace/SourceViewer/SourceFileViewModel.swift:82— HermesMobile/Features/Workspace/SourceViewer/SourceFileViewModel.swift:82-91 | HermesMobile/Features/Workspace/ReviewDiff/ReviewDiffHighlightModel.swift:106-115 — 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) HermesMobile/Networking/Hermes/HermesConnectedAppsClient.swift:186— HermesMobile/Networking/Hermes/HermesConnectedAppsClient.swift:186-195 | HermesMobile/Networking/Hermes/HermesInsightsClient.swift:78-87 — 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) HermesMobile/Models/ServerAccount.swift:579— HermesMobile/Models/ServerAccount.swift:579-588 | HermesMobile/Networking/CustomHeader.swift:119-128 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×14
Edited copy of a member (6 corresponding lines) HermesMobile/Features/Chat/ChatViewModel.swift:5794— HermesMobile/Features/Chat/ChatViewModel.swift:5794-5806 | HermesMobile/Features/Chat/HermesChatSettings.swift:218-223 — 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) HermesMobile/Widgets/BotWidgetSnapshot.swift:77— HermesMobile/Widgets/BotWidgetSnapshot.swift:77-82 | HermesMobile/Widgets/ProviderLimitsSnapshot.swift:112-117 — 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) HermesMobile/Networking/Hermes/HermesGitClient.swift:89— HermesMobile/Networking/Hermes/HermesGitClient.swift:89-94 | HermesMobile/Networking/Hermes/HermesGitClient.swift:117-123 — 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) HermesMobile/Networking/Hermes/HermesKanbanClient.swift:185— HermesMobile/Networking/Hermes/HermesKanbanClient.swift:185-190 | HermesMobile/Networking/Hermes/HermesKanbanClient.swift:192-197 — 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) HermesMobile/Features/Screen/ScreenControl.swift:117— HermesMobile/Features/Screen/ScreenControl.swift:117-125 | HermesMobile/Features/Screen/ScreenControl.swift:128-133 — 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) HermesMobile/Features/Workspace/ReviewDiff/ReviewDiffSurfaceView.swift:187— HermesMobile/Features/Workspace/ReviewDiff/ReviewDiffSurfaceView.swift:187-193 | HermesMobile/Features/Workspace/ReviewDiff/ReviewDiffSurfaceView.swift:205-210 — 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) HermesMobile/Models/Approval.swift:25— HermesMobile/Models/Approval.swift:25-30 | HermesMobile/Models/Clarification.swift:18-23 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) HermesMobile/Models/Kanban.swift:453— HermesMobile/Models/Kanban.swift:453-458 | HermesMobile/Models/Kanban.swift:503-508 — 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) HermesMobile/Config/AppFont.swift:171— HermesMobile/Config/AppFont.swift:171-176 | HermesMobile/Config/AppFont.swift:178-184 — 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) HermesMobile/Features/Bots/BotConnectionView.swift:471— HermesMobile/Features/Bots/BotConnectionView.swift:471-476 | HermesMobile/Features/Onboarding/OnboardingViewModel.swift:145-150 — 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) HermesMobile/AppIntents/ProfileEntity.swift:65— HermesMobile/AppIntents/ProfileEntity.swift:65-70 | HermesMobile/Features/Memory/MemoryViewModel.swift:87-92 — 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) HermesMobile/Models/Approval.swift:367— HermesMobile/Models/Approval.swift:367-372 | HermesMobile/Models/Kanban.swift:1041-1046 — 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) HermesMobile/Features/Workspace/GitDiffView.swift:216— HermesMobile/Features/Workspace/GitDiffView.swift:216-221 | HermesMobile/Features/Workspace/SourceViewer/SourceFileSurface.swift:166-171 — 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) HermesMobile/Features/Chat/ChatViewModel.swift:9288— HermesMobile/Features/Chat/ChatViewModel.swift:9288-9293 | HermesMobile/LiveActivities/AgentRunActivityAttributes.swift:413-419 — 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.
Duplicated block (6 lines × 2) HermesMobile/Features/Chat/MarkdownMathFormatter.swift:299— HermesMobile/Features/Chat/MarkdownMathFormatter.swift:299-304 | HermesMobile/Features/Chat/MarkdownMathFormatter.swift:315-320 — both copies are in the same file, so extract the 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 `HermesMobile/Features/Chat/MarkdownMathFormatter.swift:299` 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) HermesMobile/Features/Chat/MarkdownRenderer.swift:38— HermesMobile/Features/Chat/MarkdownRenderer.swift:38-43 | HermesMobile/Features/Chat/MarkdownRenderer.swift:124-129 — both copies are in the same file, so extract the 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 `HermesMobile/Features/Chat/MarkdownRenderer.swift:38` 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) HermesMobile/Features/Chat/MarkdownRenderer.swift:604— HermesMobile/Features/Chat/MarkdownRenderer.swift:604-609 | HermesMobile/Features/Chat/MarkdownRenderer.swift:647-652 — both copies are in the same file, so extract the 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 `HermesMobile/Features/Chat/MarkdownRenderer.swift:604` 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) HermesMobile/Features/Chat/MessageBubbleView.swift:835— HermesMobile/Features/Chat/MessageBubbleView.swift:835-840 | HermesMobile/Features/Chat/TranscriptMediaView.swift:666-671 — 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 `HermesMobile/Features/Chat/MessageBubbleView.swift:835` 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) HermesMobile/Networking/Bots/BotProtocol.swift:18— HermesMobile/Networking/Bots/BotProtocol.swift:18-23 | scripts/fixtures/HermesFixtureCapture.swift:177-182 — 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 `HermesMobile/Networking/Bots/BotProtocol.swift:18` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) HermesMobile/Persistence/CacheStore+Hermes.swift:82— HermesMobile/Persistence/CacheStore+Hermes.swift:82-87 | HermesMobile/Persistence/CacheStore.swift:127-132 — 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 `HermesMobile/Persistence/CacheStore+Hermes.swift:82` 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 (6 lines × 2) HermesMobile/Features/Kanban/KanbanCardDetailView.swift:424— HermesMobile/Features/Kanban/KanbanCardDetailView.swift:424-429 | HermesMobile/Features/Kanban/KanbanLabView.swift:1300-1305 — 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 `HermesMobile/Features/Kanban/KanbanCardDetailView.swift:424` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) HermesMobile/Features/Chat/ToolCallSummaryFormatter.swift:475— HermesMobile/Features/Chat/ToolCallSummaryFormatter.swift:475-480 | HermesMobile/Models/TurnFileChangeSummary.swift:199-206 — 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) HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift:158— HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift:158-163 | HermesMobile/Features/Chat/TranscriptMediaView.swift:946-951 — before extracting anything, compare `HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift` and `HermesMobile/Features/Chat/TranscriptMediaView.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 59 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) HermesMobile/Networking/Hermes/HermesCronClient.swift:161— HermesMobile/Networking/Hermes/HermesCronClient.swift:161-166 | HermesMobile/Networking/Hermes/HermesPluginsClient.swift:377-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 register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (6 lines × 2) HermesMobile/Features/Chat/MarkdownRenderer.swift:1460— HermesMobile/Features/Chat/MarkdownRenderer.swift:1460-1465 | HermesMobile/Features/Chat/MarkdownRenderer.swift:1563-1568 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) HermesMobile/Features/Chat/MarkdownRenderer.swift:1467— HermesMobile/Features/Chat/MarkdownRenderer.swift:1467-1472 | HermesMobile/Features/Chat/MarkdownRenderer.swift:1557-1562 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) HermesMobile/Features/Workspace/GitDiffView.swift:175— HermesMobile/Features/Workspace/GitDiffView.swift:175-180 | HermesMobile/Features/Workspace/SourceViewer/SourceFileSurface.swift:109-114 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `HermesMobile/Features/Workspace/GitDiffView.swift:175` 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) HermesMobile/Networking/Hermes/HermesREST.swift:846— HermesMobile/Networking/Hermes/HermesREST.swift:846-851 | HermesMobile/Networking/Hermes/HermesREST.swift:874-879 — both copies are in the same file, so extract the 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 `HermesMobile/Networking/Hermes/HermesREST.swift:846` 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 (9 corresponding lines) · ×13
Edited copy of a member (9 corresponding lines) HermesMobile/Models/JSONValue.swift:11— HermesMobile/Models/JSONValue.swift:11-27 | HermesMobile/Networking/Bots/BotProtocol.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.
Edited copy of a member (9 corresponding lines) HermesMobile/Features/Chat/MarkdownMathFormatter.swift:322— HermesMobile/Features/Chat/MarkdownMathFormatter.swift:322-331 | HermesMobile/Features/Chat/MarkdownMathSegmenter.swift:157-165 — 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) HermesMobile/Features/Bots/BotInbox.swift:699— HermesMobile/Features/Bots/BotInbox.swift:699-708 | HermesMobile/Features/SessionList/SessionListViewModel.swift:2350-2358 — 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) HermesMobile/Persistence/CachedMessage.swift:37— HermesMobile/Persistence/CachedMessage.swift:37-57 | HermesMobile/Persistence/CachedSession.swift:59-67 — 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) HermesMobile/Push/PushPreview.swift:60— HermesMobile/Push/PushPreview.swift:60-68 | HermesMobile/Push/PushRelayClient.swift:205-213 — 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) HermesMobile/Widgets/BotWidgetSnapshot.swift:66— HermesMobile/Widgets/BotWidgetSnapshot.swift:66-74 | HermesMobile/Widgets/ProviderLimitsSnapshot.swift:101-109 — 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) HermesMobile/Models/Kanban.swift:225— HermesMobile/Models/Kanban.swift:225-235 | HermesMobile/Models/Kanban.swift:918-926 — 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) HermesMobile/Features/Kanban/KanbanCardDetailView.swift:436— HermesMobile/Features/Kanban/KanbanCardDetailView.swift:436-444 | HermesMobile/Features/Kanban/KanbanLabView.swift:1352-1360 — 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) HermesMobile/Features/Tasks/TaskDetailViewModel.swift:79— HermesMobile/Features/Tasks/TaskDetailViewModel.swift:79-90 | HermesMobile/Features/Tasks/TasksViewModel.swift:60-68 — 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) HermesMobile/Features/SessionList/SessionRowView.swift:548— HermesMobile/Features/SessionList/SessionRowView.swift:548-556 | HermesMobile/Features/Settings/DefaultProfilePickerView.swift:528-538 — 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) HermesMobile/Features/Chat/SlashCommandCatalog.swift:198— HermesMobile/Features/Chat/SlashCommandCatalog.swift:198-206 | HermesMobile/Models/Skills.swift:174-187 — 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) HermesMobile/Features/Chat/TranscriptMediaDataLoader.swift:4— HermesMobile/Features/Chat/TranscriptMediaDataLoader.swift:4-12 | HermesMobile/Features/Chat/TranscriptMediaPreviewViewModel.swift:160-168 — 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) HermesMobile/Features/SessionList/SessionListViewModel.swift:1608— HermesMobile/Features/SessionList/SessionListViewModel.swift:1608-1616 | HermesMobile/Features/Settings/ArchivedSessionsView.swift:252-260 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×12
Edited copy of a member (13 corresponding lines) HermesMobile/Features/Settings/PluginsModel.swift:555— HermesMobile/Features/Settings/PluginsModel.swift:555-567 | HermesMobile/Features/Settings/PluginsModel.swift:569-582 — 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) HermesMobile/Models/Approval.swift:32— HermesMobile/Models/Approval.swift:32-44 | HermesMobile/Models/Clarification.swift:25-37 — 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) HermesMobile/Features/Insights/UsageChartData.swift:346— HermesMobile/Features/Insights/UsageChartData.swift:346-358 | HermesMobile/Features/Tasks/CronScheduleHumanizer.swift:169-191 — 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) HermesMobile/Features/SessionList/SessionListComponents.swift:746— HermesMobile/Features/SessionList/SessionListComponents.swift:746-759 | HermesMobile/Features/Shared/ActionToast.swift:341-353 — 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) HermesMobile/Features/Chat/ChatAttachmentCoordinator.swift:524— HermesMobile/Features/Chat/ChatAttachmentCoordinator.swift:524-536 | HermesMobile/Features/Chat/ChatAttachmentCoordinator.swift:550-563 — 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) HermesMobile/Features/SessionList/ProjectCreationSheet.swift:53— HermesMobile/Features/SessionList/ProjectCreationSheet.swift:53-67 | HermesMobile/Features/SessionList/SessionRenameSheet.swift:14-26 — 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) HermesMobile/Persistence/ChatDraftStore.swift:975— HermesMobile/Persistence/ChatDraftStore.swift:975-989 | HermesMobile/Persistence/ChatDraftStore.swift:1009-1021 — 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) HermesMobile/Features/Chat/SlashCommandAutocompleteView.swift:212— HermesMobile/Features/Chat/SlashCommandAutocompleteView.swift:212-225 | HermesMobile/Features/Chat/SlashCommandAutocompleteView.swift:227-239 — 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) HermesMobile/Features/Chat/SlashCommandAutocompleteView.swift:184— HermesMobile/Features/Chat/SlashCommandAutocompleteView.swift:184-196 | HermesMobile/Features/Chat/SlashCommandAutocompleteView.swift:198-210 — 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) HermesMobile/Features/Settings/SettingsDiagnosticsPage.swift:133— HermesMobile/Features/Settings/SettingsDiagnosticsPage.swift:133-145 | HermesMobile/Features/Settings/SettingsRows.swift:44-60 — 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) HermesMobile/Models/MessageAttachment.swift:10— HermesMobile/Models/MessageAttachment.swift:10-22 | HermesMobile/Models/Workspace.swift:105-121 — 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) HermesMobile/Features/SessionList/ProjectCreationSheet.swift:69— HermesMobile/Features/SessionList/ProjectCreationSheet.swift:69-81 | HermesMobile/Features/SessionList/ProjectCreationSheet.swift:92-104 — 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.
Repeated repair: HermesMobile/Features/Chat/SlashCommandAutocompleteView.swift HermesMobile/Features/Chat/SlashCommandAutocompleteView.swift:401— HermesMobile/Features/Chat/SlashCommandAutocompleteView.swift changed 10 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is SlashCommandAutocompleteView.subArgs at line 401), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: small bugs, dead code, and stale docs from a full-project audit (#1626)”; “fix(chat): keep the composer above the keyboard when / or @ opens on short screens (#1615)”; “fix(ui): drop the divider lines between rows (#1614)”; “fix(chat): unify corner radius of surfaces stacked above the composer (#411)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Features/Chat/SlashCommandAutocompleteView.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: HermesMobile/Features/Chat/ChatAttachmentCoordinator.swift HermesMobile/Features/Chat/ChatAttachmentCoordinator.swift:412— HermesMobile/Features/Chat/ChatAttachmentCoordinator.swift changed 9 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is ChatAttachmentCoordinator.performUpload at line 412), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(chat): give the session titler the start of a long paste (#1702)”; “fix(chat): open the continuation when a compressed webui session rejects a send (#1284)”; “fix(chat): bound retained draft attachment storage (#985)”; “fix(chat): keep queued messages when leaving a chat mid-run (#913)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Features/Chat/ChatAttachmentCoordinator.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: HermesMobile/Features/Hermes/HermesHome.swift HermesMobile/Features/Hermes/HermesHome.swift:45— HermesMobile/Features/Hermes/HermesHome.swift changed 6 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is HermesHomeChrome.body at line 45), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(ui): stop screens jumping just after they open (#1653)”; “fix(home): move the unfolded iPhone Duo's controls into its rail (#1599)”; “fix(home): put the home's switch, search, and avatar in the iPhone Duo rail (#1597)”; “fix(hermes): balance the Bots and Sessions switch (#1345)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Features/Hermes/HermesHome.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: HermesMobile/Models/ServerCatalog.swift HermesMobile/Models/ServerCatalog.swift:435— HermesMobile/Models/ServerCatalog.swift changed 6 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is UpdatesCheckResponse.forcedCheckOutcome at line 435), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(chat): honor saved server TTS preferences (#991)”; “fix(chat): a refused steer must not stop the run (#906)”; “fix(chat): count "Working for" and "Worked for" from the server's turn start (#408)”; “fix(picker): expose the full model catalog”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Models/ServerCatalog.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: HermesMobile/Features/Share/SharedDraftStore.swift HermesMobile/Features/Share/SharedDraftStore.swift:354— HermesMobile/Features/Share/SharedDraftStore.swift changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is HermesShareDraft.reserveNextPendingImport at line 354), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(intents): keep server URLs out of the app group (#1560)”; “fix(share): explain which shared items were left out (#1489)”; “fix(hermes): add a share again when the same content is shared after it was consumed (#1209)”; “fix(share): make incoming shares transactional (#287)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Features/Share/SharedDraftStore.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: HermesMobile/Models/UploadResponse.swift HermesMobile/Models/UploadResponse.swift:56— HermesMobile/Models/UploadResponse.swift changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is ImagePreviewDownsampler.previewData at line 56), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(chat): give the session titler the start of a long paste (#1702)”; “fix(chat): a refused steer must not stop the run (#906)”; “fix(chat): allow sending attachments without composer text (#407)”; “fix(chat): persist composer attachments and settings with drafts (#298)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Models/UploadResponse.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: HermesMobile/Features/Workspace/GitTurnChangesCard.swift HermesMobile/Features/Workspace/GitTurnChangesCard.swift:51— HermesMobile/Features/Workspace/GitTurnChangesCard.swift changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is GitTurnChangesCard.header at line 51), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: small bugs, dead code, and stale docs from a full-project audit (#1626)”; “fix(hermes): keep a turn's committed work in its turn-changes card (#1463)”; “fix(chat): keep transcript spacing consistent (#328)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Features/Workspace/GitTurnChangesCard.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: HermesMobile/Features/Settings/DefaultModelPickerView.swift HermesMobile/Features/Settings/DefaultModelPickerView.swift:56— HermesMobile/Features/Settings/DefaultModelPickerView.swift changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is DefaultModelPickerView.loadStatus at line 56), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(picker): expose the full model catalog”; “fix(models): persist and match the default model with its provider”; “fix(models): preserve provider identity when matching (#269)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Features/Settings/DefaultModelPickerView.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: HermesMobile/Networking/APIClient.swift HermesMobile/Networking/APIClient.swift:168— HermesMobile/Networking/APIClient.swift changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is APIClient.sendBoundedData at line 168), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(networking): stop a redirect from carrying a sign-in password to another host (#1282)”; “fix: route chat stream query + multipart errors through APIClient contract (#548)”; “fix(chat): retry the reconnect probe after a transport drop (#585)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Networking/APIClient.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: HermesMobile/Networking/APIClient+Sessions.swift HermesMobile/Networking/APIClient+Sessions.swift:7— HermesMobile/Networking/APIClient+Sessions.swift changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 1 (its worst body is APIClient.sessions at line 7), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(sessions): a new chat started under a project filter joins that project (#925)”; “fix(sessions): continue CLI and messaging sessions (#320)”; “fix(sessions): duplicate via /api/session/duplicate instead of branch (#267)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Networking/APIClient+Sessions.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: HermesMobile/Networking/APIClient+Chat.swift HermesMobile/Networking/APIClient+Chat.swift:100— HermesMobile/Networking/APIClient+Chat.swift changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is APIClient.steerChat at line 100), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(chat): a refused steer must not stop the run (#906)”; “fix: route chat stream query + multipart errors through APIClient contract (#548)”; “fix(chat): retry the reconnect probe after a transport drop (#585)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:50:34 -05:00' --until='2026-11-14 14:50:34 -05:00' --full-history --no-merges -- HermesMobile/Networking/APIClient+Chat.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D4 · Code Duplication· Edited copy of a member (5 corresponding lines) · ×11
Edited copy of a member (5 corresponding lines) HermesMobile/Features/Chat/ChatComposerTextInputView.swift:495— HermesMobile/Features/Chat/ChatComposerTextInputView.swift:495-499 | HermesMobile/Features/Chat/ComposerChipTextView.swift:523-527 — 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) HermesMobile/Features/Chat/ImageLightboxView.swift:546— HermesMobile/Features/Chat/ImageLightboxView.swift:546-556 | HermesMobile/Features/Screen/ScreenCanvas.swift:175-179 — 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) HermesMobile/Features/Bots/BotCreateView.swift:158— HermesMobile/Features/Bots/BotCreateView.swift:158-162 | HermesMobile/Features/Bots/BotCreateView.swift:244-248 — 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) HermesMobile/Features/Share/SharedDraftStore.swift:142— HermesMobile/Features/Share/SharedDraftStore.swift:142-146 | HermesMobile/Models/Cron.swift:296-300 — 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) HermesMobile/Networking/Hermes/HermesCronClient.swift:152— HermesMobile/Networking/Hermes/HermesCronClient.swift:152-157 | HermesMobile/Networking/APIClient+Memory.swift:180-184 — 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) HermesMobile/Features/SessionList/SessionListView.swift:1396— HermesMobile/Features/SessionList/SessionListView.swift:1396-1406 | HermesMobile/Features/SessionList/HermesSessionListView.swift:1087-1091 — 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) HermesMobile/Features/Insights/InsightsView.swift:19— HermesMobile/Features/Insights/InsightsView.swift:19-24 | HermesMobile/Features/Skills/SkillsView.swift:18-22 — 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) HermesMobile/Features/Chat/ApprovalRequestInset.swift:137— HermesMobile/Features/Chat/ApprovalRequestInset.swift:137-141 | HermesMobile/Features/Chat/ClarificationRequestCard.swift:83-87 — 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) HermesMobile/Features/Memory/MemoryView.swift:12— HermesMobile/Features/Memory/MemoryView.swift:12-17 | HermesMobile/Features/Settings/ArchivedSessionsView.swift:23-27 — 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) HermesMobile/Networking/Hermes/HermesConnection.swift:172— HermesMobile/Networking/Hermes/HermesConnection.swift:172-176 | HermesMobile/Networking/Hermes/HermesProfileServing.swift:167-171 — 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) HermesMobile/Features/MoveToHermes/MoveToHermesModel.swift:156— HermesMobile/Features/MoveToHermes/MoveToHermesModel.swift:156-160 | HermesMobile/Features/MoveToHermes/MoveToHermesRunner.swift:396-401 — 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 (11 corresponding lines) · ×10
Edited copy of a member (11 corresponding lines) HermesMobile/Features/Hermes/HermesSessionLookup.swift:8— HermesMobile/Features/Hermes/HermesSessionLookup.swift:8-20 | HermesMobile/Push/PushNotificationRouter.swift:176-186 — 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) HermesMobile/Features/Chat/DisplayMathView.swift:403— HermesMobile/Features/Chat/DisplayMathView.swift:403-415 | HermesMobile/Features/Chat/DisplayMathView.swift:418-428 — 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) HermesMobile/Models/Kanban.swift:479— HermesMobile/Models/Kanban.swift:479-491 | HermesMobile/Models/ServerCatalog.swift:170-180 — 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) HermesMobile/Features/SessionList/HermesSessionListView.swift:1039— HermesMobile/Features/SessionList/HermesSessionListView.swift:1039-1057 | HermesMobile/Features/SessionList/HermesSessionListView.swift:1060-1070 — 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) HermesMobile/Features/Settings/APIKeysModel.swift:85— HermesMobile/Features/Settings/APIKeysModel.swift:85-95 | HermesMobile/Features/Settings/ConnectedAppsModel.swift:152-164 — 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) HermesMobile/Persistence/ChatDraftAttachmentStore.swift:77— HermesMobile/Persistence/ChatDraftAttachmentStore.swift:77-87 | HermesMobile/Persistence/ChatDraftStore.swift:560-570 — 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) HermesMobile/Features/Settings/WebuiServerSettings.swift:233— HermesMobile/Features/Settings/WebuiServerSettings.swift:233-243 | HermesMobile/Features/Settings/WebuiServerSettings.swift:293-303 — 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) HermesMobile/Models/ServerCatalog.swift:311— HermesMobile/Models/ServerCatalog.swift:311-322 | HermesMobile/Models/Workspace.swift:22-32 — 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) HermesMobile/Features/Chat/ChatViewModel.swift:9696— HermesMobile/Features/Chat/ChatViewModel.swift:9696-9708 | HermesMobile/Features/Chat/InlineAudioPlayerView.swift:327-337 — 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) HermesMobile/Features/Settings/PluginDetailView.swift:245— HermesMobile/Features/Settings/PluginDetailView.swift:245-255 | HermesMobile/Features/Settings/PluginInstallSheet.swift:339-349 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×9
Edited copy of a member (14 corresponding lines) HermesMobile/Features/Kanban/KanbanCardDetailView.swift:467— HermesMobile/Features/Kanban/KanbanCardDetailView.swift:467-480 | HermesMobile/Features/Kanban/KanbanLabView.swift:1407-1420 — 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) HermesMobile/Features/Bots/BotCreateView.swift:229— HermesMobile/Features/Bots/BotCreateView.swift:229-242 | HermesMobile/Features/Bots/BotProfileEditorView.swift:288-301 — 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) HermesMobile/Networking/Bots/BotClient.swift:133— HermesMobile/Networking/Bots/BotClient.swift:133-149 | HermesMobile/Networking/Bots/BotClient.swift:280-293 — 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) HermesMobile/Features/Chat/ChatComposerAttachmentStripView.swift:286— HermesMobile/Features/Chat/ChatComposerAttachmentStripView.swift:286-299 | HermesMobile/Features/Chat/MessageBubbleView.swift:911-924 — 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) HermesMobile/Features/Chat/ChatView.swift:4822— HermesMobile/Features/Chat/ChatView.swift:4822-4839 | HermesMobile/Features/Chat/ChatView.swift:4848-4861 — 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) HermesMobile/Features/Bots/BotsInboxView.swift:115— HermesMobile/Features/Bots/BotsInboxView.swift:115-129 | HermesMobile/Features/SessionList/HermesSessionListView.swift:454-467 — 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) HermesMobile/Features/Chat/ChatComposerTextInputView.swift:381— HermesMobile/Features/Chat/ChatComposerTextInputView.swift:381-394 | HermesMobile/Features/Chat/ChatComposerTextInputView.swift:480-493 — 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) HermesMobile/Features/Chat/ChatStreamCoordinator.swift:1216— HermesMobile/Features/Chat/ChatStreamCoordinator.swift:1216-1231 | HermesMobile/Features/Chat/ChatStreamCoordinator.swift:1233-1246 — 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) HermesMobile/Features/Memory/MemoryViewModel.swift:43— HermesMobile/Features/Memory/MemoryViewModel.swift:43-56 | HermesMobile/Features/Skills/SkillsViewModel.swift:25-38 — 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.
Duplicated block (8 lines × 2) HermesMobile/Features/Bots/BotCreateView.swift:229— HermesMobile/Features/Bots/BotCreateView.swift:229-236 | HermesMobile/Features/Bots/BotProfileEditorView.swift:288-295 — 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 `HermesMobile/Features/Bots/BotCreateView.swift:229` 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) HermesMobile/Features/Chat/ComposerChipTextView.swift:488— HermesMobile/Features/Chat/ComposerChipTextView.swift:488-496 | HermesMobile/Features/Chat/ComposerChipTextView.swift:514-521 — both copies are in the same file, so extract the 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 `HermesMobile/Features/Chat/ComposerChipTextView.swift:488` 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 (8 lines × 2) HermesMobile/Features/Chat/HermesBtwPanel.swift:166— HermesMobile/Features/Chat/HermesBtwPanel.swift:166-173 | HermesMobile/Features/Chat/HermesBtwPanel.swift:196-203 — both copies are in the same file, so extract the 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 `HermesMobile/Features/Chat/HermesBtwPanel.swift:166` 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, `HermesMobile/Features/Chat/HermesBtwPanel.swift:174` calls `HermesBtwCloseButton` and `HermesMobile/Features/Chat/HermesBtwPanel.swift:204` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) HermesMobile/Features/Chat/HermesChatRequests.swift:291— HermesMobile/Features/Chat/HermesChatRequests.swift:291-298 | HermesMobile/Features/Chat/HermesChatRequests.swift:447-454 — both copies are in the same file, so extract the 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 `HermesMobile/Features/Chat/HermesChatRequests.swift:291` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:1124— HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:1124-1131 | HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:1150-1157 — both copies are in the same file, so extract the 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 `HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:1124` 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 (8 lines × 2) HermesMobile/Features/Chat/TranscriptLinkPreview.swift:187— HermesMobile/Features/Chat/TranscriptLinkPreview.swift:187-194 | HermesMobile/Features/Chat/TranscriptMedia.swift:696-703 — 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 `HermesMobile/Features/Chat/TranscriptLinkPreview.swift:187` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) HermesMobile/Models/Session.swift:391— HermesMobile/Models/Session.swift:391-398 | HermesMobile/Models/Session.swift:896-903 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `HermesMobile/Models/Session.swift:389` calls `decodeLossyDoubleIfPresent`, `decodeLossyStringIfPresent` and `HermesMobile/Models/Session.swift:895` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) HermesMobile/Features/Chat/ThinkingSliderLooksGeometric.swift:67— HermesMobile/Features/Chat/ThinkingSliderLooksGeometric.swift:67-74 | HermesMobile/Features/Chat/ThinkingSliderLooksGeometric.swift:278-285 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) HermesMobile/Persistence/ChatDraftAttachmentStore.swift:156— HermesMobile/Persistence/ChatDraftAttachmentStore.swift:156-163 | HermesMobile/Persistence/ChatDraftStore.swift:613-620 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×8
Edited copy of a member (12 corresponding lines) HermesMobile/Networking/Hermes/HermesREST.swift:843— HermesMobile/Networking/Hermes/HermesREST.swift:843-856 | HermesMobile/Networking/Hermes/HermesREST.swift:872-883 — 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) HermesMobile/Features/Chat/HermesChatSideTasks.swift:368— HermesMobile/Features/Chat/HermesChatSideTasks.swift:368-382 | HermesMobile/Features/Chat/HermesSlashCommands.swift:305-316 — 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) HermesMobile/Features/Chat/ChatComposerAttachmentStripView.swift:301— HermesMobile/Features/Chat/ChatComposerAttachmentStripView.swift:301-312 | HermesMobile/Features/Chat/MessageBubbleView.swift:926-937 — 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) HermesMobile/Features/Chat/ChatComposerPresentation.swift:150— HermesMobile/Features/Chat/ChatComposerPresentation.swift:150-161 | HermesMobile/Features/Chat/CustomAttachmentPicker.swift:918-935 — 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) HermesMobile/Features/Chat/ChatViewModel.swift:4529— HermesMobile/Features/Chat/ChatViewModel.swift:4529-4541 | HermesMobile/Features/Chat/ChatViewModel.swift:4546-4557 — 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) HermesMobile/Features/Chat/FilePathAutocompleteView.swift:126— HermesMobile/Features/Chat/FilePathAutocompleteView.swift:126-138 | HermesMobile/Features/Workspace/FileBrowserView.swift:421-432 — 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) HermesMobile/Features/Chat/ChatViewModel.swift:9300— HermesMobile/Features/Chat/ChatViewModel.swift:9300-9311 | HermesMobile/Models/ChatMessage.swift:516-527 — 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) HermesMobile/Features/Chat/TranscriptMediaView.swift:953— HermesMobile/Features/Chat/TranscriptMediaView.swift:953-969 | HermesMobile/Features/Workspace/FilePreviewView.swift:431-442 — 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.
Duplicated block (10 lines × 2) HermesMobile/Features/Chat/ApprovalRequestInset.swift:188— HermesMobile/Features/Chat/ApprovalRequestInset.swift:188-197 | HermesMobile/Features/Chat/ClarificationRequestCard.swift:277-286 — 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 `HermesMobile/Features/Chat/ApprovalRequestInset.swift:188` 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) HermesMobile/Features/Chat/ChatComposerAttachmentStripView.swift:303— HermesMobile/Features/Chat/ChatComposerAttachmentStripView.swift:303-312 | HermesMobile/Features/Chat/MessageBubbleView.swift:928-937 — 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 `HermesMobile/Features/Chat/ChatComposerAttachmentStripView.swift:303` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) HermesMobile/Features/Chat/MarkdownDiffCodeBlock.swift:254— HermesMobile/Features/Chat/MarkdownDiffCodeBlock.swift:254-263 | HermesMobile/Features/Chat/MarkdownRenderer.swift:606-615 — 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 `HermesMobile/Features/Chat/MarkdownDiffCodeBlock.swift:254` 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, `HermesMobile/Features/Chat/MarkdownRenderer.swift:605` calls `frame` and `HermesMobile/Features/Chat/MarkdownDiffCodeBlock.swift:253` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) HermesMobile/Features/Settings/PluginsModel.swift:442— HermesMobile/Features/Settings/PluginsModel.swift:442-451 | HermesMobile/Features/Settings/PluginsModel.swift:474-483 — both copies are in the same file, so extract the 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 `HermesMobile/Features/Settings/PluginsModel.swift:442` 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) HermesMobile/Models/Approval.swift:121— HermesMobile/Models/Approval.swift:121-130 | HermesMobile/Models/Clarification.swift:146-155 — 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 `HermesMobile/Models/Approval.swift:121` 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) HermesMobile/Config/AppTheme.swift:951— HermesMobile/Config/AppTheme.swift:951-960 | HermesMobile/Features/Settings/SettingsNotificationsPage.swift:96-105 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10 lines × 2) HermesMobile/Features/Chat/ChatComposerTextInputView.swift:211— HermesMobile/Features/Chat/ChatComposerTextInputView.swift:211-220 | HermesMobile/Features/Chat/MessageBubbleView.swift:474-483 — 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) HermesMobile/Features/Chat/MarkdownMathFormatter.swift:201— HermesMobile/Features/Chat/MarkdownMathFormatter.swift:201-210 | HermesMobile/Features/Chat/MarkdownMathSegmenter.swift:87-96 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 2) HermesMobile/Features/Chat/ChatTranscriptSupportingViews.swift:1552— HermesMobile/Features/Chat/ChatTranscriptSupportingViews.swift:1552-1560 | HermesMobile/Features/Shared/ActionToast.swift:345-353 — 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 `HermesMobile/Features/Chat/ChatTranscriptSupportingViews.swift:1552` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) HermesMobile/Features/Chat/MarkdownMathSegmenter.swift:136— HermesMobile/Features/Chat/MarkdownMathSegmenter.swift:136-144 | HermesMobile/Features/Chat/MarkdownMathSegmenter.swift:147-155 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) HermesMobile/Features/Chat/MessageBubbleView.swift:877— HermesMobile/Features/Chat/MessageBubbleView.swift:877-885 | HermesMobile/Features/Chat/MessageBubbleView.swift:987-995 — both copies are in the same file, so extract the 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) HermesMobile/Features/Chat/TranscriptMediaView.swift:512— HermesMobile/Features/Chat/TranscriptMediaView.swift:512-520 | HermesMobile/Features/Chat/TranscriptMediaView.swift:662-670 — both copies are in the same file, so extract the 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 `HermesMobile/Features/Chat/TranscriptMediaView.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.
Duplicated block (9 lines × 2) HermesMobile/Features/Chat/TranscriptMediaView.swift:554— HermesMobile/Features/Chat/TranscriptMediaView.swift:554-562 | HermesMobile/Features/Chat/TranscriptMediaView.swift:646-654 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `HermesMobile/Features/Chat/TranscriptMediaView.swift:554` 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) HermesMobile/Features/Share/SharedDraftStore.swift:361— HermesMobile/Features/Share/SharedDraftStore.swift:361-369 | HermesMobile/Features/Share/SharedDraftStore.swift:428-436 — both copies are in the same file, so extract the 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) HermesMobile/Networking/Endpoints.swift:635— HermesMobile/Networking/Endpoints.swift:635-643 | HermesMobile/Networking/Endpoints.swift:646-654 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) HermesMobile/Features/Chat/ComposerVoiceNoteRecorder.swift:188— HermesMobile/Features/Chat/ComposerVoiceNoteRecorder.swift:188-196 | HermesMobile/Features/Chat/InlineAudioPlayerView.swift:350-358 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Low cohesion: PushAppDelegate (LCOM4 7) HermesMobile/Push/PushAppDelegate.swift:11— PushAppDelegate's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Coordinator (LCOM4 7) HermesMobile/Features/Chat/ChatComposerTextInputView.swift:343— Coordinator's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ChatViewModel (LCOM4 5) HermesMobile/Features/Chat/ChatViewModel.swift:275— ChatViewModel'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: ResponseSelectionInput (LCOM4 5) HermesMobile/Features/Chat/ResponseSelectionInput.swift:5— ResponseSelectionInput'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: HermesConnection (LCOM4 5) HermesMobile/Networking/Hermes/HermesConnection.swift:28— HermesConnection'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: ComposerChipTextView (LCOM4 4) HermesMobile/Features/Chat/ComposerChipTextView.swift:6— ComposerChipTextView'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) HermesMobile/Features/Chat/HTMLReportWebView.swift:91— 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: Coordinator (LCOM4 4) HermesMobile/Features/Chat/ImageLightboxView.swift:410— 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.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×7
Edited copy of a member (18 corresponding lines) HermesMobile/Features/Bots/BotCreateView.swift:191— HermesMobile/Features/Bots/BotCreateView.swift:191-208 | HermesMobile/Features/Bots/BotProfileEditorView.swift:237-258 — 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) HermesMobile/Features/SessionList/SessionListViewModel.swift:1883— HermesMobile/Features/SessionList/SessionListViewModel.swift:1883-1900 | HermesMobile/Features/SessionList/SessionListViewModel.swift:1905-1926 — 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) HermesMobile/Features/Chat/ChatTranscriptView.swift:1060— HermesMobile/Features/Chat/ChatTranscriptView.swift:1060-1082 | HermesMobile/Features/Chat/ChatTranscriptView.swift:1092-1109 — 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) HermesMobile/Features/Chat/TranscriptLinkPreview.swift:187— HermesMobile/Features/Chat/TranscriptLinkPreview.swift:187-204 | HermesMobile/Features/Chat/TranscriptMedia.swift:696-713 — 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) HermesMobile/Features/SessionList/SessionListComponents.swift:1715— HermesMobile/Features/SessionList/SessionListComponents.swift:1715-1732 | HermesMobile/Features/SessionList/SessionListComponents.swift:1743-1763 — 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) HermesMobile/Features/Chat/ChatTranscriptSupportingViews.swift:800— HermesMobile/Features/Chat/ChatTranscriptSupportingViews.swift:800-817 | HermesMobile/Features/Chat/ChatTranscriptSupportingViews.swift:836-853 — 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) HermesMobile/Features/Settings/DefaultModelPickerView.swift:132— HermesMobile/Features/Settings/DefaultModelPickerView.swift:132-149 | HermesMobile/Features/Settings/DefaultProfilePickerView.swift:268-287 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (12 lines × 2) HermesMobile/Features/Chat/ChatComposerAttachmentStripView.swift:288— HermesMobile/Features/Chat/ChatComposerAttachmentStripView.swift:288-299 | HermesMobile/Features/Chat/MessageBubbleView.swift:913-924 — 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 `HermesMobile/Features/Chat/ChatComposerAttachmentStripView.swift:288` 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) HermesMobile/Features/Chat/ClarificationRequestCard.swift:35— HermesMobile/Features/Chat/ClarificationRequestCard.swift:35-48 | HermesMobile/Features/Chat/ClarificationRequestCard.swift:562-573 — both copies are in the same file, so extract the 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 `HermesMobile/Features/Chat/ClarificationRequestCard.swift:35` 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 (12 lines × 2) HermesMobile/Features/Chat/MarkdownRenderer.swift:389— HermesMobile/Features/Chat/MarkdownRenderer.swift:389-400 | HermesMobile/Features/Chat/ToolCallLogRowView.swift:196-207 — 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 `HermesMobile/Features/Chat/MarkdownRenderer.swift:389` 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 (12 lines × 2) HermesMobile/Features/Kanban/KanbanFeatureState.swift:2182— HermesMobile/Features/Kanban/KanbanFeatureState.swift:2182-2193 | HermesMobile/Features/Kanban/KanbanFeatureState.swift:2226-2237 — both copies are in the same file, so extract the 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) HermesMobile/Features/Settings/AddServerView.swift:524— HermesMobile/Features/Settings/AddServerView.swift:524-535 | HermesMobile/Features/Shared/SectionCard.swift:33-44 — 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 `HermesMobile/Features/Settings/AddServerView.swift:524` 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, `HermesMobile/Features/Shared/SectionCard.swift:29` calls `footer` and `HermesMobile/Features/Settings/AddServerView.swift:521` 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) HermesMobile/Features/Settings/DefaultProfilePickerView.swift:196— HermesMobile/Features/Settings/DefaultProfilePickerView.swift:196-207 | HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:348-359 — 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 `HermesMobile/Features/Settings/DefaultProfilePickerView.swift:196` 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 (12 lines × 2) HermesMobile/Models/Approval.swift:376— HermesMobile/Models/Approval.swift:376-387 | HermesMobile/Models/Clarification.swift:199-210 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×6
Edited copy of a member (17 corresponding lines) HermesMobile/Features/Kanban/KanbanFeatureState.swift:2178— HermesMobile/Features/Kanban/KanbanFeatureState.swift:2178-2195 | HermesMobile/Features/Kanban/KanbanFeatureState.swift:2223-2239 — 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) HermesMobile/Features/Chat/ChatTranscriptSupportingViews.swift:1205— HermesMobile/Features/Chat/ChatTranscriptSupportingViews.swift:1205-1230 | HermesMobile/Features/Chat/HermesBtwPanel.swift:261-277 — 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) HermesMobile/Features/Chat/TranscriptLinkPreviewView.swift:137— HermesMobile/Features/Chat/TranscriptLinkPreviewView.swift:137-153 | HermesMobile/Models/UploadResponse.swift:101-117 — 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) HermesMobile/Features/Chat/ChatTranscriptSupportingViews.swift:1381— HermesMobile/Features/Chat/ChatTranscriptSupportingViews.swift:1381-1397 | HermesMobile/Features/SessionList/SessionListComponents.swift:2252-2269 — 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) HermesMobile/Features/Chat/TranscriptMediaView.swift:437— HermesMobile/Features/Chat/TranscriptMediaView.swift:437-453 | HermesMobile/Features/Chat/TranscriptMediaView.swift:587-603 — 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) HermesMobile/Networking/APIClient+ProviderQuota.swift:38— HermesMobile/Networking/APIClient+ProviderQuota.swift:38-58 | HermesMobile/Networking/APIClient+ProviderQuota.swift:123-139 — 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 (16 corresponding lines) · ×6
Edited copy of a member (16 corresponding lines) HermesMobile/Features/Kanban/KanbanFeatureState.swift:816— HermesMobile/Features/Kanban/KanbanFeatureState.swift:816-831 | HermesMobile/Features/Kanban/KanbanFeatureState.swift:843-861 — 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) HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift:180— HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift:180-195 | HermesMobile/Features/Workspace/FilePreviewView.swift:444-462 — 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) HermesMobile/LiveActivities/AgentRunActivityAttributes.swift:594— HermesMobile/LiveActivities/AgentRunActivityAttributes.swift:594-613 | HermesMobile/LiveActivities/AgentRunActivityAttributes.swift:615-630 — 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) HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift:41— HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift:41-58 | HermesMobile/Features/Chat/TranscriptMediaView.swift:722-737 — 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) HermesMobile/Features/Chat/ChatStreamCoordinator.swift:642— HermesMobile/Features/Chat/ChatStreamCoordinator.swift:642-657 | HermesMobile/Networking/CacheFallbackPolicy.swift:22-37 — 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) HermesMobile/Features/SessionList/SessionListComponents.swift:2153— HermesMobile/Features/SessionList/SessionListComponents.swift:2153-2168 | HermesMobile/Features/SessionList/SessionRowView.swift:192-210 — 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.
Duplicated block (17 lines × 2) HermesMobile/Features/Chat/CameraPickerView.swift:492— HermesMobile/Features/Chat/CameraPickerView.swift:492-508 | HermesMobile/Features/Chat/CustomAttachmentPicker.swift:794-810 — 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 `HermesMobile/Features/Chat/CameraPickerView.swift:492` 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 (17 lines × 2) HermesMobile/Features/SessionList/SessionListComponents.swift:932— HermesMobile/Features/SessionList/SessionListComponents.swift:932-948 | HermesMobile/Features/SessionList/SessionListComponents.swift:1298-1314 — both copies are in the same file, so extract the 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 `HermesMobile/Features/SessionList/SessionListComponents.swift:932` 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 (17 lines × 2) HermesMobile/Features/SessionList/SessionListComponents.swift:2071— HermesMobile/Features/SessionList/SessionListComponents.swift:2071-2087 | HermesMobile/Features/Settings/ArchivedSessionsView.swift:271-287 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (17 lines × 2) HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:349— HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:349-365 | HermesMobile/Features/Tasks/CronJobSkillsPicker.swift:277-293 — before extracting anything, compare `HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift` and `HermesMobile/Features/Tasks/CronJobSkillsPicker.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 99 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 `HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:349` 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) HermesMobile/Networking/KanbanEventStreamClient.swift:116— HermesMobile/Networking/KanbanEventStreamClient.swift:116-132 | HermesMobile/Networking/SSEClient.swift:52-68 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `HermesMobile/Networking/KanbanEventStreamClient.swift:116` 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 lines × 2) HermesMobile/Features/Bots/BotCreateView.swift:255— HermesMobile/Features/Bots/BotCreateView.swift:255-271 | HermesMobile/Features/Bots/BotProfileEditorView.swift:320-336 — 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) HermesMobile/Features/Kanban/KanbanCardDetailState.swift:272— HermesMobile/Features/Kanban/KanbanCardDetailState.swift:272-276 | HermesMobile/Features/Kanban/KanbanFeatureState.swift:2268-2272 — 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) HermesMobile/Features/SessionList/SessionListViewModel.swift:2696— HermesMobile/Features/SessionList/SessionListViewModel.swift:2696-2700 | HermesMobile/Features/Settings/ArchivedSessionsViewModel.swift:351-355 — 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) HermesMobile/Features/Share/SharedDraftStore.swift:868— HermesMobile/Features/Share/SharedDraftStore.swift:868-872 | HermesMobile/Persistence/ChatDraftAttachmentStore.swift:179-183 — 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) HermesMobile/Features/Chat/MarkdownMathFormatter.swift:289— HermesMobile/Features/Chat/MarkdownMathFormatter.swift:289-293 | HermesMobile/Features/Chat/MarkdownMathFormatter.swift:307-311 — both copies are in the same file, so extract the 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 `HermesMobile/Features/Chat/MarkdownMathFormatter.swift:289` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) HermesMobile/Features/Chat/MessageBubbleView.swift:380— HermesMobile/Features/Chat/MessageBubbleView.swift:380-384 | HermesMobile/Features/Chat/TranscriptLinkPreviewView.swift:244-248 — 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 `HermesMobile/Features/Chat/MessageBubbleView.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.
Duplicated block (5 lines × 2) HermesMobile/Networking/Hermes/HermesEnvironmentClient.swift:156— HermesMobile/Networking/Hermes/HermesEnvironmentClient.swift:156-160 | HermesMobile/Networking/Hermes/HermesSkillsClient.swift:112-116 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Change coupling: KanbanLabView.swift ↔ APIClient+Kanban.swift HermesMobile/Features/Kanban/KanbanLabView.swift:1— `HermesMobile/Features/Kanban/KanbanLabView.swift` and `HermesMobile/Networking/APIClient+Kanban.swift` change together 100% of the time (11 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `ac344249` feat(kanban): Only Mine, bulk Scheduled and Review, and Complete outs…; `d8f63c30` feat(hermes): live Kanban updates on Hermes (#1059); `80b48b81` feat(hermes): Kanban boards and Cards on Hermes, read-only (#1056) — run `git show` on any of them.
Change coupling: GitWorkspaceViewModel.swift ↔ HermesREST.swift HermesMobile/Features/Workspace/GitWorkspaceViewModel.swift:1— `HermesMobile/Features/Workspace/GitWorkspaceViewModel.swift` and `HermesMobile/Networking/Hermes/HermesREST.swift` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `71f4bc0d` feat(hermes): show the branch's pull request in the Git menu (#1468); `b0d7a65b` fix(hermes): keep a turn's committed work in its turn-changes card (#…; `f241c793` feat(hermes): review a branch's committed changes beside uncommitted … — run `git show` on any of them.
Change coupling: ChatViewModel.swift ↔ HermesConversation.swift HermesMobile/Features/Chat/ChatViewModel.swift:1— `HermesMobile/Features/Chat/ChatViewModel.swift` and `HermesMobile/Features/Hermes/HermesConversation.swift` change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `c08c398d` fix(bots): follow a Bot Chat the host replaced (#1346); `5db9adcb` feat(hermes): open a Hermes session from a server-qualified link (#1185); `ad271390` feat(bots): give a bot's chat its pill, rules and mentions in the reg… — run `git show` on any of them.
Change coupling: ChatComposerView.swift ↔ ComposerChipTextView.swift HermesMobile/Features/Chat/ChatComposerView.swift:1— `HermesMobile/Features/Chat/ChatComposerView.swift` and `HermesMobile/Features/Chat/ComposerChipTextView.swift` change together 53% of the time (9 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `661a9b6c` feat(app): optimize Hermex for iPhone Duo (#1559); `a0267c92` fix(composer): insert dictation at the caret and never overwrite late…; `14d82587` feat(chat): turn large pasted text into a removable attachment (#1452) — run `git show` on any of them.
Change coupling: ChatTranscriptView.swift ↔ ResponseTextSelection.swift HermesMobile/Features/Chat/ChatTranscriptView.swift:1— `HermesMobile/Features/Chat/ChatTranscriptView.swift` and `HermesMobile/Features/Chat/ResponseTextSelection.swift` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `135ad1f9` fix(chat): keep your place when rotating, and stop the Plus/Max rotat…; `4c66bdde` perf(chat): count transcript body evaluations during a scripted strea…; `f7f4c587` fix(chat): keep a settled reply's header and footer clear of its text… — run `git show` on any of them.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×5
Edited copy of a member (15 corresponding lines) HermesMobile/Features/Bots/BotsInboxView.swift:131— HermesMobile/Features/Bots/BotsInboxView.swift:131-145 | HermesMobile/Features/Bots/BotsInboxView.swift:147-169 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) HermesMobile/Features/Chat/MarkdownMathFormatter.swift:288— HermesMobile/Features/Chat/MarkdownMathFormatter.swift:288-304 | HermesMobile/Features/Chat/MarkdownMathFormatter.swift:306-320 — 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) HermesMobile/Networking/APIClient+Kanban.swift:293— HermesMobile/Networking/APIClient+Kanban.swift:293-307 | HermesMobile/Networking/APIClient+Kanban.swift:309-327 — 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) HermesMobile/Features/Settings/PluginDiscoverView.swift:70— HermesMobile/Features/Settings/PluginDiscoverView.swift:70-85 | HermesMobile/Features/Settings/PluginsView.swift:228-242 — 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) HermesMobile/Features/Chat/ChatAttachmentPreviewView.swift:221— HermesMobile/Features/Chat/ChatAttachmentPreviewView.swift:221-235 | HermesMobile/Features/Chat/TranscriptMediaView.swift:930-944 — 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.
Duplicated block (11 lines × 2) HermesMobile/Features/Chat/ChatAttachmentPreviewView.swift:99— HermesMobile/Features/Chat/ChatAttachmentPreviewView.swift:99-109 | HermesMobile/Features/Workspace/FilePreviewView.swift:66-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 `HermesMobile/Features/Chat/ChatAttachmentPreviewView.swift:99` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) HermesMobile/Features/Insights/ProviderLimitsCard.swift:46— HermesMobile/Features/Insights/ProviderLimitsCard.swift:46-56 | HermesMobile/Features/Settings/ProvidersView.swift:104-114 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (11 lines × 2) HermesMobile/Features/Kanban/KanbanCardDetailState.swift:259— HermesMobile/Features/Kanban/KanbanCardDetailState.swift:259-269 | HermesMobile/Features/Kanban/KanbanCardEditorState.swift:474-484 — 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) HermesMobile/Features/Kanban/KanbanCardDetailView.swift:409— HermesMobile/Features/Kanban/KanbanCardDetailView.swift:409-419 | HermesMobile/Features/Kanban/KanbanLabView.swift:1285-1295 — 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 `HermesMobile/Features/Kanban/KanbanCardDetailView.swift:409` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) HermesMobile/Features/SessionList/SessionListComponents.swift:1829— HermesMobile/Features/SessionList/SessionListComponents.swift:1829-1839 | HermesMobile/Features/SessionList/SessionListComponents.swift:1955-1965 — both copies are in the same file, so extract the 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 `HermesMobile/Features/SessionList/SessionListComponents.swift:1829` 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 (29 corresponding lines) · ×4
Edited copy of a member (29 corresponding lines) HermesMobile/Features/Kanban/KanbanCardDetailView.swift:406— HermesMobile/Features/Kanban/KanbanCardDetailView.swift:406-434 | HermesMobile/Features/Kanban/KanbanLabView.swift:1282-1313 — 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) HermesMobile/Networking/KanbanEventStreamClient.swift:104— HermesMobile/Networking/KanbanEventStreamClient.swift:104-132 | HermesMobile/Networking/SSEClient.swift:29-68 — 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) HermesMobile/Features/Chat/ApprovalRequestInset.swift:58— HermesMobile/Features/Chat/ApprovalRequestInset.swift:58-90 | HermesMobile/Features/Chat/ClarificationRequestCard.swift:556-584 — 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) HermesMobile/Features/Chat/ChatComposerConfigLoader.swift:23— HermesMobile/Features/Chat/ChatComposerConfigLoader.swift:23-53 | HermesMobile/Models/ServerCatalog.swift:246-274 — 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 (20 corresponding lines) · ×4
Edited copy of a member (20 corresponding lines) HermesMobile/Features/Insights/ProviderLimitsCard.swift:45— HermesMobile/Features/Insights/ProviderLimitsCard.swift:45-64 | HermesMobile/Features/Settings/ProvidersView.swift:102-128 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) HermesMobile/Models/Approval.swift:121— HermesMobile/Models/Approval.swift:121-140 | HermesMobile/Models/Clarification.swift:146-165 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) HermesMobile/Features/Chat/ChatAttachmentPreviewView.swift:185— HermesMobile/Features/Chat/ChatAttachmentPreviewView.swift:185-204 | HermesMobile/Features/Workspace/FilePreviewView.swift:338-361 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) HermesMobile/Features/Chat/ChatViewModel.swift:1139— HermesMobile/Features/Chat/ChatViewModel.swift:1139-1160 | HermesMobile/Features/Chat/ChatViewModel.swift:1180-1199 — 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.
Duplicated block (19 lines × 2) HermesMobile/Features/Chat/HermesDelegatedWorkView.swift:380— HermesMobile/Features/Chat/HermesDelegatedWorkView.swift:380-398 | HermesMobile/Features/Chat/HermesDelegatedWorkView.swift:468-486 — both copies are in the same file, so extract the 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 (19 lines × 2) HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift:96— HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift:96-114 | HermesMobile/Features/Chat/TranscriptMediaView.swift:814-832 — before extracting anything, compare `HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift` and `HermesMobile/Features/Chat/TranscriptMediaView.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 59 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 `HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift:96` 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 (19 lines × 2) HermesMobile/Features/Kanban/KanbanCardDetailView.swift:99— HermesMobile/Features/Kanban/KanbanCardDetailView.swift:99-117 | HermesMobile/Features/Kanban/KanbanLabView.swift:330-348 — 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 `HermesMobile/Features/Kanban/KanbanCardDetailView.swift:99` 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 (19 lines × 2) HermesMobile/Models/Session.swift:366— HermesMobile/Models/Session.swift:366-384 | HermesMobile/Models/Session.swift:869-887 — both copies are in the same file, so extract the 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 `HermesMobile/Models/Session.swift:366` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×3
Members sharing a duplicated core (4 members, 50+ identical tokens) HermesMobile/Features/SessionList/SessionListViewModel.swift:1076— HermesMobile/Features/SessionList/SessionListViewModel.swift:1076-1094 | HermesMobile/Features/SessionList/SessionListViewModel.swift:1096-1113 | HermesMobile/Features/SessionList/SessionListViewModel.swift:1118-1135 | HermesMobile/Features/SessionList/SessionListViewModel.swift:1137-1154 — 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) HermesMobile/Features/SessionList/SessionListViewModel.swift:2900— HermesMobile/Features/SessionList/SessionListViewModel.swift:2900-2914 | HermesMobile/Features/Settings/ArchivedSessionsViewModel.swift:388-402 | HermesMobile/Features/Settings/DefaultProfilePickerView.swift:292-306 | HermesMobile/Features/Workspace/FileBrowserViewModel.swift:362-376 — 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) HermesMobile/Features/Settings/APIKeysView.swift:54— HermesMobile/Features/Settings/APIKeysView.swift:54-102 | HermesMobile/Features/Settings/ConnectedAppsView.swift:44-74 | HermesMobile/Features/Settings/HermesDefaultModelView.swift:235-271 | HermesMobile/Features/Settings/PluginsView.swift:133-175 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×3
Edited copy of a member (19 corresponding lines) HermesMobile/Features/Chat/ChatView.swift:3897— HermesMobile/Features/Chat/ChatView.swift:3897-3915 | HermesMobile/Features/Chat/ChatView.swift:3917-3935 — 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) HermesMobile/Features/Chat/ChatTimelineAccessorySurface.swift:9— HermesMobile/Features/Chat/ChatTimelineAccessorySurface.swift:9-27 | HermesMobile/Features/Chat/ChatView.swift:4632-4656 — 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) HermesMobile/Models/Clarification.swift:92— HermesMobile/Models/Clarification.swift:92-110 | HermesMobile/Models/ServerCatalog.swift:150-168 — 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, 13+ corresponding lines) · ×3
Edited copies of one member (3 members, 13+ corresponding lines) HermesMobile/Features/Chat/MarkdownMathFormatter+Environments.swift:4— HermesMobile/Features/Chat/MarkdownMathFormatter+Environments.swift:4-16 | HermesMobile/Features/Chat/MarkdownMathFormatter+Environments.swift:18-30 | HermesMobile/Features/Chat/MarkdownMathFormatter+Environments.swift:32-44 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 13+ corresponding lines) HermesMobile/Features/Chat/ChatAttachmentPreviewView.swift:206— HermesMobile/Features/Chat/ChatAttachmentPreviewView.swift:206-219 | HermesMobile/Features/Chat/TranscriptMediaView.swift:902-915 | HermesMobile/Features/Workspace/FilePreviewView.swift:253-265 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 13+ corresponding lines) HermesMobile/Features/Workspace/ReviewDiff/ReviewDiffLayout.swift:129— HermesMobile/Features/Workspace/ReviewDiff/ReviewDiffLayout.swift:129-142 | HermesMobile/Features/Workspace/ReviewDiff/ReviewDiffLayout.swift:144-157 | HermesMobile/Features/Workspace/ReviewDiff/ReviewDiffLayout.swift:176-188 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 4+ corresponding lines) · ×3
Edited copies of one member (4 members, 4+ corresponding lines) HermesMobile/Features/Bots/BotCreator.swift:145— HermesMobile/Features/Bots/BotCreator.swift:145-148 | HermesMobile/Features/Bots/BotCreator.swift:156-159 | HermesMobile/Features/Bots/BotProfileEditor.swift:223-232 | HermesMobile/Features/Bots/BotProfileEditor.swift:240-250 — 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) HermesMobile/Features/Chat/ReasoningBlockView.swift:76— HermesMobile/Features/Chat/ReasoningBlockView.swift:76-79 | HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:25-28 | HermesMobile/Models/ClarifyResult.swift:156-159 | HermesMobile/Models/Cron.swift:587-590 — 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) HermesMobile/Features/Bots/BotDeepLink.swift:76— HermesMobile/Features/Bots/BotDeepLink.swift:76-79 | HermesMobile/Features/Bots/BotPendingRequest.swift:149-152 | HermesMobile/LiveActivities/HermesDeepLink.swift:192-195 | HermesMobile/Models/Goal.swift:11-14 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 4+ corresponding lines) · ×3
Edited copies of one member (3 members, 4+ corresponding lines) HermesMobile/Features/Chat/ComposerChipToken.swift:339— HermesMobile/Features/Chat/ComposerChipToken.swift:339-342 | HermesMobile/Features/Chat/ComposerFileTrigger.swift:81-84 | HermesMobile/Features/Chat/ComposerSlashTrigger.swift:175-178 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 4+ corresponding lines) HermesMobile/Features/Chat/ApprovalRequestInset.swift:314— HermesMobile/Features/Chat/ApprovalRequestInset.swift:314-317 | HermesMobile/Features/Chat/ClarificationRequestCard.swift:513-516 | HermesMobile/Features/Kanban/KanbanCardDetailView.swift:669-672 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 4+ corresponding lines) HermesMobile/Features/Insights/InsightsModels.swift:498— HermesMobile/Features/Insights/InsightsModels.swift:498-504 | HermesMobile/Features/MoveToHermes/MoveToHermesReconcile.swift:431-434 | HermesMobile/Features/Settings/ProvidersViewModel.swift:73-81 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (34 corresponding lines) · ×2
Edited copy of a member (34 corresponding lines) HermesMobile/Features/SessionList/HermesSessionListView.swift:795— HermesMobile/Features/SessionList/HermesSessionListView.swift:795-828 | HermesMobile/Features/SessionList/SessionListView.swift:934-973 — 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) HermesMobile/Features/Settings/AddServerView.swift:524— HermesMobile/Features/Settings/AddServerView.swift:524-557 | HermesMobile/Features/Shared/SectionCard.swift:33-68 — 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 (22 corresponding lines) · ×2
Edited copy of a member (22 corresponding lines) HermesMobile/Features/Chat/MarkdownRenderer.swift:598— HermesMobile/Features/Chat/MarkdownRenderer.swift:598-619 | HermesMobile/Features/Chat/MarkdownRenderer.swift:641-662 — 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) HermesMobile/Features/Kanban/KanbanFeatureState.swift:2880— HermesMobile/Features/Kanban/KanbanFeatureState.swift:2880-2901 | HermesMobile/Features/Kanban/KanbanFeatureState.swift:2903-2927 — 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 (30 corresponding lines) · ×2
Edited copy of a member (30 corresponding lines) HermesMobile/Features/Chat/ChatGoalControls.swift:115— HermesMobile/Features/Chat/ChatGoalControls.swift:115-144 | HermesMobile/Features/Chat/ChatMessageActions.swift:204-234 — 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) HermesMobile/Features/Chat/MarkdownRenderer.swift:1053— HermesMobile/Features/Chat/MarkdownRenderer.swift:1053-1082 | HermesMobile/Features/Chat/MarkdownRenderer.swift:1084-1113 — 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 copy of a member (23 corresponding lines) · ×2
Edited copy of a member (23 corresponding lines) HermesMobile/Features/Chat/ComposerChipTextView.swift:474— HermesMobile/Features/Chat/ComposerChipTextView.swift:474-496 | HermesMobile/Features/Chat/ComposerChipTextView.swift:498-521 — 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) HermesMobile/Features/Chat/ChatPendingActionCoordinator.swift:388— HermesMobile/Features/Chat/ChatPendingActionCoordinator.swift:388-411 | HermesMobile/Features/Chat/ChatPendingActionCoordinator.swift:499-521 — 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 (28 corresponding lines) · ×2
Edited copy of a member (28 corresponding lines) HermesMobile/Features/Chat/MarkdownRenderer.swift:36— HermesMobile/Features/Chat/MarkdownRenderer.swift:36-64 | HermesMobile/Features/Chat/MarkdownRenderer.swift:119-146 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (28 corresponding lines) HermesMobile/Features/Tasks/TaskDetailViewModel.swift:615— HermesMobile/Features/Tasks/TaskDetailViewModel.swift:615-642 | HermesMobile/Features/Tasks/TaskDetailViewModel.swift:644-676 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 11+ corresponding lines) · ×2
Edited copies of one member (3 members, 11+ corresponding lines) HermesMobile/Models/JSONValue.swift:29— HermesMobile/Models/JSONValue.swift:29-46 | HermesMobile/Networking/Bots/BotProtocol.swift:18-28 | scripts/fixtures/HermesFixtureCapture.swift:177-188 — 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.
Edited copies of one member (3 members, 11+ corresponding lines) HermesMobile/Features/Chat/ClarificationRequestCard.swift:618— HermesMobile/Features/Chat/ClarificationRequestCard.swift:618-628 | HermesMobile/Features/Chat/HermesBtwPanel.swift:161-176 | HermesMobile/Features/Chat/HermesBtwPanel.swift:194-204 — 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 (3 members, 3+ corresponding lines) · ×2
Edited copies of one member (3 members, 3+ corresponding lines) HermesMobile/Networking/Hermes/HermesCronClient.swift:193— HermesMobile/Networking/Hermes/HermesCronClient.swift:193-195 | HermesMobile/Networking/Hermes/HermesGitClient.swift:647-649 | HermesMobile/Networking/Hermes/HermesWorkspaceFileClient.swift:160-162 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 3+ corresponding lines) HermesMobile/Features/Bots/BotCreator.swift:321— HermesMobile/Features/Bots/BotCreator.swift:321-324 | HermesMobile/Features/Bots/BotProfileEditor.swift:465-468 | HermesMobile/Features/Settings/HermesDefaultModelView.swift:161-163 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 3+ corresponding lines) · ×2
Edited copies of one member (4 members, 3+ corresponding lines) HermesMobile/Networking/APIClient+Memory.swift:70— HermesMobile/Networking/APIClient+Memory.swift:70-72 | HermesMobile/Networking/Bots/BotClient.swift:36-38 | HermesMobile/Networking/Hermes/HermesInsightsClient.swift:19-21 | HermesMobile/Networking/Hermes/HermesSkillsClient.swift:18-20 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 3+ corresponding lines) HermesMobile/Config/AppTheme.swift:755— HermesMobile/Config/AppTheme.swift:755-757 | HermesMobile/Features/Bots/BotHistoryCache.swift:16-18 | HermesMobile/Features/Share/SharedDraftStore.swift:80-82 | HermesMobile/Push/PushPreview.swift:77-79 — 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 (30 lines × 2) HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:119— HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:119-148 | HermesMobile/Features/Tasks/CronJobSkillsPicker.swift:24-53 — before extracting anything, compare `HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift` and `HermesMobile/Features/Tasks/CronJobSkillsPicker.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 99 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 `HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:119` 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 lines × 2) HermesMobile/Persistence/CacheStore.swift:352— HermesMobile/Persistence/CacheStore.swift:352-381 | HermesMobile/Persistence/CachedSession.swift:76-105 — 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 (20 lines × 2) HermesMobile/Features/Chat/ComposerVoiceInputController.swift:294— HermesMobile/Features/Chat/ComposerVoiceInputController.swift:294-313 | HermesMobile/Features/Chat/ComposerVoiceInputController.swift:347-366 — both copies are in the same file, so extract the 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 `HermesMobile/Features/Chat/ComposerVoiceInputController.swift:294` 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 (20 lines × 2) HermesMobile/Features/Chat/ComposerFileTrigger.swift:60— HermesMobile/Features/Chat/ComposerFileTrigger.swift:60-79 | HermesMobile/Features/Chat/ComposerSlashTrigger.swift:116-135 — 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 (17 lines × 3) HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift:95— HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift:95-111 | HermesMobile/Features/Chat/TranscriptMediaView.swift:813-829 | HermesMobile/Features/Workspace/FilePreviewView.swift:157-173 — before extracting anything, compare `HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift` and `HermesMobile/Features/Chat/TranscriptMediaView.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 59 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 `HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift:95` 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) HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift:112— HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift:112-128 | HermesMobile/Features/Chat/TranscriptMediaView.swift:407-423 | HermesMobile/Features/Chat/TranscriptMediaView.swift:532-548 — before extracting anything, compare `HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift` and `HermesMobile/Features/Chat/TranscriptMediaView.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 59 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 `HermesMobile/Features/Chat/TranscriptMediaImageLightbox.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 (16 lines × 2) HermesMobile/Features/Chat/ChatView.swift:3880— HermesMobile/Features/Chat/ChatView.swift:3880-3895 | HermesMobile/Features/Chat/ChatView.swift:3979-3994 — both copies are in the same file, so extract the 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 (16 lines × 2) HermesMobile/Features/Settings/DefaultProfilePickerView.swift:55— HermesMobile/Features/Settings/DefaultProfilePickerView.swift:55-70 | HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:209-224 — 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 `HermesMobile/Features/Settings/DefaultProfilePickerView.swift:55` 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, `HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:206` calls `listRowSeparator` and `HermesMobile/Features/Settings/DefaultProfilePickerView.swift:52` 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 (15 lines × 2) HermesMobile/Features/Settings/APIKeysModel.swift:48— HermesMobile/Features/Settings/APIKeysModel.swift:48-62 | HermesMobile/Features/Settings/ConnectedAppsModel.swift:72-86 — 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 (15 lines × 2) HermesMobile/Features/Settings/DefaultProfilePickerView.swift:205— HermesMobile/Features/Settings/DefaultProfilePickerView.swift:205-219 | HermesMobile/Features/Shared/ModelPickerSheet.swift:491-505 — 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 `HermesMobile/Features/Settings/DefaultProfilePickerView.swift:205` 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) HermesMobile/Features/Chat/ChatView.swift:1055— HermesMobile/Features/Chat/ChatView.swift:1055-1068 | HermesMobile/Features/Chat/ChatView.swift:1991-2003 — both copies are in the same file, so extract the 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 `HermesMobile/Features/Chat/ChatView.swift:1055` 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 (13–14 lines × 2) HermesMobile/Features/Chat/ChatViewModel.swift:2476— HermesMobile/Features/Chat/ChatViewModel.swift:2476-2489 | HermesMobile/Features/Chat/ChatViewModel.swift:5510-5522 — both copies are in the same file, so extract the 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 `HermesMobile/Features/Chat/ChatViewModel.swift:2476` 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, `HermesMobile/Features/Chat/ChatViewModel.swift:5509` calls `replacingTokensUsed` and `HermesMobile/Features/Chat/ChatViewModel.swift:2476` 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) HermesMobile/Features/Chat/ChatView.swift:1101— HermesMobile/Features/Chat/ChatView.swift:1101-1114 | HermesMobile/Features/Chat/ChatView.swift:2111-2124 — both copies are in the same file, so extract the 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 `HermesMobile/Features/Chat/ChatView.swift:1101` 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) HermesMobile/Features/Chat/ChatViewModel.swift:1562— HermesMobile/Features/Chat/ChatViewModel.swift:1562-1575 | HermesMobile/Features/Chat/ChatViewModel.swift:4783-4796 — both copies are in the same file, so extract the 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 `HermesMobile/Features/Chat/ChatViewModel.swift:1562` 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.
Duplicated block (13 lines × 2) HermesMobile/Features/Chat/ChatViewModel.swift:5376— HermesMobile/Features/Chat/ChatViewModel.swift:5376-5388 | HermesMobile/Features/Chat/ChatViewModel.swift:5462-5474 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) HermesMobile/Features/SessionList/SessionListViewModel.swift:1370— HermesMobile/Features/SessionList/SessionListViewModel.swift:1370-1382 | HermesMobile/Features/SessionList/SessionListViewModel.swift:1417-1429 — both copies are in the same file, so extract the 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 `HermesMobile/Features/SessionList/SessionListViewModel.swift:1370` 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, `HermesMobile/Features/SessionList/SessionListViewModel.swift:1383` calls `move` and `HermesMobile/Features/SessionList/SessionListViewModel.swift:1430` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 4) HermesMobile/Features/Chat/ChatView.swift:4684— HermesMobile/Features/Chat/ChatView.swift:4684-4688 | HermesMobile/Features/SessionList/SessionListViewModel.swift:1602-1606 | HermesMobile/Features/Settings/ArchivedSessionsViewModel.swift:380-384 | HermesMobile/Models/Session.swift:711-715 — 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 (5 lines × 4) HermesMobile/Features/Kanban/KanbanCardEditorState.swift:486— HermesMobile/Features/Kanban/KanbanCardEditorState.swift:486-490 | HermesMobile/Features/SessionList/SessionListView.swift:1441-1445 | HermesMobile/Features/SessionList/SessionRowView.swift:590-594 | HermesMobile/Models/ServerCatalog.swift:690-694 — 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.
Swallowed exception (empty catch) HermesMobile/Networking/Hermes/HermesBrowserSignIn.swift:55— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) HermesMobile/Features/SessionList/SessionListViewModel.swift:2173— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
HermesREST.request (cyclomatic 197) HermesMobile/Networking/Hermes/HermesREST.swift:410— HermesREST.request has cyclomatic complexity 197 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HermesCall.admit (cyclomatic 135) HermesMobile/Networking/Hermes/HermesCall.swift:879— HermesCall.admit has cyclomatic complexity 135 (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.
HermesCall.params (cyclomatic 122) HermesMobile/Networking/Hermes/HermesCall.swift:606— HermesCall.params has cyclomatic complexity 122 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Endpoint.queryItems (cyclomatic 58) HermesMobile/Networking/Endpoints.swift:411— Endpoint.queryItems has cyclomatic complexity 58 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: Endpoint.path (cyclomatic 129) 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.
HermesChatTurnCoordinator.apply (cyclomatic 58) HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:1363— HermesChatTurnCoordinator.apply has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BotChatControls.apply (cyclomatic 53) HermesMobile/Features/Bots/BotChatControls.swift:200— BotChatControls.apply has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BotRoomView.body (cyclomatic 50) HermesMobile/Features/Bots/BotRoomView.swift:32— BotRoomView.body has cyclomatic complexity 50 (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.
ChatStreamCoordinator.handle (cyclomatic 44) HermesMobile/Features/Chat/ChatStreamCoordinator.swift:802— ChatStreamCoordinator.handle has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MoveToHermesProgress.report (cyclomatic 41) HermesMobile/Features/MoveToHermes/MoveToHermesRunner.swift:205— MoveToHermesProgress.report has cyclomatic complexity 41 (threshold 15). Of this number, 39 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
BotAvatarPathData.parse (cyclomatic 40) HermesMobile/Features/Bots/BotGeneratedAvatar.swift:114— BotAvatarPathData.parse has cyclomatic complexity 40 (threshold 15). Of this number, 35 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.
ChatViewModel.submitHermesPrompt (cyclomatic 40) HermesMobile/Features/Chat/ChatViewModel.swift:3358— ChatViewModel.submitHermesPrompt 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.
HermesChatTurnCoordinator.submit (cyclomatic 39) HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:567— HermesChatTurnCoordinator.submit 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.
MessageComposerView.composerWithLifecycle (cyclomatic 38) HermesMobile/Features/Chat/ChatComposerView.swift:581— MessageComposerView.composerWithLifecycle has cyclomatic complexity 38 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HermesSessionListView.body (cyclomatic 37) HermesMobile/Features/SessionList/HermesSessionListView.swift:235— HermesSessionListView.body has cyclomatic complexity 37 (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.
BotRoomReader.open (cyclomatic 34) HermesMobile/Features/Bots/BotRoomReader.swift:108— BotRoomReader.open 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.
ChatStreamCoordinator.performReconnectIfNeeded (cyclomatic 33) HermesMobile/Features/Chat/ChatStreamCoordinator.swift:484— ChatStreamCoordinator.performReconnectIfNeeded 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.
BotHistoryCache.appendRoom (cyclomatic 32) HermesMobile/Features/Bots/BotHistoryCache.swift:130— BotHistoryCache.appendRoom has cyclomatic complexity 32 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
BotInbox.open (cyclomatic 32) HermesMobile/Features/Bots/BotInbox.swift:360— BotInbox.open has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SessionListViewModel.reloadHermes (cyclomatic 30) HermesMobile/Features/SessionList/SessionListViewModel.swift:1944— SessionListViewModel.reloadHermes 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.
ComposerChipTokenizer.tokens (cyclomatic 29) HermesMobile/Features/Chat/ComposerChipToken.swift:158— ComposerChipTokenizer.tokens 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.
HermesChatTurnCoordinator.reconcile (cyclomatic 29) HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:1600— HermesChatTurnCoordinator.reconcile 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.
ToolCallSummaryFormatter.kind (cyclomatic 29) HermesMobile/Features/Chat/ToolCallSummaryFormatter.swift:134— ToolCallSummaryFormatter.kind has cyclomatic complexity 29 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
BotConnectionView.body (cyclomatic 28) HermesMobile/Features/Bots/BotConnectionView.swift:37— BotConnectionView.body has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ChatView.sendDraftMessage (cyclomatic 28) HermesMobile/Features/Chat/ChatView.swift:3065— ChatView.sendDraftMessage 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.
SessionListViewModel.openHermes (cyclomatic 28) HermesMobile/Features/SessionList/SessionListViewModel.swift:1763— SessionListViewModel.openHermes 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.
AgentLiveActivityManager.update (cyclomatic 27) HermesMobile/LiveActivities/AgentLiveActivityManager.swift:391— AgentLiveActivityManager.update 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.
ChatDraftStore.stageAttachment (cyclomatic 27) HermesMobile/Persistence/ChatDraftStore.swift:1134— ChatDraftStore.stageAttachment 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.
BotConnectionSetup.connect (cyclomatic 27) HermesMobile/Features/Bots/BotConnectionView.swift:548— BotConnectionSetup.connect 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.
HermesTranscriptProjection.project (cyclomatic 27) HermesMobile/Features/Chat/HermesTranscriptHistory.swift:198— HermesTranscriptProjection.project has cyclomatic complexity 27 (threshold 15). Of this number, 24 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HermesConversation.answer (cyclomatic 27) HermesMobile/Features/Hermes/HermesConversation.swift:374— HermesConversation.answer has cyclomatic complexity 27 (threshold 15). Of this number, 21 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
KanbanCardEditorState.save (cyclomatic 27) HermesMobile/Features/Kanban/KanbanCardEditorState.swift:168— KanbanCardEditorState.save 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.
FilePreviewViewModel.load (cyclomatic 27) HermesMobile/Features/Workspace/FilePreviewViewModel.swift:66— FilePreviewViewModel.load 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.
BotRoomReader.command (cyclomatic 26) HermesMobile/Features/Bots/BotRoomReader.swift:380— BotRoomReader.command 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.
ChatAttachmentPreviewViewModel.load (cyclomatic 26) HermesMobile/Features/Chat/ChatAttachmentPreviewView.swift:638— ChatAttachmentPreviewViewModel.load 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.
ChatTranscriptMessageBlock.== (cyclomatic 26) HermesMobile/Features/Chat/ChatTranscriptView.swift:819— ChatTranscriptMessageBlock.== has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
KanbanFeatureState.refreshBoard (cyclomatic 26) HermesMobile/Features/Kanban/KanbanFeatureState.swift:2502— KanbanFeatureState.refreshBoard 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.
MoveToHermesJournal.decode (cyclomatic 26) HermesMobile/Features/MoveToHermes/MoveToHermesJournal.swift:266— MoveToHermesJournal.decode 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.
HermesUpdateMachine.handle (cyclomatic 26) HermesMobile/Features/Settings/HermesUpdateMachine.swift:107— HermesUpdateMachine.handle 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.
HermesGateway.send (cyclomatic 26) HermesMobile/Networking/Hermes/HermesGateway.swift:223— HermesGateway.send has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ChatView.messageComposer (cyclomatic 25) HermesMobile/Features/Chat/ChatView.swift:615— ChatView.messageComposer 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.
MoveToHermesReconcile.apply::send (cyclomatic 25) HermesMobile/Features/MoveToHermes/MoveToHermesReconcile.swift:160— MoveToHermesReconcile.apply::send has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
SessionListView.body (cyclomatic 25) HermesMobile/Features/SessionList/SessionListView.swift:215— SessionListView.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.
MessageAttachment.hermesTitle (cyclomatic 24) HermesMobile/Models/MessageAttachment.swift:247— MessageAttachment.hermesTitle has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
BotRoomCreator.create (cyclomatic 24) HermesMobile/Features/Bots/BotRoomCreator.swift:69— BotRoomCreator.create has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ChatViewModel.restoreDraftSettings (cyclomatic 24) HermesMobile/Features/Chat/ChatViewModel.swift:1806— ChatViewModel.restoreDraftSettings has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ChatViewModel.loadMessages (cyclomatic 24) HermesMobile/Features/Chat/ChatViewModel.swift:2065— ChatViewModel.loadMessages has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BotConnection.address (cyclomatic 23) HermesMobile/Features/Bots/BotConnection.swift:60— BotConnection.address has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
ChatTranscriptView.transcriptScrollContent (cyclomatic 23) HermesMobile/Features/Chat/ChatTranscriptView.swift:415— ChatTranscriptView.transcriptScrollContent 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.
ChatViewModel.performChatSend (cyclomatic 23) HermesMobile/Features/Chat/ChatViewModel.swift:3794— ChatViewModel.performChatSend 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.
ScreenView.content (cyclomatic 23) HermesMobile/Features/Screen/ScreenView.swift:115— ScreenView.content has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
SessionListViewModel.loadSessionForDeepLink (cyclomatic 23) HermesMobile/Features/SessionList/SessionListViewModel.swift:894— SessionListViewModel.loadSessionForDeepLink 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.
HermesConnection.beginSignIn (cyclomatic 23) HermesMobile/Networking/Hermes/HermesConnection.swift:243— HermesConnection.beginSignIn 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.
ChatView.chatContent (cyclomatic 22) HermesMobile/Features/Chat/ChatView.swift:1296— ChatView.chatContent has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ChatView.handleSlashExecutionResult (cyclomatic 22) HermesMobile/Features/Chat/ChatView.swift:3317— ChatView.handleSlashExecutionResult 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.
TranscriptMediaPreviewViewModel.load (cyclomatic 22) HermesMobile/Features/Chat/TranscriptMediaPreviewViewModel.swift:60— TranscriptMediaPreviewViewModel.load 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.
KanbanFeatureState.dispatcherAvailability (cyclomatic 22) HermesMobile/Features/Kanban/KanbanFeatureState.swift:551— KanbanFeatureState.dispatcherAvailability has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
HermesSessionListView.isQuietSessionListVisible (cyclomatic 22) HermesMobile/Features/SessionList/HermesSessionListView.swift:428— HermesSessionListView.isQuietSessionListVisible has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ReviewDiffLoader.load (cyclomatic 22) HermesMobile/Features/Workspace/GitDiffView.swift:318— ReviewDiffLoader.load has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ContentView.handleOpenURL (cyclomatic 21) HermesMobile/ContentView.swift:156— ContentView.handleOpenURL 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.
AgentLiveActivityManager.requestOrUpdateActivity (cyclomatic 21) HermesMobile/LiveActivities/AgentLiveActivityManager.swift:794— AgentLiveActivityManager.requestOrUpdateActivity 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.
Record.draft (cyclomatic 21) HermesMobile/Persistence/ChatDraftStore.swift:498— Record.draft 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.
ChatDraftStore.appendShare (cyclomatic 21) HermesMobile/Persistence/ChatDraftStore.swift:804— ChatDraftStore.appendShare has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PushActivityRegistrar.reconcile (cyclomatic 21) HermesMobile/Push/PushRegistrar.swift:573— PushActivityRegistrar.reconcile 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.
ChatViewModel.send (cyclomatic 21) HermesMobile/Features/Chat/ChatViewModel.swift:3100— ChatViewModel.send 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.
HermesChatRequests.respondToConnection (cyclomatic 21) HermesMobile/Features/Chat/HermesChatRequests.swift:322— HermesChatRequests.respondToConnection 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.
HermesDelegatedWork.loadTail (cyclomatic 21) HermesMobile/Features/Chat/HermesDelegatedWork.swift:238— HermesDelegatedWork.loadTail 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.
HermesDelegatedWork.interrupt (cyclomatic 21) HermesMobile/Features/Chat/HermesDelegatedWork.swift:281— HermesDelegatedWork.interrupt 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.
ReasoningSummaryFormatter.stripInlineMarkup (cyclomatic 21) HermesMobile/Features/Chat/ReasoningSummaryFormatter.swift:119— ReasoningSummaryFormatter.stripInlineMarkup 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.
KanbanCardEditorState.intendedValuesAppear (cyclomatic 21) HermesMobile/Features/Kanban/KanbanCardEditorState.swift:410— KanbanCardEditorState.intendedValuesAppear has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
KanbanFeatureState.checkUncertainMutation (cyclomatic 21) HermesMobile/Features/Kanban/KanbanFeatureState.swift:956— KanbanFeatureState.checkUncertainMutation 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.
OnboardingViewModel.addHermesServer (cyclomatic 21) HermesMobile/Features/Onboarding/OnboardingViewModel.swift:519— OnboardingViewModel.addHermesServer 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.
SessionListViewModel.sessionForOpening (cyclomatic 21) HermesMobile/Features/SessionList/SessionListViewModel.swift:954— SessionListViewModel.sessionForOpening 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.
KanbanCompatibilityValidator.validate (cyclomatic 20) HermesMobile/Models/Kanban.swift:1294— KanbanCompatibilityValidator.validate 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.
BotArtifactReference.path (cyclomatic 20) HermesMobile/Features/Bots/BotArtifact.swift:28— BotArtifactReference.path has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
BotInbox.reload (cyclomatic 20) HermesMobile/Features/Bots/BotInbox.swift:652— BotInbox.reload 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.
BotRoomProfileView.body (cyclomatic 20) HermesMobile/Features/Bots/BotRoomProfileView.swift:17— BotRoomProfileView.body has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
BotSearchView.body (cyclomatic 20) HermesMobile/Features/Bots/BotSearchView.swift:65— BotSearchView.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.
ChatStreamCoordinator.recoverStaleStream (cyclomatic 20) HermesMobile/Features/Chat/ChatStreamCoordinator.swift:979— ChatStreamCoordinator.recoverStaleStream 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.
ChatViewModel.runHermesSlashCommand (cyclomatic 20) HermesMobile/Features/Chat/ChatViewModel.swift:4590— ChatViewModel.runHermesSlashCommand 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.
HermesChatRequests.setApprovalBypass (cyclomatic 20) HermesMobile/Features/Chat/HermesChatRequests.swift:445— HermesChatRequests.setApprovalBypass 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.
HermesSessionLookup.resolve (cyclomatic 20) HermesMobile/Features/Hermes/HermesSessionLookup.swift:77— HermesSessionLookup.resolve 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.
SessionListView.isQuietSessionListVisible (cyclomatic 20) HermesMobile/Features/SessionList/SessionListView.swift:490— SessionListView.isQuietSessionListVisible has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
APIError.errorDescription (cyclomatic 19) HermesMobile/Networking/APIError.swift:10— APIError.errorDescription has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
BotChatControls.reload (cyclomatic 19) HermesMobile/Features/Bots/BotChatControls.swift:137— BotChatControls.reload 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.
BotConnectionSetup.connectThroughBrowser (cyclomatic 19) HermesMobile/Features/Bots/BotConnectionView.swift:598— BotConnectionSetup.connectThroughBrowser 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.
BotsInboxView.list (cyclomatic 19) HermesMobile/Features/Bots/BotsInboxView.swift:173— BotsInboxView.list 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.
HermexAttachmentImageProcessor.prepareSynchronously (cyclomatic 19) HermesMobile/Features/Chat/CustomAttachmentPicker.swift:277— HermexAttachmentImageProcessor.prepareSynchronously 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.
KanbanFeatureState.bulkActionsAvailability (cyclomatic 19) HermesMobile/Features/Kanban/KanbanFeatureState.swift:605— KanbanFeatureState.bulkActionsAvailability has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
KanbanFeatureState.load (cyclomatic 19) HermesMobile/Features/Kanban/KanbanFeatureState.swift:1013— KanbanFeatureState.load has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WebuiSessionTransfer.run (cyclomatic 19) HermesMobile/Features/MoveToHermes/WebuiSessionTransfer.swift:79— WebuiSessionTransfer.run 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.
OnboardingViewModel.connect (cyclomatic 19) HermesMobile/Features/Onboarding/OnboardingViewModel.swift:442— OnboardingViewModel.connect has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
ScreenSession.settleHost (cyclomatic 19) HermesMobile/Features/Screen/ScreenSession.swift:611— ScreenSession.settleHost has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
SessionListViewModel.searchSessions (cyclomatic 19) HermesMobile/Features/SessionList/SessionListViewModel.swift:571— SessionListViewModel.searchSessions 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.
HermesGateway.consume (cyclomatic 19) HermesMobile/Networking/Hermes/HermesGateway.swift:498— HermesGateway.consume 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.
HermesPluginSetting.parse (cyclomatic 19) HermesMobile/Networking/Hermes/HermesPluginsClient.swift:194— HermesPluginSetting.parse 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.
LeftoverLiveActivitySettlement.actions (cyclomatic 18) HermesMobile/LiveActivities/AgentLiveActivityManager.swift:1357— LeftoverLiveActivitySettlement.actions 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.
AgentRunActivitySanitizer.toolKind (cyclomatic 18) HermesMobile/LiveActivities/AgentRunActivityAttributes.swift:362— AgentRunActivitySanitizer.toolKind has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
BotCreateView.body (cyclomatic 18) HermesMobile/Features/Bots/BotCreateView.swift:20— BotCreateView.body 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.
BotPromptMode.outcome (cyclomatic 18) HermesMobile/Features/Bots/BotPromptMode.swift:47— BotPromptMode.outcome 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.
BotSlashCatalog.skills (cyclomatic 18) HermesMobile/Features/Bots/BotSlashCommands.swift:24— BotSlashCatalog.skills 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.
ChatMessageActionMenu.items (cyclomatic 18) HermesMobile/Features/Chat/ChatMessageActions.swift:81— ChatMessageActionMenu.items has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ChatView.chatLifecycle (cyclomatic 18) HermesMobile/Features/Chat/ChatView.swift:1173— ChatView.chatLifecycle 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.
TranscriptMediaThumbnailView.body (cyclomatic 18) HermesMobile/Features/Chat/TranscriptMediaView.swift:127— TranscriptMediaThumbnailView.body has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TranscriptTurnFolds.derive (cyclomatic 18) HermesMobile/Features/Chat/TranscriptTurnFolding.swift:87— TranscriptTurnFolds.derive 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.
HermesConversation.reconcile (cyclomatic 18) HermesMobile/Features/Hermes/HermesConversation.swift:562— HermesConversation.reconcile has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
InsightsViewModel.loadLimits (cyclomatic 18) HermesMobile/Features/Insights/InsightsViewModel.swift:275— InsightsViewModel.loadLimits has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
KanbanFeatureState.performBulkAction (cyclomatic 18) HermesMobile/Features/Kanban/KanbanFeatureState.swift:1698— KanbanFeatureState.performBulkAction 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.
KanbanStatusFocusView.body (cyclomatic 18) HermesMobile/Features/Kanban/KanbanLabView.swift:207— KanbanStatusFocusView.body has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
MoveToHermesSheet.pausedDetails (cyclomatic 18) HermesMobile/Features/MoveToHermes/MoveToHermesView.swift:376— MoveToHermesSheet.pausedDetails 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.
SessionRowContextMenu.body (cyclomatic 18) HermesMobile/Features/SessionList/SessionListComponents.swift:1369— SessionRowContextMenu.body has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SessionListViewModel.readHermesStatuses (cyclomatic 18) HermesMobile/Features/SessionList/SessionListViewModel.swift:2364— SessionListViewModel.readHermesStatuses has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TaskDetailViewModel.followRunNow (cyclomatic 18) HermesMobile/Features/Tasks/TaskDetailViewModel.swift:444— TaskDetailViewModel.followRunNow 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.
FileBrowserView.content (cyclomatic 18) HermesMobile/Features/Workspace/FileBrowserView.swift:74— FileBrowserView.content 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.
AgentLiveActivityManager.observePush (cyclomatic 17) HermesMobile/LiveActivities/AgentLiveActivityManager.swift:1053— AgentLiveActivityManager.observePush has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CachedMessage.matches (cyclomatic 17) HermesMobile/Persistence/CachedMessage.swift:91— CachedMessage.matches 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.
BotFaceBit.pose (cyclomatic 17) HermesMobile/Features/Bots/BotFaceMotion.swift:170— BotFaceBit.pose 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.
BotInbox.refreshRooms (cyclomatic 17) HermesMobile/Features/Bots/BotInbox.swift:902— BotInbox.refreshRooms 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.
BotProfileEditorView.body (cyclomatic 17) HermesMobile/Features/Bots/BotProfileEditorView.swift:27— BotProfileEditorView.body has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
BotsInboxView.attachPresentations (cyclomatic 17) HermesMobile/Features/Bots/BotsInboxView.swift:678— BotsInboxView.attachPresentations 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.
HermexPushProvisioner.setUp (cyclomatic 17) HermesMobile/Features/Bots/HermexPushProvisioner.swift:308— HermexPushProvisioner.setUp has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: HermexPushProvisioner.message (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
HermexPushProvisioner.restartHermes (cyclomatic 17) HermesMobile/Features/Bots/HermexPushProvisioner.swift:541— HermexPushProvisioner.restartHermes has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: HermexPushProvisioner.message (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
Coordinator.syncFocus (cyclomatic 17) HermesMobile/Features/Chat/ChatComposerTextInputView.swift:535— Coordinator.syncFocus 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.
MessageComposerView.body (cyclomatic 17) HermesMobile/Features/Chat/ChatComposerView.swift:854— MessageComposerView.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.
MessageComposerView.composerStatus (cyclomatic 17) HermesMobile/Features/Chat/ChatComposerView.swift:1533— MessageComposerView.composerStatus 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.
ChatViewModel.toggleListening (cyclomatic 17) HermesMobile/Features/Chat/ChatViewModel.swift:6642— ChatViewModel.toggleListening has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: ChatViewModel.executeServerSideSlashCommand (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
ComposerChipTextView.canPerformAction (cyclomatic 17) HermesMobile/Features/Chat/ComposerChipTextView.swift:671— ComposerChipTextView.canPerformAction 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.
ToolCallGroupSummary.init (cyclomatic 17) HermesMobile/Features/Chat/ToolCallGroupSummary.swift:27— ToolCallGroupSummary.init 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.
ProviderLimitCard.init (cyclomatic 17) HermesMobile/Features/Insights/InsightsModels.swift:389— ProviderLimitCard.init 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.
HermesSessionListView.openPendingLink (cyclomatic 17) HermesMobile/Features/SessionList/HermesSessionListView.swift:885— HermesSessionListView.openPendingLink 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.
SessionListViewModel.load (cyclomatic 17) HermesMobile/Features/SessionList/SessionListViewModel.swift:401— SessionListViewModel.load 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.
BotProfileEditor.save (cyclomatic 16) HermesMobile/Features/Bots/BotProfileEditor.swift:336— BotProfileEditor.save 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.
HermexPushSettingsPage.pushSettings (cyclomatic 16) HermesMobile/Features/Bots/HermexPushSettingsPage.swift:80— HermexPushSettingsPage.pushSettings 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.
ComposerVoiceInputController.finishServerRecording (cyclomatic 16) HermesMobile/Features/Chat/ComposerVoiceInputController.swift:497— ComposerVoiceInputController.finishServerRecording 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.
InlineMathTextRequest.parsed (cyclomatic 16) HermesMobile/Features/Chat/DisplayMathView.swift:475— InlineMathTextRequest.parsed 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.
HermesChatTurnCoordinator.compress (cyclomatic 16) HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:1100— HermesChatTurnCoordinator.compress 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.
HermesChatTurnCoordinator.branch (cyclomatic 16) HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:1210— HermesChatTurnCoordinator.branch 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.
MarkdownDiffFormatter.parse (cyclomatic 16) HermesMobile/Features/Chat/MarkdownDiffCodeBlock.swift:113— MarkdownDiffFormatter.parse has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
ResponseSelectionInput.document (cyclomatic 16) HermesMobile/Features/Chat/ResponseSelectionInput.swift:63— ResponseSelectionInput.document 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.
TranscriptMediaParser.appendMediaSegments (cyclomatic 16) HermesMobile/Features/Chat/TranscriptMedia.swift:273— TranscriptMediaParser.appendMediaSegments 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.
InsightsViewModel.load (cyclomatic 16) HermesMobile/Features/Insights/InsightsViewModel.swift:198— InsightsViewModel.load 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.
KanbanFeatureState.handleStreamFrame (cyclomatic 16) HermesMobile/Features/Kanban/KanbanFeatureState.swift:2617— KanbanFeatureState.handleStreamFrame 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.
KanbanFeatureState.scheduleCoalescedReconciliation (cyclomatic 16) HermesMobile/Features/Kanban/KanbanFeatureState.swift:2693— KanbanFeatureState.scheduleCoalescedReconciliation 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.
MoveToHermesRunner.reconcile (cyclomatic 16) HermesMobile/Features/MoveToHermes/MoveToHermesRunner.swift:645— MoveToHermesRunner.reconcile 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.
GitWorkspaceAvailabilityViewModel.quickCommit (cyclomatic 16) HermesMobile/Features/Workspace/GitWorkspaceViewModel.swift:436— GitWorkspaceAvailabilityViewModel.quickCommit 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.
HermesREST.request (cognitive 150) HermesMobile/Networking/Hermes/HermesREST.swift:410— HermesREST.request has cognitive complexity 150 (threshold 15). Drivers by points: if/else 56 (112 pts), boolean chains 19, ternaries 9 (18 pts), match/switch 1 (nesting depth added 65). 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.
HermesCall.admit (cognitive 83) HermesMobile/Networking/Hermes/HermesCall.swift:879— HermesCall.admit has cognitive complexity 83 (threshold 15). Drivers by points: boolean chains 74, match/switch 3 (5 pts), if/else 3 (4 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ChatStreamCoordinator.performReconnectIfNeeded (cognitive 81) HermesMobile/Features/Chat/ChatStreamCoordinator.swift:484— ChatStreamCoordinator.performReconnectIfNeeded has cognitive complexity 81 (threshold 15). Drivers by points: if/else 20 (59 pts), boolean chains 9, error handling 3 (7 pts), ternaries 1 (5 pts), loops 1 (nesting depth added 47). 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.
BotChatControls.apply (cognitive 80) HermesMobile/Features/Bots/BotChatControls.swift:200— BotChatControls.apply has cognitive complexity 80 (threshold 15). Drivers by points: if/else 25 (45 pts), boolean chains 20, ternaries 3 (11 pts), match/switch 2 (3 pts), error handling 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HermesCall.params (cognitive 67) HermesMobile/Networking/Hermes/HermesCall.swift:606— HermesCall.params has cognitive complexity 67 (threshold 15). Drivers by points: if/else 25 (48 pts), ternaries 4 (10 pts), match/switch 4 (7 pts), boolean chains 2 (nesting depth added 32). 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.
HermesChatTurnCoordinator.apply (cognitive 64) HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:1363— HermesChatTurnCoordinator.apply has cognitive complexity 64 (threshold 15). Drivers by points: if/else 22 (45 pts), boolean chains 16, ternaries 1 (2 pts), match/switch 1 (nesting depth added 24). 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.
BotInbox.open (cognitive 58) HermesMobile/Features/Bots/BotInbox.swift:360— BotInbox.open has cognitive complexity 58 (threshold 15). Drivers by points: if/else 22 (48 pts), boolean chains 9, error handling 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HermesTranscriptProjection.project (cognitive 58) HermesMobile/Features/Chat/HermesTranscriptHistory.swift:198— HermesTranscriptProjection.project has cognitive complexity 58 (threshold 15). Drivers by points: if/else 12 (28 pts), ternaries 6 (18 pts), boolean chains 5, loops 2 (5 pts), match/switch 1 (2 pts) (nesting depth added 32). Of this number, 55 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BotAvatarPathData.parse (cognitive 55) HermesMobile/Features/Bots/BotGeneratedAvatar.swift:114— BotAvatarPathData.parse has cognitive complexity 55 (threshold 15). Drivers by points: if/else 15 (33 pts), boolean chains 17, loops 2, match/switch 1 (2 pts), ternaries 1 (nesting depth added 19). Of this number, 50 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BotRoomReader.open (cognitive 54) HermesMobile/Features/Bots/BotRoomReader.swift:108— BotRoomReader.open has cognitive complexity 54 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 14, loops 3 (7 pts), ternaries 2 (6 pts), error handling 2 (4 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatViewModel.loadMessages (cognitive 53) HermesMobile/Features/Chat/ChatViewModel.swift:2065— ChatViewModel.loadMessages has cognitive complexity 53 (threshold 15). Drivers by points: if/else 20 (40 pts), error handling 4 (10 pts), boolean chains 3 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FilePreviewViewModel.load (cognitive 53) HermesMobile/Features/Workspace/FilePreviewViewModel.swift:66— FilePreviewViewModel.load has cognitive complexity 53 (threshold 15). Drivers by points: if/else 19 (36 pts), ternaries 2 (8 pts), boolean chains 7, error handling 2 (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
BotRoomView.body (cognitive 51) HermesMobile/Features/Bots/BotRoomView.swift:32— BotRoomView.body has cognitive complexity 51 (threshold 15). Drivers by points: if/else 26 (27 pts), boolean chains 17, ternaries 5, error handling 1, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HermesChatTurnCoordinator.submit (cognitive 50) HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:567— HermesChatTurnCoordinator.submit has cognitive complexity 50 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 13, error handling 5 (7 pts), ternaries 1 (2 pts), match/switch 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.
ChatViewModel.submitHermesPrompt (cognitive 49) HermesMobile/Features/Chat/ChatViewModel.swift:3358— ChatViewModel.submitHermesPrompt has cognitive complexity 49 (threshold 15). Drivers by points: if/else 21 (34 pts), boolean chains 11, ternaries 2, error handling 1, match/switch 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.
HermesConnection.beginSignIn (cognitive 48) HermesMobile/Networking/Hermes/HermesConnection.swift:243— HermesConnection.beginSignIn has cognitive complexity 48 (threshold 15). Drivers by points: if/else 17 (38 pts), ternaries 1 (4 pts), match/switch 1 (3 pts), boolean chains 2, error handling 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MessageComposerView.composerWithLifecycle (cognitive 47) HermesMobile/Features/Chat/ChatComposerView.swift:581— MessageComposerView.composerWithLifecycle has cognitive complexity 47 (threshold 15). Drivers by points: if/else 28 (31 pts), ternaries 6 (9 pts), boolean chains 7 (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.
ChatDraftStore.stageAttachment (cognitive 46) HermesMobile/Persistence/ChatDraftStore.swift:1134— ChatDraftStore.stageAttachment has cognitive complexity 46 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 7 (15 pts), boolean chains 6, error handling 1 (2 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BotRoomCreator.create (cognitive 46) HermesMobile/Features/Bots/BotRoomCreator.swift:69— BotRoomCreator.create has cognitive complexity 46 (threshold 15). Drivers by points: if/else 13 (30 pts), boolean chains 8, error handling 2 (5 pts), ternaries 1 (3 pts) (nesting depth added 22). 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.
MoveToHermesJournal.decode (cognitive 46) HermesMobile/Features/MoveToHermes/MoveToHermesJournal.swift:266— MoveToHermesJournal.decode has cognitive complexity 46 (threshold 15). Drivers by points: if/else 8 (28 pts), loops 3 (7 pts), match/switch 2 (6 pts), boolean chains 5 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SessionListViewModel.reloadHermes (cognitive 46) HermesMobile/Features/SessionList/SessionListViewModel.swift:1944— SessionListViewModel.reloadHermes has cognitive complexity 46 (threshold 15). Drivers by points: if/else 17 (33 pts), boolean chains 10, loops 1 (2 pts), 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.
ChatView.sendDraftMessage (cognitive 45) HermesMobile/Features/Chat/ChatView.swift:3065— ChatView.sendDraftMessage has cognitive complexity 45 (threshold 15). Drivers by points: if/else 17 (30 pts), boolean chains 8, match/switch 2 (5 pts), ternaries 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HermesConversation.answer (cognitive 45) HermesMobile/Features/Hermes/HermesConversation.swift:374— HermesConversation.answer has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (33 pts), boolean chains 4, ternaries 2 (4 pts), loops 1 (2 pts), match/switch 2 (nesting depth added 22). Of this number, 37 points are the body's own statements and 8 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.
ComposerChipTokenizer.tokens (cognitive 43) HermesMobile/Features/Chat/ComposerChipToken.swift:158— ComposerChipTokenizer.tokens has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 15, loops 3 (5 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MoveToHermesProgress.report (cognitive 43) HermesMobile/Features/MoveToHermes/MoveToHermesRunner.swift:205— MoveToHermesProgress.report has cognitive complexity 43 (threshold 15). Drivers by points: match/switch 5 (13 pts), ternaries 3 (12 pts), if/else 5 (11 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 24). Of this number, 41 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebuiSessionTransfer.run (cognitive 43) HermesMobile/Features/MoveToHermes/WebuiSessionTransfer.swift:79— WebuiSessionTransfer.run has cognitive complexity 43 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 4 (7 pts), match/switch 1 (4 pts), boolean chains 3, ternaries 1 (3 pts), error handling 1 (2 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatAttachmentPreviewViewModel.load (cognitive 42) HermesMobile/Features/Chat/ChatAttachmentPreviewView.swift:638— ChatAttachmentPreviewViewModel.load has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (33 pts), boolean chains 8, error handling 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BotRoomReader.command (cognitive 41) HermesMobile/Features/Bots/BotRoomReader.swift:380— BotRoomReader.command has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (28 pts), boolean chains 10, error handling 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KanbanFeatureState.refreshBoard (cognitive 41) HermesMobile/Features/Kanban/KanbanFeatureState.swift:2502— KanbanFeatureState.refreshBoard has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (28 pts), boolean chains 8, ternaries 1 (3 pts), error handling 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatStreamCoordinator.handle (cognitive 40) HermesMobile/Features/Chat/ChatStreamCoordinator.swift:802— ChatStreamCoordinator.handle has cognitive complexity 40 (threshold 15). Drivers by points: if/else 16 (33 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TranscriptMediaPreviewViewModel.load (cognitive 40) HermesMobile/Features/Chat/TranscriptMediaPreviewViewModel.swift:60— TranscriptMediaPreviewViewModel.load has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (31 pts), boolean chains 8, error handling 1 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
KanbanCardEditorState.save (cognitive 40) HermesMobile/Features/Kanban/KanbanCardEditorState.swift:168— KanbanCardEditorState.save has cognitive complexity 40 (threshold 15). Drivers by points: if/else 16 (27 pts), boolean chains 4, error handling 2 (3 pts), match/switch 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BotConnectionSetup.connect (cognitive 39) HermesMobile/Features/Bots/BotConnectionView.swift:548— BotConnectionSetup.connect has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 8 (13 pts), boolean chains 9, 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.
SessionListViewModel.openHermes (cognitive 39) HermesMobile/Features/SessionList/SessionListViewModel.swift:1763— SessionListViewModel.openHermes has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (30 pts), boolean chains 8, error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReviewDiffLoader.load (cognitive 38) HermesMobile/Features/Workspace/GitDiffView.swift:318— ReviewDiffLoader.load has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (28 pts), boolean chains 5, loops 3, match/switch 1 (2 pts) (nesting depth added 17). Of this number, 36 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BotSearchView.body (cognitive 37) HermesMobile/Features/Bots/BotSearchView.swift:65— BotSearchView.body has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (33 pts), boolean chains 4 (nesting depth added 17). 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.
HermexAttachmentImageProcessor.prepareSynchronously (cognitive 37) HermesMobile/Features/Chat/CustomAttachmentPicker.swift:277— HermexAttachmentImageProcessor.prepareSynchronously has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 5 (16 pts), if/else 6 (13 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HermesSessionListView.body (cognitive 37) HermesMobile/Features/SessionList/HermesSessionListView.swift:235— HermesSessionListView.body has cognitive complexity 37 (threshold 15). Drivers by points: if/else 24, boolean chains 9, ternaries 3, match/switch 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.
Endpoint.queryItems (cognitive 36) HermesMobile/Networking/Endpoints.swift:411— Endpoint.queryItems has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (29 pts), ternaries 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 16). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SessionListViewModel.loadSessionForDeepLink (cognitive 36) HermesMobile/Features/SessionList/SessionListViewModel.swift:894— SessionListViewModel.loadSessionForDeepLink has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 7, error handling 3 (6 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BotsInboxView.list (cognitive 35) HermesMobile/Features/Bots/BotsInboxView.swift:173— BotsInboxView.list has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (24 pts), ternaries 2 (6 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatViewModel.performChatSend (cognitive 35) HermesMobile/Features/Chat/ChatViewModel.swift:3794— ChatViewModel.performChatSend has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 8, error handling 1, ternaries 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.
BotInbox.reload (cognitive 34) HermesMobile/Features/Bots/BotInbox.swift:652— BotInbox.reload has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 6, loops 2 (4 pts), error handling 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KanbanFeatureState.load (cognitive 34) HermesMobile/Features/Kanban/KanbanFeatureState.swift:1013— KanbanFeatureState.load has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (25 pts), ternaries 2 (5 pts), boolean chains 2, error handling 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SessionListViewModel.readHermesStatuses (cognitive 34) HermesMobile/Features/SessionList/SessionListViewModel.swift:2364— SessionListViewModel.readHermesStatuses has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (18 pts), ternaries 2 (6 pts), loops 2 (5 pts), boolean chains 4, error handling 1 (nesting depth added 15). Of this number, 32 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AgentLiveActivityManager.requestOrUpdateActivity (cognitive 33) HermesMobile/LiveActivities/AgentLiveActivityManager.swift:794— AgentLiveActivityManager.requestOrUpdateActivity has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 7, ternaries 2 (4 pts), loops 1 (2 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.
BotHistoryCache.appendRoom (cognitive 33) HermesMobile/Features/Bots/BotHistoryCache.swift:130— BotHistoryCache.appendRoom has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 21, if/else 5 (6 pts), ternaries 4 (5 pts), loops 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
HermesChatRequests.respondToConnection (cognitive 33) HermesMobile/Features/Chat/HermesChatRequests.swift:322— HermesChatRequests.respondToConnection has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 9, ternaries 1 (4 pts), error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReasoningSummaryFormatter.stripInlineMarkup (cognitive 33) HermesMobile/Features/Chat/ReasoningSummaryFormatter.swift:119— ReasoningSummaryFormatter.stripInlineMarkup has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 10, ternaries 2 (6 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BotConnectionView.body (cognitive 32) HermesMobile/Features/Bots/BotConnectionView.swift:37— BotConnectionView.body has cognitive complexity 32 (threshold 15). Drivers by points: if/else 22 (28 pts), boolean chains 2, match/switch 1, ternaries 1 (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.
ChatView.handleSlashExecutionResult (cognitive 32) HermesMobile/Features/Chat/ChatView.swift:3317— ChatView.handleSlashExecutionResult has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (31 pts), match/switch 1 (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
HermesChatTurnCoordinator.reconcile (cognitive 32) HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:1600— HermesChatTurnCoordinator.reconcile has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 14, if/else 10, ternaries 5 (8 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
BotInbox.refreshRooms (cognitive 31) HermesMobile/Features/Bots/BotInbox.swift:902— BotInbox.refreshRooms has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 4, loops 1 (2 pts), error handling 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HermesDelegatedWork.interrupt (cognitive 31) HermesMobile/Features/Chat/HermesDelegatedWork.swift:281— HermesDelegatedWork.interrupt has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 9, 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.
SessionListViewModel.sessionForOpening (cognitive 31) HermesMobile/Features/SessionList/SessionListViewModel.swift:954— SessionListViewModel.sessionForOpening has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 8, error handling 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PushActivityRegistrar.reconcile (cognitive 30) HermesMobile/Push/PushRegistrar.swift:573— PushActivityRegistrar.reconcile has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 9, error handling 3 (7 pts), loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatViewModel.restoreDraftSettings (cognitive 30) HermesMobile/Features/Chat/ChatViewModel.swift:1806— ChatViewModel.restoreDraftSettings has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (20 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.
SessionListViewModel.load (cognitive 30) HermesMobile/Features/SessionList/SessionListViewModel.swift:401— SessionListViewModel.load has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (18 pts), error handling 3 (7 pts), boolean chains 4, ternaries 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.
SessionListViewModel.searchSessions (cognitive 30) HermesMobile/Features/SessionList/SessionListViewModel.swift:571— SessionListViewModel.searchSessions has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 6, 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.
ChatDraftStore.appendShare (cognitive 29) HermesMobile/Persistence/ChatDraftStore.swift:804— ChatDraftStore.appendShare has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (16 pts), error handling 3 (4 pts), boolean chains 3, loops 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 9). Of this number, 28 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatView.chatContent (cognitive 29) HermesMobile/Features/Chat/ChatView.swift:1296— ChatView.chatContent has cognitive complexity 29 (threshold 15). Drivers by points: if/else 22 (27 pts), boolean chains 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.
HermesUpdateMachine.handle (cognitive 29) HermesMobile/Features/Settings/HermesUpdateMachine.swift:107— HermesUpdateMachine.handle has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 8, match/switch 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HermesGateway.send (cognitive 29) HermesMobile/Networking/Hermes/HermesGateway.swift:223— HermesGateway.send has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 11, error handling 3, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
String.strippingANSIEscapes (cognitive 29) HermesMobile/Models/ANSIEscapes.swift:15— String.strippingANSIEscapes has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 3 (7 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatStreamCoordinator.recoverStaleStream (cognitive 28) HermesMobile/Features/Chat/ChatStreamCoordinator.swift:979— ChatStreamCoordinator.recoverStaleStream has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 10, 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.
ToolCallSummaryFormatter.kind (cognitive 28) HermesMobile/Features/Chat/ToolCallSummaryFormatter.swift:134— ToolCallSummaryFormatter.kind has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 18, if/else 10. 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.
HermesSessionLookup.resolve (cognitive 28) HermesMobile/Features/Hermes/HermesSessionLookup.swift:77— HermesSessionLookup.resolve has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 3, loops 1 (2 pts), match/switch 1, ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BotRoomProfileView.body (cognitive 27) HermesMobile/Features/Bots/BotRoomProfileView.swift:17— BotRoomProfileView.body has cognitive complexity 27 (threshold 15). Drivers by points: if/else 20 (25 pts), boolean chains 1, match/switch 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — 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.
HermesChatRequests.setApprovalBypass (cognitive 27) HermesMobile/Features/Chat/HermesChatRequests.swift:445— HermesChatRequests.setApprovalBypass has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 9, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TranscriptMediaThumbnailView.body (cognitive 27) HermesMobile/Features/Chat/TranscriptMediaView.swift:127— TranscriptMediaThumbnailView.body has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 5, ternaries 1 (3 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
InsightsViewModel.load (cognitive 27) HermesMobile/Features/Insights/InsightsViewModel.swift:198— InsightsViewModel.load has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (17 pts), error handling 4 (6 pts), boolean chains 4 (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.
AgentLiveActivityManager.update (cognitive 26) HermesMobile/LiveActivities/AgentLiveActivityManager.swift:391— AgentLiveActivityManager.update has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 5, ternaries 2 (5 pts), match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MessageAttachment.hermesTitle (cognitive 26) HermesMobile/Models/MessageAttachment.swift:247— MessageAttachment.hermesTitle has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 9, loops 2, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
BotConnectionSetup.connectThroughBrowser (cognitive 26) HermesMobile/Features/Bots/BotConnectionView.swift:598— BotConnectionSetup.connectThroughBrowser has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 5 (10 pts), boolean chains 8, if/else 4 (7 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatViewModel.send (cognitive 26) HermesMobile/Features/Chat/ChatViewModel.swift:3100— ChatViewModel.send has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 5, ternaries 3, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HermesDelegatedWork.loadTail (cognitive 26) HermesMobile/Features/Chat/HermesDelegatedWork.swift:238— HermesDelegatedWork.loadTail has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 12, if/else 6 (11 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ResponseSelectionInput.document (cognitive 26) HermesMobile/Features/Chat/ResponseSelectionInput.swift:63— ResponseSelectionInput.document has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 3 (6 pts), loops 3 (5 pts), boolean chains 4 (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.
KanbanCardDetailContent.mutationSection (cognitive 26) HermesMobile/Features/Kanban/KanbanCardDetailView.swift:353— KanbanCardDetailContent.mutationSection has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (18 pts), ternaries 1 (4 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
KanbanCardEditorState.reconcileAmbiguousOutcome (cognitive 26) HermesMobile/Features/Kanban/KanbanCardEditorState.swift:354— KanbanCardEditorState.reconcileAmbiguousOutcome has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 3, match/switch 1 (2 pts), error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MoveToHermesRemoval.sourceMessage (cognitive 26) HermesMobile/Features/MoveToHermes/MoveToHermesModel.swift:777— MoveToHermesRemoval.sourceMessage has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (24 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.
FileBrowserView.content (cognitive 26) HermesMobile/Features/Workspace/FileBrowserView.swift:74— FileBrowserView.content has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 6, ternaries 3 (5 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HermesPluginSetting.parse (cognitive 26) HermesMobile/Networking/Hermes/HermesPluginsClient.swift:194— HermesPluginSetting.parse has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 5 (12 pts), if/else 5 (9 pts), match/switch 2 (3 pts), boolean chains 2 (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.
ChatTranscriptMessageBlock.== (cognitive 25) HermesMobile/Features/Chat/ChatTranscriptView.swift:819— ChatTranscriptMessageBlock.== has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 24, if/else 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
HermesChatTurnCoordinator.branch (cognitive 25) HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:1210— HermesChatTurnCoordinator.branch has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 4, error handling 1 (2 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.
TranscriptTurnFolds.derive (cognitive 25) HermesMobile/Features/Chat/TranscriptTurnFolding.swift:87— TranscriptTurnFolds.derive has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 5 (7 pts), boolean chains 5, ternaries 3 (5 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.
OnboardingViewModel.configureWebui (cognitive 25) HermesMobile/Features/Onboarding/OnboardingViewModel.swift:579— OnboardingViewModel.configureWebui has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (22 pts), error handling 1 (2 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.
SessionListView.body (cognitive 25) HermesMobile/Features/SessionList/SessionListView.swift:215— SessionListView.body has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18 (19 pts), boolean chains 6 (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.
GitWorkspaceAvailabilityViewModel.quickCommit (cognitive 25) HermesMobile/Features/Workspace/GitWorkspaceViewModel.swift:436— GitWorkspaceAvailabilityViewModel.quickCommit has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (20 pts), error handling 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.
ChatAttachmentCoordinator.performUpload (cognitive 24) HermesMobile/Features/Chat/ChatAttachmentCoordinator.swift:412— ChatAttachmentCoordinator.performUpload has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 1, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatView.messageComposer (cognitive 24) HermesMobile/Features/Chat/ChatView.swift:615— ChatView.messageComposer has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 11, if/else 7, ternaries 6. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HermesChatRequests.deliver (cognitive 24) HermesMobile/Features/Chat/HermesChatRequests.swift:395— HermesChatRequests.deliver has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 3, ternaries 1 (3 pts), 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.
OnboardingViewModel.addHermesServer (cognitive 24) HermesMobile/Features/Onboarding/OnboardingViewModel.swift:519— OnboardingViewModel.addHermesServer has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (8 pts), ternaries 5 (6 pts), error handling 2 (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.
ActionToastView.toastBody (cognitive 24) HermesMobile/Features/Shared/ActionToast.swift:210— ActionToastView.toastBody has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (15 pts), ternaries 3 (6 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.
ReviewWordDiff.annotate (cognitive 24) HermesMobile/Features/Workspace/ReviewDiff/ReviewWordDiff.swift:22— ReviewWordDiff.annotate has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 4 (7 pts), boolean chains 6 (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.
ContentView.handleOpenURL (cognitive 23) HermesMobile/ContentView.swift:156— ContentView.handleOpenURL has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (19 pts), match/switch 2 (4 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.
KanbanCompatibilityValidator.validate (cognitive 23) HermesMobile/Models/Kanban.swift:1294— KanbanCompatibilityValidator.validate has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (9 pts), loops 2 (3 pts), ternaries 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BotChatControls.reload (cognitive 23) HermesMobile/Features/Bots/BotChatControls.swift:137— BotChatControls.reload has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 8, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BotConnection.address (cognitive 23) HermesMobile/Features/Bots/BotConnection.swift:60— BotConnection.address has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 10, loops 1, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HermesChatTurnCoordinator.upload (cognitive 23) HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:690— HermesChatTurnCoordinator.upload has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 5, ternaries 1 (2 pts), error handling 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ThinkingSliderLook.drawDataPackets (cognitive 23) HermesMobile/Features/Chat/ThinkingSliderLooks.swift:225— ThinkingSliderLook.drawDataPackets has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 6 (9 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ToolCallGroupSummary.init (cognitive 23) HermesMobile/Features/Chat/ToolCallGroupSummary.swift:27— ToolCallGroupSummary.init has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 2 (4 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KanbanFeatureState.scheduleCoalescedReconciliation (cognitive 23) HermesMobile/Features/Kanban/KanbanFeatureState.swift:2693— KanbanFeatureState.scheduleCoalescedReconciliation has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 4, error handling 2 (4 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.
MoveToHermesSheet.pausedDetails (cognitive 23) HermesMobile/Features/MoveToHermes/MoveToHermesView.swift:376— MoveToHermesSheet.pausedDetails has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 7 (14 pts), boolean chains 4, if/else 4, 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.
TurnFileChangeAggregator.candidates (cognitive 22) HermesMobile/Models/TurnFileChangeSummary.swift:148— TurnFileChangeAggregator.candidates has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Record.draft (cognitive 22) HermesMobile/Persistence/ChatDraftStore.swift:498— Record.draft has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 8, ternaries 3 (4 pts), 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.
PushRegistrar.updatePreferences (cognitive 22) HermesMobile/Push/PushRegistrar.swift:263— PushRegistrar.updatePreferences has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (16 pts), error handling 2 (4 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BotSlashCatalog.skills (cognitive 22) HermesMobile/Features/Bots/BotSlashCommands.swift:24— BotSlashCatalog.skills has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 7, loops 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.
HermexPushSettingsPage.pushSettings (cognitive 22) HermesMobile/Features/Bots/HermexPushSettingsPage.swift:80— HermexPushSettingsPage.pushSettings has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 3 (5 pts), match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatTranscriptView.transcriptScrollContent (cognitive 22) HermesMobile/Features/Chat/ChatTranscriptView.swift:415— ChatTranscriptView.transcriptScrollContent has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8, ternaries 8, boolean chains 6. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
KanbanFeatureState.checkUncertainMutation (cognitive 22) HermesMobile/Features/Kanban/KanbanFeatureState.swift:956— KanbanFeatureState.checkUncertainMutation has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, ternaries 2 (4 pts), match/switch 1 (2 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KanbanFeatureState.performStatusMutation (cognitive 22) HermesMobile/Features/Kanban/KanbanFeatureState.swift:1874— KanbanFeatureState.performStatusMutation has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 6, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SessionListViewModel.createSession (cognitive 22) HermesMobile/Features/SessionList/SessionListViewModel.swift:1515— SessionListViewModel.createSession has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), error handling 2 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskDetailViewModel.followRunNow (cognitive 22) HermesMobile/Features/Tasks/TaskDetailViewModel.swift:444— TaskDetailViewModel.followRunNow has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 2 (3 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AgentRunPalette.init (cognitive 21) HermesLiveActivityWidget/AgentRunLiveActivityWidget.swift:602— AgentRunPalette.init has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 11 (18 pts), if/else 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AgentLiveActivityManager.observePush (cognitive 21) HermesMobile/LiveActivities/AgentLiveActivityManager.swift:1053— AgentLiveActivityManager.observePush has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 6, loops 2, ternaries 1 (nesting depth added 5). Of this number, 19 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClarifyResult.init (cognitive 21) HermesMobile/Models/ClarifyResult.swift:65— ClarifyResult.init has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PushRegistrar.reregisterAllPairings (cognitive 21) HermesMobile/Push/PushRegistrar.swift:368— PushRegistrar.reregisterAllPairings has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BotArtifactReference.path (cognitive 21) HermesMobile/Features/Bots/BotArtifact.swift:28— BotArtifactReference.path has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 14, if/else 5 (7 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.
BotCreateView.body (cognitive 21) HermesMobile/Features/Bots/BotCreateView.swift:20— BotCreateView.body has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12, ternaries 4 (6 pts), boolean chains 3 (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.
BotProfileEditor.save (cognitive 21) HermesMobile/Features/Bots/BotProfileEditor.swift:336— BotProfileEditor.save has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 5, loops 1 (2 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatViewModel.editMessage (cognitive 21) HermesMobile/Features/Chat/ChatViewModel.swift:6108— ChatViewModel.editMessage has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), error handling 2 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HermesChatTurnCoordinator.loadOlderHistory (cognitive 21) HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:1835— HermesChatTurnCoordinator.loadOlderHistory has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 5, error handling 1 (nesting depth added 8). 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.
HermesConversation.reconcile (cognitive 21) HermesMobile/Features/Hermes/HermesConversation.swift:562— HermesConversation.reconcile has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 9, 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.
KanbanFeatureState.dispatcherAvailability (cognitive 21) HermesMobile/Features/Kanban/KanbanFeatureState.swift:551— KanbanFeatureState.dispatcherAvailability has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 13, if/else 8. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
MoveToHermesReconcile.apply::send (cognitive 21) HermesMobile/Features/MoveToHermes/MoveToHermesReconcile.swift:160— MoveToHermesReconcile.apply::send has cognitive complexity 21 (threshold 15). Drivers by points: error handling 10, if/else 4 (5 pts), boolean chains 4, match/switch 2 (nesting depth added 1). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MoveToHermesSheet.review (cognitive 21) HermesMobile/Features/MoveToHermes/MoveToHermesView.swift:223— MoveToHermesSheet.review has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (19 pts), ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ScreenView.bottomControls (cognitive 21) HermesMobile/Features/Screen/ScreenView.swift:292— ScreenView.bottomControls 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.
HermesSessionListView.isQuietSessionListVisible (cognitive 21) HermesMobile/Features/SessionList/HermesSessionListView.swift:428— HermesSessionListView.isQuietSessionListVisible has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 21. 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.
SessionRowContextMenu.body (cognitive 21) HermesMobile/Features/SessionList/SessionListComponents.swift:1369— SessionRowContextMenu.body has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (8 pts), ternaries 3 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PluginsModel.update (cognitive 21) HermesMobile/Features/Settings/PluginsModel.swift:331— PluginsModel.update has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), error handling 2, match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProviderDisclosure.statusLine (cognitive 21) HermesMobile/Features/Settings/ProvidersView.swift:223— ProviderDisclosure.statusLine has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 4 (7 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HermesGitClient.commitSelected (cognitive 21) HermesMobile/Networking/Hermes/HermesGitClient.swift:346— HermesGitClient.commitSelected has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (8 pts), loops 3 (6 pts), error handling 3 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReviewDiffDefaultCollapse.apply (cognitive 21) HermesMobile/Features/Workspace/ReviewDiff/ReviewDiffDefaultCollapse.swift:46— ReviewDiffDefaultCollapse.apply has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 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.
ChatDraftStore.transferDraft (cognitive 20) HermesMobile/Persistence/ChatDraftStore.swift:1054— ChatDraftStore.transferDraft has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), error handling 2 (3 pts), boolean chains 2, ternaries 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.
HermexPushProvisioner.setUp (cognitive 20) HermesMobile/Features/Bots/HermexPushProvisioner.swift:308— HermexPushProvisioner.setUp has cognitive complexity 20 (threshold 15). Drivers by points: error handling 6 (9 pts), if/else 6 (9 pts), match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatViewModel.runHermesSlashCommand (cognitive 20) HermesMobile/Features/Chat/ChatViewModel.swift:4590— ChatViewModel.runHermesSlashCommand has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 3 (6 pts), match/switch 2 (3 pts), boolean chains 1, 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.
HermesChatTurnCoordinator.rewind (cognitive 20) HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:995— HermesChatTurnCoordinator.rewind has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, error handling 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MarkdownMathFormatter.replacingInlineMath (cognitive 20) HermesMobile/Features/Chat/MarkdownMathFormatter.swift:44— MarkdownMathFormatter.replacingInlineMath has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 5, 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.
HermesConversation.attach (cognitive 20) HermesMobile/Features/Hermes/HermesConversation.swift:464— HermesConversation.attach has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, ternaries 2 (4 pts), 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.
InsightsViewModel.loadLimits (cognitive 20) HermesMobile/Features/Insights/InsightsViewModel.swift:275— InsightsViewModel.loadLimits has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 3, error handling 2 (3 pts), loops 3, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KanbanFeatureState.performBulkAction (cognitive 20) HermesMobile/Features/Kanban/KanbanFeatureState.swift:1698— KanbanFeatureState.performBulkAction has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 6, ternaries 1 (3 pts), match/switch 1 (2 pts), error handling 1, 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.
ScreenSession.startIdleTimer (cognitive 20) HermesMobile/Features/Screen/ScreenSession.swift:991— ScreenSession.startIdleTimer has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (10 pts), error handling 2 (5 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SessionListViewModel.refreshActiveSessionStatesIfNeeded (cognitive 20) HermesMobile/Features/SessionList/SessionListViewModel.swift:666— SessionListViewModel.refreshActiveSessionStatesIfNeeded has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 2 (5 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HermesUpdateCallout.checkCard (cognitive 20) HermesMobile/Features/Settings/HermesUpdateCallout.swift:104— HermesUpdateCallout.checkCard has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 2 (6 pts), match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
FileTreeSearch.splitWords (cognitive 20) HermesMobile/Features/Workspace/FileTree.swift:187— FileTreeSearch.splitWords has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 5, ternaries 1 (3 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.
BotAttachmentUpload.prepare (cognitive 20) HermesMobile/Networking/Bots/BotAttachmentUpload.swift:33— BotAttachmentUpload.prepare has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (8 pts), boolean chains 7, if/else 3 (5 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.
ReviewWordDiff.diff (cognitive 20) HermesMobile/Features/Workspace/ReviewDiff/ReviewWordDiff.swift:196— ReviewWordDiff.diff has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 5 (8 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.
AuthManager.commitMove (cognitive 19) HermesMobile/Auth/AuthManager+MoveToHermes.swift:46— AuthManager.commitMove has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 2 (3 pts), boolean chains 2, ternaries 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.
MemoryCanonicalizer.canonical (cognitive 19) HermesMobile/Models/Memory.swift:154— MemoryCanonicalizer.canonical has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, loops 2, match/switch 1 (2 pts) (nesting depth added 6). Of this number, 15 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.
ToolCallGroup.uniqueToolCalls (cognitive 19) HermesMobile/Models/ToolCall.swift:415— ToolCallGroup.uniqueToolCalls has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), ternaries 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BotCreator.createProfile (cognitive 19) HermesMobile/Features/Bots/BotCreator.swift:236— BotCreator.createProfile has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 2, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BotApprovalRequest.init (cognitive 19) HermesMobile/Features/Bots/BotPendingRequest.swift:116— BotApprovalRequest.init has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BotProfileEditor.load (cognitive 19) HermesMobile/Features/Bots/BotProfileEditor.swift:142— BotProfileEditor.load has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, error handling 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BotPromptMode.outcome (cognitive 19) HermesMobile/Features/Bots/BotPromptMode.swift:47— BotPromptMode.outcome has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 4, match/switch 2 (3 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.
ChatMessageActionMenu.items (cognitive 19) HermesMobile/Features/Chat/ChatMessageActions.swift:81— ChatMessageActionMenu.items has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 5, ternaries 2 (4 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.
ChatViewModel.confirmFileChipReferences (cognitive 19) HermesMobile/Features/Chat/ChatViewModel.swift:5276— ChatViewModel.confirmFileChipReferences has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (4 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.
ComposerVoiceInputController.finishServerRecording (cognitive 19) HermesMobile/Features/Chat/ComposerVoiceInputController.swift:497— ComposerVoiceInputController.finishServerRecording has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, error handling 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HermesChatTurnCoordinator.compress (cognitive 19) HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:1100— HermesChatTurnCoordinator.compress has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 2 (3 pts), boolean chains 2, ternaries 1 (2 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MarkdownDiffFormatter.parse (cognitive 19) HermesMobile/Features/Chat/MarkdownDiffCodeBlock.swift:113— MarkdownDiffFormatter.parse has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 2 (6 pts), match/switch 2 (5 pts), if/else 3 (4 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TranscriptMediaParser.appendMediaSegments (cognitive 19) HermesMobile/Features/Chat/TranscriptMedia.swift:273— TranscriptMediaParser.appendMediaSegments has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 4 (8 pts), loops 1 (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ProviderLimitCard.init (cognitive 19) HermesMobile/Features/Insights/InsightsModels.swift:389— ProviderLimitCard.init has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 6, ternaries 2 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
KanbanCardEditorState.intendedValuesAppear (cognitive 19) HermesMobile/Features/Kanban/KanbanCardEditorState.swift:410— KanbanCardEditorState.intendedValuesAppear has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 18, match/switch 1. 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.
SessionListView.isQuietSessionListVisible (cognitive 19) HermesMobile/Features/SessionList/SessionListView.swift:490— SessionListView.isQuietSessionListVisible has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 18, if/else 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
SessionListViewModel.searchHermes (cognitive 19) HermesMobile/Features/SessionList/SessionListViewModel.swift:2460— SessionListViewModel.searchHermes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GitWorkspaceAvailabilityViewModel.checkout (cognitive 19) HermesMobile/Features/Workspace/GitWorkspaceViewModel.swift:351— GitWorkspaceAvailabilityViewModel.checkout has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 2 (4 pts), boolean chains 2, error handling 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BotArtifactDownload.data (cognitive 19) HermesMobile/Networking/Bots/BotArtifactDownload.swift:32— BotArtifactDownload.data has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, ternaries 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HermesConnection.upgrade (cognitive 19) HermesMobile/Networking/Hermes/HermesConnection.swift:556— HermesConnection.upgrade has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 2, error handling 1 (nesting depth added 9). Of this number, 11 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HermesGateway.consume (cognitive 19) HermesMobile/Networking/Hermes/HermesGateway.swift:498— HermesGateway.consume has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
LeftoverLiveActivitySettlement.actions (cognitive 18) HermesMobile/LiveActivities/AgentLiveActivityManager.swift:1357— LeftoverLiveActivitySettlement.actions has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 6, ternaries 3 (4 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.
CacheStore.cacheHermesSessions (cognitive 18) HermesMobile/Persistence/CacheStore+Hermes.swift:77— CacheStore.cacheHermesSessions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BotProfileAppearance.merging (cognitive 18) HermesMobile/Features/Bots/BotProfileAppearance.swift:41— BotProfileAppearance.merging has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (16 pts), loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
BotRoomAction.init (cognitive 18) HermesMobile/Features/Bots/BotRoomAction.swift:28— BotRoomAction.init has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (8 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
MessageComposerView.body (cognitive 18) HermesMobile/Features/Chat/ChatComposerView.swift:854— MessageComposerView.body has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (16 pts), match/switch 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ChatViewModel.loadOlderMessages (cognitive 18) HermesMobile/Features/Chat/ChatViewModel.swift:2415— ChatViewModel.loadOlderMessages has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 2 (4 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatViewModel.retryLastTurnFromSlashCommand (cognitive 18) HermesMobile/Features/Chat/ChatViewModel.swift:5670— ChatViewModel.retryLastTurnFromSlashCommand has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (17 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatViewModel.regenerateAssistantResponse (cognitive 18) HermesMobile/Features/Chat/ChatViewModel.swift:6225— ChatViewModel.regenerateAssistantResponse has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), error handling 2 (5 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatViewModel.toggleListening (cognitive 18) HermesMobile/Features/Chat/ChatViewModel.swift:6642— ChatViewModel.toggleListening has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 7 (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.
InlineMathTextRequest.parsed (cognitive 18) HermesMobile/Features/Chat/DisplayMathView.swift:475— InlineMathTextRequest.parsed has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (7 pts), loops 1, ternaries 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
HermesChatTurnCoordinator.applyInfo (cognitive 18) HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:1506— HermesChatTurnCoordinator.applyInfo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
KanbanCardDetailState.submitComment (cognitive 18) HermesMobile/Features/Kanban/KanbanCardDetailState.swift:98— KanbanCardDetailState.submitComment has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KanbanCardEditorState.validate (cognitive 18) HermesMobile/Features/Kanban/KanbanCardEditorState.swift:279— KanbanCardEditorState.validate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 6 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KanbanFeatureState.bulkActionsAvailability (cognitive 18) HermesMobile/Features/Kanban/KanbanFeatureState.swift:605— KanbanFeatureState.bulkActionsAvailability has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 8. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
KanbanFeatureState.performDispatch (cognitive 18) HermesMobile/Features/Kanban/KanbanFeatureState.swift:1362— KanbanFeatureState.performDispatch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 1, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KanbanFeatureState.pollEvents (cognitive 18) HermesMobile/Features/Kanban/KanbanFeatureState.swift:2773— KanbanFeatureState.pollEvents has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, error handling 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.
MoveToHermesModel.scan (cognitive 18) HermesMobile/Features/MoveToHermes/MoveToHermesModel.swift:275— MoveToHermesModel.scan has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), error handling 2, match/switch 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
MoveToHermesRunner.reconcile (cognitive 18) HermesMobile/Features/MoveToHermes/MoveToHermesRunner.swift:645— MoveToHermesRunner.reconcile has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, loops 2 (3 pts), error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
SessionListViewModel.loadMoreHermesScheduledSessions (cognitive 18) HermesMobile/Features/SessionList/SessionListViewModel.swift:1905— SessionListViewModel.loadMoreHermesScheduledSessions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 6, loops 1 (2 pts), error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SessionListViewModel.readHermesPages (cognitive 18) HermesMobile/Features/SessionList/SessionListViewModel.swift:2018— SessionListViewModel.readHermesPages has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SessionRowView.supplementalArea (cognitive 18) HermesMobile/Features/SessionList/SessionRowView.swift:292— SessionRowView.supplementalArea has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (18 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.
FileBrowserViewModel.loadRoot (cognitive 18) HermesMobile/Features/Workspace/FileBrowserViewModel.swift:157— FileBrowserViewModel.loadRoot has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 1 (3 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KanbanWebSocketEventClient.open (cognitive 18) HermesMobile/Networking/Hermes/HermesKanbanClient.swift:372— KanbanWebSocketEventClient.open has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 2 (3 pts), loops 2 (3 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.
AppLockSceneDelegate.update (cognitive 17) HermesMobile/Auth/AppLockWindow.swift:87— AppLockSceneDelegate.update has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 5 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AgentRunActivitySanitizer.toolKind (cognitive 17) HermesMobile/LiveActivities/AgentRunActivityAttributes.swift:362— AgentRunActivitySanitizer.toolKind has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 14, if/else 3. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
APIError.errorDescription (cognitive 17) HermesMobile/Networking/APIError.swift:10— APIError.errorDescription has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 2 (3 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
BotWidgetPublisher.renderAvatars (cognitive 17) HermesMobile/Widgets/BotWidgetPublisher.swift:58— BotWidgetPublisher.renderAvatars has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BotsInboxView.attachPresentations (cognitive 17) HermesMobile/Features/Bots/BotsInboxView.swift:678— BotsInboxView.attachPresentations has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 2, match/switch 1, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Coordinator.syncFocus (cognitive 17) HermesMobile/Features/Chat/ChatComposerTextInputView.swift:535— Coordinator.syncFocus has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 7 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ChatView.chatLifecycle (cognitive 17) HermesMobile/Features/Chat/ChatView.swift:1173— ChatView.chatLifecycle has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ChatView.hydrateDraftIfNeeded (cognitive 17) HermesMobile/Features/Chat/ChatView.swift:3459— ChatView.hydrateDraftIfNeeded has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ChatView.restoreDraftAttachments (cognitive 17) HermesMobile/Features/Chat/ChatView.swift:3518— ChatView.restoreDraftAttachments has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 1 (3 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatViewModel.switchProfile (cognitive 17) HermesMobile/Features/Chat/ChatViewModel.swift:1672— ChatViewModel.switchProfile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatViewModel.steerResponseFromSlashCommand (cognitive 17) HermesMobile/Features/Chat/ChatViewModel.swift:4261— ChatViewModel.steerResponseFromSlashCommand has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 1 (2 pts), ternaries 1 (2 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HermesChatRequests.setApprovalMode (cognitive 17) HermesMobile/Features/Chat/HermesChatRequests.swift:289— HermesChatRequests.setApprovalMode has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 7, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StreamingMarkdownBlockSplitter.split (cognitive 17) HermesMobile/Features/Chat/StreamingMarkdownSupport.swift:20— StreamingMarkdownBlockSplitter.split has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HermesConversation.identify (cognitive 17) HermesMobile/Features/Hermes/HermesConversation.swift:518— HermesConversation.identify has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 6, match/switch 1 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
KanbanFeatureState.mutatePrerequisite (cognitive 17) HermesMobile/Features/Kanban/KanbanFeatureState.swift:2014— KanbanFeatureState.mutatePrerequisite has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 5, ternaries 2 (3 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OnboardingViewModel.connect (cognitive 17) HermesMobile/Features/Onboarding/OnboardingViewModel.swift:442— OnboardingViewModel.connect has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, match/switch 2 (3 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ScreenView.toolbar (cognitive 17) HermesMobile/Features/Screen/ScreenView.swift:67— ScreenView.toolbar has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 4, ternaries 2 (4 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
HermesSessionListView.regularWidthDetail (cognitive 17) HermesMobile/Features/SessionList/HermesSessionListView.swift:525— HermesSessionListView.regularWidthDetail has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
SessionProjectMoveMenu.body (cognitive 17) HermesMobile/Features/SessionList/SessionListComponents.swift:1511— SessionProjectMoveMenu.body has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (6 pts), ternaries 3 (6 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SessionListViewModel.refreshAttentionStates (cognitive 17) HermesMobile/Features/SessionList/SessionListViewModel.swift:803— SessionListViewModel.refreshAttentionStates has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 2 (4 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArchivedSessionsViewModel.loadMore (cognitive 17) HermesMobile/Features/Settings/ArchivedSessionsViewModel.swift:178— ArchivedSessionsViewModel.loadMore has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 4 (7 pts), loops 1 (2 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebuiServerSettingsModel.waitForServerToReturn (cognitive 17) HermesMobile/Features/Settings/WebuiServerSettingsModel.swift:204— WebuiServerSettingsModel.waitForServerToReturn has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DiffHunk.parse (cognitive 17) HermesMobile/Features/Workspace/GitDiffView.swift:440— DiffHunk.parse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 1 (2 pts), 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.
HermesPluginStakes.warning (cognitive 17) HermesMobile/Networking/Hermes/HermesPluginsClient.swift:247— HermesPluginStakes.warning has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 3 (5 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HermesProjectTree.init (cognitive 17) HermesMobile/Networking/Hermes/HermesProjects.swift:17— HermesProjectTree.init has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (6 pts), if/else 3 (5 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SourceHighlighter.runsByLine (cognitive 17) HermesMobile/Features/Workspace/SourceViewer/SourceHighlighter.swift:69— SourceHighlighter.runsByLine has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (5 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MessageAttachment.hermesReferences (cognitive 16) HermesMobile/Models/MessageAttachment.swift:175— MessageAttachment.hermesReferences has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 6 (7 pts), loops 2 (nesting depth added 1). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CachedMessage.matches (cognitive 16) HermesMobile/Persistence/CachedMessage.swift:91— CachedMessage.matches has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 16. 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.
BotHistoryCache.search (cognitive 16) HermesMobile/Features/Bots/BotHistoryCache.swift:102— BotHistoryCache.search has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), ternaries 2 (6 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BotInbox.configure (cognitive 16) HermesMobile/Features/Bots/BotInbox.swift:609— BotInbox.configure has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 2 (5 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.
BotRoomList.read (cognitive 16) HermesMobile/Features/Bots/BotRoomCreator.swift:158— BotRoomList.read has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HermexPushProvisioner.disable (cognitive 16) HermesMobile/Features/Bots/HermexPushProvisioner.swift:399— HermexPushProvisioner.disable has cognitive complexity 16 (threshold 15). Drivers by points: error handling 3 (7 pts), if/else 3 (7 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MessageComposerView.composerStatus (cognitive 16) HermesMobile/Features/Chat/ChatComposerView.swift:1533— MessageComposerView.composerStatus has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, boolean chains 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.
ChatStreamCoordinator.recoverStaleStreamIfNeeded (cognitive 16) HermesMobile/Features/Chat/ChatStreamCoordinator.swift:701— ChatStreamCoordinator.recoverStaleStreamIfNeeded has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 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.
ComposerChipTextView.canPerformAction (cognitive 16) HermesMobile/Features/Chat/ComposerChipTextView.swift:671— ComposerChipTextView.canPerformAction has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 8. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ComposerVoiceInputController.fallbackFromServerFailure (cognitive 16) HermesMobile/Features/Chat/ComposerVoiceInputController.swift:592— ComposerVoiceInputController.fallbackFromServerFailure has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HermesChatTurnCoordinator.undo (cognitive 16) HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:1053— HermesChatTurnCoordinator.undo has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HermesChatTurnCoordinator.complete (cognitive 16) HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:1535— HermesChatTurnCoordinator.complete has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
HermesSlashReply.init (cognitive 16) HermesMobile/Features/Chat/HermesSlashCommands.swift:131— HermesSlashReply.init has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 2 (4 pts), match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ResponseSelectionRenderer.draw (cognitive 16) HermesMobile/Features/Chat/ResponseTextSelection.swift:283— ResponseSelectionRenderer.draw has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 7). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HermesConversation.scheduleReconnect (cognitive 16) HermesMobile/Features/Hermes/HermesConversation.swift:672— HermesConversation.scheduleReconnect has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 6, error handling 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KanbanCardDetailState.checkPendingCommentOutcome (cognitive 16) HermesMobile/Features/Kanban/KanbanCardDetailState.swift:204— KanbanCardDetailState.checkPendingCommentOutcome has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 1, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KanbanFeatureState.undoArchive (cognitive 16) HermesMobile/Features/Kanban/KanbanFeatureState.swift:881— KanbanFeatureState.undoArchive has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KanbanFeatureState.handleStreamFrame (cognitive 16) HermesMobile/Features/Kanban/KanbanFeatureState.swift:2617— KanbanFeatureState.handleStreamFrame has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebuiSessionTransfer.importMessage (cognitive 16) HermesMobile/Features/MoveToHermes/WebuiSessionTransfer.swift:173— WebuiSessionTransfer.importMessage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HermesSessionListView.sessionRows (cognitive 16) HermesMobile/Features/SessionList/HermesSessionListView.swift:159— HermesSessionListView.sessionRows has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6, ternaries 4 (6 pts), boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
HermesSessionListView.openPendingLink (cognitive 16) HermesMobile/Features/SessionList/HermesSessionListView.swift:885— HermesSessionListView.openPendingLink has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, error handling 1, 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.
SessionListViewModel.rename (cognitive 16) HermesMobile/Features/SessionList/SessionListViewModel.swift:1163— SessionListViewModel.rename has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SessionListViewModel.duplicate (cognitive 16) HermesMobile/Features/SessionList/SessionListViewModel.swift:1217— SessionListViewModel.duplicate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 2 (5 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SessionListViewModel.changeHermesSession (cognitive 16) HermesMobile/Features/SessionList/SessionListViewModel.swift:2562— SessionListViewModel.changeHermesSession has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 4, ternaries 2 (4 pts), error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DefaultProfilePickerView.profileRow (cognitive 16) HermesMobile/Features/Settings/DefaultProfilePickerView.swift:167— DefaultProfilePickerView.profileRow has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (8 pts), if/else 6, boolean chains 2 (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.
PluginsModel.install (cognitive 16) HermesMobile/Features/Settings/PluginsModel.swift:282— PluginsModel.install has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 2 (5 pts), error handling 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PluginsModel.apply (cognitive 16) HermesMobile/Features/Settings/PluginsModel.swift:455— PluginsModel.apply has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), error handling 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.
PluginsModel.read (cognitive 16) HermesMobile/Features/Settings/PluginsModel.swift:519— PluginsModel.read has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 1, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CronJobEditorSheet.body (cognitive 16) HermesMobile/Features/Tasks/CronJobEditorSheet.swift:82— CronJobEditorSheet.body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 2, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HermesGateway.open (cognitive 16) HermesMobile/Networking/Hermes/HermesGateway.swift:359— HermesGateway.open has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 2, loops 1 (2 pts), 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.
HermesGitClient.checkout (cognitive 16) HermesMobile/Networking/Hermes/HermesGitClient.swift:493— HermesGitClient.checkout has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, ternaries 2 (3 pts) (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.
check_string_catalog.extracted_keys (cognitive 16) ci/check_string_catalog.py:31— check_string_catalog.extracted_keys has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 3 (6 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.
Change-coupling hub: ChatView.swift → ChatAttachmentCoordinator.swift, HermesConversation.swift, HermesMobileApp.swift, HermesGateway.swift HermesMobile/Features/Chat/ChatView.swift— `HermesMobile/Features/Chat/ChatView.swift` changes together with 4 other files — `HermesMobile/Features/Chat/ChatAttachmentCoordinator.swift`, `HermesMobile/Features/Hermes/HermesConversation.swift`, `HermesMobile/HermesMobileApp.swift`, `HermesMobile/Networking/Hermes/HermesGateway.swift` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
D4 · Code Duplication· Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (7 members, 50+ identical tokens) HermesMobile/Features/Settings/DefaultProfilePickerView.swift:167— HermesMobile/Features/Settings/DefaultProfilePickerView.swift:167-226 | HermesMobile/Features/Shared/ModelPickerSheet.swift:170-197 | HermesMobile/Features/Shared/ModelPickerSheet.swift:465-524 | HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:260-286 | HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:324-373 | HermesMobile/Features/Tasks/CronJobSkillsPicker.swift:159-184 | HermesMobile/Features/Tasks/CronJobSkillsPicker.swift:262-301 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' 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 7 times.
D4 · Code Duplication· Edited copy of a member (97 corresponding lines) · ×1
Edited copy of a member (97 corresponding lines) HermesMobile/Features/Chat/ChatViewModel.swift:6108— HermesMobile/Features/Chat/ChatViewModel.swift:6108-6223 | HermesMobile/Features/Chat/ChatViewModel.swift:6225-6321 — These two members are one piece of code written twice and then edited apart: 97 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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) HermesMobile/Features/Chat/TranscriptMediaView.swift:739— HermesMobile/Features/Chat/TranscriptMediaView.swift:739-852 | HermesMobile/Features/Workspace/FilePreviewView.swift:65-175 — 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 (25 corresponding lines) · ×1
Edited copy of a member (25 corresponding lines) HermesMobile/Features/Bots/BotCreateView.swift:164— HermesMobile/Features/Bots/BotCreateView.swift:164-188 | HermesMobile/Features/Bots/BotProfileEditorView.swift:207-235 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (40 corresponding lines) · ×1
Edited copy of a member (40 corresponding lines) HermesMobile/Features/Chat/ChatViewModel.swift:4437— HermesMobile/Features/Chat/ChatViewModel.swift:4437-4483 | HermesMobile/Features/Chat/ChatViewModel.swift:4485-4524 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (49 corresponding lines) · ×1
Edited copy of a member (49 corresponding lines) HermesMobile/Features/Chat/ChatViewModel.swift:7622— HermesMobile/Features/Chat/ChatViewModel.swift:7622-7670 | HermesMobile/Features/Chat/ChatViewModel.swift:7672-7724 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (42 corresponding lines) · ×1
Edited copy of a member (42 corresponding lines) HermesMobile/Features/Chat/ChatViewModel.swift:4700— HermesMobile/Features/Chat/ChatViewModel.swift:4700-4745 | HermesMobile/Features/Chat/ChatViewModel.swift:4763-4804 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×1
Edited copy of a member (27 corresponding lines) HermesMobile/Features/Chat/HermesChatRequests.swift:289— HermesMobile/Features/Chat/HermesChatRequests.swift:289-315 | HermesMobile/Features/Chat/HermesChatRequests.swift:445-478 — 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 (43 corresponding lines) · ×1
Edited copy of a member (43 corresponding lines) HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:190— HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:190-232 | HermesMobile/Features/Tasks/CronJobSkillsPicker.swift:83-129 — 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 (26 corresponding lines) · ×1
Edited copy of a member (26 corresponding lines) HermesMobile/Features/Settings/PluginsModel.swift:426— HermesMobile/Features/Settings/PluginsModel.swift:426-451 | HermesMobile/Features/Settings/PluginsModel.swift:455-483 — 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 (36 corresponding lines) · ×1
Edited copy of a member (36 corresponding lines) HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:113— HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:113-148 | HermesMobile/Features/Tasks/CronJobSkillsPicker.swift:17-53 — 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 (57 corresponding lines) · ×1
Edited copy of a member (57 corresponding lines) HermesMobile/Features/Chat/ChatViewModel.swift:1314— HermesMobile/Features/Chat/ChatViewModel.swift:1314-1371 | HermesMobile/Features/Chat/ChatViewModel.swift:1527-1583 — These two members are one piece of code written twice and then edited apart: 57 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (38 corresponding lines) · ×1
Edited copy of a member (38 corresponding lines) HermesMobile/Persistence/CacheStore.swift:350— HermesMobile/Persistence/CacheStore.swift:350-387 | HermesMobile/Persistence/CachedSession.swift:73-111 — 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 copies of one member (3 members, 18+ corresponding lines) · ×1
Edited copies of one member (3 members, 18+ corresponding lines) HermesMobile/Features/Bots/BotSearchView.swift:213— HermesMobile/Features/Bots/BotSearchView.swift:213-234 | HermesMobile/Features/Bots/BotSearchView.swift:236-253 | HermesMobile/Features/Bots/BotSearchView.swift:281-301 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 40+ corresponding lines) · ×1
Edited copies of one member (3 members, 40+ corresponding lines) HermesMobile/Features/SessionList/SessionListViewModel.swift:1343— HermesMobile/Features/SessionList/SessionListViewModel.swift:1343-1393 | HermesMobile/Features/SessionList/SessionListViewModel.swift:1400-1439 | HermesMobile/Features/SessionList/SessionListViewModel.swift:1469-1509 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 40 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 (21 corresponding lines) · ×1
Edited copy of a member (21 corresponding lines) HermesMobile/Features/Workspace/FileExportSupport.swift:39— HermesMobile/Features/Workspace/FileExportSupport.swift:39-59 | HermesMobile/Features/Workspace/FileExportSupport.swift:61-84 — 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 (24 corresponding lines) · ×1
Edited copy of a member (24 corresponding lines) HermesMobile/Features/Chat/MarkdownMathFormatter+Support.swift:169— HermesMobile/Features/Chat/MarkdownMathFormatter+Support.swift:169-192 | HermesMobile/Features/Chat/MarkdownMathFormatter+Support.swift:194-219 — 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 copies of one member (4 members, 19+ corresponding lines) · ×1
Edited copies of one member (4 members, 19+ corresponding lines) HermesMobile/Models/ChatMessage.swift:268— HermesMobile/Models/ChatMessage.swift:268-289 | HermesMobile/Models/Session.swift:407-425 | HermesMobile/Models/Session.swift:926-944 | HermesMobile/Models/Session.swift:946-964 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 19+ corresponding lines) · ×1
Edited copies of one member (3 members, 19+ corresponding lines) HermesMobile/Features/Settings/DefaultProfilePickerView.swift:97— HermesMobile/Features/Settings/DefaultProfilePickerView.swift:97-115 | HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:238-258 | HermesMobile/Features/Tasks/CronJobSkillsPicker.swift:135-155 — 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 copies of one member (3 members, 15+ corresponding lines) · ×1
Edited copies of one member (3 members, 15+ corresponding lines) HermesMobile/Features/Settings/APIKeysModel.swift:46— HermesMobile/Features/Settings/APIKeysModel.swift:46-64 | HermesMobile/Features/Settings/ConnectedAppsModel.swift:70-88 | HermesMobile/Features/Settings/PluginsModel.swift:169-183 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (7 members, 9+ corresponding lines) · ×1
Edited copies of one member (7 members, 9+ corresponding lines) HermesMobile/Networking/Bots/BotClient.swift:122— HermesMobile/Networking/Bots/BotClient.swift:122-131 | HermesMobile/Networking/Bots/BotClient.swift:174-182 | HermesMobile/Networking/Bots/BotClient.swift:184-192 | HermesMobile/Networking/Bots/BotClient.swift:194-204 | HermesMobile/Networking/Bots/BotClient.swift:206-214 | HermesMobile/Networking/Bots/BotClient.swift:216-224 | HermesMobile/Networking/Bots/BotClient.swift:322-330 — These 7 members are one piece of code written 7 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 7 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) HermesMobile/LiveActivities/AgentRunActivityAttributes.swift:452— HermesMobile/LiveActivities/AgentRunActivityAttributes.swift:452-469 | HermesMobile/LiveActivities/AgentRunActivityAttributes.swift:504-520 | HermesMobile/LiveActivities/AgentRunActivityAttributes.swift:576-592 — 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 copies of one member (3 members, 12+ corresponding lines) · ×1
Edited copies of one member (3 members, 12+ corresponding lines) HermesMobile/Features/Chat/ChatAttachmentPreviewView.swift:31— HermesMobile/Features/Chat/ChatAttachmentPreviewView.swift:31-44 | HermesMobile/Features/Chat/MessageBubbleView.swift:575-586 | HermesMobile/Features/Chat/MessageBubbleView.swift:892-905 — 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 (3 members, 9+ corresponding lines) · ×1
Edited copies of one member (3 members, 9+ corresponding lines) HermesMobile/Features/Insights/InsightsModels.swift:131— HermesMobile/Features/Insights/InsightsModels.swift:131-139 | HermesMobile/Models/ContextWindowSnapshot.swift:40-49 | HermesMobile/Models/CronRunHistory.swift:161-170 — 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, 21+ corresponding lines) · ×1
Edited copies of one member (3 members, 21+ corresponding lines) HermesMobile/Networking/APIClient+Chat.swift:126— HermesMobile/Networking/APIClient+Chat.swift:126-146 | HermesMobile/Networking/APIClient+Cron.swift:151-177 | HermesMobile/Networking/APIClient+ServerPanels.swift:87-107 — 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 (3 members, 8+ corresponding lines) · ×1
Edited copies of one member (3 members, 8+ corresponding lines) HermesMobile/Models/Approval.swift:346— HermesMobile/Models/Approval.swift:346-354 | HermesMobile/Models/Clarification.swift:187-195 | HermesMobile/Models/Kanban.swift:823-830 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 5+ corresponding lines) · ×1
Edited copies of one member (3 members, 5+ corresponding lines) HermesMobile/Features/Chat/HermesDelegatedWork.swift:105— HermesMobile/Features/Chat/HermesDelegatedWork.swift:105-109 | HermesMobile/Models/ServerCatalog.swift:941-945 | HermesMobile/Models/TurnFileChangeSummary.swift:209-213 — 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, 6+ corresponding lines) · ×1
Edited copies of one member (3 members, 6+ corresponding lines) HermesMobile/Features/Chat/ChatTranscriptSupportingViews.swift:1451— HermesMobile/Features/Chat/ChatTranscriptSupportingViews.swift:1451-1456 | HermesMobile/Features/MoveToHermes/MoveToHermesReconcile.swift:411-419 | HermesMobile/Models/Memory.swift:209-216 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 7+ corresponding lines) · ×1
Edited copies of one member (6 members, 7+ corresponding lines) HermesMobile/Features/Chat/ChatViewModel.swift:8034— HermesMobile/Features/Chat/ChatViewModel.swift:8034-8040 | HermesMobile/Features/SessionList/SessionListComponents.swift:1995-2001 | HermesMobile/Features/Skills/SkillsView.swift:272-278 | HermesMobile/Features/Skills/SkillsViewModel.swift:107-113 | HermesMobile/Features/Workspace/FilePreviewView.swift:385-391 | HermesMobile/Models/ToolCall.swift:37-43 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 3+ corresponding lines) · ×1
Edited copies of one member (6 members, 3+ corresponding lines) HermesMobile/Networking/Bots/BotDashboardClient.swift:13— HermesMobile/Networking/Bots/BotDashboardClient.swift:13-15 | HermesMobile/Networking/Hermes/HermesConnectedAppsClient.swift:119-121 | HermesMobile/Networking/Hermes/HermesCronClient.swift:16-18 | HermesMobile/Networking/Hermes/HermesEnvironmentClient.swift:109-111 | HermesMobile/Networking/Hermes/HermesPluginsClient.swift:289-291 | HermesMobile/Networking/Hermes/HermesUpdateClient.swift:13-15 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
Duplicated block (47–50 lines × 2) HermesMobile/Features/Chat/ChatViewModel.swift:6151— HermesMobile/Features/Chat/ChatViewModel.swift:6151-6200 | HermesMobile/Features/Chat/ChatViewModel.swift:6262-6308 — both copies are in the same file, so extract the 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 `HermesMobile/Features/Chat/ChatViewModel.swift:6151` 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, `HermesMobile/Features/Chat/ChatViewModel.swift:6259` calls `stopListening` and `HermesMobile/Features/Chat/ChatViewModel.swift:6148` 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 (29 lines × 2) HermesMobile/Features/Chat/TranscriptMediaView.swift:396— HermesMobile/Features/Chat/TranscriptMediaView.swift:396-424 | HermesMobile/Features/Chat/TranscriptMediaView.swift:521-549 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `HermesMobile/Features/Chat/TranscriptMediaView.swift:396` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21 lines × 2) HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:266— HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:266-286 | HermesMobile/Features/Tasks/CronJobSkillsPicker.swift:164-184 — before extracting anything, compare `HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift` and `HermesMobile/Features/Tasks/CronJobSkillsPicker.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 99 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 `HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:266` 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–19 lines × 2) HermesMobile/Features/Chat/ApprovalRequestInset.swift:71— HermesMobile/Features/Chat/ApprovalRequestInset.swift:71-88 | HermesMobile/Features/Chat/ClarificationRequestCard.swift:565-583 — 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 `HermesMobile/Features/Chat/ApprovalRequestInset.swift:71` 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 × 4) HermesMobile/Features/Settings/APIKeysView.swift:54— HermesMobile/Features/Settings/APIKeysView.swift:54-71 | HermesMobile/Features/Settings/ConnectedAppsView.swift:44-61 | HermesMobile/Features/Settings/HermesDefaultModelView.swift:235-252 | HermesMobile/Features/Settings/PluginsView.swift:133-150 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `HermesMobile/Features/Settings/APIKeysView.swift:54` 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, `HermesMobile/Features/Settings/HermesDefaultModelView.swift:231` calls `sheet` and `HermesMobile/Features/Settings/PluginsView.swift:129` 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–16 lines × 2) HermesMobile/Features/Bots/BotArtifactPreview.swift:122— HermesMobile/Features/Bots/BotArtifactPreview.swift:122-137 | HermesMobile/Features/Chat/TranscriptHTMLReportView.swift:67-77 — 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 `HermesMobile/Features/Bots/BotArtifactPreview.swift:122` 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 × 4) HermesMobile/Features/SessionList/SessionListViewModel.swift:2901— HermesMobile/Features/SessionList/SessionListViewModel.swift:2901-2914 | HermesMobile/Features/Settings/ArchivedSessionsViewModel.swift:389-402 | HermesMobile/Features/Settings/DefaultProfilePickerView.swift:293-306 | HermesMobile/Features/Workspace/FileBrowserViewModel.swift:363-376 — 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. 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 × 3) HermesMobile/Features/Workspace/GitCommitView.swift:305— HermesMobile/Features/Workspace/GitCommitView.swift:305-317 | HermesMobile/Features/Workspace/GitDiffFileJumpList.swift:81-93 | HermesMobile/Features/Workspace/GitWorkspaceView.swift:353-365 — 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 (12–13 lines × 2) HermesMobile/Features/Settings/DefaultProfilePickerView.swift:97— HermesMobile/Features/Settings/DefaultProfilePickerView.swift:97-109 | HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:238-249 — 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 `HermesMobile/Features/Settings/DefaultProfilePickerView.swift:97` 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, `HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:249` calls `Text`, `Button` and `HermesMobile/Features/Settings/DefaultProfilePickerView.swift:109` 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–12 lines × 2) HermesMobile/Features/SessionList/HermesSessionListView.swift:1043— HermesMobile/Features/SessionList/HermesSessionListView.swift:1043-1050 | HermesMobile/Features/SessionList/SessionListView.swift:1342-1353 — 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 `HermesMobile/Features/SessionList/HermesSessionListView.swift:1043` 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 (11 lines × 4) HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:272— HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:272-282 | HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:357-367 | HermesMobile/Features/Tasks/CronJobSkillsPicker.swift:170-180 | HermesMobile/Features/Tasks/CronJobSkillsPicker.swift:285-295 — before extracting anything, compare `HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift` and `HermesMobile/Features/Tasks/CronJobSkillsPicker.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 99 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 `HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:272` 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–11 lines × 3) HermesMobile/Features/Chat/ChatViewModel.swift:5888— HermesMobile/Features/Chat/ChatViewModel.swift:5888-5898 | HermesMobile/Features/Chat/ChatViewModel.swift:7071-7081 | HermesMobile/Features/Chat/ChatViewModel.swift:7557-7566 — 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 `HermesMobile/Features/Chat/ChatViewModel.swift:5888` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 3) HermesMobile/Features/Settings/DefaultProfilePickerView.swift:54— HermesMobile/Features/Settings/DefaultProfilePickerView.swift:54-64 | HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:208-218 | HermesMobile/Features/Tasks/CronJobSkillsPicker.swift:105-115 — 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 `HermesMobile/Features/Settings/DefaultProfilePickerView.swift:54` 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, `HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:206` calls `listRowSeparator` and `HermesMobile/Features/Settings/DefaultProfilePickerView.swift:52` 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 × 7) HermesMobile/Features/Settings/DefaultProfilePickerView.swift:212— HermesMobile/Features/Settings/DefaultProfilePickerView.swift:212-220 | HermesMobile/Features/Shared/ModelPickerSheet.swift:185-193 | HermesMobile/Features/Shared/ModelPickerSheet.swift:498-506 | HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:275-283 | HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:360-368 | HermesMobile/Features/Tasks/CronJobSkillsPicker.swift:173-181 | HermesMobile/Features/Tasks/CronJobSkillsPicker.swift:288-296 — there are 7 copies across 4 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 7 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `HermesMobile/Features/Settings/DefaultProfilePickerView.swift:212` 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, `HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:370` calls `disabled`, `accessibilityLabel`, `details` and `HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:285` 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–9 lines × 2) HermesMobile/Features/Settings/APIKeysModel.swift:46— HermesMobile/Features/Settings/APIKeysModel.swift:46-54 | HermesMobile/Features/Settings/PluginsModel.swift:169-176 — 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 `HermesMobile/Features/Settings/APIKeysModel.swift:46` 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 × 3) HermesMobile/Features/SessionList/SessionListViewModel.swift:1097— HermesMobile/Features/SessionList/SessionListViewModel.swift:1097-1104 | HermesMobile/Features/SessionList/SessionListViewModel.swift:1119-1126 | HermesMobile/Features/SessionList/SessionListViewModel.swift:1138-1145 — 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 `HermesMobile/Features/SessionList/SessionListViewModel.swift:1097` 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–8 lines × 2) HermesMobile/Config/DevAutoLogin.swift:81— HermesMobile/Config/DevAutoLogin.swift:81-87 | HermesMobile/Config/DevAutoLogin.swift:110-117 — both copies are in the same file, so extract the 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 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `HermesMobile/Config/DevAutoLogin.swift:109` calls `address` and `HermesMobile/Config/DevAutoLogin.swift:80` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 3) HermesMobile/Features/SessionList/SessionListViewModel.swift:1079— HermesMobile/Features/SessionList/SessionListViewModel.swift:1079-1085 | HermesMobile/Features/SessionList/SessionListViewModel.swift:1098-1104 | HermesMobile/Features/SessionList/SessionListViewModel.swift:1120-1126 — 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 `HermesMobile/Features/SessionList/SessionListViewModel.swift:1079` 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–6 lines × 2) HermesMobile/Features/Chat/HermesChatSideTasks.swift:369— HermesMobile/Features/Chat/HermesChatSideTasks.swift:369-374 | HermesMobile/Features/Chat/HermesSlashCommands.swift:306-310 — 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 `HermesMobile/Features/Chat/HermesChatSideTasks.swift:369` 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 (7–9 lines × 3) HermesMobile/Models/JSONValue.swift:11— HermesMobile/Models/JSONValue.swift:11-17 | HermesMobile/Networking/Bots/BotProtocol.swift:8-16 | scripts/fixtures/HermesFixtureCapture.swift:167-175 — 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 `HermesMobile/Models/JSONValue.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. 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 lines × 3) HermesMobile/Features/Chat/ApprovalRequestInset.swift:125— HermesMobile/Features/Chat/ApprovalRequestInset.swift:125-134 | HermesMobile/Features/Chat/ClarificationRequestCard.swift:71-80 | HermesMobile/Features/Chat/ClarificationRequestCard.swift:642-651 — 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.
Duplicated block (5 lines × 3) HermesMobile/Features/SessionList/SessionNavigationState.swift:136— HermesMobile/Features/SessionList/SessionNavigationState.swift:136-140 | HermesMobile/Models/Kanban.swift:1354-1358 | HermesMobile/Networking/KanbanEventStreamClient.swift:55-59 — 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.
P4 · Deployment & Rollback· No deployment automation · ×1
No deployment automation — No release automation was found in CI — neither a deploy stage (Helm/Kubernetes/compose manifests, an orchestrated rollout) nor a publish job that ships the built artifact. Releases appear to be run by hand, which is slower, less repeatable and harder to reverse.
Duplicated predicate HermesMobile/ContentView.swift:540— `$0.kind == .webui && !moved.contains($0.id)` appears character-identically in 2 files — HermesMobile/ContentView.swift, HermesMobile/Features/MoveToHermes/MoveToHermesModel.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 HermesMobile/Features/Chat/ChatScrollPolicy.swift:378— `$0.message.role == "user" && !$0.message.isSteerMessage` appears character-identically in 2 files — HermesMobile/Features/Chat/ChatScrollPolicy.swift, HermesMobile/Features/Chat/HermesChatActivity.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 HermesMobile/Features/Kanban/KanbanCardDetailState.swift:279— `Task.isCancelled || error is CancellationError` appears character-identically in 2 files — HermesMobile/Features/Kanban/KanbanCardDetailState.swift, HermesMobile/Features/Kanban/KanbanFeatureState.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 HermesMobile/Features/Chat/MarkdownMathFormatter.swift:330— `index + 1 < characters.count && !protected[index + 1] && characters[index + 1] == second` appears character-identically in 2 files — HermesMobile/Features/Chat/MarkdownMathFormatter.swift, HermesMobile/Features/Chat/MarkdownMathSegmenter.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 HermesMobile/Features/Chat/ChatViewModel.swift:338— `isViewingCachedData && !isCachedCopyProvisional` appears character-identically in 3 files — HermesMobile/Features/Chat/ChatViewModel.swift, HermesMobile/Features/SessionList/SessionListViewModel.swift, HermesMobile/Features/SessionList/SessionRowView.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 HermesMobile/Features/Chat/ChatView.swift:2789— `message.role == "user" && message.attachments?.isEmpty == false` appears character-identically in 2 files — HermesMobile/Features/Chat/ChatView.swift, HermesMobile/Features/Chat/ChatViewModel.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 HermesMobile/Features/Chat/ChatScrollPolicy.swift:37— `shouldFollowLatestMessage && !isDisclosureSettling` appears character-identically in 3 files — HermesMobile/Features/Chat/ChatScrollPolicy.swift, HermesMobile/Features/Chat/ChatTranscriptView.swift, HermesMobile/Features/Chat/ChatView.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 HermesMobile/Features/Chat/ChatAttachmentPreviewView.swift:100— `viewModel.isLoading && viewModel.preview == nil` appears character-identically in 2 files — HermesMobile/Features/Chat/ChatAttachmentPreviewView.swift, HermesMobile/Features/Workspace/FilePreviewView.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 HermesMobile/Features/SessionList/SessionListComponents.swift:923— `viewModel.isLoading && viewModel.sessions.isEmpty` appears character-identically in 2 files — HermesMobile/Features/SessionList/SessionListComponents.swift, HermesMobile/Features/Settings/ArchivedSessionsView.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.
No ADRs found HermesMobile.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 `HermesMobile.xcodeproj/project.pbxproj` makes this repository a deployable product (line 1).
D21 · Naming Consistency· `isCLISession` spells `CLI` where 21 names in the project spell it `Cli` · ×1
`isCLISession` spells `CLI` where 21 names in the project spell it `Cli` HermesMobile/Features/Chat/ChatViewModel.swift:732— 21 of 22 names in project repository spell the token `Cli` (21 of 22; unit: names in project repository containing `Cli`). Peers: HermesSessionListView.showsCliSessions (HermesMobile/Features/SessionList/HermesSessionListView.swift:47); SessionListView.showsCliSessions (HermesMobile/Features/SessionList/SessionListView.swift:164); SessionRowDisplaySettings.showCliSessionsKey (HermesMobile/Features/SessionList/SessionRowView.swift:617); SessionRowDisplaySettings.showCliSessionsKey (HermesMobile/Features/SessionList/SessionRowView.swift:622); SessionRowDisplaySettings.showsCliSessions (HermesMobile/Features/SessionList/SessionRowView.swift:633). Rename to `isCliSession`. [rule N6]
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 REDACTED:24— No static application security testing detected. For this repository's stack, add CodeQL's Swift pack (Swift/Xcode) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 2 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.
X5 · Nullable reference types· Ruby's type checker does not check nil everywhere · ×1
Ruby's type checker does not check nil everywhere — This repository commits no Sorbet configuration (`sorbet/config`) and no `Steepfile`, so nothing type-checks its 1 Ruby product file(s): a nilable value reaches a method call silently and raises `NoMethodError: undefined method … for nil` the first time it is nil. A `# typed:` sigil does nothing without a `sorbet/config` beside the code; a Steep run configured only on a command line is not something this check can read.
Silent fallback default in catch HermesMobile/Features/Screen/ScreenControl.swift:65— `holds` 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.
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 69 file(s) — `HermesMobile/AppIntents/ProfileEntity.swift`, `HermesMobile/Auth/AppLock.swift`, `HermesMobile/Auth/AuthManager.swift`, `HermesMobile/Config/AppFont.swift`, `HermesMobile/Config/AppTheme.swift`, … (+64 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 — The CI pipeline publishes no artifact — no package publish, container push or release with files to download. Supply-chain provenance, signing and an SBOM describe a PUBLISHED artifact for the people who obtain it, so there is nothing to attest here; a deployment of the service itself publishes nothing for anyone else to verify. Add them to the release pipeline when this repo starts publishing artifacts (a package, a container image, or a release with downloadable files).
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 01a1dd02-9a1b-773f-9f15-e02dd138cc59 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 6 · Warnings: 1051 · Recommendations: 15 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 15-11-2026 @ 02:21 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.