Public report of starcat-app/Starcat, published 17 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive 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, 17 November 2026, 19:19 UTC · Survey ID cd_c3c5086fda3b4b1b835f900d521747d2
starcat-app/Starcat
Measured 17 November 2026, 19:17 UTC, at code version 1d2cfc3
First survey, so nothing to compare with yet
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 340,460 lines of product code in 10 projects, tests not counted · Estimated rebuild effort: about 3.1 person-years · Weakest lens: Accessibility, 42.9
Findings by how serious they are
55 critical2431 serious105 minor
18 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
17 November 2026, 19:17 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 ▸
74of 74 dimensions measured by tools.
2582of 2591 findings point to an exact file and line, so you can open each one in the code. The other 9 concern the repository as a whole, such as missing documentation.
74dimensions across 9 lenses, read from 340,460 lines of product code in 10 projects.
starcat-app/Starcat falls short of our standard for production, held back most by its Accessibility lens, the interface's usability with a keyboard or assistive technology. It scores 54.0 out of 100 and is rated Adequate, and five of its 55 critical findings are security problems.
Accessibility, at 42.9, is the weakest lens and counts most in the score. The best first step is fixing focus, motion and contrast, worth about 7.1 points. Making the controls keyboard-usable comes next, worth about 5.6 points. Raising Accessibility to 70 would lift the score to about 62.1.
Three known security holes in the packages the code depends on can be used by attackers. One pipeline tool is referenced by a changeable name, so the build pipeline can be tampered with, and one weakness in the code could be used by an attacker. Updating the vulnerable packages, pinning the tool to an exact version and fixing the weaknesses the scanner points to would close these risks. The 40 pieces of business logic tied to the database or web code need separating from the database and web code.
The product code is 340,460 lines, about €450,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 Accessibility rose from 42.9 to 70, the lowest score rated Strong, the score would rise from 54.0 to about 62.1.
Code composition: what the lines of code are
Product code 75%Tests 25%
Rebuild cost: about €450,000 · Estimate
Cost to rebuild
€150,000 to €740,000, for 2,470 to 7,837 hours of work, about 3.1 person-years for 1 to 6 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.8 at a score of 54. 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: 340,460 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
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Raises the score by about 5.6 points · Medium effort · Keyboard semantics
3
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Raises the score by about 2.9 points · Medium effort · Page structure
Diagnosis: what the measurements show together
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €450,000 to build again, about 3.1 person-years of work. Its weakest lens is Accessibility, at 42.9 (Weak). Accessibility is about whether the interface is built so that everyone can use it, including people who can't see the screen or can't use a mouse. Because the weakest lens counts most in the score, work on Accessibility also moves the score most.
Based on: the rebuild estimate · the Accessibility grade · how much each lens counts
What to do: Start with the Accessibility actions in Top priorities.
If you do one thing first · First action
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1. Of all the actions in this report, it raises the score most for the work it takes: about 7.1 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.9 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 3% to 6% on every change. The history of the code shows how much it changes: about 337,550 lines over the last 90 days, which is about 1,368,953 lines a year. At that pace, the extra work comes to an estimated 92.4 to 554.6 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
38 modules, with 20 dependencies between them. One loop runs through 3 of the modules, marked above the diagonal.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
ThirdParty~ThinkingOrbsKit~ThinkingOrbsKit uses repository, so a change to repository can break ThirdParty~ThinkingOrbsKit~ThinkingOrbsKit, while a change to ThirdParty~ThinkingOrbsKit~ThinkingOrbsKit can't break repository.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
scripts uses scripts.release_changelog, so a change to scripts.release_changelog can break scripts, while a change to scripts can't break scripts.release_changelog.
Position
Below the diagonal: scripts uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in starcat-promo-video.presentation.src.chapters.01-coldopen uses a type in starcat-promo-video.presentation.src.registry.types.
starcat-promo-video.presentation.src.chapters.01-coldopen uses starcat-promo-video.presentation.src.registry.types, so a change to starcat-promo-video.presentation.src.registry.types can break starcat-promo-video.presentation.src.chapters.01-coldopen, while a change to starcat-promo-video.presentation.src.chapters.01-coldopen can't break starcat-promo-video.presentation.src.registry.types.
Position
Below the diagonal: starcat-promo-video.presentation.src.chapters.01-coldopen uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in starcat-promo-video.presentation.src.chapters.02-product uses a type in starcat-promo-video.presentation.src.registry.types.
starcat-promo-video.presentation.src.chapters.02-product uses starcat-promo-video.presentation.src.registry.types, so a change to starcat-promo-video.presentation.src.registry.types can break starcat-promo-video.presentation.src.chapters.02-product, while a change to starcat-promo-video.presentation.src.chapters.02-product can't break starcat-promo-video.presentation.src.registry.types.
Position
Below the diagonal: starcat-promo-video.presentation.src.chapters.02-product uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in starcat-promo-video.presentation.src.chapters.03-find uses a type in starcat-promo-video.presentation.src.registry.types.
starcat-promo-video.presentation.src.chapters.03-find uses starcat-promo-video.presentation.src.registry.types, so a change to starcat-promo-video.presentation.src.registry.types can break starcat-promo-video.presentation.src.chapters.03-find, while a change to starcat-promo-video.presentation.src.chapters.03-find can't break starcat-promo-video.presentation.src.registry.types.
Position
Below the diagonal: starcat-promo-video.presentation.src.chapters.03-find uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in starcat-promo-video.presentation.src.chapters.04-understand uses a type in starcat-promo-video.presentation.src.registry.types.
starcat-promo-video.presentation.src.chapters.04-understand uses starcat-promo-video.presentation.src.registry.types, so a change to starcat-promo-video.presentation.src.registry.types can break starcat-promo-video.presentation.src.chapters.04-understand, while a change to starcat-promo-video.presentation.src.chapters.04-understand can't break starcat-promo-video.presentation.src.registry.types.
Position
Below the diagonal: starcat-promo-video.presentation.src.chapters.04-understand uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in starcat-promo-video.presentation.src.chapters.05-tags uses a type in starcat-promo-video.presentation.src.registry.types.
starcat-promo-video.presentation.src.chapters.05-tags uses starcat-promo-video.presentation.src.registry.types, so a change to starcat-promo-video.presentation.src.registry.types can break starcat-promo-video.presentation.src.chapters.05-tags, while a change to starcat-promo-video.presentation.src.chapters.05-tags can't break starcat-promo-video.presentation.src.registry.types.
Position
Below the diagonal: starcat-promo-video.presentation.src.chapters.05-tags uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in starcat-promo-video.presentation.src.chapters.06-organize uses a type in starcat-promo-video.presentation.src.registry.types.
starcat-promo-video.presentation.src.chapters.06-organize uses starcat-promo-video.presentation.src.registry.types, so a change to starcat-promo-video.presentation.src.registry.types can break starcat-promo-video.presentation.src.chapters.06-organize, while a change to starcat-promo-video.presentation.src.chapters.06-organize can't break starcat-promo-video.presentation.src.registry.types.
Position
Below the diagonal: starcat-promo-video.presentation.src.chapters.06-organize uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in starcat-promo-video.presentation.src.chapters.07-assess uses a type in starcat-promo-video.presentation.src.registry.types.
starcat-promo-video.presentation.src.chapters.07-assess uses starcat-promo-video.presentation.src.registry.types, so a change to starcat-promo-video.presentation.src.registry.types can break starcat-promo-video.presentation.src.chapters.07-assess, while a change to starcat-promo-video.presentation.src.chapters.07-assess can't break starcat-promo-video.presentation.src.registry.types.
Position
Below the diagonal: starcat-promo-video.presentation.src.chapters.07-assess uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in starcat-promo-video.presentation.src.chapters.08-local-native uses a type in starcat-promo-video.presentation.src.registry.types.
starcat-promo-video.presentation.src.chapters.08-local-native uses starcat-promo-video.presentation.src.registry.types, so a change to starcat-promo-video.presentation.src.registry.types can break starcat-promo-video.presentation.src.chapters.08-local-native, while a change to starcat-promo-video.presentation.src.chapters.08-local-native can't break starcat-promo-video.presentation.src.registry.types.
Position
Below the diagonal: starcat-promo-video.presentation.src.chapters.08-local-native uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in starcat-promo-video.presentation.src.chapters.09-cta uses a type in starcat-promo-video.presentation.src.registry.types.
starcat-promo-video.presentation.src.chapters.09-cta uses starcat-promo-video.presentation.src.registry.types, so a change to starcat-promo-video.presentation.src.registry.types can break starcat-promo-video.presentation.src.chapters.09-cta, while a change to starcat-promo-video.presentation.src.chapters.09-cta can't break starcat-promo-video.presentation.src.registry.types.
Position
Below the diagonal: starcat-promo-video.presentation.src.chapters.09-cta uses a module listed above it, which is the healthy direction.
5 pairs of types, where a type in starcat-promo-video.presentation.src.components uses a type in starcat-promo-video.presentation.src.components.AutoStartGate.
starcat-promo-video.presentation.src.components uses starcat-promo-video.presentation.src.components.AutoStartGate, so a change to starcat-promo-video.presentation.src.components.AutoStartGate can break starcat-promo-video.presentation.src.components, while a change to starcat-promo-video.presentation.src.components can't break starcat-promo-video.presentation.src.components.AutoStartGate.
Position
Below the diagonal: starcat-promo-video.presentation.src.components uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in starcat-promo-video.presentation.src.components.AutoToggle uses a type in starcat-promo-video.presentation.src.hooks.useAudioPlayer.
starcat-promo-video.presentation.src.components.AutoToggle uses starcat-promo-video.presentation.src.hooks.useAudioPlayer, so a change to starcat-promo-video.presentation.src.hooks.useAudioPlayer can break starcat-promo-video.presentation.src.components.AutoToggle, while a change to starcat-promo-video.presentation.src.components.AutoToggle can't break starcat-promo-video.presentation.src.hooks.useAudioPlayer.
Position
Below the diagonal: starcat-promo-video.presentation.src.components.AutoToggle uses a module listed above it, which is the healthy direction.
starcat-promo-video.presentation.src.hooks uses starcat-promo-video.presentation.src.hooks.useAudioPlayer, so a change to starcat-promo-video.presentation.src.hooks.useAudioPlayer can break starcat-promo-video.presentation.src.hooks, while a change to starcat-promo-video.presentation.src.hooks can't break starcat-promo-video.presentation.src.hooks.useAudioPlayer.
Position
Below the diagonal: starcat-promo-video.presentation.src.hooks uses a module listed above it, which is the healthy direction.
starcat-promo-video.presentation.src.hooks uses starcat-promo-video.presentation.src.hooks.useStepper, so a change to starcat-promo-video.presentation.src.hooks.useStepper can break starcat-promo-video.presentation.src.hooks, while a change to starcat-promo-video.presentation.src.hooks can't break starcat-promo-video.presentation.src.hooks.useStepper.
Position
Below the diagonal: starcat-promo-video.presentation.src.hooks uses a module listed above it, which is the healthy direction.
supports.scripts uses supports.scripts.starcat-localization, so a change to supports.scripts.starcat-localization can break supports.scripts, while a change to supports.scripts can't break supports.scripts.starcat-localization.
Position
Below the diagonal: supports.scripts uses a module listed above it, which is the healthy direction.
supports.scripts uses supports.scripts.sync-starcat-readme-promo, so a change to supports.scripts.sync-starcat-readme-promo can break supports.scripts, while a change to supports.scripts can't break supports.scripts.sync-starcat-readme-promo.
Position
Below the diagonal: supports.scripts uses a module listed above it, which is the healthy direction.
repository uses ThirdParty~ThinkingOrbsKit~ThinkingOrbsKit, so a change to ThirdParty~ThinkingOrbsKit~ThinkingOrbsKit can break repository, while a change to repository can't break ThirdParty~ThinkingOrbsKit~ThinkingOrbsKit.
Position
Below the diagonal: repository uses a module listed above it, which is the healthy direction.
37→38 repository uses ThirdParty~BorderBeamKit~BorderBeamKitpart of a loop✕
Connections
6 pairs of types, where a type in repository uses a type in ThirdParty~BorderBeamKit~BorderBeamKit.
repository uses ThirdParty~BorderBeamKit~BorderBeamKit, so a change to ThirdParty~BorderBeamKit~BorderBeamKit can break repository, while a change to repository can't break ThirdParty~BorderBeamKit~BorderBeamKit.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
ThirdParty~BorderBeamKit~BorderBeamKit uses repository, so a change to repository can break ThirdParty~BorderBeamKit~BorderBeamKit, while a change to ThirdParty~BorderBeamKit~BorderBeamKit can't break repository.
Position
Below the diagonal: ThirdParty~BorderBeamKit~BorderBeamKit uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 59.0 · 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
A03:2025 — Software Supply Chain Failures
8
High / Critical
A02:2025 — Security Misconfiguration
4
Medium
A05:2025 — Injection
2
High / Critical
Roadmap
Top priorities: Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1; Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href; Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).
Keep the ORM/table mapping and web-framework types on a boundary adapter; leave the domain entity framework-free (map row↔domain through a repository).
Code Duplication: Edited copies of one member (3 members, 21+ corresponding lines)
Starcat/Core/Network/AppEndpoints.swift
6.3
Mixed
Code Duplication: Edited copy of a member (10 corresponding lines)
How the grades work
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 55
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 — 2431
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 — 105
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 18
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 74 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 — 74 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, 2582 of 2591 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the JavaScript/TypeScript half measured 99.5% (node:test via `npm ci --ignore-scripts` in resources/follow-graph/, the 3 run(s) test reliability made); the Swift half could not be measured — the Swift suite in ThirdParty/BorderBeamKit produced no coverage export. This repository's production source spans both ecosystems, and no partial figure is published as if it were the whole: coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo.
D10 Test Quality — 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. The 4,044 test(s) behind this row are the ones the code-model census could read, and this repository also carries at least 12 test source file(s) (.py, .mjs) that it cannot: it reads the test types the .swift frontend declared, so a suite in any other language is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT SCORED: this repository's production source includes .swift, and the swift executor ran against the .swift half and never executed — so reliability was not measured for the repository as a whole. The JavaScript/TypeScript (node:test via `npm ci --ignore-scripts` in resources/follow-graph/ (40 tests)): measured (0 flaky) suite(s) did re-run, and came back with 0 flaky across 1 measured tier(s) — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — test reliability is excluded from the score rather than counted. The half was driven by a runner we ship, so this is not a missing-runner gap.
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 (3 contributor(s) across 3705 commit(s) sampled, automation and bot accounts excluded). One of them holds 99% of the history; the other 2 hold 0.5% 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.
D19 Documentation Quality — 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. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated per language (docs/plans/deterministic-engine.md, P5; C# and each NeutralApiArms arm pass): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `Starcat/Core/Capabilities/RepositoryTagCapability.swift`, `Starcat/Core/Database/DatabaseManager.swift`, `Starcat/Core/Network/GitHubAPI/ReadmeAPI.swift`, `Starcat/Core/Network/GitHubAPI/ReadmeAssetURLRewriter.swift`, `Starcat/Core/Network/TypeSafeClient.swift`, … (+106 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.
AC6 Visual & motion safety — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 73 further occurrence(s) are not listed individually; the score already reflects all 113.
AX1 Captive dependencies — 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 Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository defines its own container in Starcat/Features/AI/AIConfiguration.swift, whose lifetimes are not modelled 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.
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.
DM6 Domain ↔ infrastructure boundary — 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. 19 further occurrence(s) are not listed individually; the score already reflects all 59.
GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java source only, and this repository's Go, 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, Scala and Rust source only, and this repository's Go, 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.
X1 Async correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
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.
X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X2 Cancellation propagation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded, and no named async function in this repository's JavaScript/TypeScript, nor any Go, PHP or Dart function or Kotlin suspend function, makes a request that can be cancelled (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial; amphp; Dio; Ktor, OkHttp), so there is nothing to judge, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X27 Collection changed while being enumerated — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check'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.
X29 Per-element action decided by a fixed element — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
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. 40 further occurrence(s) are not listed individually; the score already reflects all 80.
X30 Support guard that admits what it rejects — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check'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.
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.
D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
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.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
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.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (REDACTED, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
C4 Data Retention: This control is scored from in-repo evidence only — its real-world effectiveness, exercised only at runtime, is outside a static scan.
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".
P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
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.
218 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was CodexAppServerDriver.receiveNotificationOrRequest at 80. A further 38 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 ReadmeTranslationLanguage.displayName at 34 — they are counted neither in the figure above nor in this dimension's score. 13 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: Starcat/Shared/Components/RepoRowComponents.swift (LanguageColor.color at 31), Starcat/Features/RAG/Core/KnowledgeBaseAnalytics.swift (KnowledgeBaseAnalyticsExecutor.measureSQL at 24), Starcat/Shared/Telemetry/PerformanceTracer.swift (PerformanceTracer.name at 23), Starcat/Features/Profile/ShareCard/StarredMarkdownRenderer.swift (StarredMarkdownRenderer.languageEmoji at 21), Starcat/Features/Agents/Core/AgentMessageTimelineView.swift (AgentMessageTimelineView.traceKindIcon at 19), and 8 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.
+ 206 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 5 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with CodexAppServerDriver.receiveNotificationOrRequest (cyclomatic 80), KnowledgeRAGWorkspaceViewModel.runQuestion (cyclomatic 76), GRDBRepoRepository.makeListQuery (cyclomatic 75). — 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 5 together lifts Cyclomatic Complexity from 6.2 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.
+ 315 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 KnowledgeRAGWorkspaceViewModel.runQuestion (cognitive 132). — Refactoring it lifts Cognitive Complexity from 5.7 to about 5.8/10.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.1 / 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 96 FileTooLong finding(s) in God Classes — start with RAGWorkspaceInspector.swift, KnowledgeRAGWorkspaceViewModel.swift, RepositoryInsightsView.swift. — One of this dimension's main actionable groups (96 warning-level).
Resolve the 92 ClassTooLong finding(s) in God Classes — start with KnowledgeRAGWorkspaceWindowController.swift (2), SearchCenterView.swift (2), SettingsView.swift (2). — One of this dimension's main actionable groups (92 warning-level).
Resolve the 75 MethodTooLong finding(s) in God Classes — start with SettingsView.swift (3), RAGWorkspaceInspector.swift (3), KnowledgeRAGService.swift (3). — One of this dimension's main actionable groups (75 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.
616 duplicated block group(s) detected. 10.1 % of the production lines (34,395 of 340,460) are in a reported copy. A further 682 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 4 of the 1298 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
+ 287 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 45 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with BatchAIOptionsSheet.swift (3), RepoAIWindowContentView.swift (2), RAGWorkspaceInspector.swift (2). — One of this dimension's main actionable groups (45 warning-level).
Resolve the 40 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with CodeFlowStorage.swift (3), RepoHealthService.swift (2), RepoAIWindowContentView.swift (2). — One of this dimension's main actionable groups (40 warning-level).
Resolve the 39 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with ShareCardContent.swift (4), BatchAIOptionsSheet.swift (2), AgentWorkspaceRunSurface.swift (2). — One of this dimension's main actionable groups (39 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.
10 production modules (npm+Go+SwiftPM+XcodeGen), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; an XcodeGen target's dependency on a local Swift package or on a target of another project is not visible there; 0 module(s) off the main sequence, with abstractness counted on 2 of the 10 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
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 7 Low cohesion finding(s) in Cohesion (LCOM4) — start with StatusBarController.swift, StarcatCommandRouter.swift, DiskChatHistoryStore.swift. — One of this dimension's main actionable groups (7 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the code respects its intended layering / architecture rules.
Method: Enforcement rung (Prevented/Verified/Documented) per checkable ADR via Roslyn, plus dependency cycles via the engine shared with D5/AX3. Deterministic, exact.
No mechanizable ADR was identified, so enforcement is not measured. Dependency cycles not checked (no project-reference graph; where this repository's language has an import-cycle lens, cycles are reported there).
Detailed fixes: d7_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality9.8 / 10Stronggated by 50 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.
11 skipped (10 with a documented reason), 49 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 4044 tests. Measured on the .swift suite only — at least 12 test source file(s) (.py, .mjs) went unread, so its test quality is unmeasured and is not in these counts.
No assertions: adjacentSlotsAvoidDuplicateArtwork · ×49StarcatTests/AmbientGridEngineTests.swift:101
Resolve the 49 No assertions finding(s) in Test Quality — start with GitHubAPIClientTests.swift (7), AnySearchClientTests.swift (6), ExternalAgentRuntimeHostTests.swift (3). — One of this dimension's main actionable groups (49 warning-level).
Resolve the 1 Skipped test finding(s) in Test Quality — start with StarredExportSampleGenerator.swift. — One of this dimension's main actionable groups (1 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.
1 outdated, 0 author-deprecated direct Go module(s), 0 pinning or checksum defect(s). Whether any of these modules is UNMAINTAINED is not graded — proxy.golang.org publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either: that is a source question, not a registry one. Known CVEs in this module graph are D30's question, read from REDACTED and go.sum there.
Outdated: modernc.org/sqlite
✓ On the Gold path — maintain.
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 0 third-party package(s) use a banned license. This repository's 2 SwiftPM file(s) declare no third-party dependencies and no committed resolution pins any, so there is no third-party package licence to grade — a complete answer, not a gap in coverage. It also commits no CocoaPods or Carthage manifest, so SwiftPM is the only package manager it takes dependencies through. This repository's OWN licence is its own choice and is not judged here.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Top hotspots: Starcat/Features/Settings/SettingsView.swift (47×53=2491); Starcat/App/AppDependencies.swift (48×34=1632); Starcat/Features/Home/SidebarView.swift (56×28=1568) Repeated repair below the complexity floor: Starcat/Features/Agents/Core/AgentWorkspaceWindowController.swift (7 of 10 changes were fixes); Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceView.swift (6 of 11 changes were fixes); Starcat/Features/FollowGraph/FollowGraphUserCard.swift (5 of 9 changes were fixes)
Resolve the 77 Hotspot finding(s) in Churn × Complexity Hotspots — start with SettingsView.swift, AppDependencies.swift, SidebarView.swift. — One of this dimension's main actionable groups (77 warning-level).
Resolve the 11 Repeated repair finding(s) in Churn × Complexity Hotspots — start with AgentWorkspaceWindowController.swift, KnowledgeRAGWorkspaceView.swift, FollowGraphUserCard.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.
4 deducted task-comment markers across 340460 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
Resolve the 4 TodoComment finding(s) in Explicit Debt — start with UserProfileServiceTests.swift, PageToolbarSpec.swift, TrendingViewModel.swift. — One of this dimension's main actionable groups (4 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
2 of 2 documentation facets pass in full. 655 document(s) read across 6 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_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.
1 of 1 evaluated ADRs have a defect readable from the log itself (a missing or empty section, no title, a single option, consequences with no cost, no status, a missing enforcement field, a status the log contradicts, a dangling link, an unlinked second decision on one question, a date that is no calendar day). How well each record argues its case is not measured.
ADR has no Context and Decision sectiondocs/adr/0001-external-search-provider-view-and-context-aggregation.md:1detected by adr-integrity
What to do
Resolve the 1 ADR has no Context and Decision section finding(s) in ADR Quality — start with 0001-external-search-provider-view-and-context-aggregation.md. — 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.
7 naming inconsistencies among 211 declarations measured against a convention their peers follow.
`subjectApiURL` spells `Api` where 167 names in the project spell it `API` · ×2Starcat/Core/Sync/GitHubNotificationMapper.swift:688
`subjectApiUrl` spells `Api` where 167 names in the project spell it `API`Starcat/Core/Database/Models/GitHubNotificationThreadRecord.swift:39
`stripSPDXSuffixes` spells `SPDX` where 13 names in the project spell it `Spdx`Starcat/Core/Models/LicenseKnowledge.swift:97
`fromApiURL` spells `Api` where 167 names in the project spell it `API`Starcat/Core/Sync/GitHubNotificationMapper.swift:634
`verificationUri` spells `Uri` where 14 names in the project spell it `URI`Starcat/Features/Auth/GithubDeviceFlowService.swift:240
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 2 `subjectApiURL` spells `Api` where 167 names in the project spell it… finding(s) in Naming Consistency — start with GitHubNotificationMapper.swift (2). — One of this dimension's main actionable groups (2 recommendation-level).
Resolve the 1 `subjectApiUrl` spells `Api` where 167 names in the project spell it… finding(s) in Naming Consistency — start with GitHubNotificationThreadRecord.swift. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 `stripSPDXSuffixes` spells `SPDX` where 13 names in the project spell it… finding(s) in Naming Consistency — start with LicenseKnowledge.swift. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.
1 of 6 build units (Go, SwiftPM, XcodeGen, npm) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesionproject.yml:1
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with project.yml. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
0 % of calls cross a namespace and 7 % 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).
2 finding(s): 0 critical, 2 high, 0 medium, 0 low. 1 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 30 file(s) — `Starcat/Features/Auth/ProjectAccessSession.swift` (line 541, line 542, line 544, …), `Starcat/Features/Home/RepoSkillSession.swift`, `Starcat/Features/Onboarding/FirstRunWelcomeSheet.swift` (line 1595), `Starcat/Features/Settings/AISettingsView.swift` (line 595, line 597, line 604, …), `Starcat/Resources/FollowGraph/follow-graph.js`, … (+25 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them.
REDACTED
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).
No action in Static Analysis (SAST) — all 1 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (1 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 3 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).
Resolve the 1 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 4 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (4 warning-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
4 of 969 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is Starcat/Core/Cache/ReadmeMetrics.swift. Counted over 969 of the 1205 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 18 Change coupling finding(s) in Change Coupling — start with AgentWorkspaceWindowController.swift, ActivityReleaseDetailContent.swift, AIModelListView.swift. — One of this dimension's main actionable groups (18 warning-level).
Resolve the 3 Change-coupling hub finding(s) in Change Coupling — start with ActivityDetailScaffoldShell.swift, HomeView.swift, RepoListView.swift. — One of this dimension's main actionable groups (3 warning-level).
Resolve the 1 Change coupling clique finding(s) in Change Coupling — start with ActivityRepoDetailContent.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 build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
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.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
✓ On the Gold path — maintain.
Detailed fixes: d44_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives6.2 / 10Adequate✓ Tool-verified
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content. — resources/follow-graph/entry.js:180
What to do
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Do you agree with this assessment?
AC2 · Forms & labels10.0 / 10Exemplary○ Nothing flagged
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="root">, so there is no content here to wrap — render the <main> from the component mounted into it. (×2) — Starcat/Resources/CodeFlow/codeflow.html:2, starcat-promo-video/presentation/index.html:2
The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). — Starcat/Resources/FollowGraph/follow-graph.html:2
A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>. — Starcat/Resources/FollowGraph/follow-graph.html:2
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="graph">, so there is no content here to wrap — render the <main> from the component mounted into it. — Starcat/Resources/FollowGraph/follow-graph.html:2
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".
This <div> carries tabIndex={0}, so it is in the tab order and a keyboard user will land on it — but its behaviour is bound to the pointer only, with no key handler. A tabindex makes an element focusable, not operable: Enter and Space fire a click on a native <button> or <a href> and nowhere else, so this can be focused and never activated. Use a <button>, or handle Enter/Space in a key handler. — starcat-promo-video/presentation/src/components/AutoStartGate.tsx:18
A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. — starcat-promo-video/presentation/src/components/Stage.tsx:34
What to do
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.
Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
`.tree-toggle` moves (`transition: transform 0.15s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Starcat/Resources/CodeFlow/codeflow.html:93
`.legend-toggle` moves (`transition: transform 0.2s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Starcat/Resources/CodeFlow/codeflow.html:114
`.card-toggle` moves (`transition: transform 0.15s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Starcat/Resources/CodeFlow/codeflow.html:137
`.pattern-item` moves (`transition: transform 0.15s ease,border-color 0.15s ease,box-shadow 0.15s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Starcat/Resources/CodeFlow/codeflow.html:155
`.security-item` moves (`transition: transform 0.15s ease,border-color 0.15s ease,box-shadow 0.15s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Starcat/Resources/CodeFlow/codeflow.html:168
`.spinner` moves (`animation: spin 0.8s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Starcat/Resources/CodeFlow/codeflow.html:210
`.toast` moves (`animation: slideUp 0.3s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Starcat/Resources/CodeFlow/codeflow.html:233
`.loading-owner::before` moves (`animation: spin 0.6s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Starcat/Resources/CodeFlow/codeflow.html:243
`.lang-bar-segment` moves (`transition: width 0.3s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Starcat/Resources/CodeFlow/codeflow.html:270
`.sidebar` moves (`transition: transform 0.24s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. (×2) — Starcat/Resources/CodeFlow/codeflow.html:504, Starcat/Resources/CodeFlow/codeflow.html:581
`.top-btn:hover` sets color: #00a86b on background-color: #dadce0 — 2.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — Starcat/Resources/CodeFlow/codeflow.html:59
`.top-btn.primary` sets color: #fff on background-color: #00a86b — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — Starcat/Resources/CodeFlow/codeflow.html:60
`.view-mode-badge` sets color: white on background-color: #ff5f5f — 3.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — Starcat/Resources/CodeFlow/codeflow.html:77
`.tree-count` sets color: #9c9c9c on background-color: #e8eaed — 2.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — Starcat/Resources/CodeFlow/codeflow.html:96
`.badge-default` sets color: #6c6c6c on background-color: #e8eaed — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — Starcat/Resources/CodeFlow/codeflow.html:141
`.security-code` sets color: #ff9f43 on background-color: #e8eaed — 1.7:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — Starcat/Resources/CodeFlow/codeflow.html:178
`.toast.success` sets color: white on background-color: #22c55e — 2.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — Starcat/Resources/CodeFlow/codeflow.html:234
`.toast.error` sets color: white on background-color: #ff5f5f — 3.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — Starcat/Resources/CodeFlow/codeflow.html:235
`.toast.warning` sets color: #fff on background-color: #ff9f43 — 2.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — Starcat/Resources/CodeFlow/codeflow.html:236
`.fn-caller:hover` sets color: #00a86b on background-color: #e2e4e8 — 2.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — Starcat/Resources/CodeFlow/codeflow.html:252
`.unused-fn-file` sets color: #4d9fff on background-color: #f1f3f4 — 2.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — Starcat/Resources/CodeFlow/codeflow.html:284
`.viz-tab.active` sets color: #fff on background-color: #00a86b — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — Starcat/Resources/CodeFlow/codeflow.html:340
`.conn-goto:hover` sets color: #fff on background-color: #00a86b — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — Starcat/Resources/CodeFlow/codeflow.html:404
`.file-preview-close:hover` sets color: white on background-color: #ff5f5f — 3.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — Starcat/Resources/CodeFlow/codeflow.html:415
`.private-key-btn:hover` sets color: #00a86b on background-color: #dadce0 — 2.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — Starcat/Resources/CodeFlow/codeflow.html:460
`.key-info code` sets color: #00a86b on background-color: #e8eaed — 2.6:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — Starcat/Resources/CodeFlow/codeflow.html:465
`.exclude-note code` sets color: #00a86b on background-color: #fff — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — Starcat/Resources/CodeFlow/codeflow.html:467
`.letter-stagger > .letter` moves (`animation: letter-rise var(--dur-slow) var(--ease-expo) forwards`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — starcat-promo-video/presentation/src/styles/animations.css:58
`.click-cue .arrow` moves (`animation: nudge 2.4s var(--ease-soft) infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — starcat-promo-video/presentation/src/styles/base.css:333
`.at-btn` moves (`transition: opacity 280ms ease, transform 280ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — starcat-promo-video/presentation/src/components/AutoToggle.css:30
`.ct-os-row` moves (`animation: ct-rise 800ms cubic-bezier(0.16, 1, 0.3, 1) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — starcat-promo-video/presentation/src/chapters/09-cta/Cta.css:48
`.ct-pack` moves (`animation: ct-rise 900ms cubic-bezier(0.16, 1, 0.3, 1) 400ms both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — starcat-promo-video/presentation/src/chapters/09-cta/Cta.css:74
`.ct-out` moves (`animation: ct-rise 600ms ease both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — starcat-promo-video/presentation/src/chapters/09-cta/Cta.css:98
`.ct-out:nth-child(1) .ct-strike` moves (`animation: ct-strike 450ms ease 3300ms forwards`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — starcat-promo-video/presentation/src/chapters/09-cta/Cta.css:111
`.ct-out:nth-child(2) .ct-strike` moves (`animation: ct-strike 450ms ease 3750ms forwards`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — starcat-promo-video/presentation/src/chapters/09-cta/Cta.css:112
`.ct-out:nth-child(3) .ct-strike` moves (`animation: ct-strike 450ms ease 4200ms forwards`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — starcat-promo-video/presentation/src/chapters/09-cta/Cta.css:113
`.ct-oss` moves (`animation: ct-rise 900ms cubic-bezier(0.16, 1, 0.3, 1) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — starcat-promo-video/presentation/src/chapters/09-cta/Cta.css:134
`.ct-oss-free` moves (`animation: ct-rise 700ms ease 900ms both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — starcat-promo-video/presentation/src/chapters/09-cta/Cta.css:143
`.ct-path` moves (`animation: ct-path-in 700ms cubic-bezier(0.16, 1, 0.3, 1) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — starcat-promo-video/presentation/src/chapters/09-cta/Cta.css:160
What to do
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
`RAGChunkRepositoryProtocol` declares 32 requirements: `replaceSource`, `fetchChunks`, `fetchChunkIdentities`, `fetchActiveMetadata`, `countChunksNeedingEmbedding`, `fetchVectorizationProgress`, `fetchChunksNeedingEmbedding`, `claimChunksForEmbedding`, `releaseEmbeddingClaim`, `clearOrphanEmbeddingClaims`, `hasReadyVectorChunks`, `fetchReadyEmbeddings`, `fetchReadyChunks`, `fetchKeywordSearchableChunks`, `keywordSearch`, `markReady`, `markFailed`, `markStaleForOtherModels`, `coverage`, `fetchLastIndexRefreshSummary`, `saveLastIndexRefreshSummary`, `knowledgeRepositoryIndexes`, `fetchIndexIssueChunks`, `fetchKnowledgeChunks`, `fetchManagedKnowledgeChunks`, `fetchManagedKnowledgeChunkOffset`, `saveKnowledgeChunkOverride`, `setKnowledgeChunkExcluded`, `permanentlyDeleteKnowledgeChunk`, `restoreKnowledgeChunk`, `totalBytes`, `deleteAll`. Counted over its method requirements (members with no body), once per name; a default supplied by a protocol extension is not counted, because no conformer is forced to write it. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — Starcat/Core/RAG/RAGChunkRepository.swift:15
`AwesomeRepositoryProtocol` declares 16 requirements: `sources`, `enabledSources`, `repositories`, `hasCompletedSourceSetup`, `refreshCatalog`, `refreshEnabledEntries`, `completeSourceSetup`, `updateSubscriptions`, `saveCustomSource`, `customSourceParseStates`, `updateCustomSourceParseState`, `customSourceEntryFullNames`, `customSourceEntryCount`, `saveCustomSourceEntries`, `completeCustomSourceParsing`, `removeCustomSource`. Counted over its method requirements (members with no body), once per name; a default supplied by a protocol extension is not counted, because no conformer is forced to write it. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — Starcat/Core/Sync/AwesomeRepository.swift:22
`GitHubNotificationThreadRepositoryProtocol` declares 19 requirements: `fetchAll`, `fetch`, `unreadCount`, `totalCount`, `upsertMany`, `upsertOrganizationIssues`, `updateLocalUnread`, `updateHydration`, `updatePersistedIssueState`, `fetchIDsMissingIssueState`, `markNotified`, `fetchFailedMarkRead`, `fetchUnnotified`, `maxUpdatedAt`, `organizationIssueSyncState`, `updateOrganizationIssueSyncState`, `deleteIDs`, `delete`, `removeNotificationThread`. Counted over its method requirements (members with no body), once per name; a default supplied by a protocol extension is not counted, because no conformer is forced to write it. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — Starcat/Core/Sync/GitHubNotificationThreadRepositoryProtocol.swift:25
`GitHubStarListRepositoryProtocol` declares 20 requirements: `replaceRemoteSnapshot`, `upsertList`, `deleteList`, `setListIds`, `setLocalListIds`, `fetchAllLists`, `findList`, `listIds`, `remoteListIds`, `hasLocalListOverrides`, `fetchPendingLocalMembershipSyncs`, `repoCountsByList`, `ungroupedRepoCount`, `fetchAllListAssignments`, `upsertAIRule`, `findAIRule`, `fetchAllAIRules`, `fetchAIAutoIgnoredRepos`, `upsertAIAutoIgnoredRepo`, `deleteAIAutoIgnoredRepo`. Counted over its method requirements (members with no body), once per name; a default supplied by a protocol extension is not counted, because no conformer is forced to write it. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — Starcat/Core/Sync/GitHubStarListRepositoryProtocol.swift:15
`RepoNoteRepositoryProtocol` declares 16 requirements: `find`, `fetchStatusMap`, `fetchLibraryState`, `fetchLibraryStateMap`, `fetchAllLibraryStateMap`, `fetchAllStatusMap`, `fetchRepos`, `fetchRepoIdsWithNonEmptyContent`, `statusCounts`, `libraryStateCounts`, `upsert`, `updateContent`, `updateStatus`, `updateLibraryState`, `ensureRepoRowExists`, `markAsReadIfNeeded`. Counted over its method requirements (members with no body), once per name; a default supplied by a protocol extension is not counted, because no conformer is forced to write it. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — Starcat/Core/Sync/RepoNoteRepositoryProtocol.swift:21
`RepoRepositoryProtocol` declares 34 requirements: `upsertStarred`, `markUnstarredExcept`, `markUnstarred`, `upsertExternalRepoForLibrary`, `upsertRepoMetadataForLibrary`, `updateAccessState`, `starredCount`, `knowledgeCount`, `fetchAllStarred`, `fetchKnowledgeRepos`, `fetchRecentStarred`, `findById`, `findByOwnerName`, `fetchUntagged`, `fetchByLanguage`, `languageStats`, `knowledgeLanguageStats`, `searchFTS`, `searchAllLocalFTS`, `searchKnowledgeFTS`, `fetchListPage`, `fetchListCount`, `fetchListFacetCounts`, `fetchListIDs`, `fetchListSelectionSnapshots`, `fetchPinnedRepoTimestamps`, `setPinned`, `updateSyncState`, `fetchStarsETag`, `updateStarsETag`, `fetchLastSyncAt`, `fetchStarredRepoIDs`, `fetchKnowledgeRepoIDs`, `upsertSingleStarred`. Counted over its method requirements (members with no body), once per name; a default supplied by a protocol extension is not counted, because no conformer is forced to write it. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — Starcat/Core/Sync/RepoRepositoryProtocol.swift:30
`GitHubAPIClientProtocol` declares 18 requirements: `starredRepos`, `unstar`, `star`, `getCurrentUser`, `getUser`, `isFollowing`, `follow`, `unfollow`, `contributionCalendar`, `repo`, `readmeHTML`, `readmeMarkdown`, `getSubscription`, `putSubscription`, `deleteSubscription`, `releases`, `receivedEvents`, `securityAdvisories`. Counted over its method requirements (members with no body), once per name; a default supplied by a protocol extension is not counted, because no conformer is forced to write it. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — Starcat/Core/Network/GitHubAPI/GitHubAPIClientProtocol.swift:28
`RAGConversationStoring` declares 18 requirements: `createConversation`, `listConversations`, `findEmptyConversation`, `loadConversation`, `saveContextSummary`, `appendTurn`, `appendUserMessage`, `deleteMessage`, `renameConversation`, `setConversationPinned`, `setConversationGroup`, `deleteConversation`, `deleteAll`, `statistics`, `createGroup`, `listGroups`, `renameGroup`, `deleteGroup`. Counted over its method requirements (members with no body), once per name; a default supplied by a protocol extension is not counted, because no conformer is forced to write it. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — Starcat/Features/RAG/Storage/RAGConversationStore.swift:85
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
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.
`GRDBRepositoryInsightsCache.load` is a read-named query yet it performs a durable write on the read path (a persist to a store/client). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command. — Starcat/Core/Insights/RepositoryInsightsCache.swift:152
`InitialRepoWarmupCoordinator.loadOrCreateJob` is a read-named query yet it performs a durable write on the read path (a persist to a store/client). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command. — Starcat/Core/Warmup/InitialRepoWarmupCoordinator.swift:463
`BatchAIQueueService.resolveBulkTagApplications` is a read-named query yet it performs a durable write on the read path (a persist to a store/client). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command. — Starcat/Features/AI/BatchAIQueueService.swift:1281
`RepoAIInsightViewModel.findOrCreateTag` is a read-named query yet it performs a durable write on the read path (a persist to a store/client). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command. — Starcat/Features/AI/RepoAIInsightViewModel.swift:547
`GitHubRAGRemoteContextProvider.fetchBlock` is a read-named query yet it performs a durable write on the read path (a persist to a store/client). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command. — Starcat/Features/RAG/Core/GitHubRAGRemoteContextProvider.swift:144
What to do
Keep query handlers read-only — move the writes/event-publishes into a command handler so reads stay safe to retry, cache, and route to a read replica.
Do you agree with this assessment?
C4 · Data Retention10.0 / 10Exemplary✓ Tool-verified
Other · Security — Whether data has a defined lifetime — retention periods, TTLs, cleanup jobs (storage limitation).
Method: Roslyn scan: retention/TTL configuration presence in schema; CascadeDelete detected but not scored as retention control. Deterministic, gated by PII presence.
Do you agree with this assessment?
DM4 · Rich vs anemic domain model10.0 / 10Exemplary✓ Tool-verified
Other · Domain Modelling — Whether domain entities own their behaviour — a data-only reference entity whose logic lives in a foreign service is anemic. Rich models enforce their own invariants.
Method: Roslyn (DDD-gated): entity method BODIES classified mutator-vs-query — only methods that mutate the entity's own declared state count as invariant-protecting behaviour, so a getter/passthrough doesn't rescue an anemic class. Deterministic, exhaustive over domain-layer entities.
Coverage: Population: entities by name/base convention; rich-vs-anemic judged by classifying each method body mutator-vs-query — logic-bearing domain types outside the convention are invisible.
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.
`PublicRepoStarHistoryRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Insights/RepoStarHistoryRepository.swift:177
`GitHubStarListAIAutoIgnoredRepo` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Models/GitHubStarListAIAutoIgnoredRepo.swift:18
`RepositorySpotlightSnapshot` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Spotlight/RepositorySpotlightSnapshot.swift:16
`LanguageStat` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Sync/RepoRepository.swift:34
`UserSmartCollection` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Features/Collections/UserSmartCollection.swift:18
`ChatSessionSQLRow` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Shared/Services/DiskChatHistoryStore.swift:1358
`ChatMessageSQLRow` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Shared/Services/DiskChatHistoryStore.swift:1404
`AISummaryRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/AISummaryRecord.swift:19
`AIUsageEvent` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/AIUsageEvent.swift:78
`ActivityAnnouncementRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/ActivityAnnouncementRecord.swift:54
`ActivityEventRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/ActivityEventRecord.swift:21
`ActivitySyncStateRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/ActivitySyncStateRecord.swift:23
`AwesomeCustomSourceParseRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/AwesomeCustomSourceParseRecord.swift:14
`AwesomeSubscriptionRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/AwesomeRecords.swift:107
`AwesomeStateRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/AwesomeRecords.swift:185
`DiscoveryListPageRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/DiscoveryCacheRecords.swift:18
`DiscoverySummaryModeRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/DiscoveryCacheRecords.swift:211
`DiscoverySummaryFacetRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/DiscoveryCacheRecords.swift:229
`DiscoveryBulkCategoryMembershipRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/DiscoveryCacheRecords.swift:446
`DiscoveryBulkMetaRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/DiscoveryCacheRecords.swift:464
`GitHubNotificationSyncStateRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/GitHubNotificationSyncStateRecord.swift:11
`GitHubNotificationThreadRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/GitHubNotificationThreadRecord.swift:27
`GitHubStarList` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/GitHubStarList.swift:18
`GitHubStarListMembership` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/GitHubStarList.swift:55
`GitHubStarListLocalOverride` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/GitHubStarList.swift:80
`GitHubStarListAIRule` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/GitHubStarListAIRule.swift:17
`InitialWarmupJobRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/InitialWarmupJobRecord.swift:28
`OpenSSFScoreRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/OpenSSFScoreRecord.swift:27
`RAGChunk` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/RAGChunk.swift:41
`Readme` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/Readme.swift:23
`ReadmeContent` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/ReadmeContent.swift:28
`ReadmePrefetchStateRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/ReadmePrefetchStateRecord.swift:29
`ReleaseRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/ReleaseRecord.swift:18
`ReleaseSubscription` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/ReleaseSubscription.swift:19
`RepoEmbedding` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/RepoEmbedding.swift:30
`RepoHealthSnapshot` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/RepoHealthSnapshot.swift:24
`RepoNote` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/RepoNote.swift:17
`RepoStarHistoryPointRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/RepoStarHistoryPointRecord.swift:12
`RepoTag` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/RepoTag.swift:13
`RepositoryInsightsSnapshotRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Starcat/Core/Database/Models/RepositoryInsightsSnapshotRecord.swift:12
What to do
Keep the ORM/table mapping and web-framework types on a boundary adapter; leave the domain entity framework-free (map row↔domain through a repository).
Other · Event-Driven — Whether state changes and message publishes are atomic (a transactional outbox) rather than a crash-unsafe dual write.
Method: Roslyn semantic scan (event-driven gated): event-handler methods scanned for DB-save plus bus-publish without a transactional outbox reference. Deterministic, semantic-resolved.
`ReadmeAPI.cachedReadme` performs two independent DURABLE writes — `repository` (a persistence store) via `upsert` and `trendingRepository` (a persistence store) via `delete` — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox). — Starcat/Core/Network/GitHubAPI/ReadmeAPI.swift:150
What to do
Adopt the transactional outbox pattern so DB writes and message publishes commit atomically — no lost or phantom events on a crash.
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 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.
docs/0-总览/README.md links to `1-立项/`, but `docs/0-总览/1-立项` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/0-总览/README.md:99
docs/0-总览/README.md links to `2-产品/需求讨论/正式方案/`, but `docs/0-总览/2-产品/需求讨论/正式方案` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/0-总览/README.md:100
docs/0-总览/README.md links to `3-设计/详细设计/`, but `docs/0-总览/3-设计/详细设计` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/0-总览/README.md:101
docs/0-总览/README.md links to `2-产品/里程碑/`, but `docs/0-总览/2-产品/里程碑` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/0-总览/README.md:102
docs/0-总览/README.md links to `4-工程进度/`, but `docs/0-总览/4-工程进度` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/0-总览/README.md:102
docs/0-总览/README.md links to `5-规范/`, but `docs/0-总览/5-规范` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/0-总览/README.md:103
docs/0-总览/README.md links to `6-发版与上架/`, but `docs/0-总览/6-发版与上架` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/0-总览/README.md:105
docs/0-总览/README.md links to `7-工具与脚本/`, but `docs/0-总览/7-工具与脚本` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/0-总览/README.md:107
docs/0-总览/README.md links to `8-原型设计/`, but `docs/0-总览/8-原型设计` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/0-总览/README.md:108
What to do
Reconcile the README with reality: docs/0-总览/README.md links to `1-立项/`, but `docs/0-总览/1-立项` does not exist; docs/0-总览/README.md links to `2-产品/需求讨论/正式方案/`, but `docs/0-总览/2-产品/需求讨论/正式方案` does not exist; docs/0-总览/README.md links to `3-设计/详细设计/`, but `docs/0-总览/3-设计/详细设计` does not exist; docs/0-总览/README.md links to `2-产品/里程碑/`, but `docs/0-总览/2-产品/里程碑` does not exist; docs/0-总览/README.md links to `4-工程进度/`, but `docs/0-总览/4-工程进度` does not exist.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
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.
`resources/follow-graph/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — resources/follow-graph/package.json:14
What to do
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
What to do
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
Do you agree with this assessment?
P5 · DR & Backup7.0 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.
Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.
What to do
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
Do you agree with this assessment?
P6 · Release Hygiene8.0 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
The changelog this check read carries 0 versioned entries, against a bar of 3. Counted as either the distinct `x.y.z` versions it names (a link's target is not counted) or its version-shaped section headings (`## [1.2.0]`, `## V14.x.x`, `## Updates in 8.0.x`), whichever is the larger — so a log sectioned by minor series counts its sections, not its individual patch numbers. Entries recorded somewhere this check does not read — release notes generated at tag time from a generator config it did not recognise, or a log kept outside the repository — are not counted here, and this row is about what is re-findable in the tree rather than about how often you release.
What to do
Keep the changelog current — add a versioned entry (Keep-a-Changelog ## [x.y.z]) for each release so the history isn't a stub.
Readiness · Readiness — Whether database schema changes go through versioned migrations rather than being auto-created from the model at startup.
Method: Roslyn scan: EF Core DbContext for a versioned migrations directory versus bare EnsureCreated usage; off .NET, a file scan of dependency manifests, migration histories (Flyway, Liquibase, Alembic, Django, Rails, Prisma, TypeORM, Knex/Sequelize, golang-migrate, goose, Laravel, Doctrine, Diesel/sqlx) and schema auto-create in production source or config. Exhaustive, deterministic.
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.
Do you agree with this assessment?
R1 · Type Safety8.5 / 10Strong✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.
Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.
20 duplicated blocks under starcat-promo-video/presentation/src/chapters/ have copies in at least two of the sibling directories 01-coldopen, 02-product, 03-find, 04-understand, 05-tags, 06-organize (+3 more sibling(s) not listed) — 2 of them are reported below, and 18 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 20 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 20 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 20 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — starcat-promo-video/presentation/src/chapters/07-assess/Assess.tsx:19
starcat-promo-video/presentation/src/chapters/07-assess/Assess.tsx:19 · starcat-promo-video/presentation/src/chapters/08-local-native/LocalNative.tsx:83 — the two spans are one implementation copied and then locally edited — 262 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — starcat-promo-video/presentation/src/chapters/07-assess/Assess.tsx:19
starcat-promo-video/presentation/src/chapters/06-organize/Organize.tsx:30 · starcat-promo-video/presentation/src/chapters/09-cta/Cta.tsx:26 — the two spans are one implementation copied and then locally edited — 263 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — starcat-promo-video/presentation/src/chapters/06-organize/Organize.tsx:30
What to do
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.
Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.
update has cyclomatic complexity 44 and cognitive complexity 65; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — resources/follow-graph/entry.js:704
drawNode has cyclomatic complexity 25 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — resources/follow-graph/entry.js:266
sync has cyclomatic complexity 21 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — resources/follow-graph/progressive-reveal.mjs:21
syncAnimation has cyclomatic complexity 20 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — resources/follow-graph/entry.js:592
applyVisibleGraph has cyclomatic complexity 19 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — resources/follow-graph/entry.js:630
drawFlow has cyclomatic complexity 16 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — resources/follow-graph/entry.js:462
drawDirections has cyclomatic complexity 13 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — resources/follow-graph/entry.js:525
(anonymous) has cyclomatic complexity 12 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — resources/follow-graph/renderer.test.mjs:42
onKey has cyclomatic complexity 11 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — starcat-promo-video/presentation/src/hooks/useStepper.ts:140
Do you agree with this assessment?
R3 · Large Files8.9 / 10Strong✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
resources/follow-graph/entry.js has 842 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — resources/follow-graph/entry.js:1
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Do you agree with this assessment?
R4 · Test Coverage0.7 / 10Critical✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×25) — resources/screenshots/1.2.0-app-store/manifest/render-app-store.mjs:1, resources/screenshots/2026-06-23-app-store/manifest/render-landing.mjs:1, starcat-promo-video/presentation/src/hooks/useStepper.ts:1, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).
Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.
Do you agree with this assessment?
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
The package in `starcat-promo-video/presentation` declares the lint script `lint` (`oxlint`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run lint` in `starcat-promo-video/presentation` (or the workspace's task runner). — starcat-promo-video/presentation/package.json:9
Do you agree with this assessment?
R7 · Dead Code10.0 / 10Exemplary✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
2 file(s) (~444 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
Other · Security — Only what this repository's own non-C# files could be read for was assessed — markup this repository SHIPS is scored for third-party script integrity whether or not the repository serves it itself, since a page handed to a consumer runs in that consumer’s origin. Nothing else in this dimension was assessed: the transport, cookie, input-validation and crypto controls are read from a source model that was not loaded for this repository’s language, so their absence here is not a finding about this repository.
Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.
`https://cdn.jsdelivr.net/npm/mermaid@11.16.0/dist/mermaid.min.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. 2 such include(s) across the repository's markup. — Starcat/Resources/CodeFlow/codeflow.html:30
What to do
Pin third-party scripts and verify them: name an exact version in the URL and add an `integrity="sha384-…"` hash alongside `crossorigin="anonymous"` (both are required — an integrity hash on a cross-origin script without `crossorigin` is not evaluated, it blocks the script). Where the vendor ships a continuously-updated loader and publishes no stable hash (tag managers, analytics, chat widgets), Subresource Integrity is not available: constrain it instead with a `Content-Security-Policy` that names the exact origins allowed to execute, and drop the script from the pages that do not need it. Where the page is shipped inside a package that others host, prefer vendoring the asset and serving it from the app’s own origin, so no consumer inherits a third-party dependency they did not choose.
Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.
Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
`.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. — starcat-promo-video/presentation/src/hooks/useAudioPreload.ts:23
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. (×3) — starcat-promo-video/presentation/src/hooks/useStepper.ts:48, starcat-promo-video/presentation/src/hooks/useStepper.ts:69, Starcat/Features/Settings/JevConnectionSettingsView.swift:35
`catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×36) — StarcatScreensaver/ScreensaverViewModel.swift:148, StarcatScreensaver/ScreensaverViewModel.swift:183, StarcatScreensaver/ScreensaverViewModel.swift:207, …
Other · Code Health — Whether strict null checking is enabled and not undermined by heavy `!` assertion — TypeScript's `strictNullChecks` (which `strict` turns on) is what makes `string` exclude `null` and `undefined`, and the postfix `!` is the operator that silences it.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
0/2 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
~5.5 `!` null assertions per 1k TypeScript source lines — 12 assertion(s) across the 2171 source line(s) of the 33 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: starcat-promo-video/presentation/src/hooks/useStepper.ts (7), starcat-promo-video/presentation/scripts/extract-narrations.ts (2), starcat-promo-video/presentation/src/App.tsx (1). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
What to do
The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 2 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 35 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 21 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.
C5 Data-Subject Rights — Repo shows no corroborated data-subject-rights mechanism (erasure / export-portability / consent) tied to a subject id or GDPR vocabulary — absence of evidence is not evidence of a working control. Implement erasure, data export/portability and consent tracking over the subject's records.
Not included — 58 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AX1 Captive dependencies — not 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
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No Go request handler (a net/http, Gin, Echo, Fiber or fasthttp handler, or a gRPC service method) is declared as a method or function, and no handler function literal writes a value captured from outside it, so no state is shared between request goroutines. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. No Swift request handler (a Vapor, Hummingbird, Kitura, Swifter or Perfect route handler, as a method or a registered closure) is declared, so no state is shared between request threads. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — docker build failed (exit 1) — -------------------- ERROR: failed to solve: dockerfile parse error on line 1: unknown instruction: <svg; likely cause (the repository): the Dockerfile does not parse: docker reports an instruction or option it does not know; runtime evidence skipped The cause is in the repository, not in our sandbox: the Dockerfile does not parse: docker reports an instruction or option it does not know. Nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D11 Test Reliability — Test reliability not scored — polyglot repository, one half's runner produced no measurement
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.
D22 Internal API Consistency — API consistency is measured on C#, TypeScript, Go only; the exposed Swift surface was not measured.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D25 ADR Conformance — None of 1 binding record(s) states a rule in checkable form (a backticked element with a prohibition, or an `adr-rules` block), so conformance cannot be read from the code. Write the rule as an `adr-rules` block (`forbid:` a symbol, a package or a dependency) to make it checkable.
D32 Data Compliance (PII/GDPR) — 111 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
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.
D8 Code Coverage — Coverage not measured — Swift suite
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, Scala, Rust and Java, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the Go, JavaScript/TypeScript, Python, Swift source, so there is no service whose uptime a failing dependency could take down
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.
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X1 Async correctness — X1 reached only 2% of this repository's production lines — swift (334,507 lines), go (78 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X12 Unreachable branch — X12 reached only 2% of this repository's production lines — swift (334,507 lines), go (78 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not 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 — X16 reached only 1% of this repository's production lines — swift (334,507 lines), python (3,885 lines), go (78 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X17 Uncapped recursion over a caller-supplied document — not 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 — X24 reached only 2% of this repository's production lines — swift (334,507 lines), go (78 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X25 Inert configuration knob — 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 — X27 reached only 1% of this repository's production lines — swift (334,507 lines), typescript (1,990 lines), javascript (1,459 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X29 Per-element action decided by a fixed element — X29 reached only 1% of this repository's production lines — swift (334,507 lines), python (3,885 lines), go (78 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X30 Support guard that admits what it rejects — X30 reached only 2% of this repository's production lines — swift (334,507 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Swift was read, and it logs through none: `print` and `NSLog` take one finished line, and os's `Logger` keeps each interpolated value as its own argument, so an assembled message there loses nothing the API could have kept (as with log4net in C#). Calls through swift-log (`import Logging`) and `os_log` calls would be judged.
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.
Domain fused to persistence infrastructure: PublicRepoStarHistoryRecord Starcat/Core/Insights/RepoStarHistoryRepository.swift:177— `PublicRepoStarHistoryRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
Domain fused to persistence infrastructure: GitHubStarListAIAutoIgnoredRepo Starcat/Core/Models/GitHubStarListAIAutoIgnoredRepo.swift:18— `GitHubStarListAIAutoIgnoredRepo` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
Domain fused to persistence infrastructure: RepositorySpotlightSnapshot Starcat/Core/Spotlight/RepositorySpotlightSnapshot.swift:16— `RepositorySpotlightSnapshot` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
Domain fused to persistence infrastructure: LanguageStat Starcat/Core/Sync/RepoRepository.swift:34— `LanguageStat` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
Domain fused to persistence infrastructure: UserSmartCollection Starcat/Features/Collections/UserSmartCollection.swift:18— `UserSmartCollection` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
Domain fused to persistence infrastructure: ChatSessionSQLRow Starcat/Shared/Services/DiskChatHistoryStore.swift:1358— `ChatSessionSQLRow` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
Domain fused to persistence infrastructure: ChatMessageSQLRow Starcat/Shared/Services/DiskChatHistoryStore.swift:1404— `ChatMessageSQLRow` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
Domain fused to persistence infrastructure: AISummaryRecord Starcat/Core/Database/Models/AISummaryRecord.swift:19— `AISummaryRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
Domain fused to persistence infrastructure: AIUsageEvent Starcat/Core/Database/Models/AIUsageEvent.swift:78— `AIUsageEvent` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
Domain fused to persistence infrastructure: ActivityAnnouncementRecord Starcat/Core/Database/Models/ActivityAnnouncementRecord.swift:54— `ActivityAnnouncementRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
Domain fused to persistence infrastructure: ActivityEventRecord Starcat/Core/Database/Models/ActivityEventRecord.swift:21— `ActivityEventRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
Domain fused to persistence infrastructure: ActivitySyncStateRecord Starcat/Core/Database/Models/ActivitySyncStateRecord.swift:23— `ActivitySyncStateRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
Domain fused to persistence infrastructure: AwesomeCustomSourceParseRecord Starcat/Core/Database/Models/AwesomeCustomSourceParseRecord.swift:14— `AwesomeCustomSourceParseRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
Domain fused to persistence infrastructure: AwesomeSubscriptionRecord Starcat/Core/Database/Models/AwesomeRecords.swift:107— `AwesomeSubscriptionRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
Domain fused to persistence infrastructure: AwesomeStateRecord Starcat/Core/Database/Models/AwesomeRecords.swift:185— `AwesomeStateRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
Domain fused to persistence infrastructure: DiscoveryListPageRecord Starcat/Core/Database/Models/DiscoveryCacheRecords.swift:18— `DiscoveryListPageRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
Domain fused to persistence infrastructure: DiscoverySummaryModeRecord Starcat/Core/Database/Models/DiscoveryCacheRecords.swift:211— `DiscoverySummaryModeRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
Domain fused to persistence infrastructure: DiscoverySummaryFacetRecord Starcat/Core/Database/Models/DiscoveryCacheRecords.swift:229— `DiscoverySummaryFacetRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
Domain fused to persistence infrastructure: DiscoveryBulkCategoryMembershipRecord Starcat/Core/Database/Models/DiscoveryCacheRecords.swift:446— `DiscoveryBulkCategoryMembershipRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
Domain fused to persistence infrastructure: DiscoveryBulkMetaRecord Starcat/Core/Database/Models/DiscoveryCacheRecords.swift:464— `DiscoveryBulkMetaRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
Domain fused to persistence infrastructure: GitHubNotificationSyncStateRecord Starcat/Core/Database/Models/GitHubNotificationSyncStateRecord.swift:11— `GitHubNotificationSyncStateRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
Domain fused to persistence infrastructure: GitHubNotificationThreadRecord Starcat/Core/Database/Models/GitHubNotificationThreadRecord.swift:27— `GitHubNotificationThreadRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
Domain fused to persistence infrastructure: GitHubStarList Starcat/Core/Database/Models/GitHubStarList.swift:18— `GitHubStarList` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
Domain fused to persistence infrastructure: GitHubStarListMembership Starcat/Core/Database/Models/GitHubStarList.swift:55— `GitHubStarListMembership` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
Domain fused to persistence infrastructure: GitHubStarListLocalOverride Starcat/Core/Database/Models/GitHubStarList.swift:80— `GitHubStarListLocalOverride` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
+ 15 more in this group — see findings.md.
AX9 · CQS / query purity· Query writes persistent state on the read path · ×5
Query writes persistent state on the read path: GRDBRepositoryInsightsCache.load Starcat/Core/Insights/RepositoryInsightsCache.swift:152— `GRDBRepositoryInsightsCache.load` is a read-named query yet it performs a durable write on the read path (a persist to a store/client). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command.
Query writes persistent state on the read path: InitialRepoWarmupCoordinator.loadOrCreateJob Starcat/Core/Warmup/InitialRepoWarmupCoordinator.swift:463— `InitialRepoWarmupCoordinator.loadOrCreateJob` is a read-named query yet it performs a durable write on the read path (a persist to a store/client). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command.
Query writes persistent state on the read path: BatchAIQueueService.resolveBulkTagApplications Starcat/Features/AI/BatchAIQueueService.swift:1281— `BatchAIQueueService.resolveBulkTagApplications` is a read-named query yet it performs a durable write on the read path (a persist to a store/client). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command.
Query writes persistent state on the read path: RepoAIInsightViewModel.findOrCreateTag Starcat/Features/AI/RepoAIInsightViewModel.swift:547— `RepoAIInsightViewModel.findOrCreateTag` is a read-named query yet it performs a durable write on the read path (a persist to a store/client). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command.
Query writes persistent state on the read path: GitHubRAGRemoteContextProvider.fetchBlock Starcat/Features/RAG/Core/GitHubRAGRemoteContextProvider.swift:144— `GitHubRAGRemoteContextProvider.fetchBlock` is a read-named query yet it performs a durable write on the read path (a persist to a store/client). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command.
<html> without a lang Starcat/Resources/FollowGraph/follow-graph.html:2— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
AC3 · Page structure· Document without a <title> · ×1
Document without a <title> Starcat/Resources/FollowGraph/follow-graph.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Focusable <div> isn't keyboard-operable starcat-promo-video/presentation/src/components/AutoStartGate.tsx:18— This <div> carries tabIndex={0}, so it is in the tab order and a keyboard user will land on it — but its behaviour is bound to the pointer only, with no key handler. A tabindex makes an element focusable, not operable: Enter and Space fire a click on a native <button> or <a href> and nowhere else, so this can be focused and never activated. Use a <button>, or handle Enter/Space in a key handler.
AC4 · Keyboard semantics· Click handler on a non-interactive <div> · ×1
Click handler on a non-interactive <div> starcat-promo-video/presentation/src/components/Stage.tsx:34— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Dual write (no outbox): ReadmeAPI.cachedReadme Starcat/Core/Network/GitHubAPI/ReadmeAPI.swift:150— `ReadmeAPI.cachedReadme` performs two independent DURABLE writes — `repository` (a persistence store) via `upsert` and `trendingRepository` (a persistence store) via `delete` — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox).
FileTooLong: UI/RAGWorkspaceInspector.swift Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift— FileTooLong — 3118 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: RAGWorkspaceInspector (55-4303). The bar is 500 significant lines; this is 2618 over it, 6.24× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: UI/KnowledgeRAGWorkspaceViewModel.swift Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift— FileTooLong — 3093 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: KnowledgeRAGWorkspaceViewModel (357-4447). The bar is 500 significant lines; this is 2593 over it, 6.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: Insights/RepositoryInsightsView.swift Starcat/Features/Insights/RepositoryInsightsView.swift— FileTooLong — 2595 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: RepositoryInsightsView (345-3441). The bar is 500 significant lines; this is 2095 over it, 5.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: UI/KnowledgeRAGWorkspaceWindowController.swift Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift— FileTooLong — 2521 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2021 over it, 5.04× 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: Home/HomeViewModel.swift Starcat/Features/Home/HomeViewModel.swift— FileTooLong — 2492 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: HomeViewModel (40-4204). The bar is 500 significant lines; this is 1992 over it, 4.98× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: Settings/SettingsView.swift Starcat/Features/Settings/SettingsView.swift— FileTooLong — 2215 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1715 over it, 4.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: Activity/GitHubNotificationDetailView.swift Starcat/Features/Activity/GitHubNotificationDetailView.swift— FileTooLong — 2207 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1707 over it, 4.41× 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: Migrations/DatabaseMigrationsV1.swift Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift— FileTooLong — 2052 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: DatabaseMigrations (63-3447). The bar is 500 significant lines; this is 1552 over it, 4.10× 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: Home/RepoListView.swift Starcat/Features/Home/RepoListView.swift— FileTooLong — 2012 significant lines (blank, comment-only and punctuation-only lines excluded), about 76% of them inside a single declaration: RepoListView (458-2929). The bar is 500 significant lines; this is 1512 over it, 4.02× 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: Search/SearchCenterView.swift Starcat/Features/Search/SearchCenterView.swift— FileTooLong — 1973 significant lines (blank, comment-only and punctuation-only lines excluded), about 60% of them inside a single declaration: SearchCenterView (12-1890). The bar is 500 significant lines; this is 1473 over it, 3.95× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: Settings/AppSettings.swift Starcat/Core/Settings/AppSettings.swift— FileTooLong — 1959 significant lines (blank, comment-only and punctuation-only lines excluded), about 74% of them inside a single declaration: AppSettings (833-3331). The bar is 500 significant lines; this is 1459 over it, 3.92× 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: Home/SidebarView.swift Starcat/Features/Home/SidebarView.swift— FileTooLong — 1816 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: SidebarView (57-2840). The bar is 500 significant lines; this is 1316 over it, 3.63× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: Home/HomeView.swift Starcat/Features/Home/HomeView.swift— FileTooLong — 1687 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: HomeView (39-2900). The bar is 500 significant lines; this is 1187 over it, 3.37× 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: ShareCard/ShareCardContent.swift Starcat/Features/Profile/ShareCard/ShareCardContent.swift— FileTooLong — 1668 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: ShareCardContent (62-2407). The bar is 500 significant lines; this is 1168 over it, 3.34× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: Components/ReadmeWebView.swift Starcat/Shared/Components/ReadmeWebView.swift— FileTooLong — 1667 significant lines (blank, comment-only and punctuation-only lines excluded), about 61% of them inside a single declaration: ReadmeWebContentView (318-1866). The bar is 500 significant lines; this is 1167 over it, 3.33× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: AI/BatchAIQueueService.swift Starcat/Features/AI/BatchAIQueueService.swift— FileTooLong — 1619 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: BatchAIQueueService (28-2522). The bar is 500 significant lines; this is 1119 over it, 3.24× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: Settings/ProSettingsView.swift Starcat/Features/Settings/ProSettingsView.swift— FileTooLong — 1560 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1060 over it, 3.12× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: AI/GitHubStarListAIGroupingSession.swift Starcat/Features/AI/GitHubStarListAIGroupingSession.swift— FileTooLong — 1474 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: GitHubStarListAIGroupingSession (217-2083). The bar is 500 significant lines; this is 974 over it, 2.95× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: Core/KnowledgeRAGService.swift Starcat/Features/RAG/Core/KnowledgeRAGService.swift— FileTooLong — 1448 significant lines (blank, comment-only and punctuation-only lines excluded), about 79% of them inside a single declaration: KnowledgeRAGService (426-1876). The bar is 500 significant lines; this is 948 over it, 2.90× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: Settings/AISettingsView.swift Starcat/Features/Settings/AISettingsView.swift— FileTooLong — 1392 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: AISettingsTab (37-2116). The bar is 500 significant lines; this is 892 over it, 2.78× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: AI/RepoAIWindowContentView.swift Starcat/Features/AI/RepoAIWindowContentView.swift— FileTooLong — 1364 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: RepoAIWindowContentView (95-2315). The bar is 500 significant lines; this is 864 over it, 2.73× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: Activity/WeeklyContentView.swift Starcat/Features/Activity/WeeklyContentView.swift— FileTooLong — 1323 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 823 over it, 2.65× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: AI/RepoAIInsightService.swift Starcat/Features/AI/RepoAIInsightService.swift— FileTooLong — 1300 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: RepoAIInsightService (149-2181). The bar is 500 significant lines; this is 800 over it, 2.60× 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: Activity/ActivityViewModel.swift Starcat/Features/Activity/ActivityViewModel.swift— FileTooLong — 1266 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: ActivityViewModel (61-2058). The bar is 500 significant lines; this is 766 over it, 2.53× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: App/AppDependencies.swift Starcat/App/AppDependencies.swift— FileTooLong — 1251 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: AppDependencies (22-2222). The bar is 500 significant lines; this is 751 over it, 2.50× 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.
ClassTooLong: RAGWorkspaceInspector Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:55— ClassTooLong — 3074 significant lines (blank, comment-only and punctuation-only lines excluded), 138 methods. The bar is 400 significant lines; this is 2674 over it, 7.69× 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: KnowledgeRAGWorkspaceViewModel Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:355— ClassTooLong — 2859 significant lines (blank, comment-only and punctuation-only lines excluded), 169 methods. The bar is 400 significant lines; this is 2459 over it, 7.15× 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: HomeViewModel Starcat/Features/Home/HomeViewModel.swift:38— ClassTooLong — 2449 significant lines (blank, comment-only and punctuation-only lines excluded), 116 methods. The bar is 400 significant lines; this is 2049 over it, 6.12× 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: RepositoryInsightsView Starcat/Features/Insights/RepositoryInsightsView.swift:345— ClassTooLong — 2245 significant lines (blank, comment-only and punctuation-only lines excluded), 64 methods. The bar is 400 significant lines; this is 1845 over it, 5.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: DatabaseMigrations Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:63— ClassTooLong — 2050 significant lines (blank, comment-only and punctuation-only lines excluded), 113 methods. The bar is 400 significant lines; this is 1650 over it, 5.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: SidebarView Starcat/Features/Home/SidebarView.swift:57— ClassTooLong — 1799 significant lines (blank, comment-only and punctuation-only lines excluded), 50 methods. The bar is 400 significant lines; this is 1399 over it, 4.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: HomeView Starcat/Features/Home/HomeView.swift:39— ClassTooLong — 1685 significant lines (blank, comment-only and punctuation-only lines excluded), 79 methods. The bar is 400 significant lines; this is 1285 over it, 4.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: BatchAIQueueService Starcat/Features/AI/BatchAIQueueService.swift:26— ClassTooLong — 1615 significant lines (blank, comment-only and punctuation-only lines excluded), 80 methods. The bar is 400 significant lines; this is 1215 over it, 4.04× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ShareCardContent Starcat/Features/Profile/ShareCard/ShareCardContent.swift:62— ClassTooLong — 1554 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 1154 over it, 3.89× 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: RepoListView Starcat/Features/Home/RepoListView.swift:458— ClassTooLong — 1535 significant lines (blank, comment-only and punctuation-only lines excluded), 62 methods. The bar is 400 significant lines; this is 1135 over it, 3.84× 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: AppSettings Starcat/Core/Settings/AppSettings.swift:831— ClassTooLong — 1452 significant lines (blank, comment-only and punctuation-only lines excluded), 55 methods. The bar is 400 significant lines; this is 1052 over it, 3.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.
ClassTooLong: AISettingsTab Starcat/Features/Settings/AISettingsView.swift:37— ClassTooLong — 1349 significant lines (blank, comment-only and punctuation-only lines excluded), 47 methods. The bar is 400 significant lines; this is 949 over it, 3.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: GitHubStarListAIGroupingSession Starcat/Features/AI/GitHubStarListAIGroupingSession.swift:215— ClassTooLong — 1336 significant lines (blank, comment-only and punctuation-only lines excluded), 80 methods. The bar is 400 significant lines; this is 936 over it, 3.34× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ActivityViewModel Starcat/Features/Activity/ActivityViewModel.swift:59— ClassTooLong — 1259 significant lines (blank, comment-only and punctuation-only lines excluded), 77 methods. The bar is 400 significant lines; this is 859 over it, 3.15× 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: RepoAIWindowContentView Starcat/Features/AI/RepoAIWindowContentView.swift:95— ClassTooLong — 1251 significant lines (blank, comment-only and punctuation-only lines excluded), 56 methods. The bar is 400 significant lines; this is 851 over it, 3.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: AppDependencies Starcat/App/AppDependencies.swift:20— ClassTooLong — 1246 significant lines (blank, comment-only and punctuation-only lines excluded), 18 methods. The bar is 400 significant lines; this is 846 over it, 3.12× 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: KnowledgeRAGBrowserView Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:1351— ClassTooLong — 1234 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 834 over it, 3.09× 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: RepoAIInsightService Starcat/Features/AI/RepoAIInsightService.swift:148— ClassTooLong — 1220 significant lines (blank, comment-only and punctuation-only lines excluded), 61 methods. The bar is 400 significant lines; this is 820 over it, 3.05× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: SearchCenterView Starcat/Features/Search/SearchCenterView.swift:12— ClassTooLong — 1178 significant lines (blank, comment-only and punctuation-only lines excluded), 51 methods. The bar is 400 significant lines; this is 778 over it, 2.95× 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: StarredHTMLRenderer Starcat/Features/Profile/ShareCard/StarredHTMLRenderer.swift:41— ClassTooLong — 1154 significant lines (blank, comment-only and punctuation-only lines excluded), 13 methods. The bar is 400 significant lines; this is 754 over it, 2.89× 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: KnowledgeRAGService Starcat/Features/RAG/Core/KnowledgeRAGService.swift:426— ClassTooLong — 1148 significant lines (blank, comment-only and punctuation-only lines excluded), 18 methods. The bar is 400 significant lines; this is 748 over it, 2.87× 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: AgentWorkspaceRunSurface Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:38— ClassTooLong — 1075 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 675 over it, 2.69× 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: ReadmeWebContentView Starcat/Shared/Components/ReadmeWebView.swift:318— ClassTooLong — 1013 significant lines (blank, comment-only and punctuation-only lines excluded), 10 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: GRDBRepoRepository Starcat/Core/Sync/RepoRepository.swift:53— ClassTooLong — 974 significant lines (blank, comment-only and punctuation-only lines excluded), 48 methods. The bar is 400 significant lines; this is 574 over it, 2.44× 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: RAGWorkspaceAnswerSurface Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:18— ClassTooLong — 952 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 552 over it, 2.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.
Hotspot: Starcat/Features/Settings/SettingsView.swift Starcat/Features/Settings/SettingsView.swift:2324— Starcat/Features/Settings/SettingsView.swift changed 47 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in StorageSettingsTab.perform at line 2324. 2 of those changes were fix/bug commits, and the other 45 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Features/Settings/SettingsView.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: Starcat/App/AppDependencies.swift Starcat/App/AppDependencies.swift:880— Starcat/App/AppDependencies.swift changed 48 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in AppDependencies.init at line 880. 6 of those changes were fix/bug commits, and the other 42 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/App/AppDependencies.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: Starcat/Features/Home/SidebarView.swift Starcat/Features/Home/SidebarView.swift:927— Starcat/Features/Home/SidebarView.swift changed 56 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in SidebarView.isExploreSelectionCurrent at line 927. 12 of those changes were fix/bug commits, and the other 44 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Features/Home/SidebarView.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: Starcat/Features/Home/HomeViewModel.swift Starcat/Features/Home/HomeViewModel.swift:2757— Starcat/Features/Home/HomeViewModel.swift changed 25 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 62 in HomeViewModel.reloadItems at line 2757. 8 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Features/Home/HomeViewModel.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: Starcat/Features/Home/RepoListView.swift Starcat/Features/Home/RepoListView.swift:1936— Starcat/Features/Home/RepoListView.swift changed 62 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in RepoListView.unifiedListContent at line 1936. 13 of those changes were fix/bug commits, and the other 49 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Features/Home/RepoListView.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: resources/follow-graph/entry.js resources/follow-graph/entry.js:704— resources/follow-graph/entry.js changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 57 in entry.update at line 704. 7 of those changes were fix/bug commits, and the other 13 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- resources/follow-graph/entry.js`: 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: Starcat/Features/Home/HomeView.swift Starcat/Features/Home/HomeView.swift:2139— Starcat/Features/Home/HomeView.swift changed 66 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in HomeView.syncViewModelSettingsFromAppSettings at line 2139. 18 of those changes were fix/bug commits, and the other 48 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Features/Home/HomeView.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: Starcat/Core/Settings/AppSettings.swift Starcat/Core/Settings/AppSettings.swift:1917— Starcat/Core/Settings/AppSettings.swift changed 46 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in AppSettings.init at line 1917. 6 of those changes were fix/bug commits, and the other 40 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Core/Settings/AppSettings.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: Starcat/Features/AI/BatchAIQueueService.swift Starcat/Features/AI/BatchAIQueueService.swift:1681— Starcat/Features/AI/BatchAIQueueService.swift changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in BatchAIQueueService.applyResult at line 1681. 11 of those changes were fix/bug commits, and the other 19 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Features/AI/BatchAIQueueService.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: Starcat/Core/Sync/RepoRepository.swift Starcat/Core/Sync/RepoRepository.swift:793— Starcat/Core/Sync/RepoRepository.swift changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 75 in GRDBRepoRepository.makeListQuery at line 793. 4 of those changes were fix/bug commits, and the other 9 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Core/Sync/RepoRepository.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: Starcat/Features/Agents/ExternalRuntime/CodexAppServerAdapter.swift Starcat/Features/Agents/ExternalRuntime/CodexAppServerAdapter.swift:293— Starcat/Features/Agents/ExternalRuntime/CodexAppServerAdapter.swift changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 80 in CodexAppServerDriver.receiveNotificationOrRequest at line 293. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Features/Agents/ExternalRuntime/CodexAppServerAdapter.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: Starcat/Features/Agents/ExternalRuntime/DeepSeekHarnessAdapter.swift Starcat/Features/Agents/ExternalRuntime/DeepSeekHarnessAdapter.swift:360— Starcat/Features/Agents/ExternalRuntime/DeepSeekHarnessAdapter.swift changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 63 in DeepSeekHarnessDriver.mapEvent 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Features/Agents/ExternalRuntime/DeepSeekHarnessAdapter.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: Starcat/Features/Activity/GitHubNotificationDetailView.swift Starcat/Features/Activity/GitHubNotificationDetailView.swift:1143— Starcat/Features/Activity/GitHubNotificationDetailView.swift changed 44 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in GitHubNotificationCommentCard.body at line 1143. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Features/Activity/GitHubNotificationDetailView.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: Starcat/Features/Agents/ExternalRuntime/ExternalAgentRuntime.swift Starcat/Features/Agents/ExternalRuntime/ExternalAgentRuntime.swift:535— Starcat/Features/Agents/ExternalRuntime/ExternalAgentRuntime.swift changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in ExternalAgentEventProjector.consume 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Features/Agents/ExternalRuntime/ExternalAgentRuntime.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: Starcat/Features/Settings/AISettingsView.swift Starcat/Features/Settings/AISettingsView.swift:140— Starcat/Features/Settings/AISettingsView.swift changed 33 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in AISettingsTab.aiConfigurationForm at line 140. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Features/Settings/AISettingsView.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: Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:3145— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in KnowledgeRAGChunkEditor.body at line 3145. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.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: Starcat/Features/Agents/ExternalRuntime/ExternalAgentRuntimeHost.swift Starcat/Features/Agents/ExternalRuntime/ExternalAgentRuntimeHost.swift:115— Starcat/Features/Agents/ExternalRuntime/ExternalAgentRuntimeHost.swift changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in ExternalAgentProcessSession.run at line 115. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Features/Agents/ExternalRuntime/ExternalAgentRuntimeHost.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: Starcat/Features/FollowGraph/FollowGraphViewModel.swift Starcat/Features/FollowGraph/FollowGraphViewModel.swift:477— Starcat/Features/FollowGraph/FollowGraphViewModel.swift changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in FollowGraphViewModel.explore at line 477. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Features/FollowGraph/FollowGraphViewModel.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: Starcat/Features/Home/GitHubStarListAIGroupingPresentation.swift Starcat/Features/Home/GitHubStarListAIGroupingPresentation.swift:321— Starcat/Features/Home/GitHubStarListAIGroupingPresentation.swift changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in GitHubStarListAIGroupingPresentationSnapshot.init at line 321. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Features/Home/GitHubStarListAIGroupingPresentation.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: Starcat/Features/DailyRadar/DailyRadarPreviewWorkspace.swift Starcat/Features/DailyRadar/DailyRadarPreviewWorkspace.swift:176— Starcat/Features/DailyRadar/DailyRadarPreviewWorkspace.swift changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in DailyRadarPreviewWorkspace.home at line 176. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Features/DailyRadar/DailyRadarPreviewWorkspace.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: Starcat/Features/DailyRadar/DailyRadarWorkspaceViewModel.swift Starcat/Features/DailyRadar/DailyRadarWorkspaceViewModel.swift:238— Starcat/Features/DailyRadar/DailyRadarWorkspaceViewModel.swift changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in DailyRadarWorkspaceViewModel.reload at line 238. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Features/DailyRadar/DailyRadarWorkspaceViewModel.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: Starcat/Shared/Components/ReadmeWebView.swift Starcat/Shared/Components/ReadmeWebView.swift:1667— Starcat/Shared/Components/ReadmeWebView.swift changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in Coordinator.userContentController at line 1667. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Shared/Components/ReadmeWebView.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: Starcat/Core/Sync/GitHubNotificationInboxService.swift Starcat/Core/Sync/GitHubNotificationInboxService.swift:236— Starcat/Core/Sync/GitHubNotificationInboxService.swift changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in GitHubNotificationInboxService.hydrate at line 236. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Core/Sync/GitHubNotificationInboxService.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: Starcat/Features/AI/RepoAIInsightService.swift Starcat/Features/AI/RepoAIInsightService.swift:409— Starcat/Features/AI/RepoAIInsightService.swift changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in RepoAIInsightService.generateInsight at line 409. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Features/AI/RepoAIInsightService.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: Starcat/Features/AI/GitHubStarListAIGroupingSession.swift Starcat/Features/AI/GitHubStarListAIGroupingSession.swift:1613— Starcat/Features/AI/GitHubStarListAIGroupingSession.swift changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in GitHubStarListAIGroupingSession.integrate at line 1613. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Features/AI/GitHubStarListAIGroupingSession.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.
MethodTooLong: AppDependencies.init Starcat/App/AppDependencies.swift:880— MethodTooLong — init runs 696 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 596 over it, 6.96× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: StarredHTMLRenderer.buildStylesheet Starcat/Features/Profile/ShareCard/StarredHTMLRenderer.swift:489— MethodTooLong — buildStylesheet runs 513 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 413 over it, 5.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: AppSettings.init Starcat/Core/Settings/AppSettings.swift:1917— MethodTooLong — init runs 403 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 303 over it, 4.03× 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: CodexAppServerDriver.receiveNotificationOrRequest Starcat/Features/Agents/ExternalRuntime/CodexAppServerAdapter.swift:293— MethodTooLong — receiveNotificationOrRequest runs 378 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 278 over it, 3.78× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: KnowledgeRAGWorkspaceViewModel.runQuestion Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:2908— MethodTooLong — runQuestion runs 370 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 270 over it, 3.70× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: DeepSeekHarnessDriver.mapEvent Starcat/Features/Agents/ExternalRuntime/DeepSeekHarnessAdapter.swift:360— MethodTooLong — mapEvent runs 357 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 257 over it, 3.57× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: GRDBRepoRepository.makeListQuery Starcat/Core/Sync/RepoRepository.swift:793— MethodTooLong — makeListQuery runs 347 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 247 over it, 3.47× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: StorageSettingsTab.body Starcat/Features/Settings/SettingsView.swift:1760— MethodTooLong — body runs 333 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 233 over it, 3.33× 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: StarredHTMLRenderer.buildClientScript Starcat/Features/Profile/ShareCard/StarredHTMLRenderer.swift:1148— MethodTooLong — buildClientScript runs 316 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 216 over it, 3.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: KnowledgeRAGPromptBuilder.build Starcat/Features/RAG/Core/KnowledgeRAGPromptBuilder.swift:59— MethodTooLong — build runs 312 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 212 over it, 3.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RAGWorkspaceInspector.planInspector Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:1560— MethodTooLong — planInspector runs 273 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 173 over it, 2.73× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: HomeViewModel.reloadItems Starcat/Features/Home/HomeViewModel.swift:2757— MethodTooLong — reloadItems runs 260 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 160 over it, 2.60× 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: GRDBMyInsightsSnapshotProvider.makeStarredSnapshot Starcat/Features/Insights/MyInsightsSnapshotProvider.swift:270— MethodTooLong — makeStarredSnapshot runs 237 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 137 over it, 2.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: DatabaseManager.repairPrelaunchDevelopmentSchema Starcat/Core/Database/DatabaseManager.swift:241— MethodTooLong — repairPrelaunchDevelopmentSchema runs 236 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 136 over it, 2.36× 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: StarcatMCPToolRegistry.tools Starcat/Features/MCP/StarcatMCPToolRegistry.swift:99— MethodTooLong — tools runs 234 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 134 over it, 2.34× 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: LoopAgentRuntime.execute Starcat/Features/Agents/Core/LoopAgentRuntime.swift:378— MethodTooLong — execute runs 231 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 131 over it, 2.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: MCPSettingsTab.body Starcat/Features/MCP/MCPSettingsView.swift:24— MethodTooLong — body runs 221 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 121 over it, 2.21× 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: KnowledgeRAGWorkspaceViewModel.applyExecution Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:3850— MethodTooLong — applyExecution runs 217 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 117 over it, 2.17× 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: SmartCollectionRuleEditorSheet.body Starcat/Features/Collections/SmartCollectionRuleEditorView.swift:105— MethodTooLong — body runs 212 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 112 over it, 2.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CodebaseMemoryViewModel.generate Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryViewModel.swift:217— MethodTooLong — generate runs 201 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 101 over it, 2.01× 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: HomeViewModel.reloadDatabasePagedItems Starcat/Features/Home/HomeViewModel.swift:3156— MethodTooLong — reloadDatabasePagedItems runs 195 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 95 over it, 1.95× 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: SyncManager.runSyncBody Starcat/Core/Sync/SyncManager.swift:262— MethodTooLong — runSyncBody runs 174 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 74 over it, 1.74× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: OpenAIClient.chatStream Starcat/Features/AI/OpenAIClient.swift:167— MethodTooLong — chatStream runs 163 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 63 over it, 1.63× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CodexAppServerDriver.traceEvent Starcat/Features/Agents/ExternalRuntime/CodexAppServerAdapter.swift:771— MethodTooLong — traceEvent runs 161 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 61 over it, 1.61× 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: StarcatMCPToolRegistry.callTool Starcat/Features/MCP/StarcatMCPToolRegistry.swift:379— MethodTooLong — callTool runs 161 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 61 over it, 1.61× 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.
No assertions: adjacentSlotsAvoidDuplicateArtwork StarcatTests/AmbientGridEngineTests.swift:101— 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: cancellation StarcatTests/AnthropicClientTests.swift:335— 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: missingLimitHeaderYieldsNil StarcatTests/AnySearchClientTests.swift:183— 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: missingRemainingHeaderYieldsNil StarcatTests/AnySearchClientTests.swift:191— 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: missingResetHeaderYieldsNil StarcatTests/AnySearchClientTests.swift:199— 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: nonNumericLimitYieldsNil StarcatTests/AnySearchClientTests.swift:207— 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: nonNumericResetYieldsNil StarcatTests/AnySearchClientTests.swift:216— 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: noHeadersYieldsNilRateLimit StarcatTests/AnySearchClientTests.swift:225— 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: handleWebFlowCallback_wrongPath StarcatTests/AuthSessionWebFlowTests.swift:222— 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: handleWebFlowCallback_wrongScheme StarcatTests/AuthSessionWebFlowTests.swift:241— 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: rejectsArchiveAboveConfiguredLimit StarcatTests/CodeFlowRunnerTests.swift:49— 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: pageGenerationRespectsConfiguredLimit StarcatTests/CodeFlowRunnerTests.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: proCanUseAITags StarcatTests/EntitlementGateTests.swift:31— 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: codexRuntimeDirectoryRejectsMissingCodeModeHost StarcatTests/ExternalAgentProtocolAdapterTests.swift:348— 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: ignoresStdoutDiagnosticsAndStreamsJSONUntilTerminalEvent StarcatTests/ExternalAgentRuntimeHostTests.swift:15— 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: executesDynamicToolAndReturnsResult StarcatTests/ExternalAgentRuntimeHostTests.swift:43— 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: protocolActivityExtendsFirstOutputWatchdog StarcatTests/ExternalAgentRuntimeHostTests.swift:92— 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: get401Unauthorized StarcatTests/GitHubAPIClientTests.swift:265— 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: get403UnauthorizedWithoutRateLimitMessage StarcatTests/GitHubAPIClientTests.swift:331— 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: get404NotFound StarcatTests/GitHubAPIClientTests.swift:377— 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: get200DecodingError StarcatTests/GitHubAPIClientTests.swift:411— 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: getTransportError StarcatTests/GitHubAPIClientTests.swift:466— 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: unstar404NotFound StarcatTests/GitHubAPIClientTests.swift:499— 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: readmeHTML404 StarcatTests/GitHubAPIClientTests.swift:619— 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: malformedXML StarcatTests/GitHubBlogRSSAPITests.swift:112— 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.
Duplicated block (8 lines × 2) Starcat/Core/Network/GitHubAPI/GitHubAPIClient.swift:219— Starcat/Core/Network/GitHubAPI/GitHubAPIClient.swift:219-226 | Starcat/Core/Network/GitHubAPI/GitHubAPIClient.swift:231-238 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Core/Network/GitHubAPI/GitHubAPIClient.swift:219` 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 (8 lines × 2) Starcat/Core/RAG/KnowledgeRAGIndexBuilder.swift:919— Starcat/Core/RAG/KnowledgeRAGIndexBuilder.swift:919-926 | Starcat/Core/RAG/KnowledgeRAGIndexBuilder.swift:1029-1036 — 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) Starcat/Core/Sync/RepoRepository.swift:1520— Starcat/Core/Sync/RepoRepository.swift:1520-1527 | Starcat/Features/RAG/Core/KnowledgeBaseMetadataSnapshot.swift:879-886 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (8 lines × 2) Starcat/Core/Sync/SyncManager.swift:514— Starcat/Core/Sync/SyncManager.swift:514-521 | Starcat/Core/Sync/SyncManager.swift:526-533 — 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 (8 lines × 2) Starcat/Features/AI/BatchAIOptionsSheet.swift:530— Starcat/Features/AI/BatchAIOptionsSheet.swift:530-537 | Starcat/Features/AI/RepoAIGenerationOptionsSection.swift:154-161 — 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 `Starcat/Features/AI/BatchAIOptionsSheet.swift:530` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) Starcat/Features/AI/BatchAITagReviewRow.swift:306— Starcat/Features/AI/BatchAITagReviewRow.swift:306-313 | Starcat/Features/Home/GitHubStarListAIGroupingResultList.swift:733-740 — 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 `Starcat/Features/AI/BatchAITagReviewRow.swift:306` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) Starcat/Features/AI/LocalAI/LayaMLXDecisionModel.swift:106— Starcat/Features/AI/LocalAI/LayaMLXDecisionModel.swift:106-113 | Starcat/Features/AI/LocalAI/LayaMLXDecisionModel.swift:254-261 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) Starcat/Features/AI/RepoAIInlineWindowController.swift:314— Starcat/Features/AI/RepoAIInlineWindowController.swift:314-321 | Starcat/Features/Search/SearchCenterWindowController.swift:101-111 — 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 `Starcat/Features/AI/RepoAIInlineWindowController.swift:314` 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) Starcat/Features/AI/RepoAIWindowContentView.swift:401— Starcat/Features/AI/RepoAIWindowContentView.swift:401-408 | Starcat/Features/AI/RepoAIWindowContentView.swift:415-422 — 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 `Starcat/Features/AI/RepoAIWindowContentView.swift:401` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) Starcat/Features/AI/RepoAIWindowContentView.swift:785— Starcat/Features/AI/RepoAIWindowContentView.swift:785-792 | Starcat/Features/AI/RepoAIWindowContentView.swift:1007-1014 — 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 `Starcat/Features/AI/RepoAIWindowContentView.swift:785` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) Starcat/Features/AI/RepoAIWindowController.swift:275— Starcat/Features/AI/RepoAIWindowController.swift:275-282 | Starcat/Features/AI/RepoAIWindowController.swift:286-293 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) Starcat/Features/AI/RepositoryDecisionService.swift:97— Starcat/Features/AI/RepositoryDecisionService.swift:97-104 | Starcat/Features/AI/RepositoryDecisionService.swift:199-206 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/AI/RepositoryDecisionService.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.
Duplicated block (8 lines × 2) Starcat/Features/Activity/GitHubNotificationInboxView.swift:500— Starcat/Features/Activity/GitHubNotificationInboxView.swift:500-507 | Starcat/Features/Activity/GitHubNotificationInboxView.swift:553-560 — 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 `Starcat/Features/Activity/GitHubNotificationInboxView.swift:500` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8 lines × 2) Starcat/Features/Activity/WeeklyContentView.swift:596— Starcat/Features/Activity/WeeklyContentView.swift:596-603 | Starcat/Features/Activity/WeeklyContentView.swift:621-628 — 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 `Starcat/Features/Activity/WeeklyContentView.swift:596` 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 (8 lines × 2) Starcat/Features/Agents/Core/AgentMessageTimelineView.swift:237— Starcat/Features/Agents/Core/AgentMessageTimelineView.swift:237-244 | Starcat/Features/Agents/Core/AgentMessageTimelineView.swift:292-299 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Agents/Core/AgentMessageTimelineView.swift:237` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) Starcat/Features/Agents/ExternalRuntime/DeepSeekHarnessAdapter.swift:376— Starcat/Features/Agents/ExternalRuntime/DeepSeekHarnessAdapter.swift:376-383 | Starcat/Features/Agents/ExternalRuntime/DeepSeekHarnessAdapter.swift:394-401 — 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 `Starcat/Features/Agents/ExternalRuntime/DeepSeekHarnessAdapter.swift:376` 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 before the matched lines, `Starcat/Features/Agents/ExternalRuntime/DeepSeekHarnessAdapter.swift:392` calls `stepTraceID` and `Starcat/Features/Agents/ExternalRuntime/DeepSeekHarnessAdapter.swift:374` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) Starcat/Features/Auth/GithubDeviceFlowService.swift:64— Starcat/Features/Auth/GithubDeviceFlowService.swift:64-71 | Starcat/Features/Auth/GithubDeviceFlowService.swift:192-199 — 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 `Starcat/Features/Auth/GithubDeviceFlowService.swift:64` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) Starcat/Features/Home/HomeViewModel.swift:2225— Starcat/Features/Home/HomeViewModel.swift:2225-2232 | Starcat/Features/Home/HomeViewModel.swift:2242-2249 — 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) Starcat/Features/Home/SidebarView.swift:2330— Starcat/Features/Home/SidebarView.swift:2330-2337 | Starcat/Features/Home/SidebarView.swift:2412-2419 — 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 `Starcat/Features/Home/SidebarView.swift:2330` 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) Starcat/Features/Profile/ShareCard/ShareCardContent.swift:2567— Starcat/Features/Profile/ShareCard/ShareCardContent.swift:2567-2574 | Starcat/Features/Profile/ShareCard/ShareCardSheet.swift:1035-1042 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) Starcat/Features/RAG/Core/KnowledgeRAGQueryPlanner.swift:502— Starcat/Features/RAG/Core/KnowledgeRAGQueryPlanner.swift:502-509 | Starcat/Features/RAG/Core/RAGNetworkIntentResolver.swift:142-149 — 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 `Starcat/Features/RAG/Core/KnowledgeRAGQueryPlanner.swift:502` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:2512— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:2512-2519 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3260-3267 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (8 lines × 2) Starcat/Features/RAG/UI/RAGAssistantMessageBlock.swift:139— Starcat/Features/RAG/UI/RAGAssistantMessageBlock.swift:139-146 | Starcat/Features/RAG/UI/RAGUserMessageBlock.swift:144-151 — 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 `Starcat/Features/RAG/UI/RAGAssistantMessageBlock.swift:139` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2216— Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2216-2223 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2260-2267 — 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 `Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2216` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3863— Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3863-3870 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3903-3910 — 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 `Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3863` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) Starcat/App/StatusBarController.swift:220— Starcat/App/StatusBarController.swift:220-230 | Starcat/Features/Settings/IntegrationSettingsView.swift:421-431 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (11 lines × 2) Starcat/Core/Health/RepoHealthService.swift:197— Starcat/Core/Health/RepoHealthService.swift:197-207 | Starcat/Features/Releases/RepoReleaseSection.swift:277-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. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Core/Health/RepoHealthService.swift:197` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) Starcat/Core/Health/RepoHealthService.swift:192— Starcat/Core/Health/RepoHealthService.swift:192-202 | Starcat/Core/Sync/ReleaseMonitor.swift:185-195 — 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 `Starcat/Core/Health/RepoHealthService.swift:192` 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) Starcat/Core/Network/GitHubAPI/ReadmeAPI.swift:553— Starcat/Core/Network/GitHubAPI/ReadmeAPI.swift:553-564 | Starcat/Core/Network/GitHubAPI/ReadmeAPI.swift:595-605 — 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 `Starcat/Core/Network/GitHubAPI/ReadmeAPI.swift:553` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) Starcat/Core/Network/ServiceAvailabilityMonitor.swift:75— Starcat/Core/Network/ServiceAvailabilityMonitor.swift:75-85 | Starcat/Core/Network/ServiceHealthChecker.swift:238-249 — 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) Starcat/Core/Screensaver/ScreensaverRefreshCoordinator.swift:90— Starcat/Core/Screensaver/ScreensaverRefreshCoordinator.swift:90-100 | Starcat/Core/Widget/WidgetRefreshCoordinator.swift:63-73 — 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 `Starcat/Core/Screensaver/ScreensaverRefreshCoordinator.swift:90` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) Starcat/Features/AI/RepoAIWindowContentView.swift:765— Starcat/Features/AI/RepoAIWindowContentView.swift:765-775 | Starcat/Features/AI/RepoAIWindowContentView.swift:990-1000 — 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 `Starcat/Features/AI/RepoAIWindowContentView.swift:765` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (11 lines × 2) Starcat/Features/AI/RepoAIWindowContentView.swift:2222— Starcat/Features/AI/RepoAIWindowContentView.swift:2222-2232 | Starcat/Features/AI/RepoAIWindowContentView.swift:2248-2258 — 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 `Starcat/Features/AI/RepoAIWindowContentView.swift:2222` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) Starcat/Features/Activity/GitHubNotificationDetailView.swift:1607— Starcat/Features/Activity/GitHubNotificationDetailView.swift:1607-1617 | Starcat/Features/Activity/GitHubNotificationIssueTimelineConversation.swift:348-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.
Duplicated block (11 lines × 2) Starcat/Features/Activity/GitHubNotificationNoSelectionPlaceholder.swift:101— Starcat/Features/Activity/GitHubNotificationNoSelectionPlaceholder.swift:101-111 | Starcat/Shared/Components/RepoDetailNoSelectionPlaceholder.swift:88-98 — 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 `Starcat/Features/Activity/GitHubNotificationNoSelectionPlaceholder.swift:101` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) Starcat/Features/Activity/WeeklyContentView.swift:787— Starcat/Features/Activity/WeeklyContentView.swift:787-797 | Starcat/Features/Trending/TrendingView.swift:563-573 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (11 lines × 2) Starcat/Features/Activity/WeeklyContentView.swift:1284— Starcat/Features/Activity/WeeklyContentView.swift:1284-1294 | Starcat/Features/Activity/WeeklyContentView.swift:1503-1513 — 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 `Starcat/Features/Activity/WeeklyContentView.swift:1284` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) Starcat/Features/Activity/WeeklySourceEventsSection.swift:49— Starcat/Features/Activity/WeeklySourceEventsSection.swift:49-59 | Starcat/Features/Explore/AwesomeDetailView.swift:73-83 — 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 `Starcat/Features/Activity/WeeklySourceEventsSection.swift:49` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (11 lines × 2) Starcat/Features/Agents/Core/AgentMessageTimelineView.swift:264— Starcat/Features/Agents/Core/AgentMessageTimelineView.swift:264-274 | Starcat/Features/Agents/Core/AgentMessageTimelineView.swift:348-358 — 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 `Starcat/Features/Agents/Core/AgentMessageTimelineView.swift:264` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) Starcat/Features/CodeGraph/CodeFlowStorage.swift:465— Starcat/Features/CodeGraph/CodeFlowStorage.swift:465-475 | Starcat/Shared/Services/RepoContextStorage.swift:717-727 — before extracting anything, compare `Starcat/Features/CodeGraph/CodeFlowStorage.swift` and `Starcat/Shared/Services/RepoContextStorage.swift` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 259 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/CodeGraph/CodeFlowStorage.swift:465` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `removed` to `CodeFlowStoredProject?` in one and `RepoContextStoredProject?` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (11 lines × 2) Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryRunner.swift:419— Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryRunner.swift:419-429 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryRunner.swift:672-682 — 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, `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryRunner.swift:414` calls `Pipe` and `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryRunner.swift:670` 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 (11 lines × 2) Starcat/Features/Collections/SmartCollectionRuleSummary.swift:403— Starcat/Features/Collections/SmartCollectionRuleSummary.swift:403-413 | Starcat/Features/Collections/SmartCollectionRuleSummary.swift:419-429 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Collections/SmartCollectionRuleSummary.swift:403` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) Starcat/Features/Home/ReadmeSkeletonView.swift:43— Starcat/Features/Home/ReadmeSkeletonView.swift:43-53 | Starcat/Features/Home/ReadmeSkeletonView.swift:75-85 — 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 `Starcat/Features/Home/ReadmeSkeletonView.swift:43` 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, `Starcat/Features/Home/ReadmeSkeletonView.swift:72` calls `paragraphLine` and `Starcat/Features/Home/ReadmeSkeletonView.swift:40` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 2) Starcat/Features/Home/RepoListView.swift:2760— Starcat/Features/Home/RepoListView.swift:2760-2770 | Starcat/Features/RAG/UI/RAGContextPickerFilterControls.swift:227-237 — 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 `Starcat/Features/Home/RepoListView.swift:2760` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) Starcat/Features/Home/SidebarView.swift:1674— Starcat/Features/Home/SidebarView.swift:1674-1684 | Starcat/Features/Home/SidebarView.swift:2718-2728 — 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 `Starcat/Features/Home/SidebarView.swift:1674` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) Starcat/Features/Insights/InsightsCardIllustration.swift:235— Starcat/Features/Insights/InsightsCardIllustration.swift:235-245 | Starcat/Features/Insights/InsightsCardIllustration.swift:262-272 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Insights/InsightsCardIllustration.swift:235` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (11 lines × 2) Starcat/Features/Insights/RepositoryInsightsView.swift:833— Starcat/Features/Insights/RepositoryInsightsView.swift:833-843 | Starcat/Features/Insights/RepositoryInsightsView.swift:884-894 — 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 `Starcat/Features/Insights/RepositoryInsightsView.swift:833` 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, `Starcat/Features/Insights/RepositoryInsightsView.swift:832` calls `foregroundStyle` and `Starcat/Features/Insights/RepositoryInsightsView.swift:883` 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 (11 lines × 2) Starcat/Features/MCP/MCPSettingsView.swift:565— Starcat/Features/MCP/MCPSettingsView.swift:565-575 | Starcat/Features/Settings/IntegrationSettingsView.swift:744-754 — 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) Starcat/Features/RAG/UI/RAGMetadataSectionHelp.swift:92— Starcat/Features/RAG/UI/RAGMetadataSectionHelp.swift:92-102 | Starcat/Features/RAG/UI/RAGPlanSectionHelp.swift:184-194 — 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) Starcat/Features/RAG/UI/RAGMetadataSectionHelp.swift:104— Starcat/Features/RAG/UI/RAGMetadataSectionHelp.swift:104-114 | Starcat/Features/RAG/UI/RAGPlanSectionHelp.swift:196-206 — 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) Starcat/Core/Database/Models/Readme.swift:72— Starcat/Core/Database/Models/Readme.swift:72-78 | Starcat/Core/Database/Models/TrendingReadme.swift:79-85 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Core/Database/Models/Readme.swift:72` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) Starcat/Core/Health/RepoHealthStore.swift:82— Starcat/Core/Health/RepoHealthStore.swift:82-88 | Starcat/Core/Health/RepoHealthStore.swift:97-103 — 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 `Starcat/Core/Health/RepoHealthStore.swift:82` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) Starcat/Features/AI/BatchAIOptionsSheet.swift:151— Starcat/Features/AI/BatchAIOptionsSheet.swift:151-157 | Starcat/Features/Home/GitHubStarListAIGroupingPreflightView.swift:242-248 — 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 `Starcat/Features/AI/BatchAIOptionsSheet.swift:151` 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) Starcat/Features/AI/RepoAIInsightService.swift:724— Starcat/Features/AI/RepoAIInsightService.swift:724-730 | Starcat/Features/AI/RepositoryDecisionService.swift:175-181 — 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 `Starcat/Features/AI/RepoAIInsightService.swift:724` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) Starcat/Features/Agents/Core/AgentHarnessProcessView.swift:188— Starcat/Features/Agents/Core/AgentHarnessProcessView.swift:188-194 | Starcat/Features/Agents/Core/AgentHarnessProcessView.swift:227-233 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Agents/Core/AgentHarnessProcessView.swift:188` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:820— Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:820-826 | Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:916-923 — 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 `Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:820` 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) Starcat/Features/Auth/GithubDeviceFlowService.swift:78— Starcat/Features/Auth/GithubDeviceFlowService.swift:78-84 | Starcat/Features/Auth/GithubWebFlowService.swift:175-181 — 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) Starcat/Features/CodeGraph/CodeFlowRunner.swift:304— Starcat/Features/CodeGraph/CodeFlowRunner.swift:304-310 | Starcat/Shared/Services/SharedSnapshotService.swift:247-253 — 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 `Starcat/Features/CodeGraph/CodeFlowRunner.swift:304` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Starcat/Shared/Services/SharedSnapshotService.swift:256` calls `requestFailed` and `Starcat/Features/CodeGraph/CodeFlowRunner.swift:311` 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) Starcat/Features/CodeGraph/CodeFlowStorage.swift:430— Starcat/Features/CodeGraph/CodeFlowStorage.swift:430-436 | Starcat/Shared/Services/RepoContextStorage.swift:661-667 — before extracting anything, compare `Starcat/Features/CodeGraph/CodeFlowStorage.swift` and `Starcat/Shared/Services/RepoContextStorage.swift` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 259 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/CodeGraph/CodeFlowStorage.swift:430` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `newProject` to `CodeFlowStoredProject` in one and `RepoContextStoredProject` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7 lines × 2) Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryBinaryResolver.swift:307— Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryBinaryResolver.swift:307-318 | Starcat/Features/Settings/RuntimeDownloadInstaller.swift:378-384 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) Starcat/Features/Explore/ExploreView.swift:624— Starcat/Features/Explore/ExploreView.swift:624-630 | Starcat/Features/Explore/ExploreView.swift:635-641 — 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 `Starcat/Features/Explore/ExploreView.swift:624` 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) Starcat/Features/Home/LocalAIStatusSection.swift:179— Starcat/Features/Home/LocalAIStatusSection.swift:179-185 | Starcat/Features/Home/LocalAIStatusSection.swift:275-281 — 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 `Starcat/Features/Home/LocalAIStatusSection.swift:179` 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) Starcat/Features/Home/RepoFileBrowserSheet.swift:387— Starcat/Features/Home/RepoFileBrowserSheet.swift:387-393 | Starcat/Features/Home/RepoFileBrowserSheet.swift:395-401 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) Starcat/Features/Profile/ShareCard/ShareCardContent.swift:367— Starcat/Features/Profile/ShareCard/ShareCardContent.swift:367-373 | Starcat/Features/Profile/ShareCard/ShareCardContent.swift:1082-1088 — 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 `Starcat/Features/Profile/ShareCard/ShareCardContent.swift:367` 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) Starcat/Features/Profile/ShareCard/ShareCardContent.swift:508— Starcat/Features/Profile/ShareCard/ShareCardContent.swift:508-514 | Starcat/Features/Profile/ShareCard/ShareCardContent.swift:542-548 — 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 `Starcat/Features/Profile/ShareCard/ShareCardContent.swift:508` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Starcat/Features/Profile/ShareCard/ShareCardContent.swift:549` calls `lineLimit`, `minimumScaleFactor` and `Starcat/Features/Profile/ShareCard/ShareCardContent.swift:515` 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) Starcat/Features/Profile/ShareCard/ShareCardContent.swift:1071— Starcat/Features/Profile/ShareCard/ShareCardContent.swift:1071-1077 | Starcat/Features/Profile/ShareCard/ShareCardContent.swift:1278-1284 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) Starcat/Features/RAG/Core/KnowledgeRAGModels.swift:934— Starcat/Features/RAG/Core/KnowledgeRAGModels.swift:934-940 | Starcat/Features/RAG/Core/KnowledgeRAGService.swift:234-240 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) Starcat/Features/RAG/Core/RAGBackendConfiguration.swift:27— Starcat/Features/RAG/Core/RAGBackendConfiguration.swift:27-33 | Starcat/Features/RAG/Core/RAGBackendConfiguration.swift:50-56 — 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 `Starcat/Features/RAG/Core/RAGBackendConfiguration.swift:27` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) Starcat/Features/RAG/UI/RAGAddToLibrarySheet.swift:182— Starcat/Features/RAG/UI/RAGAddToLibrarySheet.swift:182-188 | Starcat/Features/RAG/UI/RAGUserMessageBlock.swift:89-95 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/RAG/UI/RAGAddToLibrarySheet.swift:182` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:1031— Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:1031-1038 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2039-2045 — 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 `Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:1031` 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) Starcat/Features/Settings/ProSettingsView.swift:1558— Starcat/Features/Settings/ProSettingsView.swift:1558-1564 | Starcat/Features/Settings/ProSettingsView.swift:1585-1591 — 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 `Starcat/Features/Settings/ProSettingsView.swift:1558` 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) Starcat/Shared/Components/Toolbar/ToolbarRepoSelection.swift:108— Starcat/Shared/Components/Toolbar/ToolbarRepoSelection.swift:108-114 | Starcat/Shared/Components/Toolbar/ToolbarRepoSelection.swift:126-132 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Shared/Components/Toolbar/ToolbarRepoSelection.swift:108` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) Starcat/Shared/Components/GitHubMarkdownFitWidthImage.swift:218— Starcat/Shared/Components/GitHubMarkdownFitWidthImage.swift:218-224 | Starcat/Shared/Components/GitHubMarkdownFitWidthImage.swift:267-273 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) Starcat/Features/Recommendations/RecommendationContextService.swift:174— Starcat/Features/Recommendations/RecommendationContextService.swift:174-180 | Starcat/Features/Recommendations/RecommendationContextService.swift:236-242 — 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 `Starcat/Features/Recommendations/RecommendationContextService.swift:174` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) Starcat/Core/Download/ReleaseAssetDownloader.swift:70— Starcat/Core/Download/ReleaseAssetDownloader.swift:70-76 | Starcat/Core/Download/RepoFileDownloader.swift:115-121 — before extracting anything, compare `Starcat/Core/Download/ReleaseAssetDownloader.swift` and `Starcat/Core/Download/RepoFileDownloader.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
TooManyMethods: KnowledgeRAGWorkspaceViewModel Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:355— TooManyMethods — 169 methods. The bar is 30 methods; this is 139 over it, 5.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: RAGWorkspaceInspector Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:55— TooManyMethods — 138 methods. The bar is 30 methods; this is 108 over it, 4.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: HomeViewModel Starcat/Features/Home/HomeViewModel.swift:38— TooManyMethods — 116 methods. The bar is 30 methods; this is 86 over it, 3.87× 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: GitHubAPIClient Starcat/Core/Network/GitHubAPI/GitHubAPIClient.swift:94— TooManyMethods — 89 methods, declared across 24 files: GitHubAPI/GitHubAPIClient.swift (21), GitHubAPI/NotificationsAPI.swift (12), GitHubAPI/GitHubStarListsAPI.swift (8), GitHubAPI/UserAPI.swift (7), +20 more file(s). The bar is 30 methods; this is 59 over it, 2.97× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: BatchAIQueueService Starcat/Features/AI/BatchAIQueueService.swift:26— TooManyMethods — 80 methods. The bar is 30 methods; this is 50 over it, 2.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: GitHubStarListAIGroupingSession Starcat/Features/AI/GitHubStarListAIGroupingSession.swift:215— TooManyMethods — 80 methods. The bar is 30 methods; this is 50 over it, 2.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: HomeView Starcat/Features/Home/HomeView.swift:39— TooManyMethods — 79 methods. The bar is 30 methods; this is 49 over it, 2.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: ActivityViewModel Starcat/Features/Activity/ActivityViewModel.swift:59— TooManyMethods — 77 methods. The bar is 30 methods; this is 47 over it, 2.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AgentWorkspaceViewModel Starcat/Features/Agents/Core/AgentWorkspaceViewModel.swift:16— TooManyMethods — 68 methods. The bar is 30 methods; this is 38 over it, 2.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: RepositoryInsightsView Starcat/Features/Insights/RepositoryInsightsView.swift:345— TooManyMethods — 64 methods. The bar is 30 methods; this is 34 over it, 2.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: RepoListView Starcat/Features/Home/RepoListView.swift:458— TooManyMethods — 62 methods. The bar is 30 methods; this is 32 over it, 2.07× 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: RepoAIInsightService Starcat/Features/AI/RepoAIInsightService.swift:148— TooManyMethods — 61 methods, declared across 2 files: AI/RepoAIInsightService.swift (56), AI/BatchAIInsightProviding.swift (5). The bar is 30 methods; this is 31 over it, 2.03× 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: GitHubNotificationInboxService Starcat/Core/Sync/GitHubNotificationInboxService.swift:44— TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RepoAIWindowContentView Starcat/Features/AI/RepoAIWindowContentView.swift:95— TooManyMethods — 56 methods. The bar is 30 methods; this is 26 over it, 1.87× 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: AppSettings Starcat/Core/Settings/AppSettings.swift:831— TooManyMethods — 55 methods, declared across 4 files: Settings/AppSettings.swift (42), LocalAI/LocalAISettingsSelection.swift (8), AI/AIConfiguration.swift (3), LocalAI/LocalAIConfigurationLifecycle.swift (2). The bar is 30 methods; this is 25 over it, 1.83× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: View Starcat/App/StarcatApp.swift:540— TooManyMethods — 53 methods, declared across 37 files: App/StarcatCommandRouter.swift (4), Components/PressableHover.swift (4), UI/RAGWorkspaceTypography.swift (3), AICommandComposer/AICommandComposerView.swift (3), +33 more file(s). The bar is 30 methods; this is 23 over it, 1.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: KnowledgeRAGIndexBuilder Starcat/Core/RAG/KnowledgeRAGIndexBuilder.swift:180— TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SearchCenterView Starcat/Features/Search/SearchCenterView.swift:12— TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× 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: SidebarView Starcat/Features/Home/SidebarView.swift:57— 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: GRDBRepoRepository Starcat/Core/Sync/RepoRepository.swift:53— TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: KnowledgeRAGBrowserViewModel Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:454— TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AISettingsTab Starcat/Features/Settings/AISettingsView.swift:37— 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: WeeklyContentViewModel Starcat/Features/Activity/WeeklyContentView.swift:898— TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: LoopAgentRuntime Starcat/Features/Agents/Core/LoopAgentRuntime.swift:162— 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: GRDBRAGChunkRepository Starcat/Core/RAG/RAGChunkRepository.swift:147— TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. Most of these members implement repository.RAGChunkRepositoryProtocol (32 of 36 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
Duplicated block (6 lines × 2) Starcat/Core/Download/RepoFileDownloader.swift:353— Starcat/Core/Download/RepoFileDownloader.swift:353-358 | Starcat/Core/Download/RepoFileDownloader.swift:363-368 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) Starcat/Core/RAG/KnowledgeRAGIndexBuilder.swift:1257— Starcat/Core/RAG/KnowledgeRAGIndexBuilder.swift:1257-1262 | Starcat/Features/AI/SemanticSearchService.swift:381-386 — 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) Starcat/Core/Sync/TrendingRepository.swift:110— Starcat/Core/Sync/TrendingRepository.swift:110-115 | Starcat/Core/Sync/TrendingRepository.swift:213-218 — 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 `Starcat/Core/Sync/TrendingRepository.swift:110` 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) Starcat/Features/AI/AIOrganizationDraftRepository.swift:244— Starcat/Features/AI/AIOrganizationDraftRepository.swift:244-249 | Starcat/Features/Agents/Core/AgentRunRepository.swift:514-519 — 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 `Starcat/Features/AI/AIOrganizationDraftRepository.swift:244` 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) Starcat/Features/AI/BatchAIOptionsSheet.swift:94— Starcat/Features/AI/BatchAIOptionsSheet.swift:94-99 | Starcat/Features/AI/BatchAIOptionsSheet.swift:173-182 — 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6 lines × 2) Starcat/Features/AI/LocalAI/LayaDecisionModelStorage.swift:104— Starcat/Features/AI/LocalAI/LayaDecisionModelStorage.swift:104-109 | Starcat/Features/AI/LocalAI/LocalAIModelStorage.swift:245-250 — 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 `Starcat/Features/AI/LocalAI/LayaDecisionModelStorage.swift:104` 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 (6 lines × 2) Starcat/Features/About/AboutView.swift:169— Starcat/Features/About/AboutView.swift:169-174 | Starcat/Shared/Components/LaunchSplashView.swift:496-501 — 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 `Starcat/Features/About/AboutView.swift:169` 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) Starcat/Features/Agents/ExternalRuntime/DeepSeekHarnessAdapter.swift:427— Starcat/Features/Agents/ExternalRuntime/DeepSeekHarnessAdapter.swift:427-434 | Starcat/Features/Agents/ExternalRuntime/DeepSeekHarnessAdapter.swift:466-471 — 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 `Starcat/Features/Agents/ExternalRuntime/DeepSeekHarnessAdapter.swift:427` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) Starcat/Features/Agents/WeeklyReport/GitHubWeeklyReportTools.swift:421— Starcat/Features/Agents/WeeklyReport/GitHubWeeklyReportTools.swift:421-426 | Starcat/Features/Agents/WeeklyReport/GitHubWeeklyReportTools.swift:583-588 — 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 `Starcat/Features/Agents/WeeklyReport/GitHubWeeklyReportTools.swift:421` 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) Starcat/Features/CodeGraph/CodeFlowStorage.swift:290— Starcat/Features/CodeGraph/CodeFlowStorage.swift:290-296 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:359-364 — before extracting anything, compare `Starcat/Features/CodeGraph/CodeFlowStorage.swift` and `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/CodeGraph/CodeFlowStorage.swift:290` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Starcat/Features/CodeGraph/CodeFlowStorage.swift:297` calls `appendingPathComponent`, `write` and `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:365` 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 (6 lines × 2) Starcat/Features/Explore/ExploreModeHelpPopover.swift:182— Starcat/Features/Explore/ExploreModeHelpPopover.swift:182-187 | Starcat/Features/RAG/UI/RAGPlanSectionHelp.swift:217-222 — 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 `Starcat/Features/Explore/ExploreModeHelpPopover.swift:182` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) Starcat/Features/FollowGraph/FollowGraphAvatarSchemeHandler.swift:20— Starcat/Features/FollowGraph/FollowGraphAvatarSchemeHandler.swift:20-25 | Starcat/Shared/Components/ReadmeAttachmentImageSchemeHandler.swift:25-30 — 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 `Starcat/Features/FollowGraph/FollowGraphAvatarSchemeHandler.swift:20` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) Starcat/Features/Home/BatchActionBar.swift:722— Starcat/Features/Home/BatchActionBar.swift:722-727 | Starcat/Features/Tags/RepoTagsSection.swift:317-325 — 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 `Starcat/Features/Tags/RepoTagsSection.swift:317` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6 lines × 2) Starcat/Features/MCP/StarcatMCPFacade.swift:405— Starcat/Features/MCP/StarcatMCPFacade.swift:405-410 | Starcat/Features/MCP/StarcatMCPToolRegistry.swift:876-881 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) Starcat/Features/Onboarding/FirstRunWelcomeSheet.swift:1473— Starcat/Features/Onboarding/FirstRunWelcomeSheet.swift:1473-1478 | Starcat/Features/Onboarding/FirstRunWelcomeSheet.swift:1485-1490 — 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 `Starcat/Features/Onboarding/FirstRunWelcomeSheet.swift:1473` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `7` in one and `8` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 2) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2697— Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2697-2702 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2722-2727 — 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 `Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2697` 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) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3572— Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3572-3577 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3586-3591 — 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 `Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3572` 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, `Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3578` calls `fixedSize`, `frame` and `Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3592` 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 (6 lines × 2) Starcat/Features/RepoIssues/RepoIssuesWorkspaceView.swift:549— Starcat/Features/RepoIssues/RepoIssuesWorkspaceView.swift:549-556 | Starcat/Shared/Components/CountedSegmentedControl.swift:34-39 — 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 `Starcat/Features/RepoIssues/RepoIssuesWorkspaceView.swift:549` 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) Starcat/Features/Settings/ProHeroBackground.swift:73— Starcat/Features/Settings/ProHeroBackground.swift:73-78 | Starcat/Features/Settings/ProHeroBackground.swift:86-91 — 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 `Starcat/Features/Settings/ProHeroBackground.swift:73` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (6 lines × 2) Starcat/Shared/Services/DiskChatHistoryStore.swift:495— Starcat/Shared/Services/DiskChatHistoryStore.swift:495-500 | Starcat/Shared/Services/DiskChatHistoryStore.swift:818-823 — 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 `Starcat/Shared/Services/DiskChatHistoryStore.swift:495` 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) Starcat/Core/Network/AnySearch/AnySearchClient.swift:96— Starcat/Core/Network/AnySearch/AnySearchClient.swift:96-101 | Starcat/Features/ExternalSearch/ExternalSearchProviderClients.swift:364-369 — 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) Starcat/Core/Network/GitHubAPI/GitHubRepositoryMetricsClient.swift:958— Starcat/Core/Network/GitHubAPI/GitHubRepositoryMetricsClient.swift:958-963 | Starcat/Core/Network/GitHubAPI/GitHubRepositoryMetricsClient.swift:1046-1051 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) Starcat/Core/Sync/GitHubStarListSyncService.swift:443— Starcat/Core/Sync/GitHubStarListSyncService.swift:443-448 | Starcat/Core/Sync/GitHubStarListSyncService.swift:467-472 — 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 `Starcat/Core/Sync/GitHubStarListSyncService.swift:443` 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) Starcat/Features/Profile/ShareCard/ShareCardContent.swift:898— Starcat/Features/Profile/ShareCard/ShareCardContent.swift:898-903 | Starcat/Features/Profile/ShareCard/ShareCardContent.swift:1609-1614 — 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 `Starcat/Features/Profile/ShareCard/ShareCardContent.swift:898` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `4` in one and `3.5` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 2) Starcat/Core/Screensaver/ScreensaverSnapshotStore.swift:133— Starcat/Core/Screensaver/ScreensaverSnapshotStore.swift:133-138 | Starcat/Core/Widget/Shared/WidgetSnapshotStore.swift:105-110 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Swallowed exception (caught, then discarded) StarcatScreensaver/ScreensaverViewModel.swift:148— `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) StarcatScreensaver/ScreensaverViewModel.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) StarcatScreensaver/ScreensaverViewModel.swift:207— `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) Starcat/Shared/Services/DiskIssueDraftCache.swift:99— `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) Starcat/Shared/Services/DiskNotificationCommentDraftCache.swift:105— `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) Starcat/Shared/Diagnostics/DiagnosticLogStore.swift:141— `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) Starcat/Shared/Diagnostics/DiagnosticLogStore.swift:176— `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) Starcat/Shared/Diagnostics/DiagnosticLogStore.swift:295— `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) Starcat/Shared/Components/WorkspaceColumnWidthPersistence.swift:63— `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) Starcat/Shared/Components/WorkspaceColumnWidthPersistence.swift:86— `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) Starcat/Features/Tags/RepoTagsSection.swift:447— `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) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:882— `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) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:1845— `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) Starcat/Features/RAG/UI/RAGCitationChunkPopover.swift:81— `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) Starcat/Features/Notes/RepoNotesSection.swift:647— `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) Starcat/Features/Notes/RepoNotesSection.swift:664— `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) Starcat/Features/Notes/RepoNotesSection.swift:687— `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) Starcat/Features/Notes/RepoNotesSection.swift:726— `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) Starcat/Features/Insights/RepositoryInsightsAIContextProvider.swift:399— `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) Starcat/Features/Insights/RepositoryInsightsAIContextProvider.swift:414— `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) Starcat/Features/Insights/RepositoryInsightsViewModel.swift:244— `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) Starcat/Features/Insights/RepositoryInsightsViewModel.swift:312— `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) Starcat/Features/Insights/RepositoryInsightsViewModel.swift:322— `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) Starcat/Features/Insights/RepositoryInsightsViewModel.swift:341— `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) Starcat/Features/Insights/RepositoryInsightsViewModel.swift:1551— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Duplicated block (9 lines × 2) Starcat/Core/Distribution/AppStoreToDirectImport.swift:237— Starcat/Core/Distribution/AppStoreToDirectImport.swift:237-245 | Starcat/Core/Distribution/AppStoreToDirectImport.swift:254-262 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Core/Distribution/AppStoreToDirectImport.swift:237` 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, `Starcat/Core/Distribution/AppStoreToDirectImport.swift:246` calls `deletingLastPathComponent` and `Starcat/Core/Distribution/AppStoreToDirectImport.swift:263` 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 (9 lines × 2) Starcat/Core/Health/RepoHealthStore.swift:59— Starcat/Core/Health/RepoHealthStore.swift:59-67 | Starcat/Core/Sync/OpenSSFScoreStore.swift:62-70 — 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 `Starcat/Core/Health/RepoHealthStore.swift:59` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (9 lines × 2) Starcat/Features/AI/BatchAIWorkspaceView.swift:289— Starcat/Features/AI/BatchAIWorkspaceView.swift:289-298 | Starcat/Features/AI/BatchAIWorkspaceView.swift:300-308 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/AI/BatchAIWorkspaceView.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.
Duplicated block (9 lines × 2) Starcat/Features/Activity/ActivityDetailView.swift:270— Starcat/Features/Activity/ActivityDetailView.swift:270-278 | Starcat/Features/Activity/ActivityDetailView.swift:281-289 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Activity/ActivityDetailView.swift:270` 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) Starcat/Features/Activity/GitHubNotificationDetailView.swift:1731— Starcat/Features/Activity/GitHubNotificationDetailView.swift:1731-1740 | Starcat/Features/Activity/GitHubNotificationDetailView.swift:1821-1829 — 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 `Starcat/Features/Activity/GitHubNotificationDetailView.swift:1731` 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 (9 lines × 2) Starcat/Features/Agents/Core/AgentRunContextProvider.swift:30— Starcat/Features/Agents/Core/AgentRunContextProvider.swift:30-39 | Starcat/Features/Agents/Core/AgentRunContextProvider.swift:79-87 — 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 2) Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:650— Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:650-658 | Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:733-741 — 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 `Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:650` 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) Starcat/Features/Agents/WeeklyReport/RepoInsightArtifactBuilder.swift:167— Starcat/Features/Agents/WeeklyReport/RepoInsightArtifactBuilder.swift:167-175 | Starcat/Features/Agents/WeeklyReport/WeeklyReportArtifactBuilder.swift:218-226 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) Starcat/Features/CodeGraph/CodeFlowStorage.swift:327— Starcat/Features/CodeGraph/CodeFlowStorage.swift:327-335 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:379-387 — before extracting anything, compare `Starcat/Features/CodeGraph/CodeFlowStorage.swift` and `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) Starcat/Features/CodeGraph/CodeFlowStorage.swift:506— Starcat/Features/CodeGraph/CodeFlowStorage.swift:506-514 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:719-727 — before extracting anything, compare `Starcat/Features/CodeGraph/CodeFlowStorage.swift` and `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/CodeGraph/CodeFlowStorage.swift:506` 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) Starcat/Features/Home/AppStatusPanelChrome.swift:215— Starcat/Features/Home/AppStatusPanelChrome.swift:215-223 | Starcat/Features/Home/AppStatusPanelChrome.swift:245-253 — 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 `Starcat/Features/Home/AppStatusPanelChrome.swift:215` 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) Starcat/Features/Home/RepoMetadataHeaderView.swift:1062— Starcat/Features/Home/RepoMetadataHeaderView.swift:1062-1070 | Starcat/Features/Home/RepoMetadataHeaderView.swift:1118-1126 — 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 `Starcat/Features/Home/RepoMetadataHeaderView.swift:1062` 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) Starcat/Features/Insights/RepositoryInsightsView.swift:1241— Starcat/Features/Insights/RepositoryInsightsView.swift:1241-1249 | Starcat/Shared/Components/GrowthShareCopyButton.swift:19-27 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Insights/RepositoryInsightsView.swift:1241` 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) Starcat/Features/MCP/StarcatMCPToolRegistry.swift:479— Starcat/Features/MCP/StarcatMCPToolRegistry.swift:479-487 | Starcat/Features/MCP/StarcatMCPToolRegistry.swift:489-497 — 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 `Starcat/Features/MCP/StarcatMCPToolRegistry.swift:479` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) Starcat/Features/Profile/ShareCard/ShareCardContent.swift:1060— Starcat/Features/Profile/ShareCard/ShareCardContent.swift:1060-1068 | Starcat/Features/Profile/ShareCard/ShareCardContent.swift:1265-1275 — 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 `Starcat/Features/Profile/ShareCard/ShareCardContent.swift:1060` 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) Starcat/Features/RAG/Core/KnowledgeRAGService.swift:830— Starcat/Features/RAG/Core/KnowledgeRAGService.swift:830-838 | Starcat/Features/RAG/Core/KnowledgeRAGService.swift:850-861 — 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) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:2833— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:2833-2841 | Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:2907-2915 — 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 `Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:2833` 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) Starcat/Features/RAG/UI/RAGExecutionTimeline.swift:178— Starcat/Features/RAG/UI/RAGExecutionTimeline.swift:178-186 | Starcat/Features/RAG/UI/RAGExecutionTimeline.swift:203-211 — 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 `Starcat/Features/RAG/UI/RAGExecutionTimeline.swift:178` 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 (9 lines × 2) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:1014— Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:1014-1022 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:1956-1964 — 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 `Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:1014` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) Starcat/Features/Settings/AISettingsView.swift:719— Starcat/Features/Settings/AISettingsView.swift:719-727 | Starcat/Features/Settings/AISettingsView.swift:836-844 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Settings/AISettingsView.swift:719` 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) Starcat/Features/Settings/DiagnosticsSettingsTab.swift:260— Starcat/Features/Settings/DiagnosticsSettingsTab.swift:260-268 | Starcat/Features/Settings/LabsSettingsView.swift:115-123 — 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, `Starcat/Features/Settings/LabsSettingsView.swift:110` calls `toggleStyle`, `disabled` and `Starcat/Features/Settings/DiagnosticsSettingsTab.swift:256` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) Starcat/Features/Settings/ProSettingsView.swift:1130— Starcat/Features/Settings/ProSettingsView.swift:1130-1138 | Starcat/Features/Settings/ProSettingsView.swift:1320-1328 — 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 `Starcat/Features/Settings/ProSettingsView.swift:1130` 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) Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2206— Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2206-2214 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2478-2486 — 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 `Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2206` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2205` calls `references` and `Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2477` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) Starcat/Features/AI/OpenAIClient.swift:453— Starcat/Features/AI/OpenAIClient.swift:453-461 | Starcat/Features/AI/OpenAIClient.swift:508-516 — 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 `Starcat/Features/AI/OpenAIClient.swift:453` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: the declarations holding them bind `exchange` to `AIHTTPFailureExchange? = nil` in one and `AIHTTPFailureExchange?` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (9 lines × 2) Starcat/Features/CodeGraph/CodeFlowStorage.swift:415— Starcat/Features/CodeGraph/CodeFlowStorage.swift:415-423 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:643-651 — before extracting anything, compare `Starcat/Features/CodeGraph/CodeFlowStorage.swift` and `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/CodeGraph/CodeFlowStorage.swift:415` 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) Starcat/Core/Health/RepoHealthService.swift:120— Starcat/Core/Health/RepoHealthService.swift:120-129 | Starcat/Core/Health/RepoHealthService.swift:148-157 — 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 `Starcat/Core/Health/RepoHealthService.swift:120` 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) Starcat/Core/Sync/DiscoveryRepository.swift:101— Starcat/Core/Sync/DiscoveryRepository.swift:101-110 | Starcat/Core/Sync/WeeklyBulkRepository.swift:197-206 — 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 `Starcat/Core/Sync/DiscoveryRepository.swift:101` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) Starcat/Features/AI/LocalAI/LocalMLXClient.swift:166— Starcat/Features/AI/LocalAI/LocalMLXClient.swift:166-175 | Starcat/Features/RAG/Core/LocalMLXRAGReranker.swift:61-70 — 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 `Starcat/Features/AI/LocalAI/LocalMLXClient.swift:166` 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) Starcat/Features/AI/RepoAIInsightService.swift:1390— Starcat/Features/AI/RepoAIInsightService.swift:1390-1399 | Starcat/Features/AI/RepoAIInsightService.swift:1420-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 `Starcat/Features/AI/RepoAIInsightService.swift:1390` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (10 lines × 2) Starcat/Features/AI/RepoAIWindowContentView.swift:2005— Starcat/Features/AI/RepoAIWindowContentView.swift:2005-2014 | Starcat/Features/AI/RepoAIWindowContentView.swift:2305-2314 — 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 `Starcat/Features/AI/RepoAIWindowContentView.swift:2005` 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) Starcat/Features/Activity/GitHubNotificationDetailView.swift:2995— Starcat/Features/Activity/GitHubNotificationDetailView.swift:2995-3004 | Starcat/Features/Home/RepoFileSourcePreview.swift:73-82 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Activity/GitHubNotificationDetailView.swift:2995` 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) Starcat/Features/Agents/Core/AgentMessageTimelineView.swift:250— Starcat/Features/Agents/Core/AgentMessageTimelineView.swift:250-259 | Starcat/Features/Agents/Core/AgentMessageTimelineView.swift:308-317 — 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 `Starcat/Features/Agents/Core/AgentMessageTimelineView.swift:250` 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, `Starcat/Features/Agents/Core/AgentMessageTimelineView.swift:248` calls `Spacer` and `Starcat/Features/Agents/Core/AgentMessageTimelineView.swift:306` 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) Starcat/Features/Agents/Core/LoopAgentRuntime.swift:1012— Starcat/Features/Agents/Core/LoopAgentRuntime.swift:1012-1021 | Starcat/Features/Agents/ExternalRuntime/ExternalAgentRuntime.swift:370-379 — 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 `Starcat/Features/Agents/Core/LoopAgentRuntime.swift:1012` 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) Starcat/Features/Agents/ExternalRuntime/DeepSeekHarnessAdapter.swift:385— Starcat/Features/Agents/ExternalRuntime/DeepSeekHarnessAdapter.swift:385-394 | Starcat/Features/Agents/ExternalRuntime/DeepSeekHarnessAdapter.swift:403-412 — 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 `Starcat/Features/Agents/ExternalRuntime/DeepSeekHarnessAdapter.swift:385` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) Starcat/Features/Auth/GithubAuthView.swift:366— Starcat/Features/Auth/GithubAuthView.swift:366-375 | Starcat/Features/Auth/GithubAuthView.swift:518-527 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) Starcat/Features/CodeGraph/CodeFlowStorage.swift:440— Starcat/Features/CodeGraph/CodeFlowStorage.swift:440-449 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:661-670 — before extracting anything, compare `Starcat/Features/CodeGraph/CodeFlowStorage.swift` and `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `newProject` to `CodeFlowStoredProject` in one and `CodebaseMemoryStoredProject` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (10 lines × 2) Starcat/Features/Home/AppStatusToolbarButton.swift:493— Starcat/Features/Home/AppStatusToolbarButton.swift:493-502 | Starcat/Features/Home/LocalAIStatusSection.swift:96-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. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Home/AppStatusToolbarButton.swift:493` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (10 lines × 2) Starcat/Features/Home/ReadmeSkeletonView.swift:62— Starcat/Features/Home/ReadmeSkeletonView.swift:62-71 | Starcat/Features/Home/ReadmeSkeletonView.swift:77-86 — 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 `Starcat/Features/Home/ReadmeSkeletonView.swift:62` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (10 lines × 2) Starcat/Features/Insights/RepositoryInsightsView.swift:2305— Starcat/Features/Insights/RepositoryInsightsView.swift:2305-2314 | Starcat/Features/Insights/RepositoryInsightsView.swift:3392-3401 — 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 `Starcat/Features/Insights/RepositoryInsightsView.swift:2305` 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) Starcat/Features/MCP/StarcatMCPWriteFacade.swift:349— Starcat/Features/MCP/StarcatMCPWriteFacade.swift:349-358 | Starcat/Features/MCP/StarcatMCPWriteFacade.swift:380-389 — 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 `Starcat/Features/MCP/StarcatMCPWriteFacade.swift:349` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (10 lines × 2) Starcat/Features/MCP/StarcatMCPWriteFacade.swift:437— Starcat/Features/MCP/StarcatMCPWriteFacade.swift:437-446 | Starcat/Features/MCP/StarcatMCPWriteFacade.swift:503-512 — 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 `Starcat/Features/MCP/StarcatMCPWriteFacade.swift:437` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (10 lines × 2) Starcat/Features/MCP/StarcatMCPWriteFacade.swift:442— Starcat/Features/MCP/StarcatMCPWriteFacade.swift:442-451 | Starcat/Features/MCP/StarcatMCPWriteFacade.swift:475-484 — 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 `Starcat/Features/MCP/StarcatMCPWriteFacade.swift:442` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (10 lines × 2) Starcat/Features/Onboarding/FirstRunWelcomeSheet.swift:525— Starcat/Features/Onboarding/FirstRunWelcomeSheet.swift:525-534 | Starcat/Features/Onboarding/FirstRunWelcomeSheet.swift:551-560 — 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 (10 lines × 2) Starcat/Features/Profile/ShareCard/LibraryExportRenderer.swift:191— Starcat/Features/Profile/ShareCard/LibraryExportRenderer.swift:191-200 | Starcat/Features/Profile/ShareCard/LibraryExportRenderer.swift:644-653 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) Starcat/Features/RAG/Core/RAGExternalSearchProviders.swift:305— Starcat/Features/RAG/Core/RAGExternalSearchProviders.swift:305-314 | Starcat/Features/RAG/Core/RAGExternalSearchProviders.swift:592-601 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) Starcat/Features/RAG/UI/RAGWorkspaceConversationRail.swift:251— Starcat/Features/RAG/UI/RAGWorkspaceConversationRail.swift:251-260 | Starcat/Features/RAG/UI/RAGWorkspaceConversationRow.swift:118-128 — 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 `Starcat/Features/RAG/UI/RAGWorkspaceConversationRail.swift:251` 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) Starcat/Features/RepoIssues/RepoIssuesWorkspaceView.swift:582— Starcat/Features/RepoIssues/RepoIssuesWorkspaceView.swift:582-591 | Starcat/Shared/Components/CountedSegmentedControl.swift:57-66 — 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 `Starcat/Features/RepoIssues/RepoIssuesWorkspaceView.swift:582` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Starcat/Shared/Components/CountedSegmentedControl.swift:67` calls `help`, `Text`, `title` and `Starcat/Features/RepoIssues/RepoIssuesWorkspaceView.swift:592` 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) Starcat/Features/Search/SearchCenterView.swift:1138— Starcat/Features/Search/SearchCenterView.swift:1138-1147 | Starcat/Features/Search/SearchCenterView.swift:1172-1181 — 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 `Starcat/Features/Search/SearchCenterView.swift:1138` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) Starcat/Features/Settings/IntegrationSettingsView.swift:247— Starcat/Features/Settings/IntegrationSettingsView.swift:247-256 | Starcat/Features/Settings/IntegrationSettingsView.swift:384-393 — 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 `Starcat/Features/Settings/IntegrationSettingsView.swift:247` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `10` in one and `12` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (10 lines × 2) Starcat/Features/Agents/Core/LoopAgentRuntime.swift:547— Starcat/Features/Agents/Core/LoopAgentRuntime.swift:547-556 | Starcat/Features/Agents/Core/LoopAgentRuntime.swift:647-656 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:1662— Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:1662-1667 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:3119-3123 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) Starcat/Core/Sync/DiscoveryRepository.swift:210— Starcat/Core/Sync/DiscoveryRepository.swift:210-214 | Starcat/Core/Sync/DiscoveryRepository.swift:300-304 — 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 `Starcat/Core/Sync/DiscoveryRepository.swift:210` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) Starcat/Features/AI/LocalAI/LayaDecisionModelManager.swift:316— Starcat/Features/AI/LocalAI/LayaDecisionModelManager.swift:316-320 | Starcat/Features/AI/LocalAI/LocalAIModelManager.swift:624-628 — 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 `Starcat/Features/AI/LocalAI/LayaDecisionModelManager.swift:316` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) Starcat/Features/AI/RepoAIInsightService.swift:1855— Starcat/Features/AI/RepoAIInsightService.swift:1855-1859 | Starcat/Features/AI/RepoAIInsightService.swift:1868-1872 — 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 `Starcat/Features/AI/RepoAIInsightService.swift:1855` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) Starcat/Features/About/AboutView.swift:501— Starcat/Features/About/AboutView.swift:501-505 | Starcat/Features/About/AboutView.swift:767-771 — 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 `Starcat/Features/About/AboutView.swift:501` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Starcat/Features/About/AboutView.swift:772` calls `onPreferenceChange` and `Starcat/Features/About/AboutView.swift:506` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) Starcat/Features/CodeGraph/CodeFlowStorage.swift:294— Starcat/Features/CodeGraph/CodeFlowStorage.swift:294-298 | Starcat/Shared/Services/RepoContextStorage.swift:447-453 — before extracting anything, compare `Starcat/Features/CodeGraph/CodeFlowStorage.swift` and `Starcat/Shared/Services/RepoContextStorage.swift` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 259 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Starcat/Features/CodeGraph/CodeFlowStorage.swift:293` calls `loadProject` and `Starcat/Shared/Services/RepoContextStorage.swift:446` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) Starcat/Features/Home/ReadmeViewModel.swift:336— Starcat/Features/Home/ReadmeViewModel.swift:336-340 | Starcat/Features/Home/ReadmeViewModel.swift:520-524 — 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 `Starcat/Features/Home/ReadmeViewModel.swift:336` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) Starcat/Features/Profile/ContributionService.swift:196— Starcat/Features/Profile/ContributionService.swift:196-201 | Starcat/Features/Profile/DeveloperLanguageService.swift:252-256 — 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 `Starcat/Features/Profile/ContributionService.swift:196` 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) Starcat/Features/RAG/UI/RAGContextUsagePopover.swift:127— Starcat/Features/RAG/UI/RAGContextUsagePopover.swift:127-131 | Starcat/Features/RAG/UI/RAGContextUsagePopover.swift:141-145 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/RAG/UI/RAGContextUsagePopover.swift:127` 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) Starcat/Core/Network/OpenSSFScoreAPI.swift:84— Starcat/Core/Network/OpenSSFScoreAPI.swift:84-88 | Starcat/Core/Network/WikiAPI.swift:95-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.
Duplicated block (5 lines × 2) Starcat/Core/RAG/RAGChunkRepository.swift:1018— Starcat/Core/RAG/RAGChunkRepository.swift:1018-1022 | Starcat/Features/RAG/Core/RAGSearchProviders.swift:256-260 — 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) Starcat/Core/Sync/ReadmeRepository.swift:190— Starcat/Core/Sync/ReadmeRepository.swift:190-194 | Starcat/Core/Sync/TrendingReadmeRepository.swift:124-128 — 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) Starcat/Core/Sync/ReadmeRepository.swift:198— Starcat/Core/Sync/ReadmeRepository.swift:198-202 | Starcat/Core/Sync/TrendingReadmeRepository.swift:131-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 (5 lines × 2) Starcat/Features/Activity/GitHubNotificationNoSelectionPlaceholder.swift:268— Starcat/Features/Activity/GitHubNotificationNoSelectionPlaceholder.swift:268-272 | Starcat/Features/Onboarding/FirstRunWelcomeSheet.swift:1543-1547 — 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) Starcat/Features/Home/HomeViewModel.swift:723— Starcat/Features/Home/HomeViewModel.swift:723-728 | Starcat/Features/Home/SidebarView.swift:1440-1444 — 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) Starcat/Core/Capabilities/RepositoryTagCapability.swift:509— Starcat/Core/Capabilities/RepositoryTagCapability.swift:509-513 | Starcat/Core/Spotlight/RepositorySpotlightEntity.swift:90-94 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) Starcat/Core/Sync/ActivitySyncStateRepository.swift:29— Starcat/Core/Sync/ActivitySyncStateRepository.swift:29-33 | Starcat/Core/Sync/GitHubNotificationThreadRepository.swift:573-580 — 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) Starcat/Core/Sync/SmartCollectionRepository.swift:57— Starcat/Core/Sync/SmartCollectionRepository.swift:57-61 | Starcat/Core/Sync/TagRepository.swift:40-44 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) Starcat/Features/AI/LocalAI/LocalMLXClient.swift:146— Starcat/Features/AI/LocalAI/LocalMLXClient.swift:146-152 | Starcat/Features/AI/OpenAIClient.swift:602-606 — 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) Starcat/Shared/Services/DiskChatHistoryStore.swift:974— Starcat/Shared/Services/DiskChatHistoryStore.swift:974-978 | Starcat/Shared/Services/DiskReadmeTranslationCache.swift:451-455 — 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) Starcat/App/StarcatApp.swift:308— Starcat/App/StarcatApp.swift:308-312 | Starcat/App/StarcatApp.swift:336-340 — 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 `Starcat/App/StarcatApp.swift:308` 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) Starcat/App/StatusBarController.swift:317— Starcat/App/StatusBarController.swift:317-321 | Starcat/App/StatusBarController.swift:331-335 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:3342— Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:3342-3346 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:3397-3401 — 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 `Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:3342` 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) Starcat/Core/Network/AwesomeModels.swift:217— Starcat/Core/Network/AwesomeModels.swift:217-221 | Starcat/Core/Network/DiscoveryModels.swift:181-185 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Starcat/Core/Network/DiscoveryModels.swift:178` calls `decodeIfPresent` and `Starcat/Core/Network/AwesomeModels.swift:216` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) Starcat/Core/Network/GitHubAPI/GitHubAPIClient.swift:494— Starcat/Core/Network/GitHubAPI/GitHubAPIClient.swift:494-498 | Starcat/Core/Network/StarcatEnvelope.swift:244-248 — 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.
+ 6 more in this group — see findings.md.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×28
Edited copy of a member (8 corresponding lines) Starcat/Features/DailyRadar/DailyRadarSkeletonView.swift:46— Starcat/Features/DailyRadar/DailyRadarSkeletonView.swift:46-53 | Starcat/Features/DailyRadar/DailyRadarSkeletonView.swift:56-65 — 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) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:2969— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:2969-2976 | Starcat/Features/RAG/UI/RAGPlanSectionHelp.swift:305-325 — 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) Starcat/Features/Insights/MyInsightsView.swift:636— Starcat/Features/Insights/MyInsightsView.swift:636-643 | Starcat/Features/Search/SearchCenterView.swift:2809-2819 — 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) Starcat/Features/Agents/ExternalRuntime/ExternalAgentProtocol.swift:422— Starcat/Features/Agents/ExternalRuntime/ExternalAgentProtocol.swift:422-430 | Starcat/Features/Agents/ExternalRuntime/ExternalAgentProtocol.swift:432-439 — 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) Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryBinaryResolver.swift:306— Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryBinaryResolver.swift:306-318 | Starcat/Features/Settings/RuntimeDownloadInstaller.swift:377-384 — 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) Starcat/Features/AI/AIOrganizationDraftRepository.swift:255— Starcat/Features/AI/AIOrganizationDraftRepository.swift:255-262 | Starcat/Features/Agents/Core/AgentRunRepository.swift:525-532 — 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) Starcat/Core/Sync/GitHubNotificationMapper.swift:447— Starcat/Core/Sync/GitHubNotificationMapper.swift:447-454 | Starcat/Core/Sync/GitHubNotificationMapper.swift:481-488 — 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) Starcat/Features/MCP/MCPSettingsView.swift:583— Starcat/Features/MCP/MCPSettingsView.swift:583-590 | Starcat/Features/Settings/IntegrationSettingsView.swift:774-784 — 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) Starcat/Features/RepoIssues/RepoIssuesWorkspaceView.swift:595— Starcat/Features/RepoIssues/RepoIssuesWorkspaceView.swift:595-603 | Starcat/Shared/Components/CountedSegmentedControl.swift:71-78 — 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) Starcat/Features/Profile/ShareCard/AvatarCacheLoader.swift:181— Starcat/Features/Profile/ShareCard/AvatarCacheLoader.swift:181-189 | Starcat/Features/Profile/ShareCard/AvatarCacheLoader.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) Starcat/Features/RAG/Core/KnowledgeRAGModels.swift:933— Starcat/Features/RAG/Core/KnowledgeRAGModels.swift:933-940 | Starcat/Features/RAG/Core/KnowledgeRAGService.swift:233-240 — 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) Starcat/Core/Database/Models/Readme.swift:84— Starcat/Core/Database/Models/Readme.swift:84-91 | Starcat/Core/Database/Models/TrendingReadme.swift:89-96 — 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) Starcat/Core/Sync/GitHubNotificationMapper.swift:588— Starcat/Core/Sync/GitHubNotificationMapper.swift:588-595 | Starcat/Core/Sync/GitHubNotificationMapper.swift:597-604 — 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) Starcat/Core/Sync/RepoRepository.swift:345— Starcat/Core/Sync/RepoRepository.swift:345-352 | Starcat/Core/Sync/RepoRepository.swift:379-387 — 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) Starcat/Shared/Components/LanguageIcon.swift:1101— Starcat/Shared/Components/LanguageIcon.swift:1101-1108 | Starcat/Shared/Components/LanguageIcon.swift:1119-1126 — 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) Starcat/Features/Auth/MockGithubOAuthService.swift:46— Starcat/Features/Auth/MockGithubOAuthService.swift:46-53 | Starcat/Features/Auth/MockGithubOAuthService.swift:105-112 — 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) Starcat/Features/Companion/CompanionContextProvider.swift:255— Starcat/Features/Companion/CompanionContextProvider.swift:255-262 | Starcat/Features/Companion/CompanionContextProvider.swift:264-271 — 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) Starcat/Features/Home/SidebarView.swift:2279— Starcat/Features/Home/SidebarView.swift:2279-2286 | Starcat/Features/Home/SidebarView.swift:2289-2298 — 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) Starcat/Shared/Services/DiskIssueDraftCache.swift:234— Starcat/Shared/Services/DiskIssueDraftCache.swift:234-241 | Starcat/Shared/Services/DiskNotificationCommentDraftCache.swift:238-245 — 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) Starcat/Shared/Services/SharedSnapshotService.swift:99— Starcat/Shared/Services/SharedSnapshotService.swift:99-106 | Starcat/Shared/Services/SharedSnapshotService.swift:108-115 — 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) Starcat/Features/Home/BatchActionBar.swift:876— Starcat/Features/Home/BatchActionBar.swift:876-883 | Starcat/Features/Tags/RepoTagsSection.swift:459-468 — 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) Starcat/Core/DataContribution/CollectionAPIClient.swift:26— Starcat/Core/DataContribution/CollectionAPIClient.swift:26-33 | Starcat/Shared/Telemetry/TelemetryManager.swift:80-87 — 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) Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:743— Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:743-753 | Starcat/Features/Agents/Core/AgentWorkspaceView.swift:112-119 — 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) Starcat/Features/Home/GitHubStarListVisibilityBadge.swift:48— Starcat/Features/Home/GitHubStarListVisibilityBadge.swift:48-55 | Starcat/Features/Insights/RepositoryInsightsView.swift:1605-1614 — 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) Starcat/Core/Insights/RepoStarHistoryRepository.swift:681— Starcat/Core/Insights/RepoStarHistoryRepository.swift:681-688 | Starcat/Core/Sync/RepoTagRepository.swift:47-55 — 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.
+ 3 more in this group — see findings.md.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×28
Edited copy of a member (4 corresponding lines) Starcat/Features/Home/RepoListView.swift:2901— Starcat/Features/Home/RepoListView.swift:2901-2904 | Starcat/Features/Search/SearchCenterView.swift:3281-3284 — 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) Starcat/Features/AI/RepoAIWindowContentView.swift:2321— Starcat/Features/AI/RepoAIWindowContentView.swift:2321-2329 | Starcat/Features/RAG/UI/RAGMetadataDrillDownStyle.swift:19-22 — 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) Starcat/Features/Collections/SmartCollectionDetailPanel.swift:858— Starcat/Features/Collections/SmartCollectionDetailPanel.swift:858-861 | Starcat/Features/Releases/ReleaseTimelineView.swift:650-653 — 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) Starcat/Features/Agents/ExternalRuntime/DeepSeekHarnessAdapter.swift:927— Starcat/Features/Agents/ExternalRuntime/DeepSeekHarnessAdapter.swift:927-931 | Starcat/Features/Agents/Core/AgentAssistantMessageContentView.swift:85-88 — 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) Starcat/Features/Profile/SnakeAnimator/GreedySnakeAnimator.swift:38— Starcat/Features/Profile/SnakeAnimator/GreedySnakeAnimator.swift:38-43 | Starcat/Features/Profile/SnakeAnimator/FoodChaseSnakeAnimator.swift:39-42 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) Starcat/Features/CodeGraph/CodeFlowRunner.swift:138— Starcat/Features/CodeGraph/CodeFlowRunner.swift:138-141 | Starcat/Shared/Services/SharedSnapshotService.swift:234-237 — 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) Starcat/Features/AI/LocalAI/LayaDecisionModelStorage.swift:118— Starcat/Features/AI/LocalAI/LayaDecisionModelStorage.swift:118-121 | Starcat/Features/AI/LocalAI/LocalAIModelStorage.swift:280-283 — 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) Starcat/Features/RAG/Core/RAGSearchProviders.swift:163— Starcat/Features/RAG/Core/RAGSearchProviders.swift:163-167 | Starcat/Shared/Utilities/FTSQuery.swift:55-58 — 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) Starcat/Features/AI/BatchAIOptionsSheet.swift:299— Starcat/Features/AI/BatchAIOptionsSheet.swift:299-302 | Starcat/Features/AI/TagTaxonomyBootstrapView.swift:356-359 — 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) Starcat/Features/Home/BatchActionBar.swift:979— Starcat/Features/Home/BatchActionBar.swift:979-982 | Starcat/Features/Tags/RepoTagsSection.swift:454-457 — 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) Starcat/Features/AI/ReadmeTranslationService.swift:731— Starcat/Features/AI/ReadmeTranslationService.swift:731-736 | Starcat/Features/Ambient/Core/AmbientGridEngine.swift:236-239 — 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) Starcat/Features/Activity/GitHubNotificationNoSelectionPlaceholder.swift:117— Starcat/Features/Activity/GitHubNotificationNoSelectionPlaceholder.swift:117-120 | Starcat/Shared/Components/RepoDetailNoSelectionPlaceholder.swift:110-113 — 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) Starcat/Shared/Services/DiskChatHistoryStore.swift:951— Starcat/Shared/Services/DiskChatHistoryStore.swift:951-954 | Starcat/Shared/Services/DiskReadmeTranslationCache.swift:431-434 — 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) Starcat/Shared/Services/DiskIssueDraftCache.swift:276— Starcat/Shared/Services/DiskIssueDraftCache.swift:276-279 | Starcat/Shared/Services/DiskNotificationCommentDraftCache.swift:280-283 — 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) Starcat/Features/Agents/Core/AgentTraceDetailPresentation.swift:56— Starcat/Features/Agents/Core/AgentTraceDetailPresentation.swift:56-59 | Starcat/Shared/Diagnostics/DiagnosticEvent.swift:396-400 — 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) Starcat/Features/Collections/UserSmartCollection.swift:41— Starcat/Features/Collections/UserSmartCollection.swift:41-44 | Starcat/Features/Home/RepoHealthSheet.swift:45-48 — 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) Starcat/Core/Network/TrendingAPI.swift:98— Starcat/Core/Network/TrendingAPI.swift:98-101 | Starcat/Core/Network/WeeklyAPI.swift:111-114 — 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) Starcat/Features/CodeGraph/CodeFlowPanel.swift:364— Starcat/Features/CodeGraph/CodeFlowPanel.swift:364-367 | Starcat/Features/Home/RepoFileBrowserSheet.swift:734-737 — 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) Starcat/Features/Home/OpenSSFScoreSheet.swift:126— Starcat/Features/Home/OpenSSFScoreSheet.swift:126-129 | Starcat/Features/Home/RepoHealthSheet.swift:55-59 — 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) Starcat/Core/Network/GitHubAPI/ContributionsAPI.swift:237— Starcat/Core/Network/GitHubAPI/ContributionsAPI.swift:237-240 | Starcat/Core/Network/GitHubStatusMonitor.swift:27-30 — 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) Starcat/Features/AI/AIClient.swift:477— Starcat/Features/AI/AIClient.swift:477-480 | Starcat/Features/AI/RepoAIChatViewModel.swift:915-918 — 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) Starcat/Core/Subscription/ProPaywallSheet.swift:438— Starcat/Core/Subscription/ProPaywallSheet.swift:438-441 | Starcat/Features/Settings/ProSettingsView.swift:774-777 — 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) Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:695— Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:695-698 | Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:1274-1277 — 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) Starcat/Shared/Services/DiskChatHistoryStore.swift:946— Starcat/Shared/Services/DiskChatHistoryStore.swift:946-949 | Starcat/Shared/Services/DiskReadmeTranslationCache.swift:426-429 — 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) Starcat/Features/CodeGraph/CodeFlowStorage.swift:97— Starcat/Features/CodeGraph/CodeFlowStorage.swift:97-101 | Starcat/Shared/Services/RepoContextStorage.swift:68-71 — 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.
+ 3 more in this group — see findings.md.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×26
Edited copy of a member (6 corresponding lines) Starcat/Features/RAG/Core/KnowledgeBaseAnalytics.swift:288— Starcat/Features/RAG/Core/KnowledgeBaseAnalytics.swift:288-293 | Starcat/Features/RAG/Core/RAGRepoCandidateRepository.swift:599-610 — 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) Starcat/Core/Network/WeeklyModels.swift:681— Starcat/Core/Network/WeeklyModels.swift:681-686 | Starcat/Core/Network/WeeklyModels.swift:688-693 — 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) Starcat/Core/Models/LicenseKnowledge.swift:88— Starcat/Core/Models/LicenseKnowledge.swift:88-93 | Starcat/Core/Models/RepoLicenseFilter.swift:47-52 — 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) Starcat/Features/About/ReleaseNotesView.swift:786— Starcat/Features/About/ReleaseNotesView.swift:786-795 | Starcat/Features/Agents/ExternalRuntime/AgentRuntimeProviderCatalog.swift:160-165 — 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) Starcat/Core/Network/GitHubAPI/GitHubRepositoryMetricsClient.swift:179— Starcat/Core/Network/GitHubAPI/GitHubRepositoryMetricsClient.swift:179-184 | Starcat/Features/Insights/RepositoryInsightsRemoteProvider.swift:108-114 — 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) Starcat/Features/Profile/ContributionGraphView.swift:352— Starcat/Features/Profile/ContributionGraphView.swift:352-357 | Starcat/Features/Profile/ShareCard/ShareCardTheme.swift:524-529 — 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) Starcat/Core/Database/Models/ActivityAnnouncementRecord.swift:130— Starcat/Core/Database/Models/ActivityAnnouncementRecord.swift:130-135 | Starcat/Core/Database/Models/ReleaseRecord.swift:132-137 — 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) Starcat/Features/AI/AIDebugLogger.swift:87— Starcat/Features/AI/AIDebugLogger.swift:87-92 | Starcat/Features/AI/OpenAIClient.swift:518-523 — 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) Starcat/Core/Sync/DailyRadarRepository.swift:46— Starcat/Core/Sync/DailyRadarRepository.swift:46-51 | Starcat/Core/Sync/LinuxDoRepository.swift:22-28 — 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) Starcat/Features/Agents/Core/AgentRepositoryCatalog.swift:362— Starcat/Features/Agents/Core/AgentRepositoryCatalog.swift:362-367 | Starcat/Features/Agents/Core/AgentRepositoryCatalog.swift:369-374 — 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) Starcat/Features/Home/RepoMetadataHeaderView.swift:757— Starcat/Features/Home/RepoMetadataHeaderView.swift:757-764 | Starcat/Features/RAG/UI/RAGUserMessageBlock.swift:163-168 — 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) Starcat/Core/Navigation/RepositoryDeepLink.swift:124— Starcat/Core/Navigation/RepositoryDeepLink.swift:124-132 | Starcat/Core/Navigation/RepositoryDeepLink.swift:134-139 — 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) Starcat/Core/Network/GitHubAPI/GitHubGitTreeAPI.swift:17— Starcat/Core/Network/GitHubAPI/GitHubGitTreeAPI.swift:17-22 | Starcat/Core/Network/GitHubAPI/GitHubGitTreeAPI.swift:25-31 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:1209— Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:1209-1214 | Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:1217-1222 — 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) Starcat/Features/AI/Anthropic/AnthropicClient.swift:479— Starcat/Features/AI/Anthropic/AnthropicClient.swift:479-484 | Starcat/Features/AI/OpenAIClient.swift:380-386 — 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) Starcat/Features/Activity/ActivityViewModel.swift:2023— Starcat/Features/Activity/ActivityViewModel.swift:2023-2028 | Starcat/Features/Settings/CCSwitchImport/CCSwitchCredentialExtractor.swift:155-162 — 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) Starcat/Features/AI/Anthropic/AnthropicMessagesCodec.swift:404— Starcat/Features/AI/Anthropic/AnthropicMessagesCodec.swift:404-409 | Starcat/Features/Activity/GitHubNotificationIssueTimeline.swift:224-229 — 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) Starcat/Shared/Components/SkeletonPlaceholderSupport.swift:135— Starcat/Shared/Components/SkeletonPlaceholderSupport.swift:135-141 | Starcat/Features/RAG/UI/RAGConversationSkeletonView.swift:174-179 — 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) Starcat/Features/AI/BatchAIWorkspaceWindowController.swift:126— Starcat/Features/AI/BatchAIWorkspaceWindowController.swift:126-137 | Starcat/Features/Explore/AwesomeSourceManagerWindowController.swift:70-75 — 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) Starcat/Features/Activity/WeeklyContentView.swift:1733— Starcat/Features/Activity/WeeklyContentView.swift:1733-1738 | Starcat/Features/Explore/ExploreDiscoveryViewModel.swift:460-465 — 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) Starcat/Features/RAG/UI/RAGPlanSectionHelp.swift:327— Starcat/Features/RAG/UI/RAGPlanSectionHelp.swift:327-332 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3697-3702 — 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) Starcat/Shared/Components/AICommandComposer/AICommandTextEditor.swift:116— Starcat/Shared/Components/AICommandComposer/AICommandTextEditor.swift:116-122 | Starcat/Shared/Components/ImagePasteTextEditor.swift:142-147 — 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) Starcat/Features/AI/BatchAIQueueService.swift:2481— Starcat/Features/AI/BatchAIQueueService.swift:2481-2486 | Starcat/Features/AI/GitHubStarListAIGroupingSession.swift:2017-2025 — 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) Starcat/Core/Sync/SmartCollectionRepository.swift:50— Starcat/Core/Sync/SmartCollectionRepository.swift:50-55 | Starcat/Core/Sync/TagRepository.swift:32-37 — 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) Starcat/Features/AI/BatchAITagReviewRow.swift:185— Starcat/Features/AI/BatchAITagReviewRow.swift:185-190 | Starcat/Features/Home/OwnerCardSheet.swift:84-90 — 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.
+ 1 more in this group — see findings.md.
R4 · Test Coverage· No test reaches this file · ×25
No test reaches this file resources/screenshots/1.2.0-app-store/manifest/render-app-store.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file resources/screenshots/2026-06-23-app-store/manifest/render-landing.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file starcat-promo-video/presentation/src/hooks/useStepper.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file starcat-promo-video/presentation/src/chapters/08-local-native/LocalNative.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file starcat-promo-video/presentation/src/chapters/01-coldopen/Coldopen.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file starcat-promo-video/presentation/src/hooks/useAudioPlayer.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file starcat-promo-video/presentation/scripts/extract-narrations.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file starcat-promo-video/presentation/src/chapters/06-organize/Organize.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file starcat-promo-video/presentation/src/components/ProgressBar.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file starcat-promo-video/presentation/src/chapters/07-assess/Assess.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file starcat-promo-video/presentation/src/chapters/09-cta/Cta.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file starcat-promo-video/presentation/src/chapters/04-understand/Understand.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file starcat-promo-video/presentation/src/chapters/03-find/Find.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file starcat-promo-video/presentation/src/App.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file starcat-promo-video/presentation/src/chapters/05-tags/Tags.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file starcat-promo-video/presentation/src/chapters/02-product/Product.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file starcat-promo-video/presentation/src/hooks/useAutoMode.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file starcat-promo-video/presentation/src/components/Stage.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file starcat-promo-video/presentation/src/hooks/useAudioPreload.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file resources/follow-graph/build.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file starcat-promo-video/presentation/src/components/AutoStartGate.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file starcat-promo-video/presentation/src/components/AutoToggle.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file starcat-promo-video/presentation/src/components/MaskReveal.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file starcat-promo-video/presentation/src/hooks/useStageScale.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file starcat-promo-video/presentation/src/main.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
AC6 · Visual & motion safety· Animation without a prefers-reduced-motion guard · ×23
Animation without a prefers-reduced-motion guard Starcat/Resources/CodeFlow/codeflow.html:93— `.tree-toggle` moves (`transition: transform 0.15s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Starcat/Resources/CodeFlow/codeflow.html:114— `.legend-toggle` moves (`transition: transform 0.2s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Starcat/Resources/CodeFlow/codeflow.html:137— `.card-toggle` moves (`transition: transform 0.15s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Starcat/Resources/CodeFlow/codeflow.html:155— `.pattern-item` moves (`transition: transform 0.15s ease,border-color 0.15s ease,box-shadow 0.15s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Starcat/Resources/CodeFlow/codeflow.html:168— `.security-item` moves (`transition: transform 0.15s ease,border-color 0.15s ease,box-shadow 0.15s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Starcat/Resources/CodeFlow/codeflow.html:210— `.spinner` moves (`animation: spin 0.8s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Starcat/Resources/CodeFlow/codeflow.html:233— `.toast` moves (`animation: slideUp 0.3s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Starcat/Resources/CodeFlow/codeflow.html:243— `.loading-owner::before` moves (`animation: spin 0.6s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Starcat/Resources/CodeFlow/codeflow.html:270— `.lang-bar-segment` moves (`transition: width 0.3s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Starcat/Resources/CodeFlow/codeflow.html:504— `.sidebar` moves (`transition: transform 0.24s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard Starcat/Resources/CodeFlow/codeflow.html:581— `.sidebar` moves (`transition: transform 0.24s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard starcat-promo-video/presentation/src/styles/animations.css:58— `.letter-stagger > .letter` moves (`animation: letter-rise var(--dur-slow) var(--ease-expo) forwards`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard starcat-promo-video/presentation/src/styles/base.css:333— `.click-cue .arrow` moves (`animation: nudge 2.4s var(--ease-soft) infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard starcat-promo-video/presentation/src/components/AutoToggle.css:30— `.at-btn` moves (`transition: opacity 280ms ease, transform 280ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard starcat-promo-video/presentation/src/chapters/09-cta/Cta.css:48— `.ct-os-row` moves (`animation: ct-rise 800ms cubic-bezier(0.16, 1, 0.3, 1) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard starcat-promo-video/presentation/src/chapters/09-cta/Cta.css:74— `.ct-pack` moves (`animation: ct-rise 900ms cubic-bezier(0.16, 1, 0.3, 1) 400ms both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard starcat-promo-video/presentation/src/chapters/09-cta/Cta.css:98— `.ct-out` moves (`animation: ct-rise 600ms ease both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard starcat-promo-video/presentation/src/chapters/09-cta/Cta.css:111— `.ct-out:nth-child(1) .ct-strike` moves (`animation: ct-strike 450ms ease 3300ms forwards`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard starcat-promo-video/presentation/src/chapters/09-cta/Cta.css:112— `.ct-out:nth-child(2) .ct-strike` moves (`animation: ct-strike 450ms ease 3750ms forwards`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard starcat-promo-video/presentation/src/chapters/09-cta/Cta.css:113— `.ct-out:nth-child(3) .ct-strike` moves (`animation: ct-strike 450ms ease 4200ms forwards`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard starcat-promo-video/presentation/src/chapters/09-cta/Cta.css:134— `.ct-oss` moves (`animation: ct-rise 900ms cubic-bezier(0.16, 1, 0.3, 1) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard starcat-promo-video/presentation/src/chapters/09-cta/Cta.css:143— `.ct-oss-free` moves (`animation: ct-rise 700ms ease 900ms both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard starcat-promo-video/presentation/src/chapters/09-cta/Cta.css:160— `.ct-path` moves (`animation: ct-path-in 700ms cubic-bezier(0.16, 1, 0.3, 1) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×22
Edited copy of a member (10 corresponding lines) Starcat/Features/RAG/Core/RAGExternalSearchProviders.swift:129— Starcat/Features/RAG/Core/RAGExternalSearchProviders.swift:129-139 | Starcat/Features/RAG/Core/RAGExternalSearchProviders.swift:161-170 — 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) Starcat/Features/Auth/ProjectAccessOAuthService.swift:325— Starcat/Features/Auth/ProjectAccessOAuthService.swift:325-336 | Starcat/Features/MCP/StarcatMCPDeviceStore.swift:273-282 — 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) Starcat/Features/MCP/StarcatMCPFacade.swift:358— Starcat/Features/MCP/StarcatMCPFacade.swift:358-367 | Starcat/Features/MCP/StarcatMCPWriteFacade.swift:619-631 — 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) Starcat/Core/Network/AppEndpoints.swift:451— Starcat/Core/Network/AppEndpoints.swift:451-460 | Starcat/Core/Network/AppEndpoints.swift:465-474 — 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) Starcat/Core/Subscription/ProPaywallSheet.swift:378— Starcat/Core/Subscription/ProPaywallSheet.swift:378-387 | Starcat/Core/Subscription/ProPaywallSheet.swift:389-398 — 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) Starcat/Features/AI/AIOrganizationDraftRepository.swift:244— Starcat/Features/AI/AIOrganizationDraftRepository.swift:244-253 | Starcat/Features/Agents/Core/AgentRunRepository.swift:514-523 — 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) Starcat/Features/AI/SystemTranslationSessionBroker.swift:399— Starcat/Features/AI/SystemTranslationSessionBroker.swift:399-410 | Starcat/Features/AI/SystemTranslationSessionBroker.swift:413-422 — 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) Starcat/Features/AI/SemanticIndexBuilder.swift:124— Starcat/Features/AI/SemanticIndexBuilder.swift:124-133 | Starcat/Features/RAG/Core/RAGCandidateResolution.swift:107-116 — 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) Starcat/Features/CodeGraph/CodeFlowRunner.swift:303— Starcat/Features/CodeGraph/CodeFlowRunner.swift:303-312 | Starcat/Shared/Services/SharedSnapshotService.swift:246-258 — 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) Starcat/Features/Settings/CCSwitchImport/CCSwitchCredentialExtractor.swift:164— Starcat/Features/Settings/CCSwitchImport/CCSwitchCredentialExtractor.swift:164-174 | Starcat/Features/Settings/CCSwitchImport/CCSwitchCredentialExtractor.swift:176-185 — 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) Starcat/Core/Subscription/ProPaywallSheet.swift:419— Starcat/Core/Subscription/ProPaywallSheet.swift:419-428 | Starcat/Features/Home/RepoListView.swift:3197-3206 — 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) Starcat/Features/AI/DecisionEngine.swift:90— Starcat/Features/AI/DecisionEngine.swift:90-99 | Starcat/Features/Insights/RepositoryInsightsView.swift:2968-2978 — 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) Starcat/Features/AI/BatchAIQueueService.swift:2507— Starcat/Features/AI/BatchAIQueueService.swift:2507-2516 | Starcat/Features/AI/GitHubStarListAIGroupingSession.swift:2027-2036 — 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) Starcat/Features/RAG/Core/RAGPromptCompatibility.swift:84— Starcat/Features/RAG/Core/RAGPromptCompatibility.swift:84-93 | Starcat/Features/RAG/Core/RAGPromptCompatibility.swift:105-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) Starcat/Features/RAG/UI/KnowledgeRAGIndexSettingsSummary.swift:169— Starcat/Features/RAG/UI/KnowledgeRAGIndexSettingsSummary.swift:169-179 | Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:2338-2347 — 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) Starcat/Features/RAG/Core/RAGQueryGuidance.swift:37— Starcat/Features/RAG/Core/RAGQueryGuidance.swift:37-46 | Starcat/Features/RAG/Core/RAGQueryGuidance.swift:48-61 — 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) Starcat/Features/Releases/RepoReleaseSection.swift:318— Starcat/Features/Releases/RepoReleaseSection.swift:318-329 | Starcat/Features/Releases/RepoReleaseSection.swift:331-340 — 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) Starcat/Shared/Services/RepoContextPacker/Internal/XmlOutputBuilder.swift:272— Starcat/Shared/Services/RepoContextPacker/Internal/XmlOutputBuilder.swift:272-281 | Starcat/Shared/Services/RepoContextPacker/Internal/XmlOutputBuilder.swift:283-298 — 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) Starcat/Core/Network/DiscoveryAPI.swift:68— Starcat/Core/Network/DiscoveryAPI.swift:68-77 | Starcat/Core/Network/DiscoveryAPI.swift:217-226 — 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) Starcat/Core/Sync/AISummaryRepository.swift:57— Starcat/Core/Sync/AISummaryRepository.swift:57-66 | Starcat/Core/Sync/ReleaseRepository.swift:26-39 — 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) Starcat/Core/RAG/RAGChunkRepository.swift:686— Starcat/Core/RAG/RAGChunkRepository.swift:686-695 | Starcat/Core/Sync/GitHubNotificationThreadRepository.swift:332-343 — 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) Starcat/Features/Agents/Core/AgentTools.swift:90— Starcat/Features/Agents/Core/AgentTools.swift:90-99 | Starcat/Features/Agents/Core/LoopAgentRuntime.swift:1330-1339 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×22
Edited copy of a member (9 corresponding lines) Starcat/Features/Releases/RepoReleaseSection.swift:355— Starcat/Features/Releases/RepoReleaseSection.swift:355-363 | Starcat/Features/RepoIssues/RepoIssuesWorkspaceView.swift:680-707 — 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) Starcat/Features/Explore/AwesomeView.swift:710— Starcat/Features/Explore/AwesomeView.swift:710-718 | Starcat/Features/Explore/AwesomeView.swift:720-731 — 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) Starcat/Features/Home/GitHubStarListMenuLabel.swift:46— Starcat/Features/Home/GitHubStarListMenuLabel.swift:46-56 | Starcat/Features/Tags/TagColorPalette.swift:48-56 — 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) Starcat/Core/Network/GitHubAPI/GitHubAPIClient.swift:218— Starcat/Core/Network/GitHubAPI/GitHubAPIClient.swift:218-226 | Starcat/Core/Network/GitHubAPI/GitHubAPIClient.swift:230-238 — 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) Starcat/Features/AI/LocalAI/LocalAIModelStorage.swift:310— Starcat/Features/AI/LocalAI/LocalAIModelStorage.swift:310-318 | Starcat/Features/Settings/RuntimeDownloadInstaller.swift:209-220 — 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) Starcat/Core/Health/RepoHealthRepository.swift:46— Starcat/Core/Health/RepoHealthRepository.swift:46-54 | Starcat/Core/Sync/OpenSSFScoreRepository.swift:45-53 — 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) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:1047— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:1047-1058 | Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:1061-1069 — 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) Starcat/Features/DailyRadar/DailyRadarDateFormatting.swift:41— Starcat/Features/DailyRadar/DailyRadarDateFormatting.swift:41-49 | Starcat/Features/Profile/ShareCard/ShareCardContent.swift:753-762 — 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) Starcat/Features/AI/LocalAI/LocalAIModelStorage.swift:95— Starcat/Features/AI/LocalAI/LocalAIModelStorage.swift:95-107 | Starcat/Shared/Services/DiskChatHistoryStore.swift:1223-1231 — 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) Starcat/Shared/Services/RepoContextStorage.swift:330— Starcat/Shared/Services/RepoContextStorage.swift:330-338 | Starcat/Shared/Services/RepoContextStorage.swift:344-352 — 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) Starcat/Features/AI/RepoAIInsightService.swift:1970— Starcat/Features/AI/RepoAIInsightService.swift:1970-1978 | Starcat/Features/AI/RepoAIInsightService.swift:2031-2039 — 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) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:2511— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:2511-2519 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3259-3267 — 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) Starcat/Shared/Services/DiskExternalSearchCache.swift:77— Starcat/Shared/Services/DiskExternalSearchCache.swift:77-85 | Starcat/Shared/Services/DiskExternalSearchCache.swift:87-96 — 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) Starcat/Features/AI/Anthropic/AnthropicClient.swift:129— Starcat/Features/AI/Anthropic/AnthropicClient.swift:129-139 | Starcat/Features/AI/LocalAI/LocalMLXClient.swift:136-144 — 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) Starcat/Shared/Services/DiskIssueDraftCache.swift:301— Starcat/Shared/Services/DiskIssueDraftCache.swift:301-309 | Starcat/Shared/Services/DiskNotificationCommentDraftCache.swift:299-307 — 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) Starcat/Features/Settings/AISettingsView.swift:1261— Starcat/Features/Settings/AISettingsView.swift:1261-1269 | Starcat/Features/Settings/DiagnosticLogGuideSheet.swift:51-60 — 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) Starcat/Features/Companion/CompanionRecommendationHandler.swift:75— Starcat/Features/Companion/CompanionRecommendationHandler.swift:75-83 | Starcat/Features/Companion/CompanionStarStateHandler.swift:41-49 — 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) Starcat/Shared/Services/DiskChatHistoryStore.swift:1122— Starcat/Shared/Services/DiskChatHistoryStore.swift:1122-1130 | Starcat/Shared/Services/DiskChatHistoryStore.swift:1132-1140 — 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) Starcat/Core/RAG/RAGChunkRepository.swift:470— Starcat/Core/RAG/RAGChunkRepository.swift:470-479 | Starcat/Core/Sync/GitHubNotificationThreadRepository.swift:506-514 — 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) Starcat/Features/Agents/ExternalRuntime/CodexAppServerAdapter.swift:23— Starcat/Features/Agents/ExternalRuntime/CodexAppServerAdapter.swift:23-31 | Starcat/Features/Agents/ExternalRuntime/CodexModelCatalog.swift:117-129 — 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) Starcat/Core/Subscription/ProPaywallSheet.swift:344— Starcat/Core/Subscription/ProPaywallSheet.swift:344-352 | Starcat/Features/Home/RepoMetadataHeaderView.swift:664-673 — 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) Starcat/Features/AI/WikiContextService.swift:73— Starcat/Features/AI/WikiContextService.swift:73-81 | Starcat/Features/Recommendations/RecommendationContextService.swift:75-83 — 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.
Duplicated block (12 lines × 2) Starcat/Core/Network/TrendingAPI.swift:25— Starcat/Core/Network/TrendingAPI.swift:25-36 | Starcat/Core/Network/WeeklyAPI.swift:26-37 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (12 lines × 2) Starcat/Core/Sync/GitHubNotificationInboxService.swift:567— Starcat/Core/Sync/GitHubNotificationInboxService.swift:567-578 | Starcat/Core/Sync/GitHubNotificationInboxService.swift:616-627 — 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) Starcat/Core/Sync/WeeklyBulkRepository.swift:195— Starcat/Core/Sync/WeeklyBulkRepository.swift:195-206 | Starcat/Core/Sync/WeeklyBulkRepository.swift:248-259 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) Starcat/Features/AI/BatchAIQueuePanel.swift:86— Starcat/Features/AI/BatchAIQueuePanel.swift:86-97 | Starcat/Features/Home/GitHubStarListAIGroupingSheet.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 `Starcat/Features/AI/BatchAIQueuePanel.swift:86` 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) Starcat/Features/AI/LocalAI/LocalAIModelManager.swift:229— Starcat/Features/AI/LocalAI/LocalAIModelManager.swift:229-240 | Starcat/Features/AI/LocalAI/LocalAIModelManager.swift:502-513 — 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 `Starcat/Features/AI/LocalAI/LocalAIModelManager.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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) Starcat/Features/Activity/ActivityViewModel.swift:1831— Starcat/Features/Activity/ActivityViewModel.swift:1831-1842 | Starcat/Features/Activity/ActivityViewModel.swift:1859-1870 — 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 `Starcat/Features/Activity/ActivityViewModel.swift:1831` 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 (12 lines × 2) Starcat/Features/Activity/GitHubNotificationDetailView.swift:547— Starcat/Features/Activity/GitHubNotificationDetailView.swift:547-558 | Starcat/Features/Activity/GitHubNotificationDetailView.swift:576-587 — 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 `Starcat/Features/Activity/GitHubNotificationDetailView.swift:547` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) Starcat/Features/Activity/GitHubNotificationIssueTimelineConversation.swift:92— Starcat/Features/Activity/GitHubNotificationIssueTimelineConversation.swift:92-103 | Starcat/Features/Activity/GitHubNotificationIssueTimelineConversation.swift:131-142 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) Starcat/Features/Activity/WeeklyContentView.swift:474— Starcat/Features/Activity/WeeklyContentView.swift:474-485 | Starcat/Shared/Components/Toolbar/UnifiedSortMenu.swift:211-222 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (12 lines × 2) Starcat/Features/CodeGraph/CodeFlowViewModel.swift:281— Starcat/Features/CodeGraph/CodeFlowViewModel.swift:281-292 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryViewModel.swift:630-641 — 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 `Starcat/Features/CodeGraph/CodeFlowViewModel.swift:281` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryViewModel.swift:305— Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryViewModel.swift:305-316 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryViewModel.swift:415-426 — 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 `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryViewModel.swift:305` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) Starcat/Features/Home/HomeViewModel.swift:3968— Starcat/Features/Home/HomeViewModel.swift:3968-3979 | Starcat/Features/Home/HomeViewModel.swift:3984-3995 — 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 `Starcat/Features/Home/HomeViewModel.swift:3968` 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 (12 lines × 2) Starcat/Features/Profile/ShareCard/ShareCardContent.swift:517— Starcat/Features/Profile/ShareCard/ShareCardContent.swift:517-528 | Starcat/Features/Profile/ShareCard/ShareCardContent.swift:553-564 — 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 `Starcat/Features/Profile/ShareCard/ShareCardContent.swift:517` 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) Starcat/Features/RAG/Core/RAGExternalSearchProviders.swift:316— Starcat/Features/RAG/Core/RAGExternalSearchProviders.swift:316-327 | Starcat/Features/RAG/Core/RAGExternalSearchProviders.swift:603-614 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:980— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:980-992 | Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:1075-1086 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) Starcat/Features/RAG/UI/RAGMetadataSectionHelp.swift:54— Starcat/Features/RAG/UI/RAGMetadataSectionHelp.swift:54-65 | Starcat/Features/RAG/UI/RAGPlanSectionHelp.swift:134-145 — 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 `Starcat/Features/RAG/UI/RAGMetadataSectionHelp.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.
Duplicated block (12 lines × 2) Starcat/Features/Settings/AISettingsView.swift:1072— Starcat/Features/Settings/AISettingsView.swift:1072-1083 | Starcat/Features/Settings/AISettingsView.swift:1314-1325 — 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 `Starcat/Features/Settings/AISettingsView.swift:1072` 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) Starcat/Shared/Components/CommitHashLink.swift:95— Starcat/Shared/Components/CommitHashLink.swift:95-106 | Starcat/Shared/Components/CommitHashLink.swift:109-120 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) Starcat/Shared/Components/EmptyStateView.swift:121— Starcat/Shared/Components/EmptyStateView.swift:121-132 | Starcat/Shared/Components/EmptyStateView.swift:149-160 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Shared/Components/EmptyStateView.swift:121` 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) Starcat/Shared/Services/DiskIssueDraftCache.swift:250— Starcat/Shared/Services/DiskIssueDraftCache.swift:250-261 | Starcat/Shared/Services/DiskNotificationCommentDraftCache.swift:254-265 — before extracting anything, compare `Starcat/Shared/Services/DiskIssueDraftCache.swift` and `Starcat/Shared/Services/DiskNotificationCommentDraftCache.swift` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) Starcat/Features/Search/SearchCenterView.swift:2069— Starcat/Features/Search/SearchCenterView.swift:2069-2080 | Starcat/Features/Settings/CCSwitchImport/CCSwitchImportPreviewSheet.swift:225-236 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (12 lines × 2) Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2533— Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2533-2544 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2604-2615 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×21
Edited copy of a member (13 corresponding lines) Starcat/Core/Network/GitHubAPI/ReadmeAssetURLRewriter.swift:183— Starcat/Core/Network/GitHubAPI/ReadmeAssetURLRewriter.swift:183-195 | Starcat/Core/Network/GitHubAPI/ReadmeAssetURLRewriter.swift:199-213 — 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) Starcat/Features/Home/RepoMetadataHeaderView.swift:1058— Starcat/Features/Home/RepoMetadataHeaderView.swift:1058-1070 | Starcat/Features/Home/RepoMetadataHeaderView.swift:1114-1126 — 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) Starcat/Features/Settings/CodexRuntimeSettingsCard.swift:83— Starcat/Features/Settings/CodexRuntimeSettingsCard.swift:83-95 | Starcat/Features/Settings/DeepSeekRuntimeSettingsCard.swift:93-106 — 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) Starcat/Features/Trending/TrendingView.swift:62— Starcat/Features/Trending/TrendingView.swift:62-78 | Starcat/Features/Trending/TrendingView.swift:81-93 — 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) Starcat/Features/Agents/Core/AgentWorkspaceViewModel.swift:1314— Starcat/Features/Agents/Core/AgentWorkspaceViewModel.swift:1314-1326 | Starcat/Features/RAG/Core/RAGMentionPickerLogic.swift:53-68 — 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) Starcat/Core/Settings/AppSettings.swift:2911— Starcat/Core/Settings/AppSettings.swift:2911-2928 | Starcat/Core/Settings/AppSettings.swift:2980-2992 — 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) Starcat/Core/Sync/WeeklyBulkRepository.swift:148— Starcat/Core/Sync/WeeklyBulkRepository.swift:148-160 | Starcat/Core/Sync/WeeklyBulkRepository.swift:381-394 — 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) Starcat/Features/Releases/ReleaseAssetRowView.swift:232— Starcat/Features/Releases/ReleaseAssetRowView.swift:232-244 | Starcat/Shared/Components/CopyFeedbackButton.swift:146-162 — 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) Starcat/Core/Screensaver/ScreensaverRefreshCoordinator.swift:88— Starcat/Core/Screensaver/ScreensaverRefreshCoordinator.swift:88-100 | Starcat/Core/Widget/WidgetRefreshCoordinator.swift:61-73 — 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) Starcat/Features/Tags/TagManagementViewModel.swift:161— Starcat/Features/Tags/TagManagementViewModel.swift:161-173 | Starcat/Features/Tags/TagManagementViewModel.swift:179-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) Starcat/Features/Insights/InsightsSectionSkeleton.swift:77— Starcat/Features/Insights/InsightsSectionSkeleton.swift:77-94 | Starcat/Features/Insights/InsightsSectionSkeleton.swift:242-254 — 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) Starcat/Core/RAG/RAGChunkRepository.swift:672— Starcat/Core/RAG/RAGChunkRepository.swift:672-684 | Starcat/Core/Sync/GitHubNotificationThreadRepository.swift:395-409 — 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) Starcat/Features/Agents/Core/AgentExternalSearchTool.swift:253— Starcat/Features/Agents/Core/AgentExternalSearchTool.swift:253-265 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2574-2586 — 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) Starcat/Core/Network/GitHubStatusMonitor.swift:205— Starcat/Core/Network/GitHubStatusMonitor.swift:205-217 | Starcat/Core/Network/ServiceAvailabilityMonitor.swift:167-179 — 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) Starcat/Features/Companion/CompanionLibraryStateWriter.swift:23— Starcat/Features/Companion/CompanionLibraryStateWriter.swift:23-35 | Starcat/Features/Companion/CompanionStarStateHandler.swift:23-38 — 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) Starcat/Features/AI/LocalAI/LocalAIModelManager.swift:169— Starcat/Features/AI/LocalAI/LocalAIModelManager.swift:169-182 | Starcat/Features/AI/LocalAI/LayaDecisionModelManager.swift:45-57 — 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) Starcat/Shared/Components/SkeletonPlaceholderSupport.swift:113— Starcat/Shared/Components/SkeletonPlaceholderSupport.swift:113-129 | Starcat/Features/RAG/UI/RAGConversationSkeletonView.swift:160-172 — 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) Starcat/Features/AI/BatchAIQueueService.swift:2447— Starcat/Features/AI/BatchAIQueueService.swift:2447-2459 | Starcat/Features/AI/GitHubStarListAIGroupingSession.swift:1989-2001 — 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) Starcat/Features/RAG/Core/KnowledgeRAGQueryPlanner.swift:93— Starcat/Features/RAG/Core/KnowledgeRAGQueryPlanner.swift:93-105 | Starcat/Features/RAG/Core/KnowledgeRAGQueryPlanner.swift:107-120 — 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) Starcat/Features/CodeGraph/CodeFlowViewModel.swift:80— Starcat/Features/CodeGraph/CodeFlowViewModel.swift:80-92 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryViewModel.swift:153-166 — 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) scripts/publish-direct-github-release.py:178— scripts/publish-direct-github-release.py:178-198 | scripts/verify-direct-release-artifacts.py: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.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×19
Edited copy of a member (17 corresponding lines) Starcat/Features/Activity/ActivityDetailView.swift:587— Starcat/Features/Activity/ActivityDetailView.swift:587-603 | Starcat/Features/Activity/GitHubNotificationDetailView.swift:1660-1676 — 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) Starcat/Core/Settings/LocalizedBundle.swift:122— Starcat/Core/Settings/LocalizedBundle.swift:122-138 | Starcat/Shared/Utilities/L10n.swift:103-120 — 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) Starcat/Core/Health/RepoHealthStore.swift:37— Starcat/Core/Health/RepoHealthStore.swift:37-53 | Starcat/Core/Sync/OpenSSFScoreStore.swift:39-55 — 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) Starcat/Features/AI/BatchAIOptionsSheet.swift:526— Starcat/Features/AI/BatchAIOptionsSheet.swift:526-542 | Starcat/Features/AI/RepoAIGenerationOptionsSection.swift:150-166 — 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) Starcat/Features/Home/RepoListView.swift:2854— Starcat/Features/Home/RepoListView.swift:2854-2873 | Starcat/Features/RAG/UI/RAGContextPickerFilterControls.swift:290-306 — 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) Starcat/Features/Notes/NoteEditorSheet.swift:174— Starcat/Features/Notes/NoteEditorSheet.swift:174-192 | Starcat/Features/Notes/RepoNotesSection.swift:383-399 — 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) Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryRunner.swift:86— Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryRunner.swift:86-107 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryRunner.swift:111-127 — 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) Starcat/Core/Sync/RepoNoteRepository.swift:156— Starcat/Core/Sync/RepoNoteRepository.swift:156-175 | Starcat/Core/Sync/RepoNoteRepository.swift:177-193 — 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) Starcat/Features/Activity/GitHubNotificationDetailView.swift:1683— Starcat/Features/Activity/GitHubNotificationDetailView.swift:1683-1699 | Starcat/Features/Activity/GitHubNotificationDetailView.swift:2924-2940 — 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) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:3342— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:3342-3360 | Starcat/Features/RAG/UI/RepositoryInsightsXMLViewer.swift:165-181 — 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) Starcat/Features/MCP/StarcatMCPToolRegistry.swift:742— Starcat/Features/MCP/StarcatMCPToolRegistry.swift:742-758 | Starcat/Features/MCP/StarcatMCPToolRegistry.swift:766-786 — 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) Starcat/Features/About/AboutView.swift:610— Starcat/Features/About/AboutView.swift:610-627 | Starcat/Features/About/AboutView.swift:635-651 — 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) Starcat/Core/Sync/RepoRepository.swift:623— Starcat/Core/Sync/RepoRepository.swift:623-643 | Starcat/Core/Sync/RepoRepository.swift:708-724 — 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) Starcat/Features/AI/TranslationSourceLanguageGate.swift:34— Starcat/Features/AI/TranslationSourceLanguageGate.swift:34-50 | Starcat/Features/Activity/GitHubNotificationCommentAI.swift:56-73 — 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) StarcatWidgets/Rediscovery/StarcatRediscoveryWidget.swift:63— StarcatWidgets/Rediscovery/StarcatRediscoveryWidget.swift:63-79 | StarcatWidgets/ReleaseWatch/StarcatReleaseWatchWidget.swift:67-85 — 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) Starcat/Features/Onboarding/FirstRunWelcomeSheet.swift:939— Starcat/Features/Onboarding/FirstRunWelcomeSheet.swift:939-955 | Starcat/Shared/Components/LaunchSplashView.swift:554-574 — 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) Starcat/Features/Home/SidebarView.swift:1156— Starcat/Features/Home/SidebarView.swift:1156-1177 | Starcat/Features/Home/SidebarView.swift:1650-1666 — 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) Starcat/Core/Sync/ActivitySyncStateRepository.swift:73— Starcat/Core/Sync/ActivitySyncStateRepository.swift:73-89 | Starcat/Core/Sync/ActivitySyncStateRepository.swift:91-107 — 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) Starcat/Features/Agents/ExternalRuntime/CodexAppServerAdapter.swift:71— Starcat/Features/Agents/ExternalRuntime/CodexAppServerAdapter.swift:71-87 | Starcat/Features/Agents/ExternalRuntime/CodexModelCatalog.swift:157-173 — 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.
Duplicated block (15 lines × 2) Starcat/Core/Download/ReleaseAssetDownloader.swift:193— Starcat/Core/Download/ReleaseAssetDownloader.swift:193-207 | Starcat/Core/Download/RepoFileDownloader.swift:267-281 — before extracting anything, compare `Starcat/Core/Download/ReleaseAssetDownloader.swift` and `Starcat/Core/Download/RepoFileDownloader.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Core/Download/ReleaseAssetDownloader.swift:193` 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 (15 lines × 2) Starcat/Core/Network/AwesomeModels.swift:170— Starcat/Core/Network/AwesomeModels.swift:170-184 | Starcat/Core/Network/AwesomeModels.swift:408-422 — 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. Note what the matched lines are: every one of them assigns one field to another, so the block is a hand-written mapper between two data shapes rather than behaviour with a helper inside it. Extracting one shared function only works if both sites map the SAME pair of types in the same direction — check that first, because inverse or differently-typed mappers have no single function they can both call. Where they do not, the moves that exist are a generated or reflective mapper, a common embedded/base type the fields live on once, or accepting the run and covering it with a test that fails when a field is added to one side only.
Duplicated block (15 lines × 2) Starcat/Features/AI/BatchAITagReviewRow.swift:352— Starcat/Features/AI/BatchAITagReviewRow.swift:352-366 | Starcat/Features/AI/BatchAITagReviewRow.swift:368-382 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) Starcat/Features/Activity/GitHubNotificationDetailView.swift:513— Starcat/Features/Activity/GitHubNotificationDetailView.swift:513-527 | Starcat/Features/Activity/GitHubNotificationDetailView.swift:541-555 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Activity/GitHubNotificationDetailView.swift:513` 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 (15 lines × 2) Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:988— Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:988-1002 | Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:1170-1184 — 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 `Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:988` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) Starcat/Features/CodeGraph/CodeFlowPanel.swift:401— Starcat/Features/CodeGraph/CodeFlowPanel.swift:401-415 | Starcat/Features/Home/RepoFileBrowserSheet.swift:767-781 — 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 `Starcat/Features/CodeGraph/CodeFlowPanel.swift:401` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) Starcat/Features/CodeGraph/CodeFlowStorage.swift:562— Starcat/Features/CodeGraph/CodeFlowStorage.swift:562-576 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:524-538 — before extracting anything, compare `Starcat/Features/CodeGraph/CodeFlowStorage.swift` and `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) Starcat/Features/Explore/ExploreView.swift:350— Starcat/Features/Explore/ExploreView.swift:350-364 | Starcat/Features/Explore/ExploreView.swift:544-558 — 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 `Starcat/Features/Explore/ExploreView.swift:350` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 2) Starcat/Features/Home/BatchActionBar.swift:813— Starcat/Features/Home/BatchActionBar.swift:813-827 | Starcat/Features/Tags/RepoTagsSection.swift:366-380 — 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 `Starcat/Features/Home/BatchActionBar.swift:813` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) Starcat/Features/Home/RepoHealthSheet.swift:311— Starcat/Features/Home/RepoHealthSheet.swift:311-325 | Starcat/Features/Home/RepoHealthSheet.swift:327-341 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) Starcat/Features/Insights/RepositoryInsightsView.swift:1447— Starcat/Features/Insights/RepositoryInsightsView.swift:1447-1461 | Starcat/Features/Insights/RepositoryInsightsView.swift:2231-2245 — 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 `Starcat/Features/Insights/RepositoryInsightsView.swift:1447` 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 (15 lines × 2) Starcat/Features/Profile/ShareCard/ShareCardContent.swift:966— Starcat/Features/Profile/ShareCard/ShareCardContent.swift:966-980 | Starcat/Shared/Components/RemoteAvatar.swift:306-320 — 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 `Starcat/Features/Profile/ShareCard/ShareCardContent.swift:966` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:3490— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:3490-3504 | Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:3513-3527 — 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 `Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:3490` 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 (15 lines × 2) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:4034— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:4034-4048 | Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:4058-4072 — 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 `Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:4034` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:1854— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:1854-1868 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3826-3840 — 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 `Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:1854` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) Starcat/Features/RAG/UI/RAGCitationChunkPopover.swift:195— Starcat/Features/RAG/UI/RAGCitationChunkPopover.swift:195-209 | Starcat/Features/RAG/UI/RAGMarkdownText.swift:217-231 — 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 `Starcat/Features/RAG/UI/RAGCitationChunkPopover.swift:195` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) Starcat/Features/Settings/AISettingsView.swift:1100— Starcat/Features/Settings/AISettingsView.swift:1100-1114 | Starcat/Features/Settings/AISettingsView.swift:1346-1360 — 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 `Starcat/Features/Settings/AISettingsView.swift:1100` 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 (15 lines × 2) Starcat/Features/Settings/CodexRuntimeSettingsCard.swift:62— Starcat/Features/Settings/CodexRuntimeSettingsCard.swift:62-76 | Starcat/Features/Settings/DeepSeekRuntimeSettingsCard.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. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Settings/CodexRuntimeSettingsCard.swift:62` 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 (15 lines × 2) Starcat/Shared/Services/DiskIssueDraftCache.swift:99— Starcat/Shared/Services/DiskIssueDraftCache.swift:99-113 | Starcat/Shared/Services/DiskNotificationCommentDraftCache.swift:105-119 — before extracting anything, compare `Starcat/Shared/Services/DiskIssueDraftCache.swift` and `Starcat/Shared/Services/DiskNotificationCommentDraftCache.swift` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `Starcat/Shared/Services/DiskIssueDraftCache.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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) Starcat/Core/Network/GitHubAPI/ReadmeHTMLAPI.swift:23— Starcat/Core/Network/GitHubAPI/ReadmeHTMLAPI.swift:23-36 | Starcat/Core/Network/GitHubAPI/ReadmeHTMLAPI.swift:44-57 — 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 `Starcat/Core/Network/GitHubAPI/ReadmeHTMLAPI.swift:23` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14 lines × 2) Starcat/Features/AI/ExternalSearchContextProvider.swift:157— Starcat/Features/AI/ExternalSearchContextProvider.swift:157-170 | Starcat/Features/AI/ExternalSearchContextProvider.swift:201-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 `Starcat/Features/AI/ExternalSearchContextProvider.swift:157` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) Starcat/Features/Activity/ActivityDetailView.swift:587— Starcat/Features/Activity/ActivityDetailView.swift:587-600 | Starcat/Features/Activity/GitHubNotificationDetailView.swift:1660-1673 — 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 `Starcat/Features/Activity/ActivityDetailView.swift:587` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) Starcat/Features/Activity/GitHubNotificationDetailView.swift:1620— Starcat/Features/Activity/GitHubNotificationDetailView.swift:1620-1633 | Starcat/Features/Activity/GitHubNotificationIssueTimelineConversation.swift:361-374 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:924— Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:924-937 | Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:1104-1117 — 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 `Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:924` 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) Starcat/Features/Agents/WeeklyReport/RepoAlternativesArtifactBuilder.swift:183— Starcat/Features/Agents/WeeklyReport/RepoAlternativesArtifactBuilder.swift:183-196 | Starcat/Features/Agents/WeeklyReport/RepoInsightArtifactBuilder.swift:101-114 — before extracting anything, compare `Starcat/Features/Agents/WeeklyReport/RepoAlternativesArtifactBuilder.swift` and `Starcat/Features/Agents/WeeklyReport/RepoInsightArtifactBuilder.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 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 `Starcat/Features/Agents/WeeklyReport/RepoAlternativesArtifactBuilder.swift:183` 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 (14 lines × 2) Starcat/Features/Home/BatchActionBar.swift:953— Starcat/Features/Home/BatchActionBar.swift:953-966 | Starcat/Features/Tags/RepoTagsSection.swift:430-443 — 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 `Starcat/Features/Home/BatchActionBar.swift:953` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) Starcat/Features/Home/OpenSSFScoreSheet.swift:161— Starcat/Features/Home/OpenSSFScoreSheet.swift:161-174 | Starcat/Features/Home/RepoHealthSheet.swift:105-118 — 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 `Starcat/Features/Home/OpenSSFScoreSheet.swift:161` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) Starcat/Features/Home/RepoListView.swift:2792— Starcat/Features/Home/RepoListView.swift:2792-2805 | Starcat/Features/RAG/UI/RAGContextPickerFilterControls.swift:255-268 — 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 `Starcat/Features/Home/RepoListView.swift:2792` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) Starcat/Features/Insights/MyInsightsView.swift:1238— Starcat/Features/Insights/MyInsightsView.swift:1238-1251 | Starcat/Features/Insights/MyInsightsView.swift:1257-1270 — 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 `Starcat/Features/Insights/MyInsightsView.swift:1238` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14 lines × 2) Starcat/Features/Onboarding/AppStoreToDirectImportSheet.swift:47— Starcat/Features/Onboarding/AppStoreToDirectImportSheet.swift:47-60 | Starcat/Features/Settings/SettingsView.swift:2874-2887 — 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 `Starcat/Features/Onboarding/AppStoreToDirectImportSheet.swift:47` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Starcat/Features/Settings/SettingsView.swift:2891` calls `VStack` and `Starcat/Features/Onboarding/AppStoreToDirectImportSheet.swift:64` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 2) Starcat/Features/Onboarding/FirstRunWelcomeSheet.swift:484— Starcat/Features/Onboarding/FirstRunWelcomeSheet.swift:484-497 | Starcat/Features/Onboarding/FirstRunWelcomeSheet.swift:535-548 — 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 `Starcat/Features/Onboarding/FirstRunWelcomeSheet.swift:484` 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, `Starcat/Features/Onboarding/FirstRunWelcomeSheet.swift:533` calls `frame` and `Starcat/Features/Onboarding/FirstRunWelcomeSheet.swift:482` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 2) Starcat/Features/Profile/ShareCard/ShareCardSheet.swift:856— Starcat/Features/Profile/ShareCard/ShareCardSheet.swift:856-869 | Starcat/Features/Profile/ShareCard/ShareCardSheet.swift:986-999 — 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 `Starcat/Features/Profile/ShareCard/ShareCardSheet.swift:856` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) Starcat/Features/RAG/Core/KnowledgeRAGService.swift:1672— Starcat/Features/RAG/Core/KnowledgeRAGService.swift:1672-1685 | Starcat/Features/RAG/Core/KnowledgeRAGService.swift:1764-1777 — 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 `Starcat/Features/RAG/Core/KnowledgeRAGService.swift:1672` 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) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:3386— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:3386-3399 | Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:3450-3463 — 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 `Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:3386` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:347— Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:347-360 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:484-497 — 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 `Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:347` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `alignment` to `.firstTextBaseline` in one and `.leading` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:344` calls `truncationMode` and `Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:482` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 2) Starcat/Features/Search/SearchCenterView.swift:2039— Starcat/Features/Search/SearchCenterView.swift:2039-2052 | Starcat/Features/Search/SearchCenterView.swift:2178-2191 — 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 `Starcat/Features/Search/SearchCenterView.swift:2039` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14 lines × 2) Starcat/Shared/Services/DiskIssueDraftCache.swift:189— Starcat/Shared/Services/DiskIssueDraftCache.swift:189-202 | Starcat/Shared/Services/DiskNotificationCommentDraftCache.swift:193-206 — before extracting anything, compare `Starcat/Shared/Services/DiskIssueDraftCache.swift` and `Starcat/Shared/Services/DiskNotificationCommentDraftCache.swift` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `Starcat/Shared/Services/DiskIssueDraftCache.swift:189` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) Starcat/Features/AI/BatchAITagReviewRow.swift:111— Starcat/Features/AI/BatchAITagReviewRow.swift:111-124 | Starcat/Features/Home/GitHubStarListAIGroupingResultList.swift:255-268 — 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.
Change coupling: AgentWorkspaceWindowController.swift ↔ KnowledgeRAGWorkspaceWindowController.swift Starcat/Features/Agents/Core/AgentWorkspaceWindowController.swift:1— `Starcat/Features/Agents/Core/AgentWorkspaceWindowController.swift` and `Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift` change together 81% of the time (13 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in 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 13 shared commits counted here, the most recent 3 are `2f3741b2` feat(starcat): 重构工作台分栏布局以支持 Agent 与 RAG 共用; `4f491799` fix(workspace): 对齐主窗口三栏工具栏; `34196250` fix(workspace): 恢复工作台顶部工具栏布局 — run `git show` on any of them.
Change coupling: ActivityReleaseDetailContent.swift ↔ ReleaseTimelineView.swift Starcat/Features/Activity/ActivityReleaseDetailContent.swift:1— `Starcat/Features/Activity/ActivityReleaseDetailContent.swift` and `Starcat/Features/Releases/ReleaseTimelineView.swift` change together 73% of the time (8 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 8 shared commits counted here, the most recent 3 are `094e1677` fix(releases): 下载完成「打开」改为在 Finder 中定位到文件; `41fd7493` feat(releases): 支持 Release 附件下载进度与完成 Toast 反馈; `2af5de40` feat(activity): 让 Release notes 图片按窗口宽度等比缩小 — run `git show` on any of them.
Change coupling: AIModelListView.swift ↔ AISettingsView.swift Starcat/Features/Settings/AIModelListView.swift:1— `Starcat/Features/Settings/AIModelListView.swift` and `Starcat/Features/Settings/AISettingsView.swift` change together 69% of the time (9 of the 13 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 `05c1f5e1` fix(ai): 修复 Anthropic 标签 JSON 400 与中转探测; `2b6eb40b` fix(settings): 修复 AI 模型勾选导致设置页卡死; `b7a638b1` feat(starcat): 优化 AI 失败诊断展示与复制逻辑并修复 macOS 签名流程 — run `git show` on any of them.
Change coupling: KnowledgeRAGWorkspaceViewModel.swift ↔ RAGAssistantMessageBlock.swift Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:1— `Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift` and `Starcat/Features/RAG/UI/RAGAssistantMessageBlock.swift` change together 67% of the time (10 of the 15 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 10 shared commits counted here, the most recent 3 are `7e2db3c9` perf(rag): 将运行中思考改为 NSTextView 增量追加避免整段重排; `4dee8cae` fix(rag): 解耦运行中读秒与流式刷新; `99cf8e55` feat(starcat): 优化 RAG 与流式 Markdown 展示组件 — run `git show` on any of them.
Change coupling: RepoDetailWindowController.swift ↔ RepoDetailView.swift Starcat/Features/Detail/RepoDetailWindowController.swift:1— `Starcat/Features/Detail/RepoDetailWindowController.swift` and `Starcat/Features/Home/RepoDetailView.swift` change together 67% of the time (8 of the 12 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 8 shared commits counted here, the most recent 3 are `87a08d36` feat(issues): 详情页新增 Issues 入口、列表浮层与新建 Issue; `276b9aa1` feat(stars): 支持取消 Star 后清理本地及知识库数据; `543a9c05` feat(ai): 接入 Google 翻译并完善 README 翻译链路 — run `git show` on any of them.
Change coupling: GitHubWeeklyReportAgentDefinition.swift ↔ GitHubWeeklyReportTools.swift Starcat/Features/Agents/WeeklyReport/GitHubWeeklyReportAgentDefinition.swift:1— `Starcat/Features/Agents/WeeklyReport/GitHubWeeklyReportAgentDefinition.swift` and `Starcat/Features/Agents/WeeklyReport/GitHubWeeklyReportTools.swift` change together 62% of the time (8 of the 13 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 8 shared commits counted here, the most recent 3 are `1ae0f9d9` fix(agent): 修复替代品报告冻结身份传递; `1f1dbd92` feat(agent): 实现未标签仓库确认写入流程; `4752997f` feat(agent): 实现仓库替代方案只读 Agent — run `git show` on any of them.
Change coupling: StarcatApp.swift ↔ GettingStartedOnboarding.swift Starcat/App/StarcatApp.swift:1— `Starcat/App/StarcatApp.swift` and `Starcat/Features/Onboarding/GettingStartedOnboarding.swift` change together 58% of the time (7 of the 12 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 `4945f243` fix(agent): 将未开放工作台收回 Debug 菜单; `f9addf8a` feat(agent): 开放正式入口并完善产品门禁; `0668a999` refactor(starcat): 重构新手引导体系移除 TipKit 并行引导并统一胶囊提示 — run `git show` on any of them.
Change coupling: GitHubStarListAIGroupingSession.swift ↔ GitHubStarListAIGroupingResultList.swift Starcat/Features/AI/GitHubStarListAIGroupingSession.swift:1— `Starcat/Features/AI/GitHubStarListAIGroupingSession.swift` and `Starcat/Features/Home/GitHubStarListAIGroupingResultList.swift` change together 56% of the time (9 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in 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 9 shared commits counted here, the most recent 3 are `2d18f5fa` improve(github-lists): 展示本地分组并支持重试同步; `b36f119a` feat(ai): 仓库分组整理支持暂停态重试与各 Tab 批量选中操作; `70b06779` improve(ai-grouping): 增加仓库列表批量选择 — run `git show` on any of them.
Change coupling: DatabaseMigrationsV1.swift ↔ AwesomeRepository.swift Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:1— `Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift` and `Starcat/Core/Sync/AwesomeRepository.swift` change together 56% of the time (9 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in 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 9 shared commits counted here, the most recent 3 are `22cc006a` feat(awesome): 展示外部资源与仓库文件条目; `dafeba3d` feat(explore): 持久化自定义 Awesome 解析状态; `b5ba6802` feat(explore): 缓存 Awesome 来源仓库元数据 — run `git show` on any of them.
Change coupling: WeeklyContentView.swift ↔ ExploreDiscoveryViewModel.swift Starcat/Features/Activity/WeeklyContentView.swift:1— `Starcat/Features/Activity/WeeklyContentView.swift` and `Starcat/Features/Explore/ExploreDiscoveryViewModel.swift` change together 56% of the time (10 of the 18 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 10 shared commits counted here, the most recent 3 are `54f27217` feat(search): 扩展中栏快速搜索到探索与活动; `b19d798e` perf(app): 优化列表加载与高频渲染; `0aa51364` feat(home): 探索栏目语言分类改为感兴趣语言驱动并新增其他/未分类分组 — run `git show` on any of them.
Change coupling: RepoAIContextProvider.swift ↔ RepoAIWindowContentView.swift Starcat/Features/AI/RepoAIContextProvider.swift:1— `Starcat/Features/AI/RepoAIContextProvider.swift` and `Starcat/Features/AI/RepoAIWindowContentView.swift` change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 7 shared commits counted here, the most recent 3 are `70a801d4` feat(ai): 支持摘要生成本次覆盖代码上下文与外部搜索; `8c623a9a` feat(starcat): 增强 RepoAI 功能并优化侧边栏布局; `4c72de9e` feat(starcat): 优化 AI 洞察生成的上下文准备时机与进度反馈机制 — run `git show` on any of them.
Change coupling: AppEndpoints.swift ↔ GitHubAPIClientProtocol.swift Starcat/Core/Network/AppEndpoints.swift:1— `Starcat/Core/Network/AppEndpoints.swift` and `Starcat/Core/Network/GitHubAPI/GitHubAPIClientProtocol.swift` change together 54% of the time (15 of the 28 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 15 shared commits counted here, the most recent 3 are `87a08d36` feat(issues): 详情页新增 Issues 入口、列表浮层与新建 Issue; `dae09f6b` feat(home): 完善详情页文件树预览、LFS 下载与缓存; `fd2b8ed8` feat(home): 详情页支持按文件勾选下载 — run `git show` on any of them.
Change coupling: BatchAIOptionsSheet.swift ↔ BatchAIQueueService.swift Starcat/Features/AI/BatchAIOptionsSheet.swift:1— `Starcat/Features/AI/BatchAIOptionsSheet.swift` and `Starcat/Features/AI/BatchAIQueueService.swift` change together 50% of the time (10 of the 20 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 10 shared commits counted here, the most recent 3 are `2436ed4d` improve(ai): 控制批量标签增量扩词; `0b0792cd` feat(ai): 新增首次标签体系引导; `887b8889` fix(ai): 统一 JEV 标签生成与新增兜底 — run `git show` on any of them.
Change coupling: GitHubStarListAIGroupingPreflightView.swift ↔ SidebarView.swift Starcat/Features/Home/GitHubStarListAIGroupingPreflightView.swift:1— `Starcat/Features/Home/GitHubStarListAIGroupingPreflightView.swift` and `Starcat/Features/Home/SidebarView.swift` change together 50% of the time (9 of the 18 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 `5e196f7f` feat(ai): 新增 AI 分组的删除与重新分组功能; `09681940` perf(home): 避免仓库分组窗口重复尺寸计算; `c8788fbd` revert(home): 撤销仓库分组窗口性能改动 — run `git show` on any of them.
Change coupling: KnowledgeRAGQueryPlanner.swift ↔ KnowledgeRAGWorkspaceViewModel.swift Starcat/Features/RAG/Core/KnowledgeRAGQueryPlanner.swift:1— `Starcat/Features/RAG/Core/KnowledgeRAGQueryPlanner.swift` and `Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift` change together 50% of the time (8 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in 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 8 shared commits counted here, the most recent 3 are `0d6901d5` feat(rag): 支持 Codex 与 Claude Code CLI 推理; `db7775fd` feat(starcat): 新增 RAG 内容新鲜度与索引可用性元数据及设置项; `355ab16e` feat(rag): 新增 RAG 调试追踪与上下文事件上报机制 — run `git show` on any of them.
Change coupling: BatchAITagReviewRow.swift ↔ BatchAIWorkspaceView.swift Starcat/Features/AI/BatchAITagReviewRow.swift:1— `Starcat/Features/AI/BatchAITagReviewRow.swift` and `Starcat/Features/AI/BatchAIWorkspaceView.swift` change together 50% of the time (7 of the 14 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 7 shared commits counted here, the most recent 3 are `899dbb7a` improve(ai): 完善首次标签体系反馈与批量应用; `0b0792cd` feat(ai): 新增首次标签体系引导; `9374039d` improve(ai): AI 整理窗口运行态接入思考球动画 — run `git show` on any of them.
Change coupling: AgentMessageTimelineView.swift ↔ AgentRunInspectorView.swift Starcat/Features/Agents/Core/AgentMessageTimelineView.swift:1— `Starcat/Features/Agents/Core/AgentMessageTimelineView.swift` and `Starcat/Features/Agents/Core/AgentRunInspectorView.swift` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `1c34e89b` fix(agent): 修复工作台中栏偏移与检查器内容溢出; `215d0cd2` feat(agent): 增加 Runtime 事件审计视图; `0727ad02` improve(agent): 重构任务检查器并打通步骤联动 — run `git show` on any of them.
Change coupling: WeeklyDetailScaffoldShell.swift ↔ TrendingScaffoldShell.swift Starcat/Features/Activity/WeeklyDetailScaffoldShell.swift:1— `Starcat/Features/Activity/WeeklyDetailScaffoldShell.swift` and `Starcat/Features/Trending/TrendingScaffoldShell.swift` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `276b9aa1` feat(stars): 支持取消 Star 后清理本地及知识库数据; `c283d55b` fix(stars): 统一跨场景星标数展示; `9e42aec4` feat(starcat): 新增外部场景 Star 操作后的统一刷新机制并重构搜索交互逻辑 — run `git show` on any of them.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×18
Edited copy of a member (19 corresponding lines) Starcat/Features/AI/LocalAI/LayaMLXDecisionModel.swift:97— Starcat/Features/AI/LocalAI/LayaMLXDecisionModel.swift:97-115 | Starcat/Features/AI/LocalAI/LayaMLXDecisionModel.swift:245-265 — 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) Starcat/Features/FollowGraph/FollowGraphAvatarSchemeHandler.swift:20— Starcat/Features/FollowGraph/FollowGraphAvatarSchemeHandler.swift:20-38 | Starcat/Shared/Components/ReadmeAttachmentImageSchemeHandler.swift:25-43 — 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) Starcat/Core/Health/RepoHealthStore.swift:55— Starcat/Core/Health/RepoHealthStore.swift:55-73 | Starcat/Core/Sync/OpenSSFScoreStore.swift:58-76 — 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) Starcat/Core/Network/TrendingAPI.swift:219— Starcat/Core/Network/TrendingAPI.swift:219-237 | Starcat/Core/Network/WeeklyAPI.swift:307-325 — 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) Starcat/Core/RAG/KnowledgeRAGIndexBuilder.swift:1256— Starcat/Core/RAG/KnowledgeRAGIndexBuilder.swift:1256-1275 | Starcat/Features/AI/SemanticSearchService.swift:380-398 — 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) Starcat/Features/Search/SearchCenterView.swift:2366— Starcat/Features/Search/SearchCenterView.swift:2366-2384 | Starcat/Features/Tags/RepoTagsSection.swift:865-883 — 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) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:3076— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:3076-3094 | Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:3117-3141 — 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) Starcat/Features/AI/RepoAIWindowContentView.swift:759— Starcat/Features/AI/RepoAIWindowContentView.swift:759-777 | Starcat/Features/AI/RepoAIWindowContentView.swift:984-1002 — 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) Starcat/Features/MCP/AgentToolMCPRuntime.swift:63— Starcat/Features/MCP/AgentToolMCPRuntime.swift:63-81 | Starcat/Features/MCP/StarcatMCPRuntime.swift:76-110 — 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) Starcat/Features/Agents/ExternalRuntime/CodexAppServerAdapter.swift:89— Starcat/Features/Agents/ExternalRuntime/CodexAppServerAdapter.swift:89-109 | Starcat/Features/Agents/ExternalRuntime/CodexModelCatalog.swift:175-193 — 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) Starcat/Features/RAG/UI/RAGExecutionTimeline.swift:175— Starcat/Features/RAG/UI/RAGExecutionTimeline.swift:175-198 | Starcat/Features/RAG/UI/RAGExecutionTimeline.swift:200-218 — 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) Starcat/Features/Agents/Core/AgentRunSession.swift:181— Starcat/Features/Agents/Core/AgentRunSession.swift:181-204 | Starcat/Features/Agents/Core/AgentRunSession.swift:209-227 — 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) Starcat/Features/Home/HomeViewModel.swift:3921— Starcat/Features/Home/HomeViewModel.swift:3921-3939 | Starcat/Features/Home/HomeViewModel.swift:3941-3963 — 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) Starcat/Features/Profile/ShareCard/ShareCardSheet.swift:851— Starcat/Features/Profile/ShareCard/ShareCardSheet.swift:851-869 | Starcat/Features/Profile/ShareCard/ShareCardSheet.swift:979-999 — 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) Starcat/Features/Tags/RepoTagsSection.swift:316— Starcat/Features/Tags/RepoTagsSection.swift:316-335 | Starcat/Features/Tags/RepoTagsSection.swift:680-698 — 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) Starcat/Features/Home/RepoMetadataHeaderView.swift:1038— Starcat/Features/Home/RepoMetadataHeaderView.swift:1038-1056 | Starcat/Features/Home/RepoMetadataHeaderView.swift:1091-1109 — 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) Starcat/Features/Notes/NoteEditorSheet.swift:199— Starcat/Features/Notes/NoteEditorSheet.swift:199-218 | Starcat/Features/Notes/RepoNotesSection.swift:403-421 — 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) Starcat/Shared/Components/StarsSyncButton.swift:97— Starcat/Shared/Components/StarsSyncButton.swift:97-115 | Starcat/Shared/Components/SyncIconButton.swift:241-268 — 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 copy of a member (11 corresponding lines) · ×18
Edited copy of a member (11 corresponding lines) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2436— Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2436-2446 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2448-2459 — 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) Starcat/Features/Agents/WeeklyReport/RepoAlternativesArtifactBuilder.swift:29— Starcat/Features/Agents/WeeklyReport/RepoAlternativesArtifactBuilder.swift:29-39 | Starcat/Features/Agents/WeeklyReport/WeeklyReportArtifactBuilder.swift:27-37 — 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) Starcat/Features/AI/RepoAIChatViewModel.swift:96— Starcat/Features/AI/RepoAIChatViewModel.swift:96-106 | Starcat/Features/Agents/Core/AgentJSON.swift:158-172 — 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) Starcat/Features/Profile/ShareCard/StarredMarkdownRenderer.swift:288— Starcat/Features/Profile/ShareCard/StarredMarkdownRenderer.swift:288-298 | Starcat/Features/Profile/ShareCard/StarredMarkdownRenderer.swift:301-312 — 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) Starcat/Core/Sync/RepoEmbeddingRepository.swift:37— Starcat/Core/Sync/RepoEmbeddingRepository.swift:37-48 | Starcat/Core/Sync/RepoEmbeddingRepository.swift:79-89 — 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) Starcat/Features/Companion/CompanionNoteWriter.swift:48— Starcat/Features/Companion/CompanionNoteWriter.swift:48-58 | Starcat/Features/Companion/CompanionTagWriter.swift:55-67 — 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) Starcat/Features/Home/RepoListView.swift:2190— Starcat/Features/Home/RepoListView.swift:2190-2201 | Starcat/Features/Home/RepoListView.swift:2203-2213 — 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) Starcat/Features/AI/AIConfiguration.swift:147— Starcat/Features/AI/AIConfiguration.swift:147-159 | Starcat/Features/Activity/GitHubNotificationIssueTimeline.swift:40-50 — 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) Starcat/Features/AI/RepoAIWindowContentView.swift:779— Starcat/Features/AI/RepoAIWindowContentView.swift:779-792 | Starcat/Features/AI/RepoAIWindowContentView.swift:1004-1014 — 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) Starcat/Core/Network/GitHubAPI/GitHubRepositoryMetricsClient.swift:615— Starcat/Core/Network/GitHubAPI/GitHubRepositoryMetricsClient.swift:615-625 | Starcat/Core/Network/GitHubAPI/GitHubRepositoryMetricsClient.swift:654-664 — 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) Starcat/Features/Home/HomeView.swift:1419— Starcat/Features/Home/HomeView.swift:1419-1435 | Starcat/Features/Home/HomeView.swift:1530-1540 — 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) Starcat/Features/AI/LocalAI/LayaDecisionModelStorage.swift:53— Starcat/Features/AI/LocalAI/LayaDecisionModelStorage.swift:53-63 | Starcat/Features/AI/LocalAI/LocalAIModelStorage.swift:177-188 — 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) Starcat/Shared/Services/RepoContextPacker/Models/PackerIO.swift:65— Starcat/Shared/Services/RepoContextPacker/Models/PackerIO.swift:65-83 | Starcat/Shared/Services/RepoContextPacker/Protocols/PackerProtocols.swift:114-124 — 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) Starcat/Core/Network/GitHubStatusMonitor.swift:89— Starcat/Core/Network/GitHubStatusMonitor.swift:89-100 | Starcat/Features/ExternalSearch/ExternalSearchProviderClients.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) Starcat/Features/AI/RepoAIInlineWindowController.swift:513— Starcat/Features/AI/RepoAIInlineWindowController.swift:513-526 | Starcat/Features/Search/SearchCenterWindowController.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) Starcat/Features/Insights/MyInsightsSnapshotProvider.swift:90— Starcat/Features/Insights/MyInsightsSnapshotProvider.swift:90-100 | Starcat/Features/RAG/Core/KnowledgeBaseMetadataSnapshot.swift:323-333 — 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) Starcat/Features/MCP/StarcatMCPRuntime.swift:35— Starcat/Features/MCP/StarcatMCPRuntime.swift:35-47 | Starcat/Features/MCP/StarcatMCPToolRegistry.swift:21-31 — 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) Starcat/Features/Explore/ExploreModeHelpPopover.swift:108— Starcat/Features/Explore/ExploreModeHelpPopover.swift:108-125 | Starcat/Features/RAG/UI/RAGMetadataSectionHelp.swift:80-90 — 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 (24 corresponding lines) · ×17
Edited copy of a member (24 corresponding lines) Starcat/Features/Explore/ExploreModeHelpPopover.swift:175— Starcat/Features/Explore/ExploreModeHelpPopover.swift:175-204 | Starcat/Features/RAG/UI/RAGPlanSectionHelp.swift:213-236 — 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.
Edited copy of a member (24 corresponding lines) Starcat/Features/Insights/InsightsMetricMotifBackground.swift:177— Starcat/Features/Insights/InsightsMetricMotifBackground.swift:177-200 | Starcat/Features/Insights/InsightsMetricMotifBackground.swift:292-316 — 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.
Edited copy of a member (24 corresponding lines) Starcat/Shared/Models/RepoDetailViewData.swift:122— Starcat/Shared/Models/RepoDetailViewData.swift:122-145 | Starcat/Shared/Models/RepoDetailViewData.swift:148-171 — 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.
Edited copy of a member (24 corresponding lines) Starcat/Features/Profile/ShareCard/ShareCardContent.swift:1559— Starcat/Features/Profile/ShareCard/ShareCardContent.swift:1559-1582 | Starcat/Features/Profile/ShareCard/ShareCardContent.swift:1780-1815 — 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.
Edited copy of a member (24 corresponding lines) Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:819— Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:819-849 | Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:916-939 — 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.
Edited copy of a member (24 corresponding lines) Starcat/Core/Network/GitHubAPI/OrganizationIssuesAPI.swift:87— Starcat/Core/Network/GitHubAPI/OrganizationIssuesAPI.swift:87-119 | Starcat/Core/Network/GitHubAPI/RepoIssuesAPI.swift:164-187 — 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.
Edited copy of a member (24 corresponding lines) Starcat/Features/AI/ReadmeTranslationService.swift:819— Starcat/Features/AI/ReadmeTranslationService.swift:819-842 | Starcat/Features/AI/RepoAIInsightService.swift:1615-1639 — 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.
Edited copy of a member (24 corresponding lines) Starcat/Core/RAG/RAGChunkRepository.swift:518— Starcat/Core/RAG/RAGChunkRepository.swift:518-551 | Starcat/Core/RAG/RAGChunkRepository.swift:622-645 — 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.
Edited copy of a member (24 corresponding lines) Starcat/Features/CodeGraph/CodeFlowPanel.swift:71— Starcat/Features/CodeGraph/CodeFlowPanel.swift:71-94 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryPanel.swift:109-136 — 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.
Edited copy of a member (24 corresponding lines) Starcat/Features/RAG/UI/RAGAssistantMessageBlock.swift:51— Starcat/Features/RAG/UI/RAGAssistantMessageBlock.swift:51-84 | Starcat/Features/RAG/UI/RAGAssistantMessageBlock.swift:221-244 — 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.
Edited copy of a member (24 corresponding lines) Starcat/Features/Profile/ShareCard/ShareCardContent.swift:2052— Starcat/Features/Profile/ShareCard/ShareCardContent.swift:2052-2079 | Starcat/Features/Profile/ShareCard/ShareCardContent.swift:2083-2106 — 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.
Edited copy of a member (24 corresponding lines) Starcat/Core/Sync/ReleaseNotificationService.swift:103— Starcat/Core/Sync/ReleaseNotificationService.swift:103-130 | Starcat/Core/Sync/ReleaseNotificationService.swift:133-156 — 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.
Edited copy of a member (24 corresponding lines) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:1005— Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:1005-1028 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:1945-1972 — 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.
Edited copy of a member (24 corresponding lines) Starcat/Core/Sync/AwesomeRepository.swift:568— Starcat/Core/Sync/AwesomeRepository.swift:568-591 | Starcat/Core/Sync/AwesomeRepository.swift:593-619 — 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.
Edited copy of a member (24 corresponding lines) Starcat/Core/Scheduling/OpenSSFScorePoller.swift:106— Starcat/Core/Scheduling/OpenSSFScorePoller.swift:106-129 | Starcat/Core/Scheduling/RepoHealthPoller.swift:116-140 — 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.
Edited copy of a member (24 corresponding lines) Starcat/Features/Home/GitHubStarListAIGroupingPresentation.swift:41— Starcat/Features/Home/GitHubStarListAIGroupingPresentation.swift:41-64 | Starcat/Features/Home/GitHubStarListAIGroupingPresentationStore.swift:246-271 — 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.
Edited copy of a member (24 corresponding lines) Starcat/Features/Home/ReadmeTranslationViewModel.swift:219— Starcat/Features/Home/ReadmeTranslationViewModel.swift:219-253 | Starcat/Features/Home/ReadmeTranslationViewModel.swift:309-332 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×17
Edited copy of a member (16 corresponding lines) Starcat/Features/AI/LocalAI/LayaDecisionModelManager.swift:292— Starcat/Features/AI/LocalAI/LayaDecisionModelManager.swift:292-307 | Starcat/Features/AI/LocalAI/LocalAIModelManager.swift:565-583 — 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) Starcat/Features/Search/SearchCenterView.swift:1354— Starcat/Features/Search/SearchCenterView.swift:1354-1373 | Starcat/Features/Search/SearchCenterView.swift:1377-1392 — 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) Starcat/Features/RAG/Core/KnowledgeRAGQueryPlanner.swift:494— Starcat/Features/RAG/Core/KnowledgeRAGQueryPlanner.swift:494-509 | Starcat/Features/RAG/Core/RAGNetworkIntentResolver.swift:133-149 — 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) Starcat/Features/Profile/ShareCard/LibraryExportRenderer.swift:48— Starcat/Features/Profile/ShareCard/LibraryExportRenderer.swift:48-63 | Starcat/Features/Profile/ShareCard/StarredMarkdownRenderer.swift:38-55 — 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) Starcat/Shared/Components/LicenseKnowledgeCapsule.swift:338— Starcat/Shared/Components/LicenseKnowledgeCapsule.swift:338-357 | Starcat/Shared/Components/LicenseKnowledgeCapsule.swift:359-374 — 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) Starcat/Features/Home/HomeViewModel.swift:2224— Starcat/Features/Home/HomeViewModel.swift:2224-2239 | Starcat/Features/Home/HomeViewModel.swift:2241-2256 — 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) Starcat/Features/AI/AIChatBubble.swift:353— Starcat/Features/AI/AIChatBubble.swift:353-368 | Starcat/Features/AI/AIChatBubble.swift:438-454 — 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) Starcat/Features/CodeGraph/CodeFlowViewModel.swift:330— Starcat/Features/CodeGraph/CodeFlowViewModel.swift:330-351 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryViewModel.swift:559-574 — 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) Starcat/Features/Agents/Core/LoopAgentRuntime.swift:1006— Starcat/Features/Agents/Core/LoopAgentRuntime.swift:1006-1021 | Starcat/Features/Agents/ExternalRuntime/ExternalAgentRuntime.swift:364-379 — 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) Starcat/Core/Network/GitHubAPI/GitHubRepositoryMetricsClient.swift:728— Starcat/Core/Network/GitHubAPI/GitHubRepositoryMetricsClient.swift:728-743 | Starcat/Core/Network/GitHubAPI/GitHubRepositoryMetricsClient.swift:773-788 — 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) Starcat/Features/ExternalSearch/ExternalSearchProviderClients.swift:411— Starcat/Features/ExternalSearch/ExternalSearchProviderClients.swift:411-429 | Starcat/Features/ExternalSearch/ExternalSearchProviderClients.swift:490-505 — 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) Starcat/Core/Capabilities/RepositoryMetadataCapability.swift:95— Starcat/Core/Capabilities/RepositoryMetadataCapability.swift:95-112 | Starcat/Core/Capabilities/RepositoryMetadataCapability.swift:114-129 — 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) Starcat/Shared/Services/DiskIssueTimelineCache.swift:147— Starcat/Shared/Services/DiskIssueTimelineCache.swift:147-166 | Starcat/Shared/Services/DiskRecommendationCacheStorage.swift:110-125 — 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) Starcat/Features/Search/SearchCenterView.swift:1137— Starcat/Features/Search/SearchCenterView.swift:1137-1156 | Starcat/Features/Search/SearchCenterView.swift:1171-1186 — 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) Starcat/Core/Database/DatabaseManager.swift:591— Starcat/Core/Database/DatabaseManager.swift:591-606 | Starcat/Core/Database/DatabaseManager.swift:608-628 — 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) Starcat/Core/Network/GitHubAPI/GitHubRepositoryMetricsClient.swift:699— Starcat/Core/Network/GitHubAPI/GitHubRepositoryMetricsClient.swift:699-714 | Starcat/Core/Network/GitHubAPI/RoutingGitHubRepositoryMetricsClient.swift:56-72 — 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) Starcat/Features/AI/AIOrganizationDraftRepository.swift:130— Starcat/Features/AI/AIOrganizationDraftRepository.swift:130-145 | Starcat/Features/RAG/Storage/RAGConversationStore.swift:243-264 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (5 corresponding lines) · ×17
Edited copy of a member (5 corresponding lines) Starcat/Features/Search/SearchCenterView.swift:3051— Starcat/Features/Search/SearchCenterView.swift:3051-3055 | Starcat/Shared/Components/RepoDetailScaffold.swift:1192-1198 — 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) Starcat/Features/AI/LocalAI/LayaDecisionModelStorage.swift:47— Starcat/Features/AI/LocalAI/LayaDecisionModelStorage.swift:47-51 | Starcat/Features/AI/LocalAI/LocalAIModelStorage.swift:168-175 — 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) Starcat/Features/Search/SearchCenterView.swift:3058— Starcat/Features/Search/SearchCenterView.swift:3058-3062 | Starcat/Shared/Components/RepoDetailScaffold.swift:1201-1207 — 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) Starcat/Core/Download/GitLFS.swift:90— Starcat/Core/Download/GitLFS.swift:90-95 | Starcat/Features/Activity/GitHubNotificationIssueTimeline.swift:109-113 — 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) Starcat/Features/DailyRadar/DailyRadarEditionCalendarPicker.swift:362— Starcat/Features/DailyRadar/DailyRadarEditionCalendarPicker.swift:362-366 | Starcat/Features/DailyRadar/DailyRadarEditionCalendarPicker.swift:368-372 — 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) Starcat/Core/Sync/GitHubNotificationInboxService.swift:504— Starcat/Core/Sync/GitHubNotificationInboxService.swift:504-508 | Starcat/Features/Activity/ActivityViewModel.swift:1365-1369 — 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) Starcat/Features/Agents/Core/AgentExternalSearchTool.swift:267— Starcat/Features/Agents/Core/AgentExternalSearchTool.swift:267-272 | Starcat/Features/Agents/WeeklyReport/RepoAlternativesArtifactBuilder.swift:282-286 — 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) Starcat/Features/Auth/GithubWebFlowService.swift:295— Starcat/Features/Auth/GithubWebFlowService.swift:295-299 | Starcat/Features/Auth/MockGithubOAuthService.swift:141-145 — 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) Starcat/Features/Settings/ProSettingsView.swift:865— Starcat/Features/Settings/ProSettingsView.swift:865-869 | Starcat/Features/Activity/GitHubNotificationIssueTimeline.swift:103-107 — 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) Starcat/Features/AI/Anthropic/AnthropicMessagesCodec.swift:616— Starcat/Features/AI/Anthropic/AnthropicMessagesCodec.swift:616-621 | Starcat/Features/RAG/Core/RAGCLIModelClient.swift:388-392 — 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) Starcat/Features/AI/AIOrganizationDraftRepository.swift:201— Starcat/Features/AI/AIOrganizationDraftRepository.swift:201-208 | Starcat/Features/RAG/Storage/RAGConversationStore.swift:515-519 — 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) Starcat/Shared/Components/LanguageIcon.swift:28— Starcat/Shared/Components/LanguageIcon.swift:28-32 | Starcat/Shared/Components/LinguistLanguages.generated.swift:17-21 — 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) Starcat/Core/Sync/ReadmeRepository.swift:140— Starcat/Core/Sync/ReadmeRepository.swift:140-144 | Starcat/Core/Sync/RepoRepository.swift:1382-1386 — 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) Starcat/Features/AI/BatchAIOptionsSheet.swift:304— Starcat/Features/AI/BatchAIOptionsSheet.swift:304-308 | Starcat/Features/Home/GitHubStarListAIGroupingPreflightView.swift:528-534 — 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) Starcat/Core/Sync/RepoRepository.swift:440— Starcat/Core/Sync/RepoRepository.swift:440-444 | Starcat/Core/Sync/UndoStarHistoryRepository.swift:113-117 — 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) Starcat/Features/Settings/AISettingsView.swift:2163— Starcat/Features/Settings/AISettingsView.swift:2163-2167 | Starcat/Features/Settings/SettingsSidebarWidthLimiter.swift:37-41 — 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) Starcat/Features/Activity/WeeklyContentView.swift:688— Starcat/Features/Activity/WeeklyContentView.swift:688-692 | Starcat/Shared/Components/Toolbar/ExternalLinksMenu.swift:305-310 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×16
Edited copy of a member (14 corresponding lines) Starcat/Features/RAG/Core/RAGSearchProviders.swift:397— Starcat/Features/RAG/Core/RAGSearchProviders.swift:397-410 | Starcat/Features/RAG/Core/RAGSearchProviders.swift:444-464 — 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) Starcat/Features/CodeGraph/CodeFlowStorage.swift:694— Starcat/Features/CodeGraph/CodeFlowStorage.swift:694-707 | Starcat/Shared/Services/RepoContextStorage.swift:951-969 — 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) Starcat/Features/AI/SemanticIndexBuilder.swift:415— Starcat/Features/AI/SemanticIndexBuilder.swift:415-428 | Starcat/Features/Home/HomeViewModel.swift:2643-2656 — 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) Starcat/Features/Activity/GitHubNotificationDetailView.swift:2991— Starcat/Features/Activity/GitHubNotificationDetailView.swift:2991-3004 | Starcat/Features/Home/RepoFileSourcePreview.swift:70-87 — 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) Starcat/Features/CodeGraph/CodeFlowStorage.swift:311— Starcat/Features/CodeGraph/CodeFlowStorage.swift:311-324 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:354-374 — 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) Starcat/Shared/Services/DiskChatHistoryStore.swift:778— Starcat/Shared/Services/DiskChatHistoryStore.swift:778-796 | Starcat/Shared/Services/DiskChatHistoryStore.swift:798-811 — 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) Starcat/Features/RAG/Storage/RAGConversationStore.swift:140— Starcat/Features/RAG/Storage/RAGConversationStore.swift:140-159 | Starcat/Features/RAG/Storage/RAGConversationStore.swift:548-561 — 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) Starcat/Features/Profile/ShareCard/ShareCardContent.swift:896— Starcat/Features/Profile/ShareCard/ShareCardContent.swift:896-909 | Starcat/Features/Profile/ShareCard/ShareCardContent.swift:1606-1622 — 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) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2284— Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2284-2300 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2302-2315 — 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) Starcat/Core/Distribution/AppStoreToDirectImport.swift:236— Starcat/Core/Distribution/AppStoreToDirectImport.swift:236-251 | Starcat/Core/Distribution/AppStoreToDirectImport.swift:253-266 — 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) Starcat/Features/Home/RepoDetailView.swift:730— Starcat/Features/Home/RepoDetailView.swift:730-743 | Starcat/Features/Home/RepoDetailView.swift:745-758 — 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) Starcat/Features/Home/HomeView.swift:1257— Starcat/Features/Home/HomeView.swift:1257-1272 | Starcat/Shared/Components/RepoDetailScaffold.swift:569-582 — 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) Starcat/Features/Settings/DiagnosticsSettingsTab.swift:296— Starcat/Features/Settings/DiagnosticsSettingsTab.swift:296-311 | Starcat/Shared/Diagnostics/StartupFailureView.swift:87-100 — 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) Starcat/Features/Settings/ProSettingsView.swift:1791— Starcat/Features/Settings/ProSettingsView.swift:1791-1807 | Starcat/Shared/Components/SettingsActionIconButton.swift:18-31 — 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) Starcat/Core/Insights/RepoStarHistoryRepository.swift:210— Starcat/Core/Insights/RepoStarHistoryRepository.swift:210-223 | Starcat/Features/Insights/RepositoryInsightsViewModel.swift:257-271 — 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) Starcat/Features/AI/BatchAIWorkspaceView.swift:675— Starcat/Features/AI/BatchAIWorkspaceView.swift:675-688 | Starcat/Features/AI/BatchAIWorkspaceView.swift:690-705 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×16
Edited copy of a member (15 corresponding lines) Starcat/Core/Network/WeeklyModels.swift:487— Starcat/Core/Network/WeeklyModels.swift:487-501 | Starcat/Features/RAG/Core/KnowledgeRAGModels.swift:1138-1154 — 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) Starcat/Core/Sync/DiscoveryRepository.swift:276— Starcat/Core/Sync/DiscoveryRepository.swift:276-296 | Starcat/Core/Sync/DiscoveryRepository.swift:356-370 — 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) Starcat/Features/Activity/ActivityViewModel.swift:720— Starcat/Features/Activity/ActivityViewModel.swift:720-734 | Starcat/Features/Activity/ActivityViewModel.swift:737-751 — 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) supports/scripts/starcat-localization.py:190— supports/scripts/starcat-localization.py:190-204 | supports/scripts/starcat-localization.py:560-575 — 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) Starcat/Features/AI/BatchAIQueueService.swift:2089— Starcat/Features/AI/BatchAIQueueService.swift:2089-2103 | Starcat/Features/Home/HomeView.swift:2528-2542 — 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) Starcat/Features/Activity/GitHubNotificationDetailView.swift:3023— Starcat/Features/Activity/GitHubNotificationDetailView.swift:3023-3037 | Starcat/Shared/Components/GitHubMarkdownFitWidthImage.swift:232-248 — 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) Starcat/Features/Agents/WeeklyReport/RepoAlternativesArtifactBuilder.swift:122— Starcat/Features/Agents/WeeklyReport/RepoAlternativesArtifactBuilder.swift:122-145 | Starcat/Features/Agents/WeeklyReport/WeeklyReportArtifactBuilder.swift:105-119 — 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) Starcat/Shared/Components/PressableHover.swift:93— Starcat/Shared/Components/PressableHover.swift:93-107 | Starcat/Shared/Components/PressableHover.swift:121-135 — 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) Starcat/Features/Agents/ExternalRuntime/CodexAppServerAdapter.swift:1026— Starcat/Features/Agents/ExternalRuntime/CodexAppServerAdapter.swift:1026-1042 | Starcat/Features/Agents/ExternalRuntime/ExternalAgentRuntime.swift:964-978 — 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) Starcat/Core/Network/OpenSSFScoreAPI.swift:23— Starcat/Core/Network/OpenSSFScoreAPI.swift:23-37 | Starcat/Core/Network/TypeSafeClient.swift:256-273 — 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) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:214— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:214-228 | Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:232-246 — 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) Starcat/Features/Agents/UntaggedTidy/UntaggedTidyAgentTools.swift:244— Starcat/Features/Agents/UntaggedTidy/UntaggedTidyAgentTools.swift:244-258 | Starcat/Features/Agents/WeeklyReport/GitHubWeeklyReportTools.swift:189-208 — 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) Starcat/Core/Database/Models/Readme.swift:50— Starcat/Core/Database/Models/Readme.swift:50-64 | Starcat/Core/Database/Models/TrendingReadme.swift:59-73 — 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) Starcat/Features/Agents/Core/AgentModels.swift:216— Starcat/Features/Agents/Core/AgentModels.swift:216-232 | Starcat/Features/Agents/Core/AgentModels.swift:375-389 — 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) Starcat/Features/AI/RepoAIContextProvider.swift:167— Starcat/Features/AI/RepoAIContextProvider.swift:167-181 | Starcat/Features/AI/RepoAIContextProvider.swift:187-203 — 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) Starcat/Core/Subscription/SubscriptionManager.swift:94— Starcat/Core/Subscription/SubscriptionManager.swift:94-108 | Starcat/Features/AI/RepoAIChatViewModel.swift:300-315 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×16
Edited copy of a member (12 corresponding lines) Starcat/Features/Home/SidebarHeaderView.swift:269— Starcat/Features/Home/SidebarHeaderView.swift:269-280 | Starcat/Features/Home/SidebarHeaderView.swift:287-298 — 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) Starcat/Features/Search/SearchCenterView.swift:1282— Starcat/Features/Search/SearchCenterView.swift:1282-1293 | Starcat/Features/Search/SearchCenterView.swift:1319-1334 — 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) Starcat/Features/RAG/Core/RAGExternalSearchProviders.swift:451— Starcat/Features/RAG/Core/RAGExternalSearchProviders.swift:451-462 | Starcat/Features/RAG/Core/RAGExternalSearchProviders.swift:465-479 — 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) Starcat/Core/Navigation/RepositoryDeepLink.swift:80— Starcat/Core/Navigation/RepositoryDeepLink.swift:80-93 | Starcat/Core/Navigation/RepositoryDeepLink.swift:97-108 — 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) Starcat/Core/Capabilities/RepositoryReadCapability.swift:245— Starcat/Core/Capabilities/RepositoryReadCapability.swift:245-260 | Starcat/Features/Home/HomeViewModel.swift:2658-2669 — 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) Starcat/Features/AI/BatchAIOptionsSheet.swift:230— Starcat/Features/AI/BatchAIOptionsSheet.swift:230-242 | Starcat/Features/Home/GitHubStarListAIGroupingPreflightView.swift:320-331 — 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) Starcat/Features/AI/BatchAIOptionsSheet.swift:59— Starcat/Features/AI/BatchAIOptionsSheet.swift:59-71 | Starcat/Features/AI/TagTaxonomyBootstrapView.swift:83-94 — 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) Starcat/Features/Agents/Core/AgentExternalSearchTool.swift:85— Starcat/Features/Agents/Core/AgentExternalSearchTool.swift:85-96 | Starcat/Features/Agents/Core/AgentExternalSearchTool.swift:98-109 — 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) Starcat/Shared/Utilities/RelativeTimeText.swift:46— Starcat/Shared/Utilities/RelativeTimeText.swift:46-57 | Starcat/Shared/Utilities/RelativeTimeText.swift:62-73 — 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) Starcat/Shared/Services/DiskIssueDraftCache.swift:167— Starcat/Shared/Services/DiskIssueDraftCache.swift:167-178 | Starcat/Shared/Services/DiskNotificationCommentDraftCache.swift:171-182 — 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) Starcat/Features/Settings/ExternalSearchSettingsSection.swift:415— Starcat/Features/Settings/ExternalSearchSettingsSection.swift:415-433 | Starcat/Features/Settings/ExternalSearchSettingsSection.swift:435-446 — 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) Starcat/Features/RAG/Core/RAGExternalSearchProviders.swift:116— Starcat/Features/RAG/Core/RAGExternalSearchProviders.swift:116-127 | Starcat/Features/RAG/Core/RAGExternalSearchProviders.swift:148-159 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) Starcat/Features/RAG/UI/RAGWorkspaceTypography.swift:67— Starcat/Features/RAG/UI/RAGWorkspaceTypography.swift:67-79 | Starcat/Features/RAG/UI/RAGWorkspaceTypography.swift:81-92 — 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) Starcat/Shared/Components/CommonActionIconButtons.swift:325— Starcat/Shared/Components/CommonActionIconButtons.swift:325-336 | Starcat/Shared/Components/SheetCloseButton.swift:24-36 — 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) Starcat/Features/Home/RepoContributorsStatItem.swift:122— Starcat/Features/Home/RepoContributorsStatItem.swift:122-133 | Starcat/Features/Trending/TrendingDetailContent.swift:161-173 — 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) Starcat/Core/Sync/GitHubNotificationThreadRepository.swift:345— Starcat/Core/Sync/GitHubNotificationThreadRepository.swift:345-361 | Starcat/Core/RAG/RAGChunkRepository.swift:858-869 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (3 corresponding lines) · ×16
Edited copy of a member (3 corresponding lines) Starcat/Features/Agents/WeeklyReport/RepoAlternativesArtifactBuilder.swift:273— Starcat/Features/Agents/WeeklyReport/RepoAlternativesArtifactBuilder.swift:273-275 | Starcat/Features/Agents/WeeklyReport/RepoInsightArtifactBuilder.swift:162-164 — 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) Starcat/Features/Home/DailyRadarPreviewColumnAnchors.swift:21— Starcat/Features/Home/DailyRadarPreviewColumnAnchors.swift:21-26 | Starcat/Features/Onboarding/GettingStartedOnboarding.swift:167-169 — 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) Starcat/Core/Network/DailyRadarAPI.swift:43— Starcat/Core/Network/DailyRadarAPI.swift:43-45 | Starcat/Features/Insights/RepositoryInsightsContextModels.swift:488-492 — 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) Starcat/Features/AI/BatchAIOptionsSheet.swift:107— Starcat/Features/AI/BatchAIOptionsSheet.swift:107-109 | Starcat/Features/AI/TagTaxonomyBootstrapView.swift:126-128 — 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) Starcat/Features/RAG/Core/GitHubRAGRemoteContextProvider.swift:570— Starcat/Features/RAG/Core/GitHubRAGRemoteContextProvider.swift:570-572 | Starcat/Features/Search/SearchSessionCache.swift:33-35 — 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) Starcat/Features/Insights/RepositoryInsightsView.swift:1567— Starcat/Features/Insights/RepositoryInsightsView.swift:1567-1575 | Starcat/Features/Insights/StarHistoryChartView.swift:339-341 — 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) Starcat/Core/Skills/RepoSkillInstaller.swift:143— Starcat/Core/Skills/RepoSkillInstaller.swift:143-145 | Starcat/Features/Insights/RepositoryInsightsContextStorage.swift:436-440 — 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) Starcat/Features/DailyRadar/DailyRadarPreviewWorkspace.swift:391— Starcat/Features/DailyRadar/DailyRadarPreviewWorkspace.swift:391-393 | Starcat/Features/DailyRadar/DailyRadarSkeletonView.swift:24-26 — 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) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:392— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:392-394 | Starcat/Features/RAG/UI/RepositoryInsightsXMLViewer.swift:24-26 — 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) Starcat/Features/Insights/RepositoryInsightsContextModels.swift:467— Starcat/Features/Insights/RepositoryInsightsContextModels.swift:467-473 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3727-3729 — 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) Starcat/Features/AI/LocalAI/LocalAILogEvent.swift:101— Starcat/Features/AI/LocalAI/LocalAILogEvent.swift:101-103 | Starcat/Features/Insights/ReadmeStarHistoryHTMLRenderer.swift:544-546 — 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) Starcat/Features/FollowGraph/FollowGraphAvatarSchemeHandler.swift:40— Starcat/Features/FollowGraph/FollowGraphAvatarSchemeHandler.swift:40-42 | Starcat/Shared/Components/ReadmeAttachmentImageSchemeHandler.swift:46-48 — 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) Starcat/Core/Capabilities/RepositoryReadCapability.swift:266— Starcat/Core/Capabilities/RepositoryReadCapability.swift:266-268 | Starcat/Core/Sync/RepoSources/LocalRepoSource.swift:26-29 — 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) Starcat/Features/RAG/Core/RAGNetworkIntentResolver.swift:232— Starcat/Features/RAG/Core/RAGNetworkIntentResolver.swift:232-235 | Starcat/Features/Settings/SettingsView.swift:584-586 — 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) Starcat/Features/RAG/Core/RAGRepoContextXMLProjector.swift:111— Starcat/Features/RAG/Core/RAGRepoContextXMLProjector.swift:111-113 | Starcat/Features/RAG/Core/RAGRepositoryInsightsContext.swift:366-368 — 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) Starcat/Core/Network/GitHubAPI/NotificationsAPI.swift:90— Starcat/Core/Network/GitHubAPI/NotificationsAPI.swift:90-92 | Starcat/Core/Network/GitHubAPI/UserAPI.swift:94-96 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×15
Edited copy of a member (18 corresponding lines) Starcat/Features/RAG/Core/KnowledgeBaseAnalytics.swift:260— Starcat/Features/RAG/Core/KnowledgeBaseAnalytics.swift:260-286 | Starcat/Features/RAG/Core/RAGRepoCandidateRepository.swift:544-587 — 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) Starcat/Features/MCP/StarcatMCPLoopbackHTTPServer.swift:254— Starcat/Features/MCP/StarcatMCPLoopbackHTTPServer.swift:254-284 | Starcat/Features/MCP/StarcatMCPLoopbackHTTPServer.swift:286-309 — 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) Starcat/Core/Network/GitHubAPI/StargazersAPI.swift:34— Starcat/Core/Network/GitHubAPI/StargazersAPI.swift:34-51 | Starcat/Core/Network/GitHubAPI/StargazersAPI.swift:76-94 — 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) Starcat/Features/Activity/GitHubNotificationDetailView.swift:914— Starcat/Features/Activity/GitHubNotificationDetailView.swift:914-931 | Starcat/Shared/Components/PillSegmentedControl.swift:109-129 — 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) Starcat/Features/AI/RepoAIWindowContentView.swift:1997— Starcat/Features/AI/RepoAIWindowContentView.swift:1997-2014 | Starcat/Features/AI/RepoAIWindowContentView.swift:2065-2082 — 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) Starcat/Features/AI/Anthropic/AnthropicClient.swift:320— Starcat/Features/AI/Anthropic/AnthropicClient.swift:320-338 | Starcat/Features/AI/OpenAIClient.swift:550-567 — 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) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:976— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:976-997 | Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:1071-1088 — 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) Starcat/Features/Insights/RepositoryInsightsRemoteProvider.swift:1409— Starcat/Features/Insights/RepositoryInsightsRemoteProvider.swift:1409-1426 | Starcat/Features/Insights/RepositoryInsightsRemoteProvider.swift:1428-1449 — 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) Starcat/Features/RAG/UI/RAGBackendConnectionSettingsModel.swift:52— Starcat/Features/RAG/UI/RAGBackendConnectionSettingsModel.swift:52-69 | Starcat/Features/RAG/UI/RAGBackendConnectionSettingsModel.swift:72-89 — 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) Starcat/Features/Detail/ReadmeWindowController.swift:126— Starcat/Features/Detail/ReadmeWindowController.swift:126-147 | Starcat/Features/Detail/RepoDetailWindowController.swift:107-124 — 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) Starcat/Features/CodeGraph/CodeFlowViewModel.swift:94— Starcat/Features/CodeGraph/CodeFlowViewModel.swift:94-113 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryViewModel.swift:105-122 — 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) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:2553— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:2553-2574 | Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:876-893 — 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) Starcat/Features/Settings/GeneralSettingsView.swift:152— Starcat/Features/Settings/GeneralSettingsView.swift:152-169 | Starcat/Features/Settings/GeneralSettingsView.swift:282-300 — 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) StarcatWidgets/Contributions/StarcatContributionProvider.swift:23— StarcatWidgets/Contributions/StarcatContributionProvider.swift:23-40 | StarcatWidgets/ReleaseWatch/StarcatReleaseWatchWidget.swift:39-56 — 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) Starcat/Core/RAG/RAGChunkRepository.swift:902— Starcat/Core/RAG/RAGChunkRepository.swift:902-919 | Starcat/Features/RAG/Core/RAGRepoCandidateRepository.swift:513-530 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×15
Edited copy of a member (21 corresponding lines) Starcat/Core/Settings/ThirdPartyService.swift:193— Starcat/Core/Settings/ThirdPartyService.swift:193-213 | Starcat/Core/Settings/ThirdPartyService.swift:219-239 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) Starcat/Features/AI/RepoAIInsightService.swift:1998— Starcat/Features/AI/RepoAIInsightService.swift:1998-2018 | Starcat/Features/AI/RepoAIInsightService.swift:2041-2062 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) Starcat/Features/AI/RepoAIWindowContentView.swift:847— Starcat/Features/AI/RepoAIWindowContentView.swift:847-867 | Starcat/Features/AI/RepoAIWindowContentView.swift:1031-1051 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) Starcat/Features/Collections/SmartCollectionDetailPanel.swift:761— Starcat/Features/Collections/SmartCollectionDetailPanel.swift:761-781 | Starcat/Features/Home/HomeView.swift:1294-1316 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) Starcat/Features/CodeGraph/CodeFlowViewModel.swift:281— Starcat/Features/CodeGraph/CodeFlowViewModel.swift:281-303 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryViewModel.swift:630-650 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) Starcat/Features/Tags/RepoTagsSection.swift:784— Starcat/Features/Tags/RepoTagsSection.swift:784-804 | Starcat/Features/Tags/SFSymbolPicker.swift:63-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.
Edited copy of a member (21 corresponding lines) Starcat/Features/Profile/SnakeFrameRenderer.swift:149— Starcat/Features/Profile/SnakeFrameRenderer.swift:149-169 | Starcat/Features/Profile/SnakeFrameRenderer.swift:173-197 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) Starcat/Features/Insights/RepositoryInsightsView.swift:3116— Starcat/Features/Insights/RepositoryInsightsView.swift:3116-3136 | Starcat/Features/Insights/RepositoryInsightsView.swift:3139-3160 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) Starcat/Shared/Components/WorkspaceColumnWidthPersistence.swift:47— Starcat/Shared/Components/WorkspaceColumnWidthPersistence.swift:47-68 | Starcat/Shared/Components/WorkspaceColumnWidthPersistence.swift:71-91 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) Starcat/Features/Releases/ReleaseAssetDownloadCoordinator.swift:150— Starcat/Features/Releases/ReleaseAssetDownloadCoordinator.swift:150-170 | Starcat/Features/Releases/ReleaseAssetRowView.swift:289-314 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) Starcat/Core/Subscription/DirectLicenseManager.swift:222— Starcat/Core/Subscription/DirectLicenseManager.swift:222-242 | Starcat/Core/Subscription/DirectLicenseManager.swift:244-274 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) Starcat/Shared/Services/DiskIssueDraftCache.swift:143— Starcat/Shared/Services/DiskIssueDraftCache.swift:143-165 | Starcat/Shared/Services/DiskNotificationCommentDraftCache.swift:149-169 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) Starcat/Features/CodeGraph/CodeFlowViewModel.swift:258— Starcat/Features/CodeGraph/CodeFlowViewModel.swift:258-279 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryViewModel.swift:597-617 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) Starcat/Features/Agents/Core/LoopAgentRuntime.swift:268— Starcat/Features/Agents/Core/LoopAgentRuntime.swift:268-292 | Starcat/Features/Agents/Core/LoopAgentRuntime.swift:294-314 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) Starcat/Features/About/AboutWindowController.swift:31— Starcat/Features/About/AboutWindowController.swift:31-52 | Starcat/Features/About/ReleaseNotesWindowController.swift:30-50 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×14
Members sharing a duplicated core (4 members, 50+ identical tokens) Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:1656— Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:1656-1677 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:3067-3144 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:3147-3169 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:3172-3204 — 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) Starcat/Core/Download/RepoFileDownloader.swift:141— Starcat/Core/Download/RepoFileDownloader.swift:141-203 | Starcat/Core/Download/RepoFileDownloader.swift:335-350 | Starcat/Core/Download/RepoFileDownloader.swift:384-419 | Starcat/Features/CodeGraph/CodeFlowRunner.swift:110-122 — 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) Starcat/Core/RAG/RAGChunkRepository.swift:492— Starcat/Core/RAG/RAGChunkRepository.swift:492-516 | Starcat/Core/RAG/RAGChunkRepository.swift:553-574 | Starcat/Core/RAG/RAGChunkRepository.swift:576-598 | Starcat/Core/RAG/RAGChunkRepository.swift:600-620 — 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) Starcat/Core/Scheduling/OpenSSFScorePoller.swift:36— Starcat/Core/Scheduling/OpenSSFScorePoller.swift:36-61 | Starcat/Core/Scheduling/ReadmePrefetchPoller.swift:40-69 | Starcat/Core/Scheduling/ReleasePoller.swift:69-96 | Starcat/Core/Scheduling/RepoHealthPoller.swift:42-69 — 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) Starcat/Core/Settings/AppSettings.swift:173— Starcat/Core/Settings/AppSettings.swift:173-188 | Starcat/Features/Activity/WeeklyContentView.swift:488-499 | Starcat/Features/Trending/TrendingViewModel.swift:103-124 | Starcat/Shared/Components/Toolbar/UnifiedSortMenu.swift:224-240 — 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) Starcat/Features/Activity/WeeklyContentView.swift:216— Starcat/Features/Activity/WeeklyContentView.swift:216-228 | Starcat/Features/Explore/AwesomeView.swift:148-167 | Starcat/Features/Explore/ExploreView.swift:433-444 | Starcat/Features/Trending/TrendingView.swift:504-515 — 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) Starcat/Features/Auth/AuthSession.swift:208— Starcat/Features/Auth/AuthSession.swift:208-277 | Starcat/Features/Auth/AuthSession.swift:417-482 | Starcat/Features/Auth/AuthSession.swift:495-539 | Starcat/Features/Auth/AuthSession.swift:672-742 — 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) Starcat/Features/Auth/GithubDeviceFlowService.swift:58— Starcat/Features/Auth/GithubDeviceFlowService.swift:58-115 | Starcat/Features/Auth/GithubDeviceFlowService.swift:190-233 | Starcat/Features/Auth/GithubWebFlowService.swift:134-240 | Starcat/Features/Auth/ProjectAccessOAuthService.swift:267-293 — 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) Starcat/Features/Auth/GithubWebFlowService.swift:274— Starcat/Features/Auth/GithubWebFlowService.swift:274-281 | Starcat/Features/Auth/GithubWebFlowService.swift:284-291 | Starcat/Features/Auth/MockGithubOAuthService.swift:123-130 | Starcat/Features/Auth/MockGithubOAuthService.swift:132-139 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) Starcat/Features/RAG/Core/GitHubRAGRemoteContextProvider.swift:491— Starcat/Features/RAG/Core/GitHubRAGRemoteContextProvider.swift:491-501 | Starcat/Features/RAG/UI/RAGExecutionTimeline.swift:505-515 | Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:1368-1378 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:4292-4302 — 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) Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:166— Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:166-216 | Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:954-967 | Starcat/Features/RAG/UI/RAGWorkspaceConversationRail.swift:32-163 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2778-2919 — 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) Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:505— Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:505-601 | Starcat/Features/Settings/AIModelManagementSheet.swift:27-82 | Starcat/Features/Settings/AITaskPromptSheet.swift:22-99 | Starcat/Features/Settings/TranslationPromptSheet.swift:22-105 — 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) Starcat/Features/Settings/RepoContextSettingsSection.swift:69— Starcat/Features/Settings/RepoContextSettingsSection.swift:69-87 | Starcat/Features/Settings/RepositorySourceDownloadSettingsSection.swift:14-35 | Starcat/Features/Settings/SettingsView.swift:1760-2194 | Starcat/Features/Settings/UndoStarRetentionSettings.swift:25-116 — 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) Starcat/Shared/Components/CommonActionIconButtons.swift:54— Starcat/Shared/Components/CommonActionIconButtons.swift:54-66 | Starcat/Shared/Components/CommonActionIconButtons.swift:169-183 | Starcat/Shared/Components/CommonActionIconButtons.swift:209-221 | Starcat/Shared/Components/CommonActionIconButtons.swift:246-258 — 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 (7 corresponding lines) · ×14
Edited copy of a member (7 corresponding lines) Starcat/Shared/Services/DiskIssueTimelineCache.swift:181— Starcat/Shared/Services/DiskIssueTimelineCache.swift:181-188 | Starcat/Shared/Services/DiskWikiCache.swift:342-348 — 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) Starcat/Features/Agents/Core/AgentContextPickerRepositoryRow.swift:26— Starcat/Features/Agents/Core/AgentContextPickerRepositoryRow.swift:26-33 | Starcat/Features/RAG/UI/RAGContextPickerRepositoryRow.swift:24-30 — 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) Starcat/Core/Network/GitHubAPI/RepositoryMarkdownLink.swift:69— Starcat/Core/Network/GitHubAPI/RepositoryMarkdownLink.swift:69-75 | Starcat/Core/Sync/RepoSources/BackendHintRepoSource.swift:38-48 — 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) Starcat/Features/MCP/StarcatMCPTLSIdentityStore.swift:202— Starcat/Features/MCP/StarcatMCPTLSIdentityStore.swift:202-208 | Starcat/Shared/Utilities/RuntimeContextProvider.swift:102-108 — 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) Starcat/Features/Ambient/Core/AmbientGridEngine.swift:255— Starcat/Features/Ambient/Core/AmbientGridEngine.swift:255-261 | Starcat/Features/DailyRadar/DailyRadarCoverComposition.swift:92-98 — 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) Starcat/Features/RAG/Core/GitHubRAGRemoteContextProvider.swift:562— Starcat/Features/RAG/Core/GitHubRAGRemoteContextProvider.swift:562-568 | Starcat/Features/Search/SearchSessionCache.swift:24-31 — 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) Starcat/Core/Database/Models/RepoNote.swift:138— Starcat/Core/Database/Models/RepoNote.swift:138-144 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2465-2471 — 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) Starcat/Core/Sync/RepoTagRepository.swift:166— Starcat/Core/Sync/RepoTagRepository.swift:166-174 | Starcat/Core/Sync/UndoStarHistoryRepository.swift:135-141 — 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) Starcat/Features/Home/HomeViewModel.swift:731— Starcat/Features/Home/HomeViewModel.swift:731-737 | Starcat/Features/Home/SidebarView.swift:1464-1470 — 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) Starcat/Features/Home/RepoListView.swift:2880— Starcat/Features/Home/RepoListView.swift:2880-2886 | Starcat/Features/RAG/UI/RAGContextPickerFilterControls.swift:391-397 — 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) Starcat/Shared/Components/LayoutDebugOverlay.swift:79— Starcat/Shared/Components/LayoutDebugOverlay.swift:79-85 | Starcat/Shared/Utilities/MainWindowFrameModifier.swift:102-108 — 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) Starcat/Features/Home/HomeViewModel.swift:715— Starcat/Features/Home/HomeViewModel.swift:715-721 | Starcat/Features/Home/SidebarView.swift:1456-1462 — 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) Starcat/Features/Home/ManageDetailContent.swift:185— Starcat/Features/Home/ManageDetailContent.swift:185-191 | Starcat/Features/Home/RepoDetailView.swift:891-897 — 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) Starcat/Shared/Components/RemoteAvatar.swift:147— Starcat/Shared/Components/RemoteAvatar.swift:147-154 | Starcat/Shared/Components/RemoteFavicon.swift:98-104 — 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 (20 corresponding lines) · ×13
Edited copy of a member (20 corresponding lines) Starcat/Core/Sync/AwesomeRepository.swift:155— Starcat/Core/Sync/AwesomeRepository.swift:155-174 | Starcat/Core/Sync/AwesomeRepository.swift:303-324 — 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) Starcat/Core/Network/DiscoveryAPI.swift:101— Starcat/Core/Network/DiscoveryAPI.swift:101-120 | Starcat/Core/Network/DiscoveryAPI.swift:123-146 — 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) Starcat/Features/CodeGraph/CodeFlowPanel.swift:175— Starcat/Features/CodeGraph/CodeFlowPanel.swift:175-194 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryPanel.swift:402-425 — 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) Starcat/Core/Sync/TrendingRepository.swift:106— Starcat/Core/Sync/TrendingRepository.swift:106-128 | Starcat/Core/Sync/TrendingRepository.swift:209-228 — 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) Starcat/Features/Home/ProjectAccessSheet.swift:59— Starcat/Features/Home/ProjectAccessSheet.swift:59-78 | Starcat/Features/Home/RepoContributorsStatItem.swift:169-190 — 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) Starcat/Features/AI/Usage/AIUsageWindowController.swift:35— Starcat/Features/AI/Usage/AIUsageWindowController.swift:35-54 | Starcat/Features/About/ReleaseNotesWindowController.swift:52-72 — 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) Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:1252— Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:1252-1271 | Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:1273-1292 — 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) Starcat/Shared/Components/RepoDetailScaffold.swift:620— Starcat/Shared/Components/RepoDetailScaffold.swift:620-639 | Starcat/Shared/Components/RepoDetailScaffold.swift:641-666 — 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) Starcat/Features/AI/BatchAIQueueService.swift:2306— Starcat/Features/AI/BatchAIQueueService.swift:2306-2335 | Starcat/Features/Activity/GitHubNotificationDetailView.swift:3041-3060 — 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) Starcat/Features/Search/SearchCenterView.swift:2010— Starcat/Features/Search/SearchCenterView.swift:2010-2029 | Starcat/Features/Search/SearchCenterView.swift:2144-2163 — 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) Starcat/Features/Settings/TranslationSettingsView.swift:381— Starcat/Features/Settings/TranslationSettingsView.swift:381-400 | Starcat/Features/Settings/TranslationSettingsView.swift:402-421 — 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) Starcat/Features/Insights/MyInsightsView.swift:529— Starcat/Features/Insights/MyInsightsView.swift:529-550 | Starcat/Features/Insights/MyInsightsView.swift:805-824 — 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) Starcat/Core/Sync/ReleaseSubscriptionRepository.swift:117— Starcat/Core/Sync/ReleaseSubscriptionRepository.swift:117-138 | Starcat/Core/Sync/RepoNoteRepository.swift:211-230 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (23 corresponding lines) · ×12
Edited copy of a member (23 corresponding lines) Starcat/Core/Health/RepoHealthService.swift:101— Starcat/Core/Health/RepoHealthService.swift:101-129 | Starcat/Core/Health/RepoHealthService.swift:135-157 — 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) Starcat/Features/AI/OpenAIClient.swift:439— Starcat/Features/AI/OpenAIClient.swift:439-461 | Starcat/Features/AI/OpenAIClient.swift:493-516 — 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) Starcat/Features/Settings/ExternalSearchSettingsSection.swift:168— Starcat/Features/Settings/ExternalSearchSettingsSection.swift:168-197 | Starcat/Features/Settings/SettingsView.swift:788-810 — 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) Starcat/Features/Activity/ActivityViewModel.swift:376— Starcat/Features/Activity/ActivityViewModel.swift:376-398 | Starcat/Features/Activity/ActivityViewModel.swift:403-425 — 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) Starcat/Features/Agents/WeeklyReport/GitHubWeeklyReportTools.swift:467— Starcat/Features/Agents/WeeklyReport/GitHubWeeklyReportTools.swift:467-489 | Starcat/Features/Agents/WeeklyReport/GitHubWeeklyReportTools.swift:657-680 — 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) Starcat/Features/Profile/ShareCard/ShareCardContent.swift:955— Starcat/Features/Profile/ShareCard/ShareCardContent.swift:955-981 | Starcat/Shared/Components/RemoteAvatar.swift:300-322 — 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) Starcat/Features/Search/SearchCenterView.swift:3303— Starcat/Features/Search/SearchCenterView.swift:3303-3325 | Starcat/Shared/Components/Toolbar/ExternalLinksMenu.swift:421-447 — 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) Starcat/Features/AI/RepoAIWindowController.swift:98— Starcat/Features/AI/RepoAIWindowController.swift:98-121 | Starcat/Features/Detail/RepoDetailWindowController.swift:81-103 — 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) Starcat/Core/Subscription/DirectLicenseManager.swift:309— Starcat/Core/Subscription/DirectLicenseManager.swift:309-331 | Starcat/Core/Subscription/DirectLicenseManager.swift:337-362 — 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) Starcat/Features/Auth/AuthSession.swift:550— Starcat/Features/Auth/AuthSession.swift:550-573 | Starcat/Features/Auth/AuthSession.swift:594-616 — 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) Starcat/Features/Auth/ProjectAccessSession.swift:556— Starcat/Features/Auth/ProjectAccessSession.swift:556-580 | Starcat/Features/Auth/ProjectAccessSession.swift:583-605 — 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) Starcat/Features/AI/Anthropic/AnthropicClient.swift:447— Starcat/Features/AI/Anthropic/AnthropicClient.swift:447-470 | Starcat/Features/AI/OpenAIClient.swift:742-764 — 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.
Repeated repair: Starcat/Features/Agents/Core/AgentWorkspaceWindowController.swift Starcat/Features/Agents/Core/AgentWorkspaceWindowController.swift:31— Starcat/Features/Agents/Core/AgentWorkspaceWindowController.swift changed 10 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is AgentWorkspaceWindowController.show at line 31), 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(agent): 修复工作台面板显隐时布局跳动与窗口增宽”; “fix(agent): 切换原生右侧工具栏”; “fix(workspace): 对齐主窗口三栏工具栏”; “fix(workspace): 恢复工作台顶部工具栏布局”. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Features/Agents/Core/AgentWorkspaceWindowController.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: Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceView.swift Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceView.swift:63— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceView.swift changed 11 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 4 (its worst body is KnowledgeRAGWorkspaceView.body at line 63), 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(rag): 分类展示向量化故障并直达对应设置”; “fix(workspace): 恢复工作台顶部工具栏布局”; “fix(workspace): 修复工作台分栏布局循环卡死”; “fix(workspace): 修复最小窗口拖动侧栏时内容裁切”. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceView.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: Starcat/Features/FollowGraph/FollowGraphUserCard.swift Starcat/Features/FollowGraph/FollowGraphUserCard.swift:24— Starcat/Features/FollowGraph/FollowGraphUserCard.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 FollowGraphUserCard.body at line 24), 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(follow-graph): 修复分页入口提前消失并支持人数异常刷新”; “fix(follow-graph): 仅在手动加载时展开关注关系”; “fix(follow-graph): 修复加载更多并增加底部结果提示”; “fix(follow-graph): 让选中用户人数跟随画布节点逐步增长”. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Features/FollowGraph/FollowGraphUserCard.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: Starcat/Features/Settings/AIModelListView.swift Starcat/Features/Settings/AIModelListView.swift:328— Starcat/Features/Settings/AIModelListView.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 AIModelFixedHeightView.rebuildScrollMonitor at line 328), 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(ai): 修复 Anthropic 标签 JSON 400 与中转探测”; “fix(ai): 修复本地模型路由与重复生成”; “fix(settings): 优化 AI 模型列表分页与嵌套滚动”; “fix(settings): 修复 AI 模型勾选导致设置页卡死”. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Features/Settings/AIModelListView.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: Starcat/Core/Distribution/AppStoreToDirectImport.swift Starcat/Core/Distribution/AppStoreToDirectImport.swift:157— Starcat/Core/Distribution/AppStoreToDirectImport.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 5 (its worst body is AppStoreToDirectImportEvaluator.decidePrompt at line 157), 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(direct): 修复 macOS 15 每次启动重复弹容器授权框”; “fix(direct): 避免重复触发商店数据访问授权”; “fix(direct): 修复首次导入弹窗判定与商店 Widget 组拷贝失败”. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Core/Distribution/AppStoreToDirectImport.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: Starcat/Core/Subscription/DirectLicenseManager.swift Starcat/Core/Subscription/DirectLicenseManager.swift:462— Starcat/Core/Subscription/DirectLicenseManager.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 9 (its worst body is DirectLicenseManager.applyValidationFailure at line 462), 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(subscription): 完善 Direct 激活限流冷却与失败提示”; “fix(diagnostics): 分离界面脱敏边界并约束待写载荷”; “fix(subscription): 区分 Direct 授权错误并补充本地化诊断”. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Core/Subscription/DirectLicenseManager.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: Starcat/Shared/Diagnostics/DiagnosticEvent.swift Starcat/Shared/Diagnostics/DiagnosticEvent.swift:132— Starcat/Shared/Diagnostics/DiagnosticEvent.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 11 (its worst body is DiagnosticEvent.init at line 132), 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(diagnostics): 分离界面脱敏边界并约束待写载荷”; “fix(diagnostics): 完善安全错误链与退出写入屏障”; “fix(ai): 未知服务商不再导致整表配置解码失败”. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Shared/Diagnostics/DiagnosticEvent.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: Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryBinaryResolver.swift Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryBinaryResolver.swift:248— Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryBinaryResolver.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 9 (its worst body is CodebaseMemoryBinaryResolver.runVersionProbe at line 248), 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(diagnostics): 完善安全错误链与退出写入屏障”; “fix(codebase): 适配账户级共享图谱服务”; “fix(codebase): 拒绝不包含图谱 UI 的外部二进制”. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryBinaryResolver.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: Starcat/Features/RepoIssues/RepoIssuesWorkspaceView.swift Starcat/Features/RepoIssues/RepoIssuesWorkspaceView.swift:251— Starcat/Features/RepoIssues/RepoIssuesWorkspaceView.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 8 (its worst body is RepoIssuesWorkspaceContent.issueList at line 251), 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(repo-issues): 统一评论区背景并补齐详情切换动画”; “fix(repo-issues): 跳过纯 PR 空页以继续加载后续 Issue”; “fix(repo-issues): 防止草稿恢复前关闭工作台丢失内容”. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Features/RepoIssues/RepoIssuesWorkspaceView.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: Starcat/Features/RepoIssues/RepoIssuesWorkspaceViewModel.swift Starcat/Features/RepoIssues/RepoIssuesWorkspaceViewModel.swift:143— Starcat/Features/RepoIssues/RepoIssuesWorkspaceViewModel.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 9 (its worst body is RepoIssuesWorkspaceViewModel.reloadDetailItem at line 143), 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(repo-issues): 恢复连续新建 Issue 时的草稿保存”; “fix(repo-issues): 防止草稿恢复前关闭工作台丢失内容”; “fix(repo-issues): 防止旧详情响应覆盖当前选中的 Issue”. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Features/RepoIssues/RepoIssuesWorkspaceViewModel.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: Starcat/Shared/Utilities/AIWorkspaceSceneCoordinator.swift Starcat/Shared/Utilities/AIWorkspaceSceneCoordinator.swift:115— Starcat/Shared/Utilities/AIWorkspaceSceneCoordinator.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 WorkspaceSceneWindowReader.configure at line 115), 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(ai): 修正标签整理窗口展示时序”; “fix(workspace): 让工作区窗口标题跟随 App 语言设置”; “fix(workspace): 让工作区窗口标题跟随 App 语言设置”. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:41:47 +08:00' --until='2026-11-12 02:41:47 +08:00' --full-history --no-merges -- Starcat/Shared/Utilities/AIWorkspaceSceneCoordinator.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Duplicated block (7 lines × 3) Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:165— Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:165-171 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:396-402 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:683-689 — 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 `Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:165` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 3) Starcat/Core/Network/ServiceHealthChecker.swift:280— Starcat/Core/Network/ServiceHealthChecker.swift:280-286 | Starcat/Core/Network/StarHistoryAPI.swift:186-192 | Starcat/Core/Network/WikiAPI.swift:59-65 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (7 lines × 3) Starcat/Core/Network/ShareAPI.swift:106— Starcat/Core/Network/ShareAPI.swift:106-112 | Starcat/Core/Network/TrendingAPI.swift:222-229 | Starcat/Core/Network/WeeklyAPI.swift:310-317 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Starcat/Core/Network/ShareAPI.swift:105` calls `setValue` and `Starcat/Core/Network/TrendingAPI.swift:221` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 3) Starcat/Features/Agents/ExternalRuntime/CodexAppServerAdapter.swift:111— Starcat/Features/Agents/ExternalRuntime/CodexAppServerAdapter.swift:111-117 | Starcat/Features/Agents/ExternalRuntime/CodexModelCatalog.swift:195-201 | Starcat/Features/Agents/ExternalRuntime/DeepSeekHarnessAdapter.swift:303-309 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Agents/ExternalRuntime/CodexAppServerAdapter.swift:111` 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 × 3) Starcat/Features/Insights/InsightsCardIllustration.swift:192— Starcat/Features/Insights/InsightsCardIllustration.swift:192-198 | Starcat/Features/Insights/InsightsCardIllustration.swift:241-247 | Starcat/Features/Insights/InsightsCardIllustration.swift:268-274 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Starcat/Features/Insights/InsightsCardIllustration.swift:238` calls `Path`, `move`, `CGPoint` and `Starcat/Features/Insights/InsightsCardIllustration.swift:191` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 3) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:3422— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:3422-3428 | Starcat/Features/RAG/UI/RAGCitationChunkPopover.swift:224-230 | Starcat/Features/RAG/UI/RAGMarkdownText.swift:376-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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:3422` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 3) Starcat/Features/Settings/CodebaseMemoryExecutableSettingsView.swift:166— Starcat/Features/Settings/CodebaseMemoryExecutableSettingsView.swift:166-172 | Starcat/Features/Settings/DeepSeekRuntimeSettingsCard.swift:142-148 | Starcat/Features/Settings/DeepSeekRuntimeSettingsCard.swift:156-162 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 3) Starcat/Shared/Services/DiskIssueSummaryCache.swift:206— Starcat/Shared/Services/DiskIssueSummaryCache.swift:206-213 | Starcat/Shared/Services/DiskIssueTimelineCache.swift:204-210 | Starcat/Shared/Services/DiskWikiCache.swift:376-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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Shared/Services/DiskIssueSummaryCache.swift:206` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 3) Starcat/Features/Activity/WeeklyContentView.swift:1870— Starcat/Features/Activity/WeeklyContentView.swift:1870-1876 | Starcat/Features/Explore/ExploreDiscoveryViewModel.swift:719-725 | Starcat/Features/Trending/TrendingViewModel.swift:787-793 — 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.
Duplicated block (7 lines × 3) Starcat/Features/Collections/SmartCollectionRuleEditorView.swift:574— Starcat/Features/Collections/SmartCollectionRuleEditorView.swift:574-580 | Starcat/Features/Home/RepoListView.swift:2609-2615 | Starcat/Features/RAG/UI/RAGContextPickerFilterControls.swift:383-389 — 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.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×9
Edited copy of a member (22 corresponding lines) Starcat/Features/AI/LocalAI/LayaDecisionModelStorage.swift:91— Starcat/Features/AI/LocalAI/LayaDecisionModelStorage.swift:91-116 | Starcat/Features/AI/LocalAI/LocalAIModelStorage.swift:236-257 — 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) Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:989— Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:989-1010 | Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:1014-1039 — 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) Starcat/Features/Activity/GitHubNotificationDetailView.swift:2784— Starcat/Features/Activity/GitHubNotificationDetailView.swift:2784-2805 | Starcat/Features/RepoIssues/RepoIssuesWorkspaceViewModel.swift:486-509 — 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) Starcat/Core/Screensaver/ScreensaverSnapshotStore.swift:67— Starcat/Core/Screensaver/ScreensaverSnapshotStore.swift:67-88 | Starcat/Core/Widget/Shared/WidgetSnapshotStore.swift:47-70 — 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) Starcat/Features/RAG/Core/KnowledgeRAGRetriever.swift:558— Starcat/Features/RAG/Core/KnowledgeRAGRetriever.swift:558-579 | Starcat/Features/RAG/Core/KnowledgeRAGRetriever.swift:627-651 — 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) Starcat/Features/AI/RepoAIInlineWindowController.swift:486— Starcat/Features/AI/RepoAIInlineWindowController.swift:486-511 | Starcat/Features/Search/SearchCenterWindowController.swift:147-168 — 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) Starcat/Core/Sync/GitHubStarListSyncService.swift:162— Starcat/Core/Sync/GitHubStarListSyncService.swift:162-183 | Starcat/Core/Sync/GitHubStarListSyncService.swift:185-212 — 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) Starcat/Features/Home/BatchActionBar.swift:806— Starcat/Features/Home/BatchActionBar.swift:806-827 | Starcat/Features/Tags/RepoTagsSection.swift:359-380 — 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) Starcat/Core/Sync/GitHubNotificationMapper.swift:76— Starcat/Core/Sync/GitHubNotificationMapper.swift:76-98 | Starcat/Core/Sync/GitHubNotificationMapper.swift:106-127 — 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.
Duplicated block (18 lines × 2) Starcat/Core/Network/TrendingAPI.swift:75— Starcat/Core/Network/TrendingAPI.swift:75-92 | Starcat/Core/Network/WeeklyAPI.swift:86-103 — 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 `Starcat/Core/Network/TrendingAPI.swift:75` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) Starcat/Features/AI/BatchAITagReviewRow.swift:246— Starcat/Features/AI/BatchAITagReviewRow.swift:246-263 | Starcat/Features/AI/BatchAITagReviewRow.swift:291-308 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/AI/BatchAITagReviewRow.swift:246` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (18 lines × 2) Starcat/Features/Activity/ActivityViewModel.swift:612— Starcat/Features/Activity/ActivityViewModel.swift:612-629 | Starcat/Features/Activity/ActivityViewModel.swift:801-818 — 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 `Starcat/Features/Activity/ActivityViewModel.swift:612` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) Starcat/Features/Activity/GitHubNotificationInboxView.swift:521— Starcat/Features/Activity/GitHubNotificationInboxView.swift:521-538 | Starcat/Features/RepoIssues/RepoIssuesWorkspaceViewModel.swift:214-231 — 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 `Starcat/Features/Activity/GitHubNotificationInboxView.swift:521` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) Starcat/Features/Auth/ProjectAccessSession.swift:465— Starcat/Features/Auth/ProjectAccessSession.swift:465-482 | Starcat/Features/Auth/ProjectAccessSession.swift:500-517 — 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 `Starcat/Features/Auth/ProjectAccessSession.swift:500` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Starcat/Features/Auth/ProjectAccessSession.swift:464` calls `now`, `addingTimeInterval` and `Starcat/Features/Auth/ProjectAccessSession.swift:499` 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 (18 lines × 2) Starcat/Features/Explore/ExploreView.swift:151— Starcat/Features/Explore/ExploreView.swift:151-168 | Starcat/Features/Home/RepoListView.swift:1510-1527 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (18 lines × 2) Starcat/Features/Home/LocalAIStatusSection.swift:241— Starcat/Features/Home/LocalAIStatusSection.swift:241-258 | Starcat/Features/Home/LocalAIStatusSection.swift:338-355 — 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 `Starcat/Features/Home/LocalAIStatusSection.swift:241` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) Starcat/Features/Home/RepoMetadataHeaderView.swift:459— Starcat/Features/Home/RepoMetadataHeaderView.swift:459-476 | Starcat/Shared/Components/UnifiedRepoRow.swift:487-504 — 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 (18 lines × 2) Starcat/Features/Insights/InsightsSectionSkeleton.swift:105— Starcat/Features/Insights/InsightsSectionSkeleton.swift:105-122 | Starcat/Features/Insights/InsightsSectionSkeleton.swift:216-233 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `10` in one and `4` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (10 lines × 3) Starcat/Features/AI/RepoAIWindowContentView.swift:1815— Starcat/Features/AI/RepoAIWindowContentView.swift:1815-1824 | Starcat/Features/AI/RepoAIWindowContentView.swift:2044-2053 | Starcat/Features/AI/RepoAIWindowContentView.swift:2073-2082 — 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 `Starcat/Features/AI/RepoAIWindowContentView.swift:1815` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) Starcat/Features/Activity/WeeklyContentView.swift:219— Starcat/Features/Activity/WeeklyContentView.swift:219-228 | Starcat/Features/Explore/ExploreView.swift:435-444 | Starcat/Features/Trending/TrendingView.swift:506-515 — 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 `Starcat/Features/Activity/WeeklyContentView.swift:219` 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 × 3) Starcat/Features/Collections/SmartCollectionMultiSelectField.swift:73— Starcat/Features/Collections/SmartCollectionMultiSelectField.swift:73-82 | Starcat/Features/Search/SearchCenterView.swift:2047-2056 | Starcat/Features/Search/SearchCenterView.swift:2186-2195 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Collections/SmartCollectionMultiSelectField.swift:73` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) Starcat/Features/Explore/AwesomeView.swift:129— Starcat/Features/Explore/AwesomeView.swift:129-138 | Starcat/Features/Explore/ExploreView.swift:334-343 | Starcat/Features/Explore/LinuxDoView.swift:112-121 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Explore/AwesomeView.swift:129` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:2776— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:2776-2785 | Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:2852-2861 | Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:2929-2938 — 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 `Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:2776` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:3412— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:3412-3421 | Starcat/Features/RAG/UI/RAGCitationChunkPopover.swift:214-223 | Starcat/Features/RAG/UI/RAGMarkdownText.swift:365-374 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:3412` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:444— Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:444-453 | Starcat/Features/Settings/AITaskPromptSheet.swift:116-125 | Starcat/Features/Settings/TranslationPromptSheet.swift:129-138 — before extracting anything, compare `Starcat/Features/Settings/AITaskPromptSheet.swift` and `Starcat/Features/Settings/TranslationPromptSheet.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 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 `Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:444` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) Starcat/Features/AI/BatchAIWorkspaceWindowController.swift:163— Starcat/Features/AI/BatchAIWorkspaceWindowController.swift:163-173 | Starcat/Features/Explore/AwesomeSourceManagerWindowController.swift:101-110 | Starcat/Features/Home/GitHubStarListAIGroupingWindowController.swift:138-148 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Starcat/Features/Home/GitHubStarListAIGroupingWindowController.swift:134` calls `activate` and `Starcat/Features/Explore/AwesomeSourceManagerWindowController.swift:97` 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 (10 lines × 3) Starcat/Features/CodeGraph/CodeFlowStorage.swift:129— Starcat/Features/CodeGraph/CodeFlowStorage.swift:129-138 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:44-53 | Starcat/Shared/Services/RepoContextStorage.swift:123-132 — before extracting anything, compare `Starcat/Features/CodeGraph/CodeFlowStorage.swift` and `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 3) Starcat/Features/Activity/UndoStarContentView.swift:369— Starcat/Features/Activity/UndoStarContentView.swift:369-376 | Starcat/Features/Activity/WeeklyContentView.swift:634-643 | Starcat/Features/Trending/TrendingView.swift:717-726 — 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 `Starcat/Features/Activity/UndoStarContentView.swift:369` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 3) Starcat/Features/Activity/WeeklyContentView.swift:476— Starcat/Features/Activity/WeeklyContentView.swift:476-483 | Starcat/Features/Trending/TrendingViewModel.swift:91-98 | Starcat/Shared/Components/Toolbar/UnifiedSortMenu.swift:213-220 — 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 `Starcat/Features/Activity/WeeklyContentView.swift:476` 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 × 3) Starcat/Features/Home/SidebarItem.swift:85— Starcat/Features/Home/SidebarItem.swift:85-92 | Starcat/Features/Home/SidebarItem.swift:104-111 | Starcat/Features/Home/SidebarItem.swift:127-134 — 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 `Starcat/Features/Home/SidebarItem.swift:85` 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 × 3) Starcat/Features/Home/SidebarView.swift:784— Starcat/Features/Home/SidebarView.swift:784-791 | Starcat/Features/Search/SearchCenterView.swift:2039-2046 | Starcat/Features/Search/SearchCenterView.swift:2178-2185 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Home/SidebarView.swift:784` 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 (8 lines × 3) Starcat/Features/Settings/ExploreCatalogSettingsSection.swift:238— Starcat/Features/Settings/ExploreCatalogSettingsSection.swift:238-245 | Starcat/Features/Settings/ExploreCatalogSettingsSection.swift:257-264 | Starcat/Features/Settings/ExploreCatalogSettingsSection.swift:274-281 — 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 `Starcat/Features/Settings/ExploreCatalogSettingsSection.swift:238` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Starcat/Features/Settings/ExploreCatalogSettingsSection.swift:257` calls `Text` and `Starcat/Features/Settings/ExploreCatalogSettingsSection.swift:274` 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 (8 lines × 3) Starcat/Features/AI/BatchAITagFlowLayout.swift:31— Starcat/Features/AI/BatchAITagFlowLayout.swift:31-38 | Starcat/Features/Home/GitHubStarListAIGroupingResultList.swift:766-773 | Starcat/Features/Settings/SettingsView.swift:1549-1556 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (8 lines × 3) Starcat/Core/Sync/ActivityAnnouncementRepository.swift:59— Starcat/Core/Sync/ActivityAnnouncementRepository.swift:59-66 | Starcat/Core/Sync/ActivityEventRepository.swift:46-53 | Starcat/Core/Sync/GitHubNotificationThreadRepository.swift:40-47 — before extracting anything, compare `Starcat/Core/Sync/ActivityAnnouncementRepository.swift` and `Starcat/Core/Sync/ActivityEventRepository.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 3) Starcat/Features/CodeGraph/CodeFlowStorage.swift:246— Starcat/Features/CodeGraph/CodeFlowStorage.swift:246-253 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:305-312 | Starcat/Shared/Services/RepoContextStorage.swift:257-264 — before extracting anything, compare `Starcat/Features/CodeGraph/CodeFlowStorage.swift` and `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 3) Starcat/Core/Sync/GitHubNotificationThreadRepository.swift:411— Starcat/Core/Sync/GitHubNotificationThreadRepository.swift:411-421 | Starcat/Core/Sync/GitHubNotificationThreadRepository.swift:423-433 | Starcat/Core/Sync/GitHubStarListRepository.swift:191-198 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Core/Sync/GitHubStarListRepository.swift:191` 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· Edited copy of a member (29 corresponding lines) · ×8
Edited copy of a member (29 corresponding lines) Starcat/Features/Activity/GitHubNotificationIssueSummaryMarkdownView.swift:80— Starcat/Features/Activity/GitHubNotificationIssueSummaryMarkdownView.swift:80-113 | Starcat/Features/RepoIssues/RepoIssueCreatePane.swift:266-300 — 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) Starcat/Features/RAG/Core/RAGExternalSearchProviders.swift:304— Starcat/Features/RAG/Core/RAGExternalSearchProviders.swift:304-332 | Starcat/Features/RAG/Core/RAGExternalSearchProviders.swift:586-619 — 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) Starcat/Features/Agents/WeeklyReport/GitHubWeeklyReportTools.swift:411— Starcat/Features/Agents/WeeklyReport/GitHubWeeklyReportTools.swift:411-439 | Starcat/Features/Agents/WeeklyReport/GitHubWeeklyReportTools.swift:572-600 — 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) Starcat/Features/Activity/GitHubNotificationNoSelectionPlaceholder.swift:84— Starcat/Features/Activity/GitHubNotificationNoSelectionPlaceholder.swift:84-115 | Starcat/Shared/Components/RepoDetailNoSelectionPlaceholder.swift:73-101 — 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) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:1845— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:1845-1873 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3817-3845 — 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) StarcatWidgets/Focus/StarcatFocusFeaturedRepository.swift:16— StarcatWidgets/Focus/StarcatFocusFeaturedRepository.swift:16-44 | StarcatWidgets/Focus/StarcatFocusWidget.swift:221-250 — 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) Starcat/Features/Home/BatchActionBar.swift:840— Starcat/Features/Home/BatchActionBar.swift:840-868 | Starcat/Features/Tags/RepoTagsSection.swift:391-424 — 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) Starcat/Core/Sync/ActivityAnnouncementRepository.swift:70— Starcat/Core/Sync/ActivityAnnouncementRepository.swift:70-99 | Starcat/Core/Sync/ActivityEventRepository.swift:57-85 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (31 corresponding lines) · ×8
Edited copy of a member (31 corresponding lines) Starcat/Features/Activity/ActivityView.swift:363— Starcat/Features/Activity/ActivityView.swift:363-393 | Starcat/Features/Activity/WeeklyContentView.swift:728-766 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) Starcat/Features/Profile/SnakeAnimator/FoodChaseSnakeAnimator.swift:171— Starcat/Features/Profile/SnakeAnimator/FoodChaseSnakeAnimator.swift:171-202 | Starcat/Features/Profile/SnakeAnimator/GreedySnakeAnimator.swift:125-155 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) Starcat/Shared/Services/DiskIssueTimelineCache.swift:80— Starcat/Shared/Services/DiskIssueTimelineCache.swift:80-118 | Starcat/Shared/Services/DiskWikiCache.swift:192-222 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) Starcat/Features/Search/SearchCenterView.swift:1507— Starcat/Features/Search/SearchCenterView.swift:1507-1552 | Starcat/Shared/Components/RepoDetailScaffold.swift:1073-1103 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) Starcat/Shared/Services/DiskIssueDraftCache.swift:189— Starcat/Shared/Services/DiskIssueDraftCache.swift:189-219 | Starcat/Shared/Services/DiskNotificationCommentDraftCache.swift:193-223 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) StarcatWidgets/Contributions/StarcatContributionHeatmapWidgetView.swift:21— StarcatWidgets/Contributions/StarcatContributionHeatmapWidgetView.swift:21-52 | StarcatWidgets/Contributions/StarcatContributionRadarWidgetView.swift:18-48 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:706— Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:706-741 | Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:1287-1317 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) Starcat/Core/Sync/GitHubNotificationThreadRepository.swift:363— Starcat/Core/Sync/GitHubNotificationThreadRepository.swift:363-393 | Starcat/Core/Sync/GitHubNotificationThreadRepository.swift:469-504 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×8
Edited copy of a member (25 corresponding lines) Starcat/Features/Insights/InsightsCardIllustration.swift:234— Starcat/Features/Insights/InsightsCardIllustration.swift:234-258 | Starcat/Features/Insights/InsightsCardIllustration.swift:261-287 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) Starcat/Features/Profile/ShareCard/ShareCardExporter.swift:129— Starcat/Features/Profile/ShareCard/ShareCardExporter.swift:129-159 | Starcat/Features/Settings/ProSettingsView.swift:1920-1944 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) Starcat/Features/AI/AIConfiguration.swift:553— Starcat/Features/AI/AIConfiguration.swift:553-577 | Starcat/Features/AI/AIConfiguration.swift:583-616 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) Starcat/Features/Home/BatchActionBar.swift:950— Starcat/Features/Home/BatchActionBar.swift:950-974 | Starcat/Features/Tags/RepoTagsSection.swift:427-451 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:58— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:58-82 | Starcat/Shared/Utilities/AIWorkspaceSceneCoordinator.swift:115-142 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) Starcat/Features/Home/HomeView.swift:1640— Starcat/Features/Home/HomeView.swift:1640-1664 | Starcat/Features/Home/HomeView.swift:1666-1691 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) Starcat/Features/Home/ManageDetailContent.swift:158— Starcat/Features/Home/ManageDetailContent.swift:158-182 | Starcat/Features/Home/RepoDetailView.swift:860-889 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) Starcat/Core/Database/Models/InitialWarmupJobRecord.swift:45— Starcat/Core/Database/Models/InitialWarmupJobRecord.swift:45-71 | Starcat/Core/Network/RecommendModels.swift:34-58 — 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 (35 corresponding lines) · ×8
Edited copy of a member (35 corresponding lines) Starcat/Features/Insights/RepositoryInsightsView.swift:1797— Starcat/Features/Insights/RepositoryInsightsView.swift:1797-1831 | Starcat/Features/Insights/RepositoryInsightsView.swift:2538-2572 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (35 corresponding lines) Starcat/Features/Insights/InsightsCardIllustration.swift:127— Starcat/Features/Insights/InsightsCardIllustration.swift:127-161 | Starcat/Features/Insights/InsightsCardIllustration.swift:290-324 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (35 corresponding lines) Starcat/Core/Sync/GitHubNotificationInboxService.swift:963— Starcat/Core/Sync/GitHubNotificationInboxService.swift:963-997 | Starcat/Core/Sync/GitHubNotificationInboxService.swift:999-1043 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (35 corresponding lines) Starcat/Features/AI/BatchAIQueueService.swift:2348— Starcat/Features/AI/BatchAIQueueService.swift:2348-2382 | Starcat/Features/AI/GitHubStarListAIGroupingSession.swift:1931-1973 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (35 corresponding lines) Starcat/Features/Home/OpenSSFScoreSheet.swift:161— Starcat/Features/Home/OpenSSFScoreSheet.swift:161-195 | Starcat/Features/Home/RepoHealthSheet.swift:105-141 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (35 corresponding lines) Starcat/Core/Network/GitHubAPI/GitHubDTOs.swift:74— Starcat/Core/Network/GitHubAPI/GitHubDTOs.swift:74-108 | Starcat/Features/RAG/Core/KnowledgeRAGModels.swift:169-207 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (35 corresponding lines) Starcat/Features/Insights/RepositoryInsightsView.swift:732— Starcat/Features/Insights/RepositoryInsightsView.swift:732-766 | Starcat/Features/Insights/RepositoryInsightsView.swift:1725-1760 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (35 corresponding lines) Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:1969— Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:1969-2005 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2043-2077 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (17 lines × 2) Starcat/Core/Scheduling/OpenSSFScorePoller.swift:43— Starcat/Core/Scheduling/OpenSSFScorePoller.swift:43-59 | Starcat/Core/Scheduling/RepoHealthPoller.swift:50-66 — before extracting anything, compare `Starcat/Core/Scheduling/OpenSSFScorePoller.swift` and `Starcat/Core/Scheduling/RepoHealthPoller.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `interval` to `TimeInterval = OpenSSFScorePoller.defaultInterval` in one and `TimeInterval = RepoHealthPoller.defaultInterval` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Starcat/Core/Scheduling/RepoHealthPoller.swift:67` calls `scheduleInitialRefresh` and `Starcat/Core/Scheduling/OpenSSFScorePoller.swift:60` 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 (17 lines × 2) Starcat/Core/Sync/ActivitySyncStateRepository.swift:36— Starcat/Core/Sync/ActivitySyncStateRepository.swift:36-52 | Starcat/Core/Sync/ActivitySyncStateRepository.swift:55-71 — 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 (17 lines × 2) Starcat/Core/Sync/GitHubStarListRepository.swift:270— Starcat/Core/Sync/GitHubStarListRepository.swift:270-286 | Starcat/Core/Sync/RepoTagRepository.swift:206-222 — 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 × 2) Starcat/Features/AI/Anthropic/AnthropicClient.swift:322— Starcat/Features/AI/Anthropic/AnthropicClient.swift:322-338 | Starcat/Features/AI/OpenAIClient.swift:551-567 — 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 `Starcat/Features/AI/Anthropic/AnthropicClient.swift:322` 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) Starcat/Features/Explore/ExploreDiscoveryViewModel.swift:123— Starcat/Features/Explore/ExploreDiscoveryViewModel.swift:123-139 | Starcat/Features/Explore/ExploreDiscoveryViewModel.swift:170-186 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Explore/ExploreDiscoveryViewModel.swift:123` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) Starcat/Features/Search/SearchCenterView.swift:2366— Starcat/Features/Search/SearchCenterView.swift:2366-2382 | Starcat/Features/Tags/RepoTagsSection.swift:865-881 — 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 `Starcat/Features/Search/SearchCenterView.swift:2366` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) Starcat/Features/Search/SearchCenterView.swift:2386— Starcat/Features/Search/SearchCenterView.swift:2386-2402 | Starcat/Features/Tags/RepoTagsSection.swift:885-901 — 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) Starcat/Features/Tags/RepoTagsSection.swift:788— Starcat/Features/Tags/RepoTagsSection.swift:788-804 | Starcat/Features/Tags/SFSymbolPicker.swift:68-84 — 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 `Starcat/Features/Tags/RepoTagsSection.swift:788` 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) Starcat/Features/AI/BatchAIQueueService.swift:2320— Starcat/Features/AI/BatchAIQueueService.swift:2320-2335 | Starcat/Features/Activity/GitHubNotificationDetailView.swift:3045-3060 — 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 `Starcat/Features/AI/BatchAIQueueService.swift:2320` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 2) Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:726— Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:726-741 | Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:1302-1317 — 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 `Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:726` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) Starcat/Features/Insights/InsightsSectionSkeleton.swift:273— Starcat/Features/Insights/InsightsSectionSkeleton.swift:273-288 | Starcat/Features/Insights/InsightsSectionSkeleton.swift:332-347 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Insights/InsightsSectionSkeleton.swift:273` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) Starcat/Features/MCP/AgentToolMCPRuntime.swift:46— Starcat/Features/MCP/AgentToolMCPRuntime.swift:46-61 | Starcat/Features/MCP/StarcatMCPRuntime.swift:59-74 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (16 lines × 2) Starcat/Features/RAG/UI/RAGRepoContextXMLPopover.swift:69— Starcat/Features/RAG/UI/RAGRepoContextXMLPopover.swift:69-84 | Starcat/Features/RAG/UI/RAGRepositoryInsightsXMLPopover.swift:64-79 — before extracting anything, compare `Starcat/Features/RAG/UI/RAGRepoContextXMLPopover.swift` and `Starcat/Features/RAG/UI/RAGRepositoryInsightsXMLPopover.swift` as WHOLE FILES: this scan already matched 3 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 (16 lines × 2) Starcat/Shared/Components/ReadmeWebView.swift:370— Starcat/Shared/Components/ReadmeWebView.swift:370-385 | Starcat/Shared/Components/ReadmeWebView.swift:390-405 — 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 (16 lines × 2) StarcatWidgets/Contributions/StarcatContributionProvider.swift:25— StarcatWidgets/Contributions/StarcatContributionProvider.swift:25-40 | StarcatWidgets/ReleaseWatch/StarcatReleaseWatchWidget.swift:41-56 — before extracting anything, compare `StarcatWidgets/Contributions/StarcatContributionProvider.swift` and `StarcatWidgets/ReleaseWatch/StarcatReleaseWatchWidget.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `StarcatWidgets/Contributions/StarcatContributionProvider.swift:25` 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 (16 lines × 2) Starcat/Features/RAG/UI/RAGLiveAssistantPresentationView.swift:69— Starcat/Features/RAG/UI/RAGLiveAssistantPresentationView.swift:69-84 | Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:1326-1341 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (13 lines × 2) Starcat/Core/Subscription/DirectLicenseManager.swift:319— Starcat/Core/Subscription/DirectLicenseManager.swift:319-331 | Starcat/Core/Subscription/DirectLicenseManager.swift:350-362 — 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 `Starcat/Core/Subscription/DirectLicenseManager.swift:319` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) Starcat/Features/AI/BatchAIQueueService.swift:2091— Starcat/Features/AI/BatchAIQueueService.swift:2091-2103 | Starcat/Features/Home/HomeView.swift:2530-2542 — 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 `Starcat/Features/AI/BatchAIQueueService.swift:2091` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) Starcat/Features/Home/OpenSSFScoreSheet.swift:309— Starcat/Features/Home/OpenSSFScoreSheet.swift:309-321 | Starcat/Features/Home/RepoHealthSheet.swift:575-587 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `10` in one and `8` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (13 lines × 2) Starcat/Features/Home/ReadmeSkeletonView.swift:28— Starcat/Features/Home/ReadmeSkeletonView.swift:28-40 | Starcat/Features/Home/ReadmeSkeletonView.swift:43-55 — 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 `Starcat/Features/Home/ReadmeSkeletonView.swift:28` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `22` in one and `10` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Starcat/Features/Home/ReadmeSkeletonView.swift:56` calls `paragraphLine` and `Starcat/Features/Home/ReadmeSkeletonView.swift:41` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 2) Starcat/Features/Insights/MyInsightsSnapshotProvider.swift:600— Starcat/Features/Insights/MyInsightsSnapshotProvider.swift:600-612 | Starcat/Features/RAG/Core/KnowledgeBaseMetadataSnapshot.swift:863-875 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (13 lines × 2) Starcat/Features/RAG/Core/KnowledgeRAGService.swift:1657— Starcat/Features/RAG/Core/KnowledgeRAGService.swift:1657-1669 | Starcat/Features/RAG/Core/KnowledgeRAGService.swift:1749-1761 — 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 `Starcat/Features/RAG/Core/KnowledgeRAGService.swift:1657` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (13 lines × 2) Starcat/Shared/Services/DiskIssueDraftCache.swift:153— Starcat/Shared/Services/DiskIssueDraftCache.swift:153-165 | Starcat/Shared/Services/DiskNotificationCommentDraftCache.swift:157-169 — before extracting anything, compare `Starcat/Shared/Services/DiskIssueDraftCache.swift` and `Starcat/Shared/Services/DiskNotificationCommentDraftCache.swift` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `Starcat/Shared/Services/DiskIssueDraftCache.swift:153` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) StarcatWidgets/CollectionTrend/StarcatCollectionTrendWidget.swift:63— StarcatWidgets/CollectionTrend/StarcatCollectionTrendWidget.swift:63-75 | StarcatWidgets/Focus/StarcatFocusWidget.swift:54-66 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (11 lines × 3) Starcat/Features/Agents/Core/AgentKnowledgeTool.swift:174— Starcat/Features/Agents/Core/AgentKnowledgeTool.swift:174-184 | Starcat/Features/Agents/UntaggedTidy/UntaggedTidyAgentTools.swift:300-310 | Starcat/Features/Agents/WeeklyReport/GitHubWeeklyReportTools.swift:213-223 — 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 `Starcat/Features/Agents/Core/AgentKnowledgeTool.swift:174` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 3) Starcat/Features/Agents/WeeklyReport/RepoAlternativesArtifactBuilder.swift:180— Starcat/Features/Agents/WeeklyReport/RepoAlternativesArtifactBuilder.swift:180-190 | Starcat/Features/Agents/WeeklyReport/RepoInsightArtifactBuilder.swift:98-108 | Starcat/Features/Agents/WeeklyReport/WeeklyReportArtifactBuilder.swift:169-179 — before extracting anything, compare `Starcat/Features/Agents/WeeklyReport/RepoAlternativesArtifactBuilder.swift` and `Starcat/Features/Agents/WeeklyReport/RepoInsightArtifactBuilder.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Starcat/Features/Agents/WeeklyReport/WeeklyReportArtifactBuilder.swift:180` calls `joined` and `Starcat/Features/Agents/WeeklyReport/RepoAlternativesArtifactBuilder.swift:192` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 3) Starcat/Features/ExternalSearch/ExternalSearchProviderClients.swift:201— Starcat/Features/ExternalSearch/ExternalSearchProviderClients.swift:201-211 | Starcat/Features/ExternalSearch/ExternalSearchProviderClients.swift:237-247 | Starcat/Features/ExternalSearch/ExternalSearchProviderClients.swift:273-283 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (11 lines × 3) Starcat/Features/Home/ReadmeViewModel.swift:467— Starcat/Features/Home/ReadmeViewModel.swift:467-479 | Starcat/Features/Home/ReadmeViewModel.swift:523-533 | Starcat/Features/Home/ReadmeViewModel.swift:544-555 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (11 lines × 3) Starcat/Features/Onboarding/AppStoreToDirectImportSheet.swift:69— Starcat/Features/Onboarding/AppStoreToDirectImportSheet.swift:69-79 | Starcat/Features/Settings/SettingsView.swift:2897-2907 | Starcat/Features/Settings/SettingsView.swift:3042-3052 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Onboarding/AppStoreToDirectImportSheet.swift:69` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Starcat/Features/Onboarding/AppStoreToDirectImportSheet.swift:83` calls `VStack` and `Starcat/Features/Settings/SettingsView.swift:2909` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 3) Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:591— Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:591-601 | Starcat/Features/Settings/AIModelManagementSheet.swift:72-82 | Starcat/Features/Settings/AITaskPromptSheet.swift:89-99 — 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 `Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:591` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 3) Starcat/Features/Settings/AIModelManagementSheet.swift:71— Starcat/Features/Settings/AIModelManagementSheet.swift:71-81 | Starcat/Features/Settings/AITaskPromptSheet.swift:88-98 | Starcat/Features/Settings/TranslationPromptSheet.swift:90-100 — before extracting anything, compare `Starcat/Features/Settings/AITaskPromptSheet.swift` and `Starcat/Features/Settings/TranslationPromptSheet.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 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 `Starcat/Features/Settings/AIModelManagementSheet.swift:71` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (11 lines × 3) Starcat/Features/Settings/SettingsView.swift:703— Starcat/Features/Settings/SettingsView.swift:703-713 | Starcat/Features/Settings/SettingsView.swift:814-824 | Starcat/Features/Settings/SettingsView.swift:975-985 — 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 `Starcat/Features/Settings/SettingsView.swift:703` 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 × 3) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3558— Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3558-3562 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3572-3576 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3586-3590 — 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 `Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3558` 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, `Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3578` calls `fixedSize`, `frame` and `Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3564` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 3) Starcat/Core/Sync/ActivityAnnouncementRepository.swift:110— Starcat/Core/Sync/ActivityAnnouncementRepository.swift:110-114 | Starcat/Core/Sync/ActivityEventRepository.swift:96-100 | Starcat/Core/Sync/ReleaseRepository.swift:202-206 — before extracting anything, compare `Starcat/Core/Sync/ActivityAnnouncementRepository.swift` and `Starcat/Core/Sync/ActivityEventRepository.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 3) Starcat/Core/Sync/ActivityAnnouncementRepository.swift:127— Starcat/Core/Sync/ActivityAnnouncementRepository.swift:127-131 | Starcat/Core/Sync/ActivityEventRepository.swift:116-120 | Starcat/Core/Sync/SearchHistoryRepository.swift:103-107 — before extracting anything, compare `Starcat/Core/Sync/ActivityAnnouncementRepository.swift` and `Starcat/Core/Sync/ActivityEventRepository.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 3) Starcat/Features/Activity/ActivityView.swift:395— Starcat/Features/Activity/ActivityView.swift:395-399 | Starcat/Features/Activity/WeeklyContentView.swift:768-772 | Starcat/Features/Explore/ExploreView.swift:708-712 — 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.
Duplicated block (5 lines × 3) Starcat/Shared/Services/DiskExternalSearchCache.swift:71— Starcat/Shared/Services/DiskExternalSearchCache.swift:71-75 | Starcat/Shared/Services/DiskIssueTimelineCache.swift:74-78 | Starcat/Shared/Services/DiskWikiCache.swift:180-184 — 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 (5 lines × 3) Starcat/Core/Sync/GitHubStarListRepository.swift:336— Starcat/Core/Sync/GitHubStarListRepository.swift:336-343 | Starcat/Core/Sync/ReleaseSubscriptionRepository.swift:37-44 | Starcat/Core/Sync/RepoRepository.swift:185-189 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (5 lines × 3) Starcat/Features/AI/JevDecisionEngine.swift:163— Starcat/Features/AI/JevDecisionEngine.swift:163-167 | Starcat/Features/Ambient/Core/AmbientCardFactory.swift:90-94 | Starcat/Shared/Components/Toolbar/ToolbarRepoSelection.swift:145-149 — 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.
Duplicated block (5 lines × 3) Starcat/Features/CodeGraph/CodeFlowStorage.swift:283— Starcat/Features/CodeGraph/CodeFlowStorage.swift:283-287 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:346-350 | Starcat/Shared/Services/RepoContextStorage.swift:307-311 — before extracting anything, compare `Starcat/Features/CodeGraph/CodeFlowStorage.swift` and `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:340` calls `isDirectoryAuthorizationError` and `Starcat/Features/CodeGraph/CodeFlowStorage.swift:279` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×7
Edited copy of a member (26 corresponding lines) Starcat/Shared/Services/DiskChatHistoryStore.swift:502— Starcat/Shared/Services/DiskChatHistoryStore.swift:502-527 | Starcat/Shared/Services/DiskChatHistoryStore.swift:529-559 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) Starcat/Core/Network/NetworkError.swift:50— Starcat/Core/Network/NetworkError.swift:50-79 | Starcat/Shared/Services/RepoContextPacker/Models/RepoContextPackerError.swift:69-94 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) Starcat/Features/Home/HomeViewModel.swift:742— Starcat/Features/Home/HomeViewModel.swift:742-767 | Starcat/Features/Home/SidebarView.swift:1475-1507 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) Starcat/Features/Settings/SettingsView.swift:2889— Starcat/Features/Settings/SettingsView.swift:2889-2914 | Starcat/Features/Settings/SettingsView.swift:3034-3064 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) Starcat/Shared/Components/EmptyStateView.swift:118— Starcat/Shared/Components/EmptyStateView.swift:118-143 | Starcat/Shared/Components/EmptyStateView.swift:146-171 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:792— Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:792-817 | Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:869-895 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) Starcat/Shared/Models/RepoCardViewData.swift:158— Starcat/Shared/Models/RepoCardViewData.swift:158-183 | Starcat/Shared/Models/RepoCardViewData.swift:189-214 — 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 copies of one member (3 members, 12+ corresponding lines) · ×7
Edited copies of one member (3 members, 12+ corresponding lines) Starcat/Features/ExternalSearch/ExternalSearchProviderClients.swift:213— Starcat/Features/ExternalSearch/ExternalSearchProviderClients.swift:213-224 | Starcat/Features/ExternalSearch/ExternalSearchProviderClients.swift:249-260 | Starcat/Features/ExternalSearch/ExternalSearchProviderClients.swift:359-373 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) Starcat/Features/Profile/ContributionService.swift:188— Starcat/Features/Profile/ContributionService.swift:188-201 | Starcat/Features/Profile/DeveloperLanguageService.swift:245-256 | Starcat/Features/Profile/UserProfileService.swift:285-300 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) Starcat/Features/Agents/Core/AgentTools.swift:239— Starcat/Features/Agents/Core/AgentTools.swift:239-250 | Starcat/Features/Agents/Core/AgentWorkspaceViewModel.swift:1336-1349 | Starcat/Features/RAG/Core/RAGBackendConfiguration.swift:194-213 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) Starcat/Features/Activity/ActivityView.swift:643— Starcat/Features/Activity/ActivityView.swift:643-654 | Starcat/Features/Explore/AwesomeView.swift:489-500 | Starcat/Features/Explore/ExploreView.swift:730-741 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) Starcat/Features/Insights/RepositoryInsightsView.swift:1238— Starcat/Features/Insights/RepositoryInsightsView.swift:1238-1249 | Starcat/Features/Settings/ProSettingsView.swift:1196-1211 | Starcat/Shared/Components/GrowthShareCopyButton.swift:16-27 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) Starcat/Features/Collections/SmartCollectionRuleSummary.swift:402— Starcat/Features/Collections/SmartCollectionRuleSummary.swift:402-416 | Starcat/Features/Collections/SmartCollectionRuleSummary.swift:418-432 | Starcat/Features/Collections/SmartCollectionRuleSummary.swift:434-445 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) Starcat/Features/Insights/RepositoryInsightsView.swift:650— Starcat/Features/Insights/RepositoryInsightsView.swift:650-661 | Starcat/Features/Insights/RepositoryInsightsView.swift:663-674 | Starcat/Features/Insights/RepositoryInsightsView.swift:676-687 — 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, 16+ corresponding lines) · ×7
Edited copies of one member (3 members, 16+ corresponding lines) Starcat/Shared/Components/Toolbar/ToolbarRepoSelection.swift:84— Starcat/Shared/Components/Toolbar/ToolbarRepoSelection.swift:84-99 | Starcat/Shared/Components/Toolbar/ToolbarRepoSelection.swift:107-122 | Starcat/Shared/Components/Toolbar/ToolbarRepoSelection.swift:125-140 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 16+ corresponding lines) Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryExtractor.swift:128— Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryExtractor.swift:128-143 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:177-192 | Starcat/Shared/Services/RepoContextPacker/Internal/SourceZipExtractor.swift:181-199 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 16+ corresponding lines) Starcat/Features/Explore/ExploreModeHelpPopover.swift:77— Starcat/Features/Explore/ExploreModeHelpPopover.swift:77-94 | Starcat/Features/RAG/UI/RAGMetadataSectionHelp.swift:54-69 | Starcat/Features/RAG/UI/RAGPlanSectionHelp.swift:134-149 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 16+ corresponding lines) Starcat/Core/Cache/ReadmeInflightTracker.swift:80— Starcat/Core/Cache/ReadmeInflightTracker.swift:80-96 | Starcat/Core/Cache/ReadmeInflightTracker.swift:99-114 | Starcat/Core/Cache/ReadmeInflightTracker.swift:117-132 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 16+ corresponding lines) Starcat/Features/Activity/GitHubNotificationDetailView.swift:1858— Starcat/Features/Activity/GitHubNotificationDetailView.swift:1858-1873 | Starcat/Features/Home/RepoDetailView.swift:1318-1333 | Starcat/Features/Settings/TranslationSettingsView.swift:436-451 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 16+ corresponding lines) Starcat/Features/Activity/ActivityDetailScaffoldShell.swift:79— Starcat/Features/Activity/ActivityDetailScaffoldShell.swift:79-97 | Starcat/Features/Activity/WeeklyDetailScaffoldShell.swift:108-128 | Starcat/Features/Explore/DiscoveryDetailView.swift:55-70 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 16+ corresponding lines) Starcat/Core/Sync/UserRepoActivityRepository.swift:134— Starcat/Core/Sync/UserRepoActivityRepository.swift:134-149 | Starcat/Core/Sync/UserRepoActivityRepository.swift:178-195 | Starcat/Core/Sync/UserRepoActivityRepository.swift:197-212 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 4+ corresponding lines) · ×7
Edited copies of one member (3 members, 4+ corresponding lines) Starcat/Core/Insights/RepoStarHistoryRepository.swift:1046— Starcat/Core/Insights/RepoStarHistoryRepository.swift:1046-1054 | Starcat/Core/Widget/WidgetSnapshotBuilder.swift:229-240 | Starcat/Features/DailyRadar/DailyRadarDateFormatting.swift:60-63 — 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) Starcat/Core/Database/Models/DiscoveryCacheRecords.swift:204— Starcat/Core/Database/Models/DiscoveryCacheRecords.swift:204-207 | Starcat/Core/Database/Models/DiscoveryCacheRecords.swift:436-439 | Starcat/Core/Database/Models/WeeklyBulkRepoRecord.swift:188-191 — 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) Starcat/Features/Agents/WeeklyReport/RepoAlternativesArtifactBuilder.swift:277— Starcat/Features/Agents/WeeklyReport/RepoAlternativesArtifactBuilder.swift:277-280 | Starcat/Features/Profile/ShareCard/LibraryExportRenderer.swift:210-214 | Starcat/Features/Profile/ShareCard/StarredMarkdownRenderer.swift:373-377 — 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) Starcat/Features/AI/OpenAIClient.swift:947— Starcat/Features/AI/OpenAIClient.swift:947-950 | Starcat/Features/Agents/ExternalRuntime/CodexAppServerAdapter.swift:1044-1047 | Starcat/Features/MCP/AgentToolMCPRuntime.swift:176-179 — 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) Starcat/Features/CodeGraph/CodeFlowStorage.swift:669— Starcat/Features/CodeGraph/CodeFlowStorage.swift:669-672 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:425-428 | Starcat/Shared/Services/RepoContextStorage.swift:917-920 — 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) Starcat/Features/CodeGraph/CodeFlowStorage.swift:536— Starcat/Features/CodeGraph/CodeFlowStorage.swift:536-539 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:489-492 | Starcat/Shared/Services/RepoContextStorage.swift:581-584 — 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) Starcat/Features/AI/RepoAIInsightModels.swift:217— Starcat/Features/AI/RepoAIInsightModels.swift:217-220 | Starcat/Features/AI/RepoAIInsightViewModel.swift:807-810 | Starcat/Features/AI/RepoAIWindowContentView.swift:2414-2417 — 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.
Duplicated block (12 lines × 3) Starcat/Core/Health/RepoHealthService.swift:265— Starcat/Core/Health/RepoHealthService.swift:265-276 | Starcat/Core/Sync/ReleaseMonitor.swift:233-244 | Starcat/Features/Releases/RepoReleaseSection.swift:365-376 — 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.
Duplicated block (12 lines × 3) Starcat/Core/Network/WeeklyAPI.swift:133— Starcat/Core/Network/WeeklyAPI.swift:133-144 | Starcat/Core/Network/WeeklyAPI.swift:181-192 | Starcat/Core/Network/WeeklyAPI.swift:223-234 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (12 lines × 3) Starcat/Features/Search/SearchCenterView.swift:2373— Starcat/Features/Search/SearchCenterView.swift:2373-2384 | Starcat/Features/Tags/RepoTagsSection.swift:872-883 | Starcat/Shared/Components/TagChipFlowLayout.swift:23-34 — 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 `Starcat/Features/Search/SearchCenterView.swift:2373` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (12 lines × 3) Starcat/Shared/Components/CommonActionIconButtons.swift:55— Starcat/Shared/Components/CommonActionIconButtons.swift:55-66 | Starcat/Shared/Components/CommonActionIconButtons.swift:210-221 | Starcat/Shared/Components/CommonActionIconButtons.swift:247-258 — 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. 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 (12 lines × 3) Starcat/Shared/Services/DiskExternalSearchCache.swift:216— Starcat/Shared/Services/DiskExternalSearchCache.swift:216-227 | Starcat/Shared/Services/DiskIssueTimelineCache.swift:190-201 | Starcat/Shared/Services/DiskWikiCache.swift:350-361 — 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 lines × 3) StarcatWidgets/Contributions/StarcatContributionProvider.swift:23— StarcatWidgets/Contributions/StarcatContributionProvider.swift:23-34 | StarcatWidgets/Rediscovery/StarcatRediscoveryWidget.swift:39-50 | StarcatWidgets/ReleaseWatch/StarcatReleaseWatchWidget.swift:39-50 — before extracting anything, compare `StarcatWidgets/Contributions/StarcatContributionProvider.swift` and `StarcatWidgets/ReleaseWatch/StarcatReleaseWatchWidget.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `StarcatWidgets/Contributions/StarcatContributionProvider.swift:23` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 3) Starcat/Features/CodeGraph/CodeFlowStorage.swift:541— Starcat/Features/CodeGraph/CodeFlowStorage.swift:541-552 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:494-505 | Starcat/Shared/Services/RepoContextStorage.swift:795-806 — before extracting anything, compare `Starcat/Features/CodeGraph/CodeFlowStorage.swift` and `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/CodeGraph/CodeFlowStorage.swift:541` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Low cohesion: StatusBarController (LCOM4 10) Starcat/App/StatusBarController.swift:18— StatusBarController's methods fall into 10 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 10 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: StarcatCommandRouter (LCOM4 6) Starcat/App/StarcatCommandRouter.swift:34— StarcatCommandRouter's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: SQLiteChatHistoryStorageBackend (LCOM4 6) Starcat/Shared/Services/DiskChatHistoryStore.swift:983— SQLiteChatHistoryStorageBackend's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Coordinator (LCOM4 5) Starcat/Shared/Components/ReadmeWebView.swift:545— Coordinator'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: MockGithubOAuthService (LCOM4 4) Starcat/Features/Auth/MockGithubOAuthService.swift:23— MockGithubOAuthService'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: DefaultCursorShieldView (LCOM4 4) Starcat/Shared/Components/DefaultCursorShield.swift:27— DefaultCursorShieldView'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: CodexAppServerDriver (LCOM4 4) Starcat/Features/Agents/ExternalRuntime/CodexAppServerAdapter.swift:43— CodexAppServerDriver'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 (30 corresponding lines) · ×6
Edited copy of a member (30 corresponding lines) Starcat/Features/Profile/ShareCard/ShareCardContent.swift:499— Starcat/Features/Profile/ShareCard/ShareCardContent.swift:499-528 | Starcat/Features/Profile/ShareCard/ShareCardContent.swift:531-564 — 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) Starcat/Features/Recommendations/RepoRecommendationItem+ViewData.swift:61— Starcat/Features/Recommendations/RepoRecommendationItem+ViewData.swift:61-90 | Starcat/Shared/Components/SemanticScoreBadge+Recommendation.swift:24-71 — 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) Starcat/Core/Screensaver/ScreensaverSnapshotStore.swift:91— Starcat/Core/Screensaver/ScreensaverSnapshotStore.swift:91-120 | Starcat/Core/Widget/Shared/WidgetSnapshotStore.swift:73-103 — 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) Starcat/Features/Home/SidebarView.swift:2618— Starcat/Features/Home/SidebarView.swift:2618-2655 | Starcat/Features/Home/SidebarView.swift:2805-2834 — 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) Starcat/Features/Explore/ExploreDiscoveryViewModel.swift:339— Starcat/Features/Explore/ExploreDiscoveryViewModel.swift:339-369 | Starcat/Features/Explore/ExploreDiscoveryViewModel.swift:371-400 — 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) Starcat/Core/RAG/RAGChunkRepository.swift:697— Starcat/Core/RAG/RAGChunkRepository.swift:697-726 | Starcat/Core/RAG/RAGChunkRepository.swift:786-816 — 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 (27 corresponding lines) · ×6
Edited copy of a member (27 corresponding lines) Starcat/Features/AI/RepoAIInlineWindowController.swift:314— Starcat/Features/AI/RepoAIInlineWindowController.swift:314-348 | Starcat/Features/Search/SearchCenterWindowController.swift:101-127 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) Starcat/Features/Profile/ShareCard/ShareCardContent.swift:1744— Starcat/Features/Profile/ShareCard/ShareCardContent.swift:1744-1778 | Starcat/Features/Profile/ShareCard/ShareCardContent.swift:2110-2136 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) Starcat/Features/AI/RepoAIWindowContentView.swift:2026— Starcat/Features/AI/RepoAIWindowContentView.swift:2026-2053 | Starcat/Features/AI/RepoAIWindowContentView.swift:2288-2314 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) Starcat/Features/Auth/ProjectAccessSession.swift:454— Starcat/Features/Auth/ProjectAccessSession.swift:454-485 | Starcat/Features/Auth/ProjectAccessSession.swift:491-517 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) Starcat/Features/Onboarding/AppStoreToDirectImportSheet.swift:95— Starcat/Features/Onboarding/AppStoreToDirectImportSheet.swift:95-121 | Starcat/Features/Settings/SettingsView.swift:2916-2943 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) Starcat/Core/Network/GitHubAPI/GitHubStarListsAPI.swift:230— Starcat/Core/Network/GitHubAPI/GitHubStarListsAPI.swift:230-256 | Starcat/Core/Network/GitHubAPI/GitHubStarListsAPI.swift:258-286 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 11+ corresponding lines) · ×6
Edited copies of one member (3 members, 11+ corresponding lines) Starcat/Features/Agents/Core/AgentApproval.swift:22— Starcat/Features/Agents/Core/AgentApproval.swift:22-32 | Starcat/Features/Agents/Core/AgentMessageTimelineView.swift:1000-1010 | Starcat/Features/Agents/Core/AgentWorkspaceView.swift:317-334 — 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) Starcat/Features/AI/BatchAIQueueService.swift:870— Starcat/Features/AI/BatchAIQueueService.swift:870-880 | Starcat/Features/AI/BatchAIQueueService.swift:882-892 | Starcat/Features/AI/BatchAIQueueService.swift:895-907 — 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) Starcat/Features/Onboarding/FirstRunWelcomeSheet.swift:1472— Starcat/Features/Onboarding/FirstRunWelcomeSheet.swift:1472-1482 | Starcat/Features/Onboarding/FirstRunWelcomeSheet.swift:1484-1499 | Starcat/Features/Profile/ShareCard/ShareCardContent.swift:1938-1950 — 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) Starcat/Core/Sync/AwesomeRepository.swift:131— Starcat/Core/Sync/AwesomeRepository.swift:131-141 | Starcat/Core/Sync/AwesomeRepository.swift:143-153 | Starcat/Core/Sync/AwesomeRepository.swift:510-522 — 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) Starcat/Shared/Services/DiskIssueSummaryCache.swift:206— Starcat/Shared/Services/DiskIssueSummaryCache.swift:206-216 | Starcat/Shared/Services/DiskIssueTimelineCache.swift:203-213 | Starcat/Shared/Services/DiskWikiCache.swift:375-385 — 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) Starcat/Features/Profile/ContributionService.swift:153— Starcat/Features/Profile/ContributionService.swift:153-163 | Starcat/Features/Profile/DeveloperLanguageService.swift:144-155 | Starcat/Features/Profile/UserProfileService.swift:248-259 — 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) · ×6
Edited copies of one member (3 members, 3+ corresponding lines) Starcat/Features/AI/BatchAITagFlowLayout.swift:17— Starcat/Features/AI/BatchAITagFlowLayout.swift:17-23 | Starcat/Features/Home/GitHubStarListAIGroupingResultList.swift:761-763 | Starcat/Features/Settings/SettingsView.swift:1544-1546 — 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) Starcat/Core/Network/AppEndpoints.swift:479— Starcat/Core/Network/AppEndpoints.swift:479-481 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryRunner.swift:336-338 | Starcat/Features/Home/RepoFileTreeSessionCache.swift:54-56 — 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) Starcat/Features/Insights/RepositoryInsightsView.swift:1577— Starcat/Features/Insights/RepositoryInsightsView.swift:1577-1582 | Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:1319-1321 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:4266-4268 — 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) Starcat/Features/Insights/RepositoryInsightsAIContextProvider.swift:504— Starcat/Features/Insights/RepositoryInsightsAIContextProvider.swift:504-506 | Starcat/Features/Insights/RepositoryInsightsViewModel.swift:1430-1432 | Starcat/Features/RAG/Core/GitHubRAGRemoteContextProvider.swift:433-435 — 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) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:2961— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:2961-2963 | Starcat/Features/RAG/UI/RAGAddToLibrarySheet.swift:332-334 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2158-2160 — 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) Starcat/Features/AI/Usage/AIUsageDashboardView.swift:539— Starcat/Features/AI/Usage/AIUsageDashboardView.swift:539-541 | Starcat/Features/Home/OwnerCardView.swift:502-504 | Starcat/Features/Insights/MyInsightsView.swift:1075-1077 — 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.
Duplicated block (11–12 lines × 2) Starcat/Features/AI/LocalAI/LayaDecisionModelManager.swift:296— Starcat/Features/AI/LocalAI/LayaDecisionModelManager.swift:296-307 | Starcat/Features/AI/LocalAI/LocalAIModelManager.swift:572-582 — 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 `Starcat/Features/AI/LocalAI/LayaDecisionModelManager.swift:296` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (11–12 lines × 2) Starcat/Features/Activity/WeeklyLanguageStore.swift:60— Starcat/Features/Activity/WeeklyLanguageStore.swift:60-70 | Starcat/Features/Trending/TrendingLanguageStore.swift:131-142 — 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 `Starcat/Features/Activity/WeeklyLanguageStore.swift:60` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `api` to `WeeklyAPI` in one and `TrendingAPI` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (11–12 lines × 2) Starcat/Features/Insights/MyInsightsView.swift:316— Starcat/Features/Insights/MyInsightsView.swift:316-327 | Starcat/Features/Insights/MyInsightsView.swift:671-681 — 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 `Starcat/Features/Insights/MyInsightsView.swift:316` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `alignment` to `.leading` in one and `.center` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (11–12 lines × 2) Starcat/Features/Insights/RepositoryInsightsView.swift:2936— Starcat/Features/Insights/RepositoryInsightsView.swift:2936-2946 | Starcat/Features/Insights/RepositoryInsightsView.swift:3080-3091 — 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 `Starcat/Features/Insights/RepositoryInsightsView.swift:2936` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11–12 lines × 2) Starcat/Features/MCP/StarcatMCPToolRegistry.swift:313— Starcat/Features/MCP/StarcatMCPToolRegistry.swift:313-323 | Starcat/Features/MCP/StarcatMCPToolRegistry.swift:362-373 — 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 `Starcat/Features/MCP/StarcatMCPToolRegistry.swift:362` 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–12 lines × 2) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceView.swift:101— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceView.swift:101-112 | Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:1415-1425 — 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 `Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceView.swift:101` 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· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×5
Members sharing a duplicated core (6 members, 50+ identical tokens) Starcat/Core/Network/RecommendAPI.swift:33— Starcat/Core/Network/RecommendAPI.swift:33-50 | Starcat/Core/Network/ShareAPI.swift:62-84 | Starcat/Core/Network/StarHistoryAPI.swift:121-144 | Starcat/Core/Network/TrendingAPI.swift:71-92 | Starcat/Core/Network/WeeklyAPI.swift:82-103 | Starcat/Core/Network/WikiAPI.swift:24-41 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) Starcat/Core/Settings/AppSettings.swift:318— Starcat/Core/Settings/AppSettings.swift:318-347 | Starcat/Core/Settings/AppSettings.swift:354-385 | Starcat/Core/Settings/AppSettings.swift:423-452 | Starcat/Core/Settings/AppSettings.swift:455-485 | Starcat/Core/Settings/AppSettings.swift:488-542 | Starcat/Features/AI/AIConfiguration.swift:1658-1687 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) Starcat/Features/Activity/ActivityDetailScaffoldShell.swift:197— Starcat/Features/Activity/ActivityDetailScaffoldShell.swift:197-215 | Starcat/Features/Activity/ActivityReleaseDetailScaffoldShell.swift:127-145 | Starcat/Features/Activity/WeeklyDetailScaffoldShell.swift:364-383 | Starcat/Features/Explore/DiscoveryDetailView.swift:114-133 | Starcat/Features/Home/RepoDetailView.swift:241-256 | Starcat/Features/Trending/TrendingScaffoldShell.swift:198-217 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) Starcat/Features/Activity/ActivityView.swift:656— Starcat/Features/Activity/ActivityView.swift:656-664 | Starcat/Features/Activity/WeeklyContentView.swift:799-807 | Starcat/Features/Explore/AwesomeView.swift:502-510 | Starcat/Features/Explore/ExploreView.swift:743-751 | Starcat/Features/Home/HomeViewModel.swift:1238-1247 | Starcat/Features/Trending/TrendingView.swift:299-307 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) Starcat/Features/Companion/CompanionLocalServer.swift:283— Starcat/Features/Companion/CompanionLocalServer.swift:283-296 | Starcat/Features/Companion/CompanionLocalServer.swift:298-326 | Starcat/Features/Companion/CompanionLocalServer.swift:353-382 | Starcat/Features/Companion/CompanionLocalServer.swift:384-413 | Starcat/Features/Companion/CompanionLocalServer.swift:415-451 | Starcat/Features/Companion/CompanionLocalServer.swift:453-480 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication· Edited copy of a member (42 corresponding lines) · ×5
Edited copy of a member (42 corresponding lines) Starcat/Core/Network/WeeklyAPI.swift:128— Starcat/Core/Network/WeeklyAPI.swift:128-170 | Starcat/Core/Network/WeeklyAPI.swift:219-260 — 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.
Edited copy of a member (42 corresponding lines) Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryPortAvailability.swift:16— Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryPortAvailability.swift:16-57 | Starcat/Features/MCP/StarcatMCPPortAvailability.swift:36-77 — 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.
Edited copy of a member (42 corresponding lines) Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:1008— Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:1008-1049 | Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:1190-1233 — 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.
Edited copy of a member (42 corresponding lines) Starcat/App/AppDependencies.swift:2117— Starcat/App/AppDependencies.swift:2117-2159 | Starcat/App/AppDependencies.swift:2175-2216 — 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.
Edited copy of a member (42 corresponding lines) Starcat/Features/MCP/StarcatMCPWriteFacade.swift:65— Starcat/Features/MCP/StarcatMCPWriteFacade.swift:65-109 | Starcat/Features/MCP/StarcatMCPWriteFacade.swift:112-153 — 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 (39 corresponding lines) · ×5
Edited copy of a member (39 corresponding lines) Starcat/Core/Network/RecommendAPI.swift:89— Starcat/Core/Network/RecommendAPI.swift:89-145 | Starcat/Core/Network/WikiAPI.swift:44-82 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (39 corresponding lines) Starcat/Features/Insights/MyInsightsSnapshotProvider.swift:541— Starcat/Features/Insights/MyInsightsSnapshotProvider.swift:541-592 | Starcat/Features/RAG/Core/KnowledgeBaseMetadataSnapshot.swift:823-861 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (39 corresponding lines) Starcat/Features/Home/RepoListView.swift:2783— Starcat/Features/Home/RepoListView.swift:2783-2825 | Starcat/Features/RAG/UI/RAGContextPickerFilterControls.swift:250-288 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (39 corresponding lines) Starcat/Features/Profile/ShareCard/ShareCardSheet.swift:334— Starcat/Features/Profile/ShareCard/ShareCardSheet.swift:334-378 | Starcat/Features/Profile/ShareCard/ShareCardSheet.swift:521-559 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (39 corresponding lines) Starcat/Core/Network/GitHubAPI/ReadmeAPI.swift:544— Starcat/Core/Network/GitHubAPI/ReadmeAPI.swift:544-583 | Starcat/Core/Network/GitHubAPI/ReadmeAPI.swift:586-624 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 19+ corresponding lines) · ×5
Edited copies of one member (3 members, 19+ corresponding lines) Starcat/Features/CodeGraph/CodeFlowStorage.swift:674— Starcat/Features/CodeGraph/CodeFlowStorage.swift:674-692 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:745-766 | Starcat/Shared/Services/RepoContextStorage.swift:922-949 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 19+ corresponding lines) Starcat/Features/CodeGraph/CodeFlowStorage.swift:541— Starcat/Features/CodeGraph/CodeFlowStorage.swift:541-559 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:494-512 | Starcat/Shared/Services/RepoContextStorage.swift:795-813 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 19+ corresponding lines) Starcat/Core/Sync/ReleaseRepository.swift:41— Starcat/Core/Sync/ReleaseRepository.swift:41-64 | Starcat/Core/Sync/RepoNoteRepository.swift:45-69 | Starcat/Core/Sync/RepoNoteRepository.swift:82-100 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 19+ corresponding lines) Starcat/Features/Onboarding/AppStoreToDirectImportSheet.swift:42— Starcat/Features/Onboarding/AppStoreToDirectImportSheet.swift:42-60 | Starcat/Features/Settings/SettingsView.swift:2869-2887 | Starcat/Features/Settings/SettingsView.swift:3014-3032 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 19+ corresponding lines) Starcat/Features/AI/ReadmeTranslationService.swift:67— Starcat/Features/AI/ReadmeTranslationService.swift:67-85 | Starcat/Features/Home/ReadmeTranslationViewModel.swift:198-217 | Starcat/Features/Home/ReadmeTranslationViewModel.swift:288-307 — 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) · ×5
Edited copies of one member (3 members, 15+ corresponding lines) Starcat/Features/Activity/GitHubNotificationInboxView.swift:328— Starcat/Features/Activity/GitHubNotificationInboxView.swift:328-342 | Starcat/Features/Activity/GitHubNotificationInboxView.swift:350-369 | Starcat/Features/Home/RepoHealthSheet.swift:589-605 — 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.
Edited copies of one member (3 members, 15+ corresponding lines) Starcat/Features/AI/LocalAI/LocalMLXRuntime.swift:276— Starcat/Features/AI/LocalAI/LocalMLXRuntime.swift:276-290 | Starcat/Features/AI/LocalAI/LocalMLXRuntime.swift:293-307 | Starcat/Features/AI/LocalAI/LocalMLXRuntime.swift:310-325 — 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.
Edited copies of one member (3 members, 15+ corresponding lines) Starcat/Features/Home/HomeViewModel.swift:3806— Starcat/Features/Home/HomeViewModel.swift:3806-3823 | Starcat/Features/Home/HomeViewModel.swift:3965-3979 | Starcat/Features/Home/HomeViewModel.swift:3981-3995 — 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.
Edited copies of one member (3 members, 15+ corresponding lines) Starcat/Features/Home/RepoDetailView.swift:1344— Starcat/Features/Home/RepoDetailView.swift:1344-1358 | Starcat/Features/Home/RepoDetailView.swift:1366-1381 | Starcat/Features/Home/RepoMetadataHeaderView.swift:1177-1198 — 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.
Edited copies of one member (3 members, 15+ corresponding lines) Starcat/App/StarcatCommandRouter.swift:362— Starcat/App/StarcatCommandRouter.swift:362-376 | Starcat/Shared/Components/AutomaticListPagination.swift:118-136 | Starcat/Shared/Components/AutomaticListPagination.swift:139-155 — 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 (3 members, 9+ corresponding lines) · ×5
Edited copies of one member (3 members, 9+ corresponding lines) Starcat/Features/Profile/ContributionService.swift:178— Starcat/Features/Profile/ContributionService.swift:178-186 | Starcat/Features/Profile/DeveloperLanguageService.swift:232-243 | Starcat/Features/Profile/UserProfileService.swift:274-282 — 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.
Edited copies of one member (3 members, 9+ corresponding lines) Starcat/Features/CodeGraph/CodeFlowStorage.swift:504— Starcat/Features/CodeGraph/CodeFlowStorage.swift:504-514 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:717-727 | Starcat/Shared/Services/RepoContextStorage.swift:761-769 — 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.
Edited copies of one member (3 members, 9+ corresponding lines) Starcat/Features/AI/RepoAIInsightViewModel.swift:450— Starcat/Features/AI/RepoAIInsightViewModel.swift:450-458 | Starcat/Features/Activity/GitHubNotificationDetailView.swift:2673-2685 | Starcat/Features/RepoIssues/RepoIssuesWorkspaceViewModel.swift:468-480 — 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.
Edited copies of one member (3 members, 9+ corresponding lines) Starcat/Core/Health/RepoHealthCalculator.swift:376— Starcat/Core/Health/RepoHealthCalculator.swift:376-384 | Starcat/Shared/Components/RepoHealthBadge.swift:86-94 | Starcat/Shared/Telemetry/TelemetryEvent.swift:82-90 — 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.
Edited copies of one member (3 members, 9+ corresponding lines) Starcat/Features/Activity/WeeklyContentView.swift:1740— Starcat/Features/Activity/WeeklyContentView.swift:1740-1751 | Starcat/Features/Explore/ExploreDiscoveryViewModel.swift:467-475 | Starcat/Features/Trending/TrendingListPipeline.swift:233-243 — 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.
Duplicated block (14–15 lines × 2) Starcat/Features/CodeGraph/CodeFlowPanel.swift:55— Starcat/Features/CodeGraph/CodeFlowPanel.swift:55-69 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryPanel.swift:68-81 — before extracting anything, compare `Starcat/Features/CodeGraph/CodeFlowPanel.swift` and `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryPanel.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 123 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/CodeGraph/CodeFlowPanel.swift:55` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Starcat/Features/CodeGraph/CodeFlowPanel.swift:53` calls `frame` and `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryPanel.swift:66` 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–15 lines × 2) Starcat/Features/Profile/ShareCard/ShareCardContent.swift:1143— Starcat/Features/Profile/ShareCard/ShareCardContent.swift:1143-1156 | Starcat/Features/Profile/ShareCard/ShareCardContent.swift:1280-1294 — 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 `Starcat/Features/Profile/ShareCard/ShareCardContent.swift:1143` 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–15 lines × 2) Starcat/Features/Settings/AITaskPromptSheet.swift:113— Starcat/Features/Settings/AITaskPromptSheet.swift:113-126 | Starcat/Features/Settings/TranslationPromptSheet.swift:126-140 — before extracting anything, compare `Starcat/Features/Settings/AITaskPromptSheet.swift` and `Starcat/Features/Settings/TranslationPromptSheet.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 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 `Starcat/Features/Settings/AITaskPromptSheet.swift:113` 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 (14–15 lines × 2) Starcat/Features/Settings/ExternalSearchSettingsSection.swift:184— Starcat/Features/Settings/ExternalSearchSettingsSection.swift:184-197 | Starcat/Features/Settings/SettingsView.swift:796-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 `Starcat/Features/Settings/ExternalSearchSettingsSection.swift:184` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14–15 lines × 2) Starcat/Features/Settings/GeneralSettingsView.swift:253— Starcat/Features/Settings/GeneralSettingsView.swift:253-266 | Starcat/Features/Settings/SettingsView.swift:1225-1239 — 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 `Starcat/Features/Settings/GeneralSettingsView.swift:253` 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–13 lines × 2) Starcat/Features/AI/BatchAIWorkspaceView.swift:161— Starcat/Features/AI/BatchAIWorkspaceView.swift:161-172 | Starcat/Features/Home/GitHubStarListAIGroupingSheet.swift:50-62 — 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 `Starcat/Features/AI/BatchAIWorkspaceView.swift:161` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–13 lines × 2) Starcat/Features/AI/RepoAIInsightService.swift:792— Starcat/Features/AI/RepoAIInsightService.swift:792-804 | Starcat/Features/AI/RepoAIInsightService.swift:1583-1594 — 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–13 lines × 2) Starcat/Features/Insights/RepositoryInsightsRemoteProvider.swift:1415— Starcat/Features/Insights/RepositoryInsightsRemoteProvider.swift:1415-1426 | Starcat/Features/Insights/RepositoryInsightsRemoteProvider.swift:1437-1449 — 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 `Starcat/Features/Insights/RepositoryInsightsRemoteProvider.swift:1415` 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 (12–13 lines × 2) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:1378— Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:1378-1389 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:1483-1495 — 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 `Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:1378` 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 (12–13 lines × 2) Starcat/Shared/Components/RepoDetailScaffold.swift:876— Starcat/Shared/Components/RepoDetailScaffold.swift:876-887 | Starcat/Shared/Components/RepoDetailScaffold.swift:892-904 — 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 `Starcat/Shared/Components/RepoDetailScaffold.swift:876` 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 × 3) Starcat/Core/Health/RepoHealthService.swift:195— Starcat/Core/Health/RepoHealthService.swift:195-203 | Starcat/Core/Sync/ReleaseMonitor.swift:188-196 | Starcat/Features/Releases/RepoReleaseSection.swift:275-283 — 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.
Duplicated block (9 lines × 3) Starcat/Features/Activity/ActivityDetailView.swift:595— Starcat/Features/Activity/ActivityDetailView.swift:595-603 | Starcat/Features/Activity/GitHubNotificationDetailView.swift:1668-1676 | Starcat/Shared/Components/TagChipFlowLayout.swift:44-52 — 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 `Starcat/Features/Activity/ActivityDetailView.swift:595` 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 × 3) Starcat/Features/Activity/ActivityViewModel.swift:616— Starcat/Features/Activity/ActivityViewModel.swift:616-624 | Starcat/Features/Activity/ActivityViewModel.swift:805-813 | Starcat/Features/Activity/ActivityViewModel.swift:1130-1138 — 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 `Starcat/Features/Activity/ActivityViewModel.swift:616` 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 × 3) Starcat/Features/Settings/IntegrationSettingsView.swift:595— Starcat/Features/Settings/IntegrationSettingsView.swift:595-603 | Starcat/Features/Settings/IntegrationSettingsView.swift:629-637 | Starcat/Features/Settings/RepoContextSettingsSection.swift:122-130 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Settings/IntegrationSettingsView.swift:595` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 3) Starcat/Core/Sync/GitHubStarListRepository.swift:206— Starcat/Core/Sync/GitHubStarListRepository.swift:206-214 | Starcat/Core/Sync/GitHubStarListRepository.swift:216-224 | Starcat/Core/Sync/RepoTagRepository.swift:109-117 — 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 (7–8 lines × 2) Starcat/Core/Capabilities/RepositoryReadCapability.swift:247— Starcat/Core/Capabilities/RepositoryReadCapability.swift:247-254 | Starcat/Features/Home/HomeViewModel.swift:2660-2666 — 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 `Starcat/Core/Capabilities/RepositoryReadCapability.swift:247` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7–8 lines × 2) Starcat/Features/AI/ReadmeTranslationService.swift:833— Starcat/Features/AI/ReadmeTranslationService.swift:833-840 | Starcat/Features/AI/RepoAIInsightService.swift:1631-1637 — 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 `Starcat/Features/AI/ReadmeTranslationService.swift:833` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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–8 lines × 2) Starcat/Features/RAG/Core/KnowledgeRAGPromptBuilder.swift:134— Starcat/Features/RAG/Core/KnowledgeRAGPromptBuilder.swift:134-140 | Starcat/Features/RAG/Core/KnowledgeSearchCapability.swift:260-267 — 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 `Starcat/Features/RAG/Core/KnowledgeSearchCapability.swift:260` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7–8 lines × 2) Starcat/Shared/Services/DiskChatHistoryStore.swift:521— Starcat/Shared/Services/DiskChatHistoryStore.swift:521-527 | Starcat/Shared/Services/DiskChatHistoryStore.swift:552-559 — 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 `Starcat/Shared/Services/DiskChatHistoryStore.swift:521` 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, `Starcat/Shared/Services/DiskChatHistoryStore.swift:520` calls `makeSession` and `Starcat/Shared/Services/DiskChatHistoryStore.swift:552` 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–8 lines × 2) Starcat/Shared/Components/ReadmeWebView.swift:2194— Starcat/Shared/Components/ReadmeWebView.swift:2194-2200 | Starcat/Shared/Components/ReadmeWebView.swift:2204-2211 — 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 `Starcat/Shared/Components/ReadmeWebView.swift:2194` 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.
Low contrast colour pair in CSS (3.1:1) Starcat/Resources/CodeFlow/codeflow.html:60— `.top-btn.primary` sets color: #fff on background-color: #00a86b — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.1:1) Starcat/Resources/CodeFlow/codeflow.html:340— `.viz-tab.active` sets color: #fff on background-color: #00a86b — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.1:1) Starcat/Resources/CodeFlow/codeflow.html:404— `.conn-goto:hover` sets color: #fff on background-color: #00a86b — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.1:1) Starcat/Resources/CodeFlow/codeflow.html:467— `.exclude-note code` sets color: #00a86b on background-color: #fff — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
TodoComment StarcatTests/UserProfileServiceTests.swift:17— // - acceptRefreshedUser 反向 push 路径在 AuthSession 上单测(TODO,本文件只测 service 自身)。 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Starcat/Shared/Components/Toolbar/PageToolbarSpec.swift:19— // TODO(后续 PR): — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Starcat/Features/Trending/TrendingViewModel.swift:737— // TODO: 调用 AI 服务生成摘要 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Starcat/Features/AI/IndexedTextDiff.swift:34— /// - notes 是用户随手改的小本子,常见的"加一行 TODO" / "改个错别字"如果按 10% 触发, — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×4
Members sharing a duplicated core (5 members, 50+ identical tokens) Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:714— Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:714-722 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:939-947 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:953-965 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:3067-3144 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:3147-3169 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) Starcat/Core/Network/GitHubAPI/DeveloperLanguageAPI.swift:20— Starcat/Core/Network/GitHubAPI/DeveloperLanguageAPI.swift:20-37 | Starcat/Core/Network/GitHubAPI/OrganizationIssuesAPI.swift:54-85 | Starcat/Core/Network/GitHubAPI/RepoIssuesAPI.swift:60-99 | Starcat/Core/Network/GitHubAPI/RepoIssuesAPI.swift:103-133 | Starcat/Core/Network/GitHubAPI/UserProjectsAPI.swift:121-143 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) Starcat/Core/Settings/AppSettings.swift:2677— Starcat/Core/Settings/AppSettings.swift:2677-2703 | Starcat/Core/Settings/AppSettings.swift:2706-2731 | Starcat/Core/Settings/AppSettings.swift:2828-2853 | Starcat/Core/Sync/StarringSubsystem.swift:263-337 | Starcat/Core/Sync/StarringSubsystem.swift:373-488 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) Starcat/Shared/Services/DiskChatHistoryStore.swift:741— Starcat/Shared/Services/DiskChatHistoryStore.swift:741-776 | Starcat/Shared/Services/DiskChatHistoryStore.swift:867-883 | Starcat/Shared/Services/DiskReadmeTranslationCache.swift:248-294 | Starcat/Shared/Services/DiskReadmeTranslationCache.swift:301-339 | Starcat/Shared/Services/DiskReadmeTranslationCache.swift:374-390 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication· Edited copy of a member (48 corresponding lines) · ×4
Edited copy of a member (48 corresponding lines) Starcat/Shared/Services/WikiAvailabilitySnapshotLoader.swift:29— Starcat/Shared/Services/WikiAvailabilitySnapshotLoader.swift:29-83 | Starcat/Shared/Services/WikiAvailabilitySnapshotLoader.swift:89-136 — These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (48 corresponding lines) Starcat/Features/Insights/RepositoryInsightsView.swift:805— Starcat/Features/Insights/RepositoryInsightsView.swift:805-855 | Starcat/Features/Insights/RepositoryInsightsView.swift:859-906 — These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (48 corresponding lines) Starcat/Core/Network/GitHubAPI/GitHubAPIClient.swift:544— Starcat/Core/Network/GitHubAPI/GitHubAPIClient.swift:544-615 | Starcat/Core/Network/GitHubAPI/GitHubAPIClient.swift:625-672 — These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (48 corresponding lines) Starcat/Features/Explore/ExploreView.swift:296— Starcat/Features/Explore/ExploreView.swift:296-343 | Starcat/Features/Explore/LinuxDoView.swift:72-121 — These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (46 corresponding lines) · ×4
Edited copy of a member (46 corresponding lines) Starcat/Features/AI/BatchAITagReviewRow.swift:270— Starcat/Features/AI/BatchAITagReviewRow.swift:270-317 | Starcat/Features/Home/GitHubStarListAIGroupingResultList.swift:701-746 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (46 corresponding lines) Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:1565— Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:1565-1610 | Starcat/Features/Settings/AIPromptPlaceholderPopover.swift:115-165 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (46 corresponding lines) Starcat/Shared/Services/DiskIssueDraftCache.swift:95— Starcat/Shared/Services/DiskIssueDraftCache.swift:95-140 | Starcat/Shared/Services/DiskNotificationCommentDraftCache.swift:101-146 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (46 corresponding lines) Starcat/Features/Settings/AISettingsView.swift:1041— Starcat/Features/Settings/AISettingsView.swift:1041-1087 | Starcat/Features/Settings/AISettingsView.swift:1284-1329 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (37 corresponding lines) · ×4
Edited copy of a member (37 corresponding lines) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2202— Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2202-2238 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2240-2281 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (37 corresponding lines) Starcat/Core/Warmup/InitialRepoWarmupCoordinator.swift:249— Starcat/Core/Warmup/InitialRepoWarmupCoordinator.swift:249-285 | Starcat/Core/Warmup/InitialRepoWarmupCoordinator.swift:287-324 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (37 corresponding lines) Starcat/Core/Network/GitHubAPI/GitHubRepositoryMetricsClient.swift:854— Starcat/Core/Network/GitHubAPI/GitHubRepositoryMetricsClient.swift:854-894 | Starcat/Core/Network/GitHubAPI/GitHubRepositoryMetricsClient.swift:897-933 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (37 corresponding lines) Starcat/Features/MCP/StarcatMCPWriteFacade.swift:536— Starcat/Features/MCP/StarcatMCPWriteFacade.swift:536-572 | Starcat/Features/MCP/StarcatMCPWriteFacade.swift:656-695 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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) · ×4
Edited copy of a member (36 corresponding lines) Starcat/Features/Profile/ShareCard/ShareCardSheet.swift:634— Starcat/Features/Profile/ShareCard/ShareCardSheet.swift:634-669 | Starcat/Features/Profile/ShareCard/ShareCardSheet.swift:779-821 — 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.
Edited copy of a member (36 corresponding lines) Starcat/Features/Activity/GitHubNotificationIssueTimelineConversation.swift:79— Starcat/Features/Activity/GitHubNotificationIssueTimelineConversation.swift:79-116 | Starcat/Features/Activity/GitHubNotificationIssueTimelineConversation.swift:118-153 — 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.
Edited copy of a member (36 corresponding lines) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:1657— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:1657-1694 | Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:1792-1827 — 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.
Edited copy of a member (36 corresponding lines) Starcat/Features/Settings/AISettingsView.swift:1092— Starcat/Features/Settings/AISettingsView.swift:1092-1127 | Starcat/Features/Settings/AISettingsView.swift:1333-1373 — 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 copies of one member (3 members, 18+ corresponding lines) · ×4
Edited copies of one member (3 members, 18+ corresponding lines) Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:440— Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:440-461 | Starcat/Features/Settings/AITaskPromptSheet.swift:113-130 | Starcat/Features/Settings/TranslationPromptSheet.swift:126-146 — 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.
Edited copies of one member (3 members, 18+ corresponding lines) Starcat/Features/Insights/MyInsightsView.swift:1145— Starcat/Features/Insights/MyInsightsView.swift:1145-1163 | Starcat/Features/Insights/MyInsightsView.swift:1234-1251 | Starcat/Features/Insights/MyInsightsView.swift:1253-1270 — 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.
Edited copies of one member (3 members, 18+ corresponding lines) Starcat/Features/AI/BatchAIInsightProviding.swift:138— Starcat/Features/AI/BatchAIInsightProviding.swift:138-155 | Starcat/Features/AI/BatchAIInsightProviding.swift:203-222 | Starcat/Features/AI/BatchAIInsightProviding.swift:224-243 — 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.
Edited copies of one member (3 members, 18+ corresponding lines) Starcat/Core/Health/RepoHealthRepository.swift:63— Starcat/Core/Health/RepoHealthRepository.swift:63-83 | Starcat/Core/Health/RepoHealthRepository.swift:85-105 | Starcat/Core/Sync/RepoRepository.swift:390-407 — 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.
Duplicated block (20–21 lines × 2) Starcat/Core/Network/GitHubAPI/ReadmeAPI.swift:298— Starcat/Core/Network/GitHubAPI/ReadmeAPI.swift:298-318 | Starcat/Core/Network/GitHubAPI/ReadmeAPI.swift:564-583 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Core/Network/GitHubAPI/ReadmeAPI.swift:298` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (20–21 lines × 2) Starcat/Features/AI/GitHubStarListAIGroupingSession.swift:1829— Starcat/Features/AI/GitHubStarListAIGroupingSession.swift:1829-1849 | Starcat/Features/AI/GitHubStarListAIGroupingSession.swift:1884-1903 — 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 `Starcat/Features/AI/GitHubStarListAIGroupingSession.swift:1829` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Starcat/Features/AI/GitHubStarListAIGroupingSession.swift:1828` calls `remove` and `Starcat/Features/AI/GitHubStarListAIGroupingSession.swift:1883` 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 (20–21 lines × 2) Starcat/Features/CodeGraph/CodeFlowStorage.swift:216— Starcat/Features/CodeGraph/CodeFlowStorage.swift:216-235 | Starcat/Shared/Services/RepoContextStorage.swift:226-246 — before extracting anything, compare `Starcat/Features/CodeGraph/CodeFlowStorage.swift` and `Starcat/Shared/Services/RepoContextStorage.swift` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 259 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/CodeGraph/CodeFlowStorage.swift:216` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (20–21 lines × 2) Starcat/Features/RAG/UI/RAGAssistantMessageBlock.swift:51— Starcat/Features/RAG/UI/RAGAssistantMessageBlock.swift:51-71 | Starcat/Features/RAG/UI/RAGAssistantMessageBlock.swift:221-240 — 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 `Starcat/Features/RAG/UI/RAGAssistantMessageBlock.swift:51` 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 (21 lines × 2) Starcat/Core/Screensaver/ScreensaverAvatarCache.swift:224— Starcat/Core/Screensaver/ScreensaverAvatarCache.swift:224-244 | Starcat/Core/Widget/WidgetAvatarCache.swift:171-191 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (21 lines × 2) Starcat/Core/Sync/UserProjectRepository.swift:83— Starcat/Core/Sync/UserProjectRepository.swift:83-103 | Starcat/Core/Sync/UserProjectRepository.swift:226-246 — 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 `Starcat/Core/Sync/UserProjectRepository.swift:83` 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 (21 lines × 2) Starcat/Features/RAG/UI/RAGCitationChunkPopover.swift:454— Starcat/Features/RAG/UI/RAGCitationChunkPopover.swift:454-474 | Starcat/Features/RAG/UI/RAGRepoContextXMLPopover.swift:117-137 — 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 `Starcat/Features/RAG/UI/RAGCitationChunkPopover.swift:454` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21 lines × 2) Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:1585— Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:1585-1605 | Starcat/Features/Settings/AIPromptPlaceholderPopover.swift:134-154 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:1585` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `interfaceScale.scaled(8)` in one and `8` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (10–11 lines × 2) Starcat/Features/Activity/GitHubNotificationInboxView.swift:508— Starcat/Features/Activity/GitHubNotificationInboxView.swift:508-517 | Starcat/Features/RepoIssues/RepoIssuesWorkspaceViewModel.swift:200-210 — 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 `Starcat/Features/RepoIssues/RepoIssuesWorkspaceViewModel.swift:200` 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–11 lines × 2) Starcat/Features/Home/RepoMetadataHeaderView.swift:630— Starcat/Features/Home/RepoMetadataHeaderView.swift:630-639 | Starcat/Shared/Components/RepoDetailScaffold.swift:572-582 — 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 `Starcat/Shared/Components/RepoDetailScaffold.swift:572` 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 (10–11 lines × 2) Starcat/Features/Settings/AISettingsView.swift:782— Starcat/Features/Settings/AISettingsView.swift:782-792 | Starcat/Features/Settings/TranslationSettingsView.swift:326-335 — 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 `Starcat/Features/Settings/AISettingsView.swift:782` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (10–11 lines × 2) Starcat/Shared/Services/RepoContextStorage.swift:377— Starcat/Shared/Services/RepoContextStorage.swift:377-387 | Starcat/Shared/Services/RepoContextStorage.swift:513-522 — 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 `Starcat/Shared/Services/RepoContextStorage.swift:377` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–10 lines × 2) Starcat/Features/Activity/WeeklyDetailScaffoldShell.swift:133— Starcat/Features/Activity/WeeklyDetailScaffoldShell.swift:133-142 | Starcat/Features/Explore/DiscoveryDetailView.swift:72-79 — 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 `Starcat/Features/Activity/WeeklyDetailScaffoldShell.swift:133` 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–10 lines × 2) Starcat/Features/Profile/SnakeAnimator/HilbertSnakeAnimator.swift:100— Starcat/Features/Profile/SnakeAnimator/HilbertSnakeAnimator.swift:100-107 | Starcat/Features/Profile/SnakeAnimator/HilbertSnakeAnimator.swift:113-122 — 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 `Starcat/Features/Profile/SnakeAnimator/HilbertSnakeAnimator.swift:100` 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–10 lines × 2) Starcat/Shared/Services/DiskIssueTimelineCache.swift:86— Starcat/Shared/Services/DiskIssueTimelineCache.swift:86-95 | Starcat/Shared/Services/DiskWikiCache.swift:198-205 — 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 `Starcat/Shared/Services/DiskIssueTimelineCache.swift:86` 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–10 lines × 2) Starcat/Core/Navigation/RepositoryDeepLink.swift:84— Starcat/Core/Navigation/RepositoryDeepLink.swift:84-93 | Starcat/Core/Navigation/RepositoryDeepLink.swift:101-108 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Core/Navigation/RepositoryDeepLink.swift:84` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (6 lines × 3) Starcat/Features/Agents/Core/LoopAgentRuntime.swift:1279— Starcat/Features/Agents/Core/LoopAgentRuntime.swift:1279-1289 | Starcat/Features/Agents/ExternalRuntime/CodexAppServerAdapter.swift:1031-1036 | Starcat/Features/Agents/ExternalRuntime/ExternalAgentRuntime.swift:967-976 — 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 `Starcat/Features/Agents/Core/LoopAgentRuntime.swift:1279` 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 (6 lines × 3) Starcat/Features/Profile/ShareCard/ShareCardContent.swift:1073— Starcat/Features/Profile/ShareCard/ShareCardContent.swift:1073-1078 | Starcat/Features/Profile/ShareCard/ShareCardContent.swift:1143-1148 | Starcat/Features/Profile/ShareCard/ShareCardContent.swift:1280-1285 — 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 `Starcat/Features/Profile/ShareCard/ShareCardContent.swift:1073` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) Starcat/Features/CodeGraph/CodeFlowStorage.swift:376— Starcat/Features/CodeGraph/CodeFlowStorage.swift:376-381 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:417-422 | Starcat/Shared/Services/RepoContextStorage.swift:592-597 — before extracting anything, compare `Starcat/Features/CodeGraph/CodeFlowStorage.swift` and `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 3) StarcatWidgets/Contributions/StarcatContributionProvider.swift:16— StarcatWidgets/Contributions/StarcatContributionProvider.swift:16-21 | StarcatWidgets/Rediscovery/StarcatRediscoveryWidget.swift:32-37 | StarcatWidgets/ReleaseWatch/StarcatReleaseWatchWidget.swift:32-37 — before extracting anything, compare `StarcatWidgets/Contributions/StarcatContributionProvider.swift` and `StarcatWidgets/ReleaseWatch/StarcatReleaseWatchWidget.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Swallowed exception (empty catch) starcat-promo-video/presentation/src/hooks/useAudioPreload.ts:23— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) starcat-promo-video/presentation/src/hooks/useStepper.ts:48— 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) starcat-promo-video/presentation/src/hooks/useStepper.ts:69— 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) Starcat/Features/Settings/JevConnectionSettingsView.swift:35— 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.
AC3 · Page structure· Page without a main landmark · ×3
Page without a main landmark Starcat/Resources/CodeFlow/codeflow.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="root">, so there is no content here to wrap — render the <main> from the component mounted into it.
Page without a main landmark Starcat/Resources/FollowGraph/follow-graph.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="graph">, so there is no content here to wrap — render the <main> from the component mounted into it.
Page without a main landmark starcat-promo-video/presentation/index.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="root">, so there is no content here to wrap — render the <main> from the component mounted into it.
Low contrast colour pair in CSS (3.0:1) Starcat/Resources/CodeFlow/codeflow.html:77— `.view-mode-badge` sets color: white on background-color: #ff5f5f — 3.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.0:1) Starcat/Resources/CodeFlow/codeflow.html:235— `.toast.error` sets color: white on background-color: #ff5f5f — 3.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.0:1) Starcat/Resources/CodeFlow/codeflow.html:415— `.file-preview-close:hover` sets color: white on background-color: #ff5f5f — 3.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Change-coupling hub: ActivityDetailScaffoldShell.swift → WeeklyDetailScaffoldShell.swift, RepoDetailView.swift, TrendingScaffoldShell.swift Starcat/Features/Activity/ActivityDetailScaffoldShell.swift— `Starcat/Features/Activity/ActivityDetailScaffoldShell.swift` changes together with 3 other files — `Starcat/Features/Activity/WeeklyDetailScaffoldShell.swift`, `Starcat/Features/Home/RepoDetailView.swift`, `Starcat/Features/Trending/TrendingScaffoldShell.swift` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 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 3.
Change-coupling hub: HomeView.swift → AutoTidyScheduler.swift, BatchAIOptionsSheet.swift, RepoAIFloatingOverlay.swift Starcat/Features/Home/HomeView.swift— `Starcat/Features/Home/HomeView.swift` changes together with 3 other files — `Starcat/Features/AI/AutoTidyScheduler.swift`, `Starcat/Features/AI/BatchAIOptionsSheet.swift`, `Starcat/Features/AI/RepoAIFloatingOverlay.swift` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 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 3.
Change-coupling hub: RepoListView.swift → UndoStarContentView.swift, GettingStartedOnboarding.swift, DebugFlags.swift Starcat/Features/Home/RepoListView.swift— `Starcat/Features/Home/RepoListView.swift` changes together with 3 other files — `Starcat/Features/Activity/UndoStarContentView.swift`, `Starcat/Features/Onboarding/GettingStartedOnboarding.swift`, `Starcat/Shared/Utilities/DebugFlags.swift` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 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 3.
D4 · Code Duplication· Edited copy of a member (44 corresponding lines) · ×3
Edited copy of a member (44 corresponding lines) Starcat/Features/Onboarding/FirstRunWelcomeSheet.swift:473— Starcat/Features/Onboarding/FirstRunWelcomeSheet.swift:473-516 | Starcat/Features/Onboarding/FirstRunWelcomeSheet.swift:519-568 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (44 corresponding lines) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:1719— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:1719-1775 | Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:1924-1967 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (44 corresponding lines) Starcat/Core/Download/ReleaseAssetDownloader.swift:189— Starcat/Core/Download/ReleaseAssetDownloader.swift:189-232 | Starcat/Core/Download/RepoFileDownloader.swift:260-309 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (47 corresponding lines) · ×3
Edited copy of a member (47 corresponding lines) Starcat/Features/Profile/ShareCard/ShareCardContent.swift:1052— Starcat/Features/Profile/ShareCard/ShareCardContent.swift:1052-1110 | Starcat/Features/Profile/ShareCard/ShareCardContent.swift:1260-1306 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (47 corresponding lines) StarcatWidgets/Focus/StarcatFocusWidget.swift:114— StarcatWidgets/Focus/StarcatFocusWidget.swift:114-160 | StarcatWidgets/Rediscovery/StarcatRediscoveryWidget.swift:81-134 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (47 corresponding lines) Starcat/Features/Settings/IndexRebuildConfirmationSheet.swift:22— Starcat/Features/Settings/IndexRebuildConfirmationSheet.swift:22-68 | Starcat/Features/Settings/ListPreferencesResetSheet.swift:16-62 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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) · ×3
Edited copy of a member (43 corresponding lines) Starcat/Features/Profile/ContributionService.swift:108— Starcat/Features/Profile/ContributionService.swift:108-150 | Starcat/Features/Profile/UserProfileService.swift:175-229 — 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.
Edited copy of a member (43 corresponding lines) Starcat/Features/CodeGraph/CodeFlowPanel.swift:369— Starcat/Features/CodeGraph/CodeFlowPanel.swift:369-415 | Starcat/Features/Home/RepoFileBrowserSheet.swift:739-781 — 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.
Edited copy of a member (43 corresponding lines) Starcat/Features/AI/BatchAIQueuePanel.swift:74— Starcat/Features/AI/BatchAIQueuePanel.swift:74-116 | Starcat/Features/Home/GitHubStarListAIGroupingSheet.swift:337-387 — 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 (49 corresponding lines) · ×3
Edited copy of a member (49 corresponding lines) Starcat/Features/Insights/MyInsightsView.swift:293— Starcat/Features/Insights/MyInsightsView.swift:293-344 | Starcat/Features/Insights/MyInsightsView.swift:645-693 — 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.
Edited copy of a member (49 corresponding lines) Starcat/Features/Settings/CodexRuntimeSettingsCard.swift:32— Starcat/Features/Settings/CodexRuntimeSettingsCard.swift:32-80 | Starcat/Features/Settings/DeepSeekRuntimeSettingsCard.swift:37-90 — 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.
Edited copy of a member (49 corresponding lines) Starcat/Features/Home/RepoListView.swift:2733— Starcat/Features/Home/RepoListView.swift:2733-2781 | Starcat/Features/RAG/UI/RAGContextPickerFilterControls.swift:197-248 — 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 (34 corresponding lines) · ×3
Edited copy of a member (34 corresponding lines) Starcat/Core/Database/Models/DiscoveryCacheRecords.swift:116— Starcat/Core/Database/Models/DiscoveryCacheRecords.swift:116-149 | Starcat/Core/Database/Models/DiscoveryCacheRecords.swift:342-385 — 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) Starcat/Features/AI/BatchAIOptionsSheet.swift:485— Starcat/Features/AI/BatchAIOptionsSheet.swift:485-519 | Starcat/Features/AI/RepoAIGenerationOptionsSection.swift:102-135 — 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) Starcat/Core/Network/GitHubAPI/GitHubStarListsAPI.swift:57— Starcat/Core/Network/GitHubAPI/GitHubStarListsAPI.swift:57-90 | Starcat/Core/Network/GitHubAPI/GitHubStarListsAPI.swift:92-131 — 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 copies of one member (3 members, 14+ corresponding lines) · ×3
Edited copies of one member (3 members, 14+ corresponding lines) Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:728— Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:728-744 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:1091-1104 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:1107-1122 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 14+ corresponding lines) Starcat/Core/Health/RepoHealthStore.swift:75— Starcat/Core/Health/RepoHealthStore.swift:75-88 | Starcat/Core/Health/RepoHealthStore.swift:90-103 | Starcat/Core/Sync/OpenSSFScoreStore.swift:78-91 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 14+ corresponding lines) Starcat/Features/Activity/ActivityViewModel.swift:1234— Starcat/Features/Activity/ActivityViewModel.swift:1234-1249 | Starcat/Features/Activity/ActivityViewModel.swift:1463-1476 | Starcat/Features/Activity/ActivityViewModel.swift:1478-1491 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 17+ corresponding lines) · ×3
Edited copies of one member (3 members, 17+ corresponding lines) Starcat/Features/AI/RepoAIWindowContentView.swift:2213— Starcat/Features/AI/RepoAIWindowContentView.swift:2213-2233 | Starcat/Features/AI/RepoAIWindowContentView.swift:2238-2260 | Starcat/Features/Insights/RepositoryInsightsView.swift:909-925 — 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.
Edited copies of one member (3 members, 17+ corresponding lines) Starcat/Features/Home/ProjectAccessSheet.swift:175— Starcat/Features/Home/ProjectAccessSheet.swift:175-196 | Starcat/Features/Home/RepoHealthSheet.swift:755-771 | Starcat/Features/Settings/ScreensaverSetupHelpView.swift:48-69 — 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.
Edited copies of one member (3 members, 17+ corresponding lines) StarcatWidgets/CollectionTrend/StarcatCollectionTrendWidget.swift:59— StarcatWidgets/CollectionTrend/StarcatCollectionTrendWidget.swift:59-75 | StarcatWidgets/Focus/StarcatFocusWidget.swift:50-66 | StarcatWidgets/Rediscovery/StarcatRediscoveryWidget.swift:39-56 — 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 (4 members, 14+ corresponding lines) · ×3
Edited copies of one member (4 members, 14+ corresponding lines) Starcat/Features/Search/SearchCenterView.swift:1234— Starcat/Features/Search/SearchCenterView.swift:1234-1249 | Starcat/Features/Search/SearchCenterView.swift:1297-1314 | Starcat/Shared/Components/RepoRowComponents.swift:260-277 | Starcat/Shared/Components/RepoRowComponents.swift:292-305 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 14+ corresponding lines) Starcat/Features/Home/RepoListView.swift:2678— Starcat/Features/Home/RepoListView.swift:2678-2697 | Starcat/Features/Home/RepoListView.swift:2699-2714 | Starcat/Features/Home/RepoListView.swift:2716-2731 | Starcat/Features/RAG/UI/RAGContextPickerFilterControls.swift:182-195 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 14+ corresponding lines) Starcat/Features/Agents/WeeklyReport/RepoAlternativesArtifactBuilder.swift:99— Starcat/Features/Agents/WeeklyReport/RepoAlternativesArtifactBuilder.swift:99-113 | Starcat/Features/Agents/WeeklyReport/RepoInsightArtifactBuilder.swift:53-67 | Starcat/Features/Agents/WeeklyReport/WeeklyReportArtifactBuilder.swift:67-81 | Starcat/Features/Agents/WeeklyReport/WeeklyReportArtifactBuilder.swift:83-96 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 9+ corresponding lines) · ×3
Edited copies of one member (4 members, 9+ corresponding lines) Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2231— Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2231-2239 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2475-2486 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2652-2660 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2757-2765 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 9+ corresponding lines) Starcat/Features/AI/BatchAITagFlowLayout.swift:25— Starcat/Features/AI/BatchAITagFlowLayout.swift:25-38 | Starcat/Features/Home/GitHubStarListAIGroupingResultList.swift:765-773 | Starcat/Features/RAG/UI/RAGCitationChips.swift:167-175 | Starcat/Features/Settings/SettingsView.swift:1548-1556 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 9+ corresponding lines) Starcat/Core/RAG/RAGChunkRepository.swift:392— Starcat/Core/RAG/RAGChunkRepository.swift:392-402 | Starcat/Core/Sync/GitHubStarListRepository.swift:288-300 | Starcat/Core/Sync/ReleaseRepository.swift:129-137 | Starcat/Core/Sync/RepoRepository.swift:333-342 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 8+ corresponding lines) · ×3
Edited copies of one member (4 members, 8+ corresponding lines) Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:579— Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:579-586 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:591-598 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:1570-1579 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:1617-1626 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 8+ corresponding lines) Starcat/Core/Sync/RepoRepository.swift:1519— Starcat/Core/Sync/RepoRepository.swift:1519-1527 | Starcat/Features/Activity/ActivityViewModel.swift:2034-2042 | Starcat/Features/RAG/Core/KnowledgeBaseMetadataSnapshot.swift:878-886 | Starcat/Shared/Models/RepoDetailViewData.swift:175-182 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 8+ corresponding lines) Starcat/Features/Activity/WeeklyContentView.swift:408— Starcat/Features/Activity/WeeklyContentView.swift:408-420 | Starcat/Features/Home/GitHubStarListEditorSheet.swift:319-328 | Starcat/Features/Tags/TagEditorView.swift:218-227 | Starcat/Shared/Components/LicenseKnowledgeCapsule.swift:402-409 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 10+ corresponding lines) · ×3
Edited copies of one member (3 members, 10+ corresponding lines) Starcat/Features/Agents/WeeklyReport/RepoAlternativesArtifactBuilder.swift:88— Starcat/Features/Agents/WeeklyReport/RepoAlternativesArtifactBuilder.swift:88-97 | Starcat/Features/Agents/WeeklyReport/RepoInsightArtifactBuilder.swift:42-51 | Starcat/Features/Agents/WeeklyReport/WeeklyReportArtifactBuilder.swift:56-65 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 10+ corresponding lines) Starcat/Core/Spotlight/RepositorySpotlightService.swift:204— Starcat/Core/Spotlight/RepositorySpotlightService.swift:204-213 | Starcat/Core/Spotlight/RepositorySpotlightService.swift:215-224 | Starcat/Features/Home/RepoListView.swift:2215-2225 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 10+ corresponding lines) Starcat/Core/Sync/RepoNoteRepository.swift:134— Starcat/Core/Sync/RepoNoteRepository.swift:134-143 | Starcat/Core/Sync/RepoRepository.swift:366-376 | Starcat/Core/Sync/RepoTagRepository.swift:133-142 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 5+ corresponding lines) · ×3
Edited copies of one member (3 members, 5+ corresponding lines) Starcat/Core/RAG/KnowledgeRAGIndexBuilder.swift:1434— Starcat/Core/RAG/KnowledgeRAGIndexBuilder.swift:1434-1438 | Starcat/Features/Agents/Core/AgentMessageTimelineView.swift:539-543 | Starcat/Features/Agents/ExternalRuntime/ExternalAgentRuntime.swift:938-942 — 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.
Edited copies of one member (3 members, 5+ corresponding lines) Starcat/Core/Sync/GitHubNotificationThreadRepository.swift:49— Starcat/Core/Sync/GitHubNotificationThreadRepository.swift:49-56 | Starcat/Core/Sync/RepoRepository.swift:302-306 | Starcat/Core/Sync/UserRepoActivityRepository.swift:335-339 — 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.
Edited copies of one member (3 members, 5+ corresponding lines) Starcat/Core/DataContribution/RecommendationSnapshot.swift:137— Starcat/Core/DataContribution/RecommendationSnapshot.swift:137-141 | Starcat/Core/Database/Models/UserRepoActivityRecord.swift:74-78 | Starcat/Shared/Services/RepoContextPacker/Internal/XmlOutputBuilder.swift:335-339 — 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 (4 members, 4+ corresponding lines) · ×3
Edited copies of one member (4 members, 4+ corresponding lines) Starcat/Features/AI/RepoAIInsightViewModel.swift:555— Starcat/Features/AI/RepoAIInsightViewModel.swift:555-558 | Starcat/Features/Home/ReadmeTranslationViewModel.swift:671-677 | Starcat/Features/Releases/RepoReleaseSection.swift:348-351 | Starcat/Features/Tags/TagManagementViewModel.swift:204-207 — 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) Starcat/Features/Profile/ShareCard/StarredMarkdownRenderer.swift:359— Starcat/Features/Profile/ShareCard/StarredMarkdownRenderer.swift:359-363 | Starcat/Features/RAG/UI/RAGRepoContextXMLPopover.swift:175-178 | Starcat/Features/RAG/UI/RAGRepositoryInsightsXMLPopover.swift:102-105 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2025-2028 — 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) Starcat/Core/Network/GitHubAPI/RepositorySearchAPI.swift:46— Starcat/Core/Network/GitHubAPI/RepositorySearchAPI.swift:46-49 | Starcat/Features/Agents/WeeklyReport/GitHubWeeklyReportTools.swift:173-176 | Starcat/Features/Agents/WeeklyReport/WeeklyReportArtifactBuilder.swift:228-231 | Starcat/Features/Home/GitHubStarListAIGroupingPresentation.swift:170-173 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Duplicated block (19 lines × 2) Starcat/Features/AI/BatchAIWorkspaceView.swift:455— Starcat/Features/AI/BatchAIWorkspaceView.swift:455-473 | Starcat/Features/AI/BatchAIWorkspaceView.swift:477-495 — 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 (19 lines × 2) Starcat/Features/Activity/ActivityDetailView.swift:567— Starcat/Features/Activity/ActivityDetailView.swift:567-585 | Starcat/Features/Activity/GitHubNotificationDetailView.swift:1640-1658 — 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 (19 lines × 2) Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:959— Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:959-977 | Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:1139-1157 — 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 `Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:959` 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–17 lines × 2) Starcat/Core/Network/GitHubAPI/GitHubRepositoryMetricsClient.swift:878— Starcat/Core/Network/GitHubAPI/GitHubRepositoryMetricsClient.swift:878-894 | Starcat/Core/Network/GitHubAPI/GitHubRepositoryMetricsClient.swift:918-933 — 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 `Starcat/Core/Network/GitHubAPI/GitHubRepositoryMetricsClient.swift:878` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16–17 lines × 2) Starcat/Features/Agents/Core/AgentRepositoryCatalog.swift:249— Starcat/Features/Agents/Core/AgentRepositoryCatalog.swift:249-265 | Starcat/Features/Agents/Core/AgentRepositoryCatalog.swift:293-308 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Agents/Core/AgentRepositoryCatalog.swift:249` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16–17 lines × 2) Starcat/Features/Home/LocalAIStatusSection.swift:223— Starcat/Features/Home/LocalAIStatusSection.swift:223-239 | Starcat/Features/Home/LocalAIStatusSection.swift:321-336 — 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 `Starcat/Features/Home/LocalAIStatusSection.swift:223` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 3) Starcat/Features/CodeGraph/CodeFlowStorage.swift:578— Starcat/Features/CodeGraph/CodeFlowStorage.swift:578-593 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:540-555 | Starcat/Shared/Services/RepoContextStorage.swift:816-831 — before extracting anything, compare `Starcat/Features/CodeGraph/CodeFlowStorage.swift` and `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/CodeGraph/CodeFlowStorage.swift:578` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 3) Starcat/Features/Insights/InsightsSectionSkeleton.swift:106— Starcat/Features/Insights/InsightsSectionSkeleton.swift:106-121 | Starcat/Features/Insights/InsightsSectionSkeleton.swift:217-232 | Starcat/Features/Insights/InsightsSectionSkeleton.swift:263-278 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (16 lines × 3) Starcat/Features/Insights/RepositoryInsightsView.swift:1457— Starcat/Features/Insights/RepositoryInsightsView.swift:1457-1472 | Starcat/Features/Insights/RepositoryInsightsView.swift:1816-1831 | Starcat/Features/Insights/RepositoryInsightsView.swift:2557-2572 — 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 `Starcat/Features/Insights/RepositoryInsightsView.swift:1457` 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, `Starcat/Features/Insights/RepositoryInsightsView.swift:1814` calls `minimumScaleFactor` and `Starcat/Features/Insights/RepositoryInsightsView.swift:1455` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 3) Starcat/Features/Activity/GitHubNotificationDetailView.swift:1860— Starcat/Features/Activity/GitHubNotificationDetailView.swift:1860-1873 | Starcat/Features/Home/RepoDetailView.swift:1320-1333 | Starcat/Features/Settings/TranslationSettingsView.swift:438-451 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (14 lines × 3) Starcat/Features/Insights/RepositoryInsightsView.swift:1442— Starcat/Features/Insights/RepositoryInsightsView.swift:1442-1455 | Starcat/Features/Insights/RepositoryInsightsView.swift:1800-1813 | Starcat/Features/Insights/RepositoryInsightsView.swift:2541-2554 — 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 `Starcat/Features/Insights/RepositoryInsightsView.swift:1442` 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, `Starcat/Features/Insights/RepositoryInsightsView.swift:1814` calls `minimumScaleFactor` and `Starcat/Features/Insights/RepositoryInsightsView.swift:1456` 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 × 3) Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:997— Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:997-1010 | Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:1026-1039 | Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:1051-1064 — 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 `Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:997` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 4) Starcat/Features/Home/GitHubStarListSidebarRow.swift:111— Starcat/Features/Home/GitHubStarListSidebarRow.swift:111-120 | Starcat/Features/Home/SidebarView.swift:1783-1792 | Starcat/Features/Home/SidebarView.swift:1800-1809 | Starcat/Features/Home/SidebarView.swift:1857-1866 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Home/GitHubStarListSidebarRow.swift:111` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (10 lines × 4) Starcat/Features/RAG/Core/GitHubRAGRemoteContextProvider.swift:492— Starcat/Features/RAG/Core/GitHubRAGRemoteContextProvider.swift:492-501 | Starcat/Features/RAG/UI/RAGExecutionTimeline.swift:506-515 | Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:1369-1378 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:4293-4302 — 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 (10 lines × 4) Starcat/Shared/Components/CommonActionIconButtons.swift:54— Starcat/Shared/Components/CommonActionIconButtons.swift:54-63 | Starcat/Shared/Components/CommonActionIconButtons.swift:169-178 | Starcat/Shared/Components/CommonActionIconButtons.swift:209-218 | Starcat/Shared/Components/CommonActionIconButtons.swift:246-255 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Shared/Components/CommonActionIconButtons.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 after the matched lines, `Starcat/Shared/Components/CommonActionIconButtons.swift:179` calls `pressableHover` and `Starcat/Shared/Components/CommonActionIconButtons.swift:64` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7–10 lines × 2) Starcat/Features/AI/AIChatInputView.swift:362— Starcat/Features/AI/AIChatInputView.swift:362-368 | Starcat/Features/RAG/UI/RAGStreamingPlainTextView.swift:293-302 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Starcat/Features/RAG/UI/RAGStreamingPlainTextView.swift:292` calls `applyReasoningAppearance` and `Starcat/Features/AI/AIChatInputView.swift:361` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7–10 lines × 2) Starcat/Features/Profile/ShareCard/ShareCardSheet.swift:361— Starcat/Features/Profile/ShareCard/ShareCardSheet.swift:361-370 | Starcat/Features/Profile/ShareCard/ShareCardSheet.swift:545-551 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Profile/ShareCard/ShareCardSheet.swift:361` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7–10 lines × 2) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:2844— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:2844-2850 | Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:2918-2927 — 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 `Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:2844` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–10 lines × 2) Starcat/Features/MCP/MCPSettingsView.swift:412— Starcat/Features/MCP/MCPSettingsView.swift:412-421 | Starcat/Features/Settings/SettingsView.swift:792-800 — 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 `Starcat/Features/MCP/MCPSettingsView.swift:412` 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–10 lines × 2) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:3227— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:3227-3236 | Starcat/Features/RAG/UI/RepositoryInsightsXMLViewer.swift:73-81 — 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 `Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:3227` 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–10 lines × 2) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2203— Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2203-2212 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2248-2256 — 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 `Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2203` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `alignment` to `.leading` in one and `.firstTextBaseline` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (8–9 lines × 2) Starcat/Features/Agents/ExternalRuntime/CodexAppServerAdapter.swift:418— Starcat/Features/Agents/ExternalRuntime/CodexAppServerAdapter.swift:418-425 | Starcat/Features/Agents/ExternalRuntime/CodexAppServerAdapter.swift:435-443 — 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 `Starcat/Features/Agents/ExternalRuntime/CodexAppServerAdapter.swift:418` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8–9 lines × 2) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2932— Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2932-2940 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3033-3040 — 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 `Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2932` 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–9 lines × 2) supports/scripts/starcat-localization.py:699— supports/scripts/starcat-localization.py:699-706 | supports/scripts/starcat-localization.py:717-725 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 4) Starcat/Core/Settings/AppSettings.swift:180— Starcat/Core/Settings/AppSettings.swift:180-184 | Starcat/Features/Activity/WeeklyContentView.swift:491-495 | Starcat/Features/Trending/TrendingViewModel.swift:107-116 | Starcat/Shared/Components/Toolbar/UnifiedSortMenu.swift:227-234 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Core/Settings/AppSettings.swift:180` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 4) Starcat/Features/Auth/GithubDeviceFlowService.swift:64— Starcat/Features/Auth/GithubDeviceFlowService.swift:64-68 | Starcat/Features/Auth/GithubDeviceFlowService.swift:192-196 | Starcat/Features/Auth/GithubWebFlowService.swift:152-156 | Starcat/Features/Auth/ProjectAccessOAuthService.swift:271-276 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Auth/ProjectAccessOAuthService.swift:271` 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 × 4) Starcat/Core/Sync/GitHubStarListRepository.swift:118— Starcat/Core/Sync/GitHubStarListRepository.swift:118-122 | Starcat/Core/Sync/GitHubStarListRepository.swift:369-373 | Starcat/Core/Sync/TagRepository.swift:46-50 | Starcat/Core/Sync/TrendingReadmeRepository.swift:108-112 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Low contrast colour pair in CSS (2.2:1) Starcat/Resources/CodeFlow/codeflow.html:59— `.top-btn:hover` sets color: #00a86b on background-color: #dadce0 — 2.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (2.2:1) Starcat/Resources/CodeFlow/codeflow.html:460— `.private-key-btn:hover` sets color: #00a86b on background-color: #dadce0 — 2.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (2.3:1) Starcat/Resources/CodeFlow/codeflow.html:96— `.tree-count` sets color: #9c9c9c on background-color: #e8eaed — 2.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (2.3:1) Starcat/Resources/CodeFlow/codeflow.html:234— `.toast.success` sets color: white on background-color: #22c55e — 2.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (2.4:1) Starcat/Resources/CodeFlow/codeflow.html:252— `.fn-caller:hover` sets color: #00a86b on background-color: #e2e4e8 — 2.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (2.4:1) Starcat/Resources/CodeFlow/codeflow.html:284— `.unused-fn-file` sets color: #4d9fff on background-color: #f1f3f4 — 2.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Near-duplicate member pair (48 shared lines) Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:871— Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:871-1006 | Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:1067-1188 — These two members are variants of one another: 48 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (48 shared lines) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2922— Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2922-3017 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3021-3127 — These two members are variants of one another: 48 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Edited copy of a member (52 corresponding lines) · ×2
Edited copy of a member (52 corresponding lines) Starcat/Features/AI/GitHubStarListAIGroupingSession.swift:1777— Starcat/Features/AI/GitHubStarListAIGroupingSession.swift:1777-1849 | Starcat/Features/AI/GitHubStarListAIGroupingSession.swift:1852-1903 — These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (52 corresponding lines) Starcat/Features/Agents/Core/LoopAgentRuntime.swift:215— Starcat/Features/Agents/Core/LoopAgentRuntime.swift:215-266 | Starcat/Features/Agents/Core/LoopAgentRuntime.swift:318-369 — These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (41 corresponding lines) · ×2
Edited copy of a member (41 corresponding lines) Starcat/Features/Activity/GitHubNotificationInboxView.swift:492— Starcat/Features/Activity/GitHubNotificationInboxView.swift:492-546 | Starcat/Features/RepoIssues/RepoIssuesWorkspaceViewModel.swift:199-239 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (41 corresponding lines) Starcat/Features/AI/ExternalSearchContextProvider.swift:134— Starcat/Features/AI/ExternalSearchContextProvider.swift:134-179 | Starcat/Features/AI/ExternalSearchContextProvider.swift:181-221 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (40 corresponding lines) · ×2
Edited copy of a member (40 corresponding lines) Starcat/Core/Database/Models/DiscoveryCacheRecords.swift:151— Starcat/Core/Database/Models/DiscoveryCacheRecords.swift:151-194 | Starcat/Core/Database/Models/DiscoveryCacheRecords.swift:387-426 — 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.
Edited copy of a member (40 corresponding lines) Starcat/Features/AI/BatchAITagReviewRow.swift:126— Starcat/Features/AI/BatchAITagReviewRow.swift:126-171 | Starcat/Features/Home/GitHubStarListAIGroupingResultList.swift:270-309 — 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 (38 corresponding lines) · ×2
Edited copy of a member (38 corresponding lines) Starcat/Shared/Components/Toolbar/ExternalLinksMenu.swift:118— Starcat/Shared/Components/Toolbar/ExternalLinksMenu.swift:118-155 | Starcat/Shared/Components/Toolbar/ExternalLinksMenu.swift:184-245 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (38 corresponding lines) Starcat/Features/Home/BatchActionBar.swift:462— Starcat/Features/Home/BatchActionBar.swift:462-505 | Starcat/Features/Home/BatchActionBar.swift:508-545 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (45 corresponding lines) · ×2
Edited copy of a member (45 corresponding lines) Starcat/Features/CodeGraph/CodeFlowPanel.swift:25— Starcat/Features/CodeGraph/CodeFlowPanel.swift:25-69 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryPanel.swift:34-81 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (45 corresponding lines) Starcat/Features/Home/SidebarView.swift:2458— Starcat/Features/Home/SidebarView.swift:2458-2538 | Starcat/Features/Home/SidebarView.swift:2706-2750 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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, 33+ corresponding lines) · ×2
Edited copies of one member (3 members, 33+ corresponding lines) Starcat/Features/CodeGraph/CodeFlowStorage.swift:630— Starcat/Features/CodeGraph/CodeFlowStorage.swift:630-662 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:439-475 | Starcat/Shared/Services/RepoContextStorage.swift:869-905 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 33 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 33+ corresponding lines) Starcat/Shared/Models/RepoCardViewData.swift:342— Starcat/Shared/Models/RepoCardViewData.swift:342-374 | Starcat/Shared/Models/RepoCardViewData.swift:392-425 | Starcat/Shared/Models/RepoCardViewData.swift:438-475 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 33 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (33 corresponding lines) · ×2
Edited copy of a member (33 corresponding lines) Starcat/Core/Sync/AwesomeRepository.swift:773— Starcat/Core/Sync/AwesomeRepository.swift:773-810 | Starcat/Core/Sync/AwesomeRepository.swift:812-844 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (33 corresponding lines) Starcat/Features/Insights/RepositoryInsightsView.swift:689— Starcat/Features/Insights/RepositoryInsightsView.swift:689-721 | Starcat/Features/Insights/RepositoryInsightsView.swift:1662-1697 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 25+ corresponding lines) · ×2
Edited copies of one member (3 members, 25+ corresponding lines) Starcat/Features/Collections/SmartCollectionMultiSelectField.swift:58— Starcat/Features/Collections/SmartCollectionMultiSelectField.swift:58-82 | Starcat/Features/Search/SearchCenterView.swift:2032-2056 | Starcat/Features/Search/SearchCenterView.swift:2169-2195 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 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, 25+ corresponding lines) Starcat/Features/Activity/ActivityDetailScaffoldShell.swift:115— Starcat/Features/Activity/ActivityDetailScaffoldShell.swift:115-139 | Starcat/Features/Explore/DiscoveryDetailView.swift:72-96 | Starcat/Features/Trending/TrendingScaffoldShell.swift:83-117 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 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, 26+ corresponding lines) · ×2
Edited copies of one member (3 members, 26+ corresponding lines) Starcat/Features/RAG/Core/GitHubRAGRemoteContextProvider.swift:279— Starcat/Features/RAG/Core/GitHubRAGRemoteContextProvider.swift:279-308 | Starcat/Features/RAG/Core/GitHubRAGRemoteContextProvider.swift:310-335 | Starcat/Features/RAG/Core/GitHubRAGRemoteContextProvider.swift:366-391 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 26 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, 26+ corresponding lines) Starcat/Features/AI/RepoAIInsightService.swift:1316— Starcat/Features/AI/RepoAIInsightService.swift:1316-1341 | Starcat/Features/AI/RepoAIInsightService.swift:1388-1414 | Starcat/Features/AI/RepoAIInsightService.swift:1418-1444 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 26 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 (32 corresponding lines) · ×2
Edited copy of a member (32 corresponding lines) Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:1244— Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:1244-1275 | Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:1345-1382 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (32 corresponding lines) Starcat/Core/Sync/UserProjectRepository.swift:79— Starcat/Core/Sync/UserProjectRepository.swift:79-110 | Starcat/Core/Sync/UserProjectRepository.swift:221-254 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 29+ corresponding lines) · ×2
Edited copies of one member (3 members, 29+ corresponding lines) Starcat/Features/Activity/WeeklyDetailContent.swift:68— Starcat/Features/Activity/WeeklyDetailContent.swift:68-109 | Starcat/Features/Explore/DiscoveryDetailView.swift:170-198 | Starcat/Features/Trending/TrendingDetailContent.swift:56-96 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 29 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, 29+ corresponding lines) Starcat/Features/CodeGraph/CodeFlowStorage.swift:426— Starcat/Features/CodeGraph/CodeFlowStorage.swift:426-460 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:653-681 | Starcat/Shared/Services/RepoContextStorage.swift:657-686 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 29 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, 23+ corresponding lines) · ×2
Edited copies of one member (3 members, 23+ corresponding lines) Starcat/Features/CodeGraph/CodeFlowStorage.swift:387— Starcat/Features/CodeGraph/CodeFlowStorage.swift:387-409 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:615-637 | Starcat/Shared/Services/RepoContextStorage.swift:606-633 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 23 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, 23+ corresponding lines) Starcat/Features/CodeGraph/CodeFlowStorage.swift:213— Starcat/Features/CodeGraph/CodeFlowStorage.swift:213-235 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:268-294 | Starcat/Shared/Services/RepoContextStorage.swift:223-246 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 23 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 (28 corresponding lines) · ×2
Edited copy of a member (28 corresponding lines) Starcat/Features/Insights/MyInsightsSnapshotProvider.swift:127— Starcat/Features/Insights/MyInsightsSnapshotProvider.swift:127-159 | Starcat/Features/RAG/Core/KnowledgeBaseMetadataSnapshot.swift:350-377 — 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) Starcat/Features/Agents/UntaggedTidy/UntaggedTidyAgentTools.swift:260— Starcat/Features/Agents/UntaggedTidy/UntaggedTidyAgentTools.swift:260-291 | Starcat/Features/Agents/WeeklyReport/GitHubWeeklyReportTools.swift:761-788 — 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, 21+ corresponding lines) · ×2
Edited copies of one member (3 members, 21+ corresponding lines) Starcat/App/StarcatCommandRouter.swift:257— Starcat/App/StarcatCommandRouter.swift:257-277 | Starcat/App/StarcatCommandRouter.swift:290-314 | Starcat/App/StarcatCommandRouter.swift:326-347 — 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.
Edited copies of one member (3 members, 21+ corresponding lines) Starcat/Features/Onboarding/FirstRunWelcomeSheet.swift:374— Starcat/Features/Onboarding/FirstRunWelcomeSheet.swift:374-400 | Starcat/Features/Profile/ShareCard/ShareCardSheet.swift:192-212 | Starcat/Shared/Components/LaunchSplashView.swift:468-494 — 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, 13+ corresponding lines) · ×2
Edited copies of one member (3 members, 13+ corresponding lines) Starcat/Features/CodeGraph/CodeFlowStorage.swift:411— Starcat/Features/CodeGraph/CodeFlowStorage.swift:411-423 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:639-651 | Starcat/Shared/Services/RepoContextStorage.swift:636-648 — 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) Starcat/Features/Home/SidebarView.swift:2328— Starcat/Features/Home/SidebarView.swift:2328-2340 | Starcat/Features/Home/SidebarView.swift:2409-2425 | Starcat/Features/Home/SidebarView.swift:2427-2442 — 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, 19+ corresponding lines) · ×2
Edited copies of one member (4 members, 19+ corresponding lines) Starcat/Features/Home/SidebarView.swift:1510— Starcat/Features/Home/SidebarView.swift:1510-1529 | Starcat/Features/Home/SidebarView.swift:1532-1551 | Starcat/Features/Home/SidebarView.swift:1554-1572 | Starcat/Features/Home/SidebarView.swift:1575-1594 — 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.
Edited copies of one member (4 members, 19+ corresponding lines) Starcat/Core/Health/RepoHealthRepository.swift:107— Starcat/Core/Health/RepoHealthRepository.swift:107-127 | Starcat/Core/RAG/RAGChunkRepository.swift:404-422 | Starcat/Core/Sync/ReadmePrefetchRepository.swift:97-125 | Starcat/Features/RAG/Storage/RAGConversationStore.swift:528-546 — 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 (6 members, 13+ corresponding lines) · ×2
Edited copies of one member (6 members, 13+ corresponding lines) Starcat/Features/Settings/CodexRuntimeSettingsCard.swift:118— Starcat/Features/Settings/CodexRuntimeSettingsCard.swift:118-130 | Starcat/Features/Settings/DeepSeekRuntimeSettingsCard.swift:140-152 | Starcat/Features/Settings/DeepSeekRuntimeSettingsCard.swift:154-166 | Starcat/Features/Settings/IntegrationSettingsView.swift:594-608 | Starcat/Features/Settings/IntegrationSettingsView.swift:628-642 | Starcat/Features/Settings/RepoContextSettingsSection.swift:121-135 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
Edited copies of one member (6 members, 13+ corresponding lines) Starcat/Features/Insights/RepositoryInsightsView.swift:977— Starcat/Features/Insights/RepositoryInsightsView.swift:977-989 | Starcat/Features/Insights/RepositoryInsightsView.swift:2103-2115 | Starcat/Features/Insights/RepositoryInsightsView.swift:2342-2354 | Starcat/Features/Insights/RepositoryInsightsView.swift:2766-2778 | Starcat/Features/Insights/RepositoryInsightsView.swift:3273-3285 | Starcat/Features/Insights/RepositoryInsightsViewModel.swift:36-48 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 8+ corresponding lines) · ×2
Edited copies of one member (3 members, 8+ corresponding lines) Starcat/Features/CodeGraph/CodeFlowStorage.swift:493— Starcat/Features/CodeGraph/CodeFlowStorage.swift:493-502 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:708-715 | Starcat/Shared/Services/RepoContextStorage.swift:750-757 — 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.
Edited copies of one member (3 members, 8+ corresponding lines) Starcat/Features/Insights/RepositoryInsightsContextStorage.swift:354— Starcat/Features/Insights/RepositoryInsightsContextStorage.swift:354-362 | Starcat/Shared/Services/DiskChatHistoryStore.swift:635-642 | Starcat/Shared/Services/DiskReadmeTranslationCache.swift:218-226 — 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 (5 members, 10+ corresponding lines) · ×2
Edited copies of one member (5 members, 10+ corresponding lines) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:1030— Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:1030-1043 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2038-2050 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3557-3566 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3571-3582 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3585-3594 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
Edited copies of one member (5 members, 10+ corresponding lines) Starcat/Core/Sync/ReleaseSubscriptionRepository.swift:65— Starcat/Core/Sync/ReleaseSubscriptionRepository.swift:65-85 | Starcat/Core/Sync/ReleaseSubscriptionRepository.swift:87-100 | Starcat/Core/Sync/ReleaseSubscriptionRepository.swift:102-115 | Starcat/Core/Sync/RepoNoteRepository.swift:352-369 | Starcat/Core/Sync/RepoTagRepository.swift:36-45 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 7+ corresponding lines) · ×2
Edited copies of one member (3 members, 7+ corresponding lines) Starcat/Core/Database/Models/Readme.swift:70— Starcat/Core/Database/Models/Readme.swift:70-78 | Starcat/Core/Database/Models/ReadmeContent.swift:55-61 | Starcat/Core/Database/Models/TrendingReadme.swift:77-85 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 7+ corresponding lines) Starcat/Core/Sync/RepoListQuery.swift:82— Starcat/Core/Sync/RepoListQuery.swift:82-88 | Starcat/Features/Home/RepoListView.swift:2625-2631 | Starcat/Features/RAG/UI/RAGContextPickerFilterControls.swift:375-381 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 4+ corresponding lines) · ×2
Edited copies of one member (5 members, 4+ corresponding lines) Starcat/Core/Database/Models/Repo.swift:155— Starcat/Core/Database/Models/Repo.swift:155-158 | Starcat/Core/Spotlight/RepositorySpotlightSnapshot.swift:36-39 | Starcat/Core/Sync/GitHubNotificationMapper.swift:718-721 | Starcat/Core/Sync/GitHubNotificationMapper.swift:772-775 | Starcat/Features/Agents/Core/AgentRepositoryCatalog.swift:357-360 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
Edited copies of one member (5 members, 4+ corresponding lines) Starcat/Core/Cache/CacheCleaner.swift:195— Starcat/Core/Cache/CacheCleaner.swift:195-204 | Starcat/Features/CodeGraph/CodeFlowStorage.swift:664-667 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:477-485 | Starcat/Shared/Services/RepoContextStorage.swift:907-915 | Starcat/Shared/Services/SharedSnapshotService.swift:201-204 — These 5 members are one piece of code written 5 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 5 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) Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:40— Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:40-42 | Starcat/Features/RAG/UI/RAGWorkspaceConversationRail.swift:165-167 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:104-106 | Starcat/Features/RAG/UI/RAGWorkspaceTypography.swift:36-43 — 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) Starcat/Core/Models/RepoExternalLinks.swift:102— Starcat/Core/Models/RepoExternalLinks.swift:102-104 | Starcat/Core/RAG/RAGChunkRepository.swift:1014-1016 | Starcat/Features/RepoIssues/RepoIssuesSharedStore.swift:114-116 | Starcat/Shared/Components/Toolbar/ToolbarRepoSelection.swift:151-153 — 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 (29–32 lines × 2) Starcat/Features/Home/ReadmeViewModel.swift:299— Starcat/Features/Home/ReadmeViewModel.swift:299-330 | Starcat/Features/Home/ReadmeViewModel.swift:480-508 — 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 `Starcat/Features/Home/ReadmeViewModel.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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: the declarations holding them bind `forceRefresh` to `Bool = false` in one and `Bool` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (29–32 lines × 2) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2950— Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2950-2981 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3050-3078 — 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 `Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2950` 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 (27 lines × 2) Starcat/Features/Activity/GitHubNotificationIssueSummaryMarkdownView.swift:87— Starcat/Features/Activity/GitHubNotificationIssueSummaryMarkdownView.swift:87-113 | Starcat/Features/RepoIssues/RepoIssueCreatePane.swift:274-300 — 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 `Starcat/Features/Activity/GitHubNotificationIssueSummaryMarkdownView.swift:87` 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 (27 lines × 2) Starcat/Features/Agents/WeeklyReport/GitHubWeeklyReportTools.swift:145— Starcat/Features/Agents/WeeklyReport/GitHubWeeklyReportTools.swift:145-171 | Starcat/Features/Agents/WeeklyReport/GitHubWeeklyReportTools.swift:604-630 — 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 `Starcat/Features/Agents/WeeklyReport/GitHubWeeklyReportTools.swift:145` 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 (22–24 lines × 2) Starcat/Features/AI/ReadmeTranslationService.swift:491— Starcat/Features/AI/ReadmeTranslationService.swift:491-514 | Starcat/Features/AI/ReadmeTranslationService.swift:671-692 — 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 `Starcat/Features/AI/ReadmeTranslationService.swift:491` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (22–24 lines × 2) Starcat/Features/Profile/ShareCard/ShareCardContent.swift:2343— Starcat/Features/Profile/ShareCard/ShareCardContent.swift:2343-2366 | Starcat/Features/Profile/ShareCard/ShareCardContent.swift:2370-2391 — 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 (24 lines × 2) Starcat/Features/Insights/InsightsCardIllustration.swift:128— Starcat/Features/Insights/InsightsCardIllustration.swift:128-151 | Starcat/Features/Insights/InsightsCardIllustration.swift:291-314 — 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 `Starcat/Features/Insights/InsightsCardIllustration.swift:128` 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 (24 lines × 2) Starcat/Features/Insights/RepositoryInsightsView.swift:1798— Starcat/Features/Insights/RepositoryInsightsView.swift:1798-1821 | Starcat/Features/Insights/RepositoryInsightsView.swift:2539-2562 — 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 `Starcat/Features/Insights/RepositoryInsightsView.swift:1798` 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 (23 lines × 2) Starcat/Features/Home/SidebarView.swift:650— Starcat/Features/Home/SidebarView.swift:650-672 | Starcat/Features/Home/SidebarView.swift:707-729 — 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 `Starcat/Features/Home/SidebarView.swift:650` 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 (23 lines × 2) Starcat/Features/Insights/RepositoryInsightsViewModel.swift:214— Starcat/Features/Insights/RepositoryInsightsViewModel.swift:214-236 | Starcat/Features/Insights/RepositoryInsightsViewModel.swift:393-415 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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 (20 lines × 2) Starcat/Core/Network/GitHubAPI/ReadmeAPI.swift:433— Starcat/Core/Network/GitHubAPI/ReadmeAPI.swift:433-452 | Starcat/Core/Network/GitHubAPI/ReadmeAPI.swift:605-624 — 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 `Starcat/Core/Network/GitHubAPI/ReadmeAPI.swift:433` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (20 lines × 2) Starcat/Core/Scheduling/OpenSSFScorePoller.swift:85— Starcat/Core/Scheduling/OpenSSFScorePoller.swift:85-104 | Starcat/Core/Scheduling/RepoHealthPoller.swift:95-114 — before extracting anything, compare `Starcat/Core/Scheduling/OpenSSFScorePoller.swift` and `Starcat/Core/Scheduling/RepoHealthPoller.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 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 (18–19 lines × 2) Starcat/Features/Home/ManageDetailContent.swift:160— Starcat/Features/Home/ManageDetailContent.swift:160-177 | Starcat/Features/Home/RepoDetailView.swift:866-884 — 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 `Starcat/Features/Home/ManageDetailContent.swift:160` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18–19 lines × 2) Starcat/Features/Home/RepoListView.swift:2807— Starcat/Features/Home/RepoListView.swift:2807-2825 | Starcat/Features/RAG/UI/RAGContextPickerFilterControls.swift:271-288 — 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 `Starcat/Features/Home/RepoListView.swift:2807` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15–16 lines × 2) Starcat/Core/Download/ReleaseAssetDownloader.swift:145— Starcat/Core/Download/ReleaseAssetDownloader.swift:145-160 | Starcat/Core/Download/RepoFileDownloader.swift:170-184 — before extracting anything, compare `Starcat/Core/Download/ReleaseAssetDownloader.swift` and `Starcat/Core/Download/RepoFileDownloader.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Core/Download/ReleaseAssetDownloader.swift:145` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (15–16 lines × 2) Starcat/Core/Download/ReleaseAssetDownloader.swift:209— Starcat/Core/Download/ReleaseAssetDownloader.swift:209-224 | Starcat/Core/Download/RepoFileDownloader.swift:283-297 — before extracting anything, compare `Starcat/Core/Download/ReleaseAssetDownloader.swift` and `Starcat/Core/Download/RepoFileDownloader.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Core/Download/ReleaseAssetDownloader.swift:209` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (11–16 lines × 2) Starcat/Features/Activity/WeeklyContentView.swift:489— Starcat/Features/Activity/WeeklyContentView.swift:489-499 | Starcat/Shared/Components/Toolbar/UnifiedSortMenu.swift:225-240 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (11–16 lines × 2) Starcat/Features/Agents/Core/AgentMessageTimelineView.swift:890— Starcat/Features/Agents/Core/AgentMessageTimelineView.swift:890-905 | Starcat/Features/Agents/Core/AgentRunInspectorView.swift:435-445 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (13–14 lines × 6) Starcat/Core/Network/RecommendAPI.swift:33— Starcat/Core/Network/RecommendAPI.swift:33-46 | Starcat/Core/Network/ShareAPI.swift:62-74 | Starcat/Core/Network/StarHistoryAPI.swift:121-133 | Starcat/Core/Network/TrendingAPI.swift:71-83 | Starcat/Core/Network/WeeklyAPI.swift:82-94 | Starcat/Core/Network/WikiAPI.swift:24-37 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 6 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Core/Network/RecommendAPI.swift:33` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Starcat/Core/Network/ShareAPI.swift:82` calls `JSONEncoder` and `Starcat/Core/Network/RecommendAPI.swift:49` 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 (13–14 lines × 6) Starcat/Features/Activity/ActivityDetailScaffoldShell.swift:197— Starcat/Features/Activity/ActivityDetailScaffoldShell.swift:197-210 | Starcat/Features/Activity/ActivityReleaseDetailScaffoldShell.swift:127-140 | Starcat/Features/Activity/WeeklyDetailScaffoldShell.swift:364-377 | Starcat/Features/Explore/DiscoveryDetailView.swift:114-126 | Starcat/Features/Home/RepoDetailView.swift:241-254 | Starcat/Features/Trending/TrendingScaffoldShell.swift:198-211 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 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 6 times. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Activity/ActivityDetailScaffoldShell.swift:197` 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, `Starcat/Features/Activity/WeeklyDetailScaffoldShell.swift:382` calls `resolveRepo` and `Starcat/Features/Activity/ActivityDetailScaffoldShell.swift:215` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 5) Starcat/Core/Settings/AppSettings.swift:319— Starcat/Core/Settings/AppSettings.swift:319-332 | Starcat/Core/Settings/AppSettings.swift:355-368 | Starcat/Core/Settings/AppSettings.swift:424-437 | Starcat/Core/Settings/AppSettings.swift:456-469 | Starcat/Features/AI/AIConfiguration.swift:1659-1672 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Core/Settings/AppSettings.swift:319` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 5) Starcat/Features/AI/ReadmeTranslationService.swift:391— Starcat/Features/AI/ReadmeTranslationService.swift:391-405 | Starcat/Features/AI/ReadmeTranslationService.swift:454-467 | Starcat/Features/AI/ReadmeTranslationService.swift:498-512 | Starcat/Features/AI/ReadmeTranslationService.swift:628-641 | Starcat/Features/AI/ReadmeTranslationService.swift:676-690 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/AI/ReadmeTranslationService.swift:454` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (13–14 lines × 2) Starcat/Core/Download/RepoFileDownloader.swift:422— Starcat/Core/Download/RepoFileDownloader.swift:422-434 | Starcat/Core/Network/GitHubBlog/GitHubBlogRSSAPI.swift:53-66 — 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 `Starcat/Core/Download/RepoFileDownloader.swift:422` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–14 lines × 2) Starcat/Core/Network/DiscoveryAPI.swift:277— Starcat/Core/Network/DiscoveryAPI.swift:277-289 | Starcat/Core/Network/StarcatEnvelope.swift:224-237 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Core/Network/DiscoveryAPI.swift:277` 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–14 lines × 2) Starcat/Features/AI/GitHubStarListAIGroupingSession.swift:1791— Starcat/Features/AI/GitHubStarListAIGroupingSession.swift:1791-1804 | Starcat/Features/AI/GitHubStarListAIGroupingSession.swift:1858-1869 — 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 `Starcat/Features/AI/GitHubStarListAIGroupingSession.swift:1791` 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–14 lines × 2) Starcat/Features/Home/ReadmeViewModel.swift:522— Starcat/Features/Home/ReadmeViewModel.swift:522-533 | Starcat/Features/Home/ReadmeViewModel.swift:543-556 — 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 `Starcat/Features/Home/ReadmeViewModel.swift:522` 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–14 lines × 2) Starcat/Features/Auth/AuthSession.swift:551— Starcat/Features/Auth/AuthSession.swift:551-564 | Starcat/Features/Auth/AuthSession.swift:597-607 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11–14 lines × 2) Starcat/Shared/Services/DiskIssueSummaryCache.swift:83— Starcat/Shared/Services/DiskIssueSummaryCache.swift:83-96 | Starcat/Shared/Services/DiskIssueTimelineCache.swift:92-102 — 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 `Starcat/Shared/Services/DiskIssueSummaryCache.swift:83` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11–13 lines × 2) Starcat/Features/AI/BatchAITagReviewRow.swift:78— Starcat/Features/AI/BatchAITagReviewRow.swift:78-90 | Starcat/Features/Home/GitHubStarListAIGroupingResultList.swift:236-246 — 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 `Starcat/Features/AI/BatchAITagReviewRow.swift:78` 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–13 lines × 2) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3770— Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3770-3782 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3788-3798 — 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 × 8) Starcat/Features/Settings/AISettingsView.swift:411— Starcat/Features/Settings/AISettingsView.swift:411-422 | Starcat/Features/Settings/AISettingsView.swift:936-947 | Starcat/Features/Settings/ExternalSearchSettingsSection.swift:55-66 | Starcat/Features/Settings/GeneralSettingsView.swift:63-74 | Starcat/Features/Settings/SettingsView.swift:714-725 | Starcat/Features/Settings/SettingsView.swift:825-836 | Starcat/Features/Settings/SettingsView.swift:986-997 | Starcat/Features/Settings/TranslationSettingsView.swift:84-95 — there are 8 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 8 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Settings/AISettingsView.swift:411` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Starcat/Features/Settings/AISettingsView.swift:423` calls `help`, `Text` and `Starcat/Features/Settings/GeneralSettingsView.swift:75` 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 (12 lines × 8) Starcat/Features/Settings/AISettingsView.swift:424— Starcat/Features/Settings/AISettingsView.swift:424-435 | Starcat/Features/Settings/AISettingsView.swift:949-960 | Starcat/Features/Settings/ExternalSearchSettingsSection.swift:68-79 | Starcat/Features/Settings/GeneralSettingsView.swift:75-86 | Starcat/Features/Settings/SettingsView.swift:726-737 | Starcat/Features/Settings/SettingsView.swift:837-848 | Starcat/Features/Settings/SettingsView.swift:998-1009 | Starcat/Features/Settings/TranslationSettingsView.swift:97-108 — there are 8 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 8 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Settings/AISettingsView.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Starcat/Features/Settings/AISettingsView.swift:423` calls `help`, `Text` and `Starcat/Features/Settings/GeneralSettingsView.swift:74` 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 (9–12 lines × 3) Starcat/Features/Activity/GitHubNotificationDetailView.swift:1401— Starcat/Features/Activity/GitHubNotificationDetailView.swift:1401-1409 | Starcat/Features/Activity/GitHubNotificationInboxView.swift:193-201 | Starcat/Features/Home/RepoDetailView.swift:1296-1307 — 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 `Starcat/Features/Activity/GitHubNotificationDetailView.swift:1401` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Starcat/Features/Activity/GitHubNotificationDetailView.swift:1411` calls `focusEffectDisabled` and `Starcat/Features/Activity/GitHubNotificationInboxView.swift:203` 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–12 lines × 3) Starcat/Core/Widget/WidgetSnapshotBuilder.swift:250— Starcat/Core/Widget/WidgetSnapshotBuilder.swift:250-258 | Starcat/Features/Insights/MyInsightsSnapshotProvider.swift:548-559 | Starcat/Features/RAG/Core/KnowledgeBaseMetadataSnapshot.swift:828-837 — 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 `Starcat/Core/Widget/WidgetSnapshotBuilder.swift:250` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9–11 lines × 2) Starcat/Core/Download/ReleaseAssetDownloader.swift:167— Starcat/Core/Download/ReleaseAssetDownloader.swift:167-177 | Starcat/Core/Download/RepoFileDownloader.swift:312-320 — before extracting anything, compare `Starcat/Core/Download/ReleaseAssetDownloader.swift` and `Starcat/Core/Download/RepoFileDownloader.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Core/Download/ReleaseAssetDownloader.swift:167` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–11 lines × 2) Starcat/Features/Home/RepoListView.swift:2687— Starcat/Features/Home/RepoListView.swift:2687-2697 | Starcat/Features/RAG/UI/RAGContextPickerFilterControls.swift:187-195 — 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 `Starcat/Features/Home/RepoListView.swift:2687` 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 (4–8 lines × 3) Starcat/Core/Sync/GitHubNotificationMapper.swift:342— Starcat/Core/Sync/GitHubNotificationMapper.swift:342-345 | Starcat/Features/About/ReleaseNotesView.swift:696-703 | Starcat/Features/RAG/UI/RAGMarkdownText.swift:155-162 — 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. 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 (4–8 lines × 3) Starcat/Features/Home/BatchActionBar.swift:897— Starcat/Features/Home/BatchActionBar.swift:897-900 | Starcat/Features/Tags/TagManagementView.swift:190-197 | Starcat/Features/Tags/TagManagementView.swift:347-356 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Home/BatchActionBar.swift:897` 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, `Starcat/Features/Tags/TagManagementView.swift:357` calls `foregroundStyle` and `Starcat/Features/Tags/TagManagementView.swift:198` 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 × 5) Starcat/Core/Settings/AppSettings.swift:2693— Starcat/Core/Settings/AppSettings.swift:2693-2699 | Starcat/Core/Settings/AppSettings.swift:2720-2727 | Starcat/Core/Settings/AppSettings.swift:2842-2848 | Starcat/Core/Sync/StarringSubsystem.swift:307-313 | Starcat/Core/Sync/StarringSubsystem.swift:457-463 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Core/Settings/AppSettings.swift:2693` 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 × 5) Starcat/Features/Activity/ActivityView.swift:401— Starcat/Features/Activity/ActivityView.swift:401-407 | Starcat/Features/Activity/WeeklyContentView.swift:774-780 | Starcat/Features/Explore/ExploreView.swift:714-720 | Starcat/Features/Explore/LinuxDoView.swift:217-223 | Starcat/Features/Home/HomeViewModel.swift:3910-3919 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 times. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Starcat/Features/Explore/ExploreView.swift:722` calls `isInLibrary` and `Starcat/Features/Activity/WeeklyContentView.swift:782` 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 × 4) Starcat/Features/Auth/GithubWebFlowService.swift:275— Starcat/Features/Auth/GithubWebFlowService.swift:275-281 | Starcat/Features/Auth/GithubWebFlowService.swift:285-291 | Starcat/Features/Auth/MockGithubOAuthService.swift:124-130 | Starcat/Features/Auth/MockGithubOAuthService.swift:133-139 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 4) Starcat/Features/Settings/RepoContextSettingsSection.swift:72— Starcat/Features/Settings/RepoContextSettingsSection.swift:72-78 | Starcat/Features/Settings/RepositorySourceDownloadSettingsSection.swift:17-24 | Starcat/Features/Settings/SettingsView.swift:1979-1986 | Starcat/Features/Settings/UndoStarRetentionSettings.swift:27-34 — 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 `Starcat/Features/Settings/RepositorySourceDownloadSettingsSection.swift:17` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `alignment` to `.leading` in one and `.center` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (5–6 lines × 2) Starcat/Features/Agents/ExternalRuntime/DeepSeekHarnessAdapter.swift:392— Starcat/Features/Agents/ExternalRuntime/DeepSeekHarnessAdapter.swift:392-396 | Starcat/Features/Agents/ExternalRuntime/DeepSeekHarnessAdapter.swift:451-456 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5–6 lines × 2) Starcat/Features/CodeGraph/CodeFlowViewModel.swift:294— Starcat/Features/CodeGraph/CodeFlowViewModel.swift:294-299 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryViewModel.swift:643-647 — 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 `Starcat/Features/CodeGraph/CodeFlowViewModel.swift:294` 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 lines × 3) Starcat/Features/Activity/ActivityDetailScaffoldShell.swift:143— Starcat/Features/Activity/ActivityDetailScaffoldShell.swift:143-155 | Starcat/Features/Activity/ActivityReleaseDetailScaffoldShell.swift:94-106 | Starcat/Features/Trending/TrendingScaffoldShell.swift:133-145 — 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.
Duplicated block (13 lines × 3) Starcat/Core/Sync/ActivityAnnouncementRepository.swift:30— Starcat/Core/Sync/ActivityAnnouncementRepository.swift:30-42 | Starcat/Core/Sync/ActivityEventRepository.swift:32-44 | Starcat/Core/Sync/GitHubNotificationThreadRepository.swift:20-32 — before extracting anything, compare `Starcat/Core/Sync/ActivityAnnouncementRepository.swift` and `Starcat/Core/Sync/ActivityEventRepository.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 52 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.
AC1 · Text alternatives· <canvas> without a text alternative · ×1
<canvas> without a text alternative resources/follow-graph/entry.js:180— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
Low contrast colour pair in CSS (4.4:1) Starcat/Resources/CodeFlow/codeflow.html:141— `.badge-default` sets color: #6c6c6c on background-color: #e8eaed — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (1.7:1) Starcat/Resources/CodeFlow/codeflow.html:178— `.security-code` sets color: #ff9f43 on background-color: #e8eaed — 1.7:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (2.0:1) Starcat/Resources/CodeFlow/codeflow.html:236— `.toast.warning` sets color: #fff on background-color: #ff9f43 — 2.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (2.6:1) Starcat/Resources/CodeFlow/codeflow.html:465— `.key-info code` sets color: #00a86b on background-color: #e8eaed — 2.6:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
CodexAppServerDriver.receiveNotificationOrRequest (cyclomatic 80) Starcat/Features/Agents/ExternalRuntime/CodexAppServerAdapter.swift:293— CodexAppServerDriver.receiveNotificationOrRequest has cyclomatic complexity 80 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
KnowledgeRAGWorkspaceViewModel.runQuestion (cyclomatic 76) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:2908— KnowledgeRAGWorkspaceViewModel.runQuestion has cyclomatic complexity 76 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GRDBRepoRepository.makeListQuery (cyclomatic 75) Starcat/Core/Sync/RepoRepository.swift:793— GRDBRepoRepository.makeListQuery has cyclomatic complexity 75 (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.
DeepSeekHarnessDriver.mapEvent (cyclomatic 63) Starcat/Features/Agents/ExternalRuntime/DeepSeekHarnessAdapter.swift:360— DeepSeekHarnessDriver.mapEvent has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HomeViewModel.reloadItems (cyclomatic 62) Starcat/Features/Home/HomeViewModel.swift:2757— HomeViewModel.reloadItems has cyclomatic complexity 62 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
entry.update (cyclomatic 57) resources/follow-graph/entry.js:704— entry.update has cyclomatic complexity 57 (threshold 15). Of this number, 44 points are the body's own statements and 13 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
analyze.analyze (cyclomatic 54) skills/starcat-diagnostics/scripts/analyze.py:206— analyze.analyze has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
StorageSettingsTab.perform (cyclomatic 53) Starcat/Features/Settings/SettingsView.swift:2324— StorageSettingsTab.perform has cyclomatic complexity 53 (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.
KnowledgeRAGWorkspaceViewModel.applyExecution (cyclomatic 49) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:3850— KnowledgeRAGWorkspaceViewModel.applyExecution has cyclomatic complexity 49 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — 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.
RepoSkillScanner.scan (cyclomatic 45) Starcat/Core/Skills/RepoSkillScanner.swift:18— RepoSkillScanner.scan has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ActivityViewModel.reload (cyclomatic 44) Starcat/Features/Activity/ActivityViewModel.swift:496— ActivityViewModel.reload 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.
SmartCollectionRuleSummary.appendAdvancedLines (cyclomatic 44) Starcat/Features/Collections/SmartCollectionRuleSummary.swift:68— SmartCollectionRuleSummary.appendAdvancedLines has cyclomatic complexity 44 (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.
SmartCollectionRuleFilter.apply (cyclomatic 44) Starcat/Features/Collections/SmartCollectionRuleSummary.swift:235— SmartCollectionRuleFilter.apply 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.
KnowledgeRAGService.runPromptPhase (cyclomatic 43) Starcat/Features/RAG/Core/KnowledgeRAGService.swift:1220— KnowledgeRAGService.runPromptPhase has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
analyze.collect (cyclomatic 43) skills/starcat-diagnostics/scripts/analyze.py:103— analyze.collect has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ExternalAgentEventProjector.consume (cyclomatic 41) Starcat/Features/Agents/ExternalRuntime/ExternalAgentRuntime.swift:535— ExternalAgentEventProjector.consume has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HomeViewModel.reloadDatabasePagedItems (cyclomatic 40) Starcat/Features/Home/HomeViewModel.swift:3156— HomeViewModel.reloadDatabasePagedItems 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.
AppBackgroundTaskSnapshot.current (cyclomatic 39) Starcat/Features/Home/AppBackgroundTaskSnapshot.swift:41— AppBackgroundTaskSnapshot.current 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.
KnowledgeRAGPromptBuilder.build (cyclomatic 39) Starcat/Features/RAG/Core/KnowledgeRAGPromptBuilder.swift:59— KnowledgeRAGPromptBuilder.build 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.
ReadmeViewModel.loadInternal (cyclomatic 38) Starcat/Features/Home/ReadmeViewModel.swift:378— ReadmeViewModel.loadInternal has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SyncManager.runSyncBody (cyclomatic 37) Starcat/Core/Sync/SyncManager.swift:262— SyncManager.runSyncBody has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ExploreDiscoveryViewModel.reload (cyclomatic 37) Starcat/Features/Explore/ExploreDiscoveryViewModel.swift:68— ExploreDiscoveryViewModel.reload has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DailyRadarWorkspaceViewModel.reload (cyclomatic 36) Starcat/Features/DailyRadar/DailyRadarWorkspaceViewModel.swift:238— DailyRadarWorkspaceViewModel.reload has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CodexAppServerDriver.traceEvent (cyclomatic 35) Starcat/Features/Agents/ExternalRuntime/CodexAppServerAdapter.swift:771— CodexAppServerDriver.traceEvent has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ExternalAgentProcessSession.run (cyclomatic 35) Starcat/Features/Agents/ExternalRuntime/ExternalAgentRuntimeHost.swift:115— ExternalAgentProcessSession.run has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AppDependencies.init (cyclomatic 34) Starcat/App/AppDependencies.swift:880— AppDependencies.init has cyclomatic complexity 34 (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.
StarcatMCPToolRegistry.callTool (cyclomatic 34) Starcat/Features/MCP/StarcatMCPToolRegistry.swift:379— StarcatMCPToolRegistry.callTool has cyclomatic complexity 34 (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.
DiskChatHistoryStore.migrate (cyclomatic 34) Starcat/Shared/Services/DiskChatHistoryStore.swift:232— DiskChatHistoryStore.migrate has cyclomatic complexity 34 (threshold 15). Of this number, 27 points are the body's own statements and 7 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.
LoopAgentRuntime.execute (cyclomatic 34) Starcat/Features/Agents/Core/LoopAgentRuntime.swift:378— LoopAgentRuntime.execute 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.
RAGWorkspaceError.classify (cyclomatic 34) Starcat/Features/RAG/UI/RAGWorkspaceErrorSheet.swift:171— RAGWorkspaceError.classify 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.
BatchAIQueueService.applyResult (cyclomatic 33) Starcat/Features/AI/BatchAIQueueService.swift:1681— BatchAIQueueService.applyResult 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.
DailyRadarMarkdownRenderer.renderNode (cyclomatic 32) Starcat/Features/DailyRadar/DailyRadarMarkdownView.swift:57— DailyRadarMarkdownRenderer.renderNode has cyclomatic complexity 32 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
RAGCLIJSONLineParser.parseClaude (cyclomatic 32) Starcat/Features/RAG/Core/RAGCLIModelClient.swift:305— RAGCLIJSONLineParser.parseClaude 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.
ReadmeStarJourney.growthEvent (cyclomatic 31) Starcat/Features/Insights/ReadmeStarHistoryChartModel.swift:204— ReadmeStarJourney.growthEvent has cyclomatic complexity 31 (threshold 15). Of this number, 18 points are the body's own statements and 13 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.
SkillFrontmatter.parse (cyclomatic 30) Starcat/Core/Skills/SkillFrontmatter.swift:34— SkillFrontmatter.parse 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.
GitHubStarListAIGroupingPresentationSnapshot.init (cyclomatic 30) Starcat/Features/Home/GitHubStarListAIGroupingPresentation.swift:321— GitHubStarListAIGroupingPresentationSnapshot.init has cyclomatic complexity 30 (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.
AgentWorkspaceRunSurface.agentComposerInputBox (cyclomatic 30) Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:536— AgentWorkspaceRunSurface.agentComposerInputBox has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DailyRadarPreviewWorkspace.home (cyclomatic 29) Starcat/Features/DailyRadar/DailyRadarPreviewWorkspace.swift:176— DailyRadarPreviewWorkspace.home 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.
KnowledgeRAGIndexBuilder.embedPendingChunks (cyclomatic 28) Starcat/Core/RAG/KnowledgeRAGIndexBuilder.swift:885— KnowledgeRAGIndexBuilder.embedPendingChunks 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.
WeeklyContentViewModel.makeLocalSorter (cyclomatic 28) Starcat/Features/Activity/WeeklyContentView.swift:1881— WeeklyContentViewModel.makeLocalSorter 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.
FollowGraphStore.load (cyclomatic 28) Starcat/Features/FollowGraph/FollowGraphStore.swift:53— FollowGraphStore.load 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.
Coordinator.userContentController (cyclomatic 28) Starcat/Features/FollowGraph/FollowGraphWebView.swift:89— Coordinator.userContentController has cyclomatic complexity 28 (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.
HomeViewModel.selection (cyclomatic 28) Starcat/Features/Home/HomeViewModel.swift:46— HomeViewModel.selection 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.
ReadmeViewModel.loadTrending (cyclomatic 28) Starcat/Features/Home/ReadmeViewModel.swift:256— ReadmeViewModel.loadTrending 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.
SidebarView.isExploreSelectionCurrent (cyclomatic 28) Starcat/Features/Home/SidebarView.swift:927— SidebarView.isExploreSelectionCurrent has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
LocalAIModelDownloader.streamDownload (cyclomatic 28) Starcat/Features/AI/LocalAI/LocalAIModelDownloader.swift:193— LocalAIModelDownloader.streamDownload 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.
LocalMLXRuntime.generate (cyclomatic 28) Starcat/Features/AI/LocalAI/LocalMLXRuntime.swift:499— LocalMLXRuntime.generate 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.
RAGWorkspaceInspector.planInspector (cyclomatic 28) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:1560— RAGWorkspaceInspector.planInspector 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.
OpenAIClient.chatStream (cyclomatic 27) Starcat/Features/AI/OpenAIClient.swift:167— OpenAIClient.chatStream has cyclomatic complexity 27 (threshold 15). Of this number, 16 points are the body's own statements and 11 belong to one function item inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
TrendingViewModel.reload (cyclomatic 27) Starcat/Features/Trending/TrendingViewModel.swift:425— TrendingViewModel.reload 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.
KnowledgeRAGIndexBuilder.startObservingSourceChanges (cyclomatic 26) Starcat/Core/RAG/KnowledgeRAGIndexBuilder.swift:356— KnowledgeRAGIndexBuilder.startObservingSourceChanges 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.
AIModelCapability.inferred (cyclomatic 26) Starcat/Features/AI/AIConfiguration.swift:82— AIModelCapability.inferred 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. This is NOT this file's highest cyclomatic complexity: AIServiceProvider.defaultProfileName (cyclomatic 27) 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.
DailyRadarWorkspaceViewModel.reloadWeeklyTopic (cyclomatic 26) Starcat/Features/DailyRadar/DailyRadarWorkspaceViewModel.swift:139— DailyRadarWorkspaceViewModel.reloadWeeklyTopic 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.
RepoAIChatViewModel.performSendMessage (cyclomatic 25) Starcat/Features/AI/RepoAIChatViewModel.swift:504— RepoAIChatViewModel.performSendMessage has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HomeViewModel.prefetch (cyclomatic 25) Starcat/Features/Home/HomeViewModel.swift:3511— HomeViewModel.prefetch has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CodebaseMemoryViewModel.generate (cyclomatic 25) Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryViewModel.swift:217— CodebaseMemoryViewModel.generate has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
entry.drawNode (cyclomatic 25) resources/follow-graph/entry.js:266— entry.drawNode 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.
RepoAIInsightViewModel.generate (cyclomatic 24) Starcat/Features/AI/RepoAIInsightViewModel.swift:296— RepoAIInsightViewModel.generate 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.
WeeklyContentViewModel.deriveLocalItems (cyclomatic 24) Starcat/Features/Activity/WeeklyContentView.swift:1760— WeeklyContentViewModel.deriveLocalItems 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.
FollowGraphViewModel.explore (cyclomatic 24) Starcat/Features/FollowGraph/FollowGraphViewModel.swift:477— FollowGraphViewModel.explore 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.
RepositoryInsightsViewModel.loadActivity (cyclomatic 24) Starcat/Features/Insights/RepositoryInsightsViewModel.swift:975— RepositoryInsightsViewModel.loadActivity 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.
EncoderConfigurationFile.validated (cyclomatic 24) Starcat/Features/AI/LocalAI/LayaMLXDecisionRuntime.swift:440— EncoderConfigurationFile.validated 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.
KnowledgeRAGQueryPlanner.decodeAndValidate (cyclomatic 24) Starcat/Features/RAG/Core/KnowledgeRAGQueryPlanner.swift:292— KnowledgeRAGQueryPlanner.decodeAndValidate 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.
KnowledgeRAGWorkspaceViewModel.selectConversation (cyclomatic 24) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:1111— KnowledgeRAGWorkspaceViewModel.selectConversation 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.
starcat-localization.analyze_repository (cyclomatic 24) supports/scripts/starcat-localization.py:1159— starcat-localization.analyze_repository 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.
GRDBRepoStarHistoryRepository.performRefresh (cyclomatic 23) Starcat/Core/Insights/RepoStarHistoryRepository.swift:326— GRDBRepoStarHistoryRepository.performRefresh 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.
GRDBRAGChunkRepository.replaceSource (cyclomatic 23) Starcat/Core/RAG/RAGChunkRepository.swift:156— GRDBRAGChunkRepository.replaceSource 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.
AppSettings.init (cyclomatic 23) Starcat/Core/Settings/AppSettings.swift:1917— AppSettings.init 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. This is NOT this file's highest cyclomatic complexity: ReadmeTranslationLanguage.displayName (cyclomatic 34) 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.
AutoTidyScheduler.executeRound (cyclomatic 23) Starcat/Features/AI/AutoTidyScheduler.swift:335— AutoTidyScheduler.executeRound 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.
BatchAIQueueService.runLoop (cyclomatic 23) Starcat/Features/AI/BatchAIQueueService.swift:1405— BatchAIQueueService.runLoop 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.
FollowGraphOverlayView.body (cyclomatic 23) Starcat/Features/FollowGraph/FollowGraphOverlayView.swift:33— FollowGraphOverlayView.body 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.
RepoSkillSession.start (cyclomatic 23) Starcat/Features/Home/RepoSkillSession.swift:239— RepoSkillSession.start 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.
RepositoryInsightsViewModel.loadCommunityProfile (cyclomatic 23) Starcat/Features/Insights/RepositoryInsightsViewModel.swift:1261— RepositoryInsightsViewModel.loadCommunityProfile 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.
DiagnosticLogStore.append (cyclomatic 23) Starcat/Shared/Diagnostics/DiagnosticLogStore.swift:238— DiagnosticLogStore.append 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.
AnySearchError.errorDescription (cyclomatic 23) Starcat/Core/Network/AnySearch/AnySearchModels.swift:170— AnySearchError.errorDescription 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.
ReadmeAssetURLRewriter.rewriteSourceSet (cyclomatic 23) Starcat/Core/Network/GitHubAPI/ReadmeAssetURLRewriter.swift:345— ReadmeAssetURLRewriter.rewriteSourceSet 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.
CodexProviderCatalog.parse (cyclomatic 23) Starcat/Features/Agents/ExternalRuntime/AgentRuntimeProviderCatalog.swift:88— CodexProviderCatalog.parse 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.
ExternalAgentRuntimeError.errorDescription (cyclomatic 23) Starcat/Features/Agents/ExternalRuntime/ExternalAgentProtocol.swift:282— ExternalAgentRuntimeError.errorDescription 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.
RAGWorkspaceAnswerSurface.commandComposer (cyclomatic 23) Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:643— RAGWorkspaceAnswerSurface.commandComposer 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.
LinuxDoPayload.validate (cyclomatic 22) Starcat/Core/Network/LinuxDoModels.swift:69— LinuxDoPayload.validate 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.
RepoSkillStore.detect (cyclomatic 22) Starcat/Core/Skills/RepoSkillStore.swift:162— RepoSkillStore.detect 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.
BatchAIJob.== (cyclomatic 22) Starcat/Features/AI/BatchAIQueueModels.swift:258— BatchAIJob.== 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.
OpenAIClient.makeChatQuery (cyclomatic 22) Starcat/Features/AI/OpenAIClient.swift:859— OpenAIClient.makeChatQuery 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.
ActivityViewModel.supplementNetworks (cyclomatic 22) Starcat/Features/Activity/ActivityViewModel.swift:754— ActivityViewModel.supplementNetworks 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.
DailyRadarPreviewReader.body (cyclomatic 22) Starcat/Features/DailyRadar/DailyRadarPreviewReader.swift:31— DailyRadarPreviewReader.body has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FollowGraphViewModel.refresh (cyclomatic 22) Starcat/Features/FollowGraph/FollowGraphViewModel.swift:381— FollowGraphViewModel.refresh 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.
HomeViewModel.computeFilteredSorted (cyclomatic 22) Starcat/Features/Home/HomeViewModel.swift:3711— HomeViewModel.computeFilteredSorted 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.
RepositoryInsightsViewModel.loadReleaseCadenceFallback (cyclomatic 22) Starcat/Features/Insights/RepositoryInsightsViewModel.swift:870— RepositoryInsightsViewModel.loadReleaseCadenceFallback 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.
RepositoryInsightsViewModel.loadCommitActivity (cyclomatic 22) Starcat/Features/Insights/RepositoryInsightsViewModel.swift:1091— RepositoryInsightsViewModel.loadCommitActivity 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. This shape REPEATS in the file: 2 other methods here (RepositoryInsightsViewModel.loadContributors, RepositoryInsightsViewModel.loadRecentActivity) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
RepositoryInsightsViewModel.loadContributors (cyclomatic 22) Starcat/Features/Insights/RepositoryInsightsViewModel.swift:1180— RepositoryInsightsViewModel.loadContributors 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. This shape REPEATS in the file: 2 other methods here (RepositoryInsightsViewModel.loadCommitActivity, RepositoryInsightsViewModel.loadRecentActivity) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
RepositoryInsightsViewModel.loadRecentActivity (cyclomatic 22) Starcat/Features/Insights/RepositoryInsightsViewModel.swift:1434— RepositoryInsightsViewModel.loadRecentActivity 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. This shape REPEATS in the file: 2 other methods here (RepositoryInsightsViewModel.loadCommitActivity, RepositoryInsightsViewModel.loadContributors) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
TrendingListFilter.matches (cyclomatic 22) Starcat/Features/Trending/TrendingListPipeline.swift:91— TrendingListFilter.matches 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.
DiagnosticArchiveBuilder.writePayload (cyclomatic 22) Starcat/Shared/Diagnostics/DiagnosticArchiveBuilder.swift:65— DiagnosticArchiveBuilder.writePayload 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.
DiagnosticArchiveBuilder.report (cyclomatic 22) Starcat/Shared/Diagnostics/DiagnosticArchiveBuilder.swift:210— DiagnosticArchiveBuilder.report has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
LocalAIModelManager.runInstall (cyclomatic 22) Starcat/Features/AI/LocalAI/LocalAIModelManager.swift:367— LocalAIModelManager.runInstall 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.
ExternalAgentStderrSummary.classification (cyclomatic 22) Starcat/Features/Agents/ExternalRuntime/ExternalAgentRuntimeHost.swift:604— ExternalAgentStderrSummary.classification 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.
LibraryHTMLRenderer.renderMarkdown (cyclomatic 22) Starcat/Features/Profile/ShareCard/LibraryExportRenderer.swift:415— LibraryHTMLRenderer.renderMarkdown 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.
KnowledgeRAGChunkEditor.body (cyclomatic 22) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:3145— KnowledgeRAGChunkEditor.body has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AppLocale.aiOutputLanguageDescriptor (cyclomatic 21) Starcat/Core/Settings/LocaleStore.swift:145— AppLocale.aiOutputLanguageDescriptor has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
BatchAIQueueService.confirmPendingTagExpansion (cyclomatic 21) Starcat/Features/AI/BatchAIQueueService.swift:1962— BatchAIQueueService.confirmPendingTagExpansion 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.
BatchAIWorkspaceView.footer (cyclomatic 21) Starcat/Features/AI/BatchAIWorkspaceView.swift:283— BatchAIWorkspaceView.footer 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.
GithubWebFlowService.exchangeCodeForToken (cyclomatic 21) Starcat/Features/Auth/GithubWebFlowService.swift:134— GithubWebFlowService.exchangeCodeForToken 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.
ExploreDiscoveryViewModel.makeLocalSorter (cyclomatic 21) Starcat/Features/Explore/ExploreDiscoveryViewModel.swift:541— ExploreDiscoveryViewModel.makeLocalSorter has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
AnySearchClient.perform (cyclomatic 21) Starcat/Core/Network/AnySearch/AnySearchClient.swift:91— AnySearchClient.perform 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.
LayaDecisionModelManager.runInstall (cyclomatic 21) Starcat/Features/AI/LocalAI/LayaDecisionModelManager.swift:142— LayaDecisionModelManager.runInstall 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.
RepositoryAgentRunContextProvider.loadBusinessRepos (cyclomatic 21) Starcat/Features/Agents/Core/AgentRunContextProvider.swift:111— RepositoryAgentRunContextProvider.loadBusinessRepos 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.
LoopAgentRuntime.requestModel (cyclomatic 21) Starcat/Features/Agents/Core/LoopAgentRuntime.swift:663— LoopAgentRuntime.requestModel 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.
starcat-localization.patch_catalog_text (cyclomatic 21) supports/scripts/starcat-localization.py:433— starcat-localization.patch_catalog_text 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.
sync-starcat-readme-promo.promo (cyclomatic 21) supports/scripts/sync-starcat-readme-promo.py:252— sync-starcat-readme-promo.promo 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.
ProgressiveReveal.sync (cyclomatic 21) resources/follow-graph/progressive-reveal.mjs:21— ProgressiveReveal.sync 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.
StarHistoryAPI.fetch (cyclomatic 20) Starcat/Core/Network/StarHistoryAPI.swift:154— StarHistoryAPI.fetch has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
GitHubNotificationInboxService.hydrate (cyclomatic 20) Starcat/Core/Sync/GitHubNotificationInboxService.swift:236— GitHubNotificationInboxService.hydrate 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.
AwesomeGlobalFilterPolicy.matches (cyclomatic 20) Starcat/Features/Explore/AwesomeView.swift:588— AwesomeGlobalFilterPolicy.matches 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.
FollowGraphAvatarURL.request (cyclomatic 20) Starcat/Features/FollowGraph/FollowGraphAvatarCache.swift:29— FollowGraphAvatarURL.request 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.
FollowGraphViewModel.open (cyclomatic 20) Starcat/Features/FollowGraph/FollowGraphViewModel.swift:92— FollowGraphViewModel.open 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.
ReadmeStarHistoryHTMLRenderer.render (cyclomatic 20) Starcat/Features/Insights/ReadmeStarHistoryHTMLRenderer.swift:82— ReadmeStarHistoryHTMLRenderer.render 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.
ReadmeStarHistoryViewModel.loadIfNeeded (cyclomatic 20) Starcat/Features/Insights/ReadmeStarHistoryPreview.swift:121— ReadmeStarHistoryViewModel.loadIfNeeded 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.
RepositoryInsightsViewModel.loadSecurityAdvisories (cyclomatic 20) Starcat/Features/Insights/RepositoryInsightsViewModel.swift:1354— RepositoryInsightsViewModel.loadSecurityAdvisories 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.
DiagnosticBundleExporter.export (cyclomatic 20) Starcat/Shared/Diagnostics/DiagnosticBundleExporter.swift:66— DiagnosticBundleExporter.export 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.
AgentTimelineProjection.makeItems (cyclomatic 20) Starcat/Features/Agents/Core/AgentTimelineProjection.swift:184— AgentTimelineProjection.makeItems 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.
KnowledgeRAGRetriever.retrieve (cyclomatic 20) Starcat/Features/RAG/Core/KnowledgeRAGRetriever.swift:108— KnowledgeRAGRetriever.retrieve 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.
CCSwitchConfigStore.parseSQLDump (cyclomatic 20) Starcat/Features/Settings/CCSwitchImport/CCSwitchConfigStore.swift:104— CCSwitchConfigStore.parseSQLDump 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.
entry.drainImages (cyclomatic 20) resources/follow-graph/entry.js:75— entry.drainImages has cyclomatic complexity 20 (threshold 15). Of this number, 10 points are the body's own statements and 10 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
entry.syncAnimation (cyclomatic 20) resources/follow-graph/entry.js:592— entry.syncAnimation 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.
AIOrganizationBannerState.grouping (cyclomatic 19) Starcat/Features/AI/AIOrganizationBannerState.swift:40— AIOrganizationBannerState.grouping 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.
ActivityView.matchesGlobalFilters (cyclomatic 19) Starcat/Features/Activity/ActivityView.swift:363— ActivityView.matchesGlobalFilters 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.
WeeklyContentView.matchesGlobalFilters (cyclomatic 19) Starcat/Features/Activity/WeeklyContentView.swift:728— WeeklyContentView.matchesGlobalFilters 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.
SmartCollectionsOverviewView.systemCollectionCard (cyclomatic 19) Starcat/Features/Collections/SmartCollectionsOverviewView.swift:178— SmartCollectionsOverviewView.systemCollectionCard 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.
ExploreDiscoveryListView.matchesGlobalFilters (cyclomatic 19) Starcat/Features/Explore/ExploreView.swift:670— ExploreDiscoveryListView.matchesGlobalFilters 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.
FollowGraphViewModel.toggleFollow (cyclomatic 19) Starcat/Features/FollowGraph/FollowGraphViewModel.swift:230— FollowGraphViewModel.toggleFollow 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.
RepoListView.unifiedListContent (cyclomatic 19) Starcat/Features/Home/RepoListView.swift:1936— RepoListView.unifiedListContent 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.
ManageNavigationPresentation.make (cyclomatic 19) Starcat/Features/Home/SidebarItem.swift:193— ManageNavigationPresentation.make 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.
ReadmeStarJourney.init (cyclomatic 19) Starcat/Features/Insights/ReadmeStarHistoryChartModel.swift:118— ReadmeStarJourney.init 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.
StorageSettingsTab.body (cyclomatic 19) Starcat/Features/Settings/SettingsView.swift:1760— StorageSettingsTab.body has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: SettingsView.settingsLocation (cyclomatic 25) 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.userContentController (cyclomatic 19) Starcat/Shared/Components/ReadmeWebView.swift:1667— Coordinator.userContentController has cyclomatic complexity 19 (threshold 15). Of this number, 13 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RepoDetailScaffold.trailingActionsView (cyclomatic 19) Starcat/Shared/Components/RepoDetailScaffold.swift:862— RepoDetailScaffold.trailingActionsView 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.
UserFacingError.map (cyclomatic 19) Starcat/Shared/Diagnostics/UserFacingError.swift:33— UserFacingError.map 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.
AgentWorkspaceViewModel.apply (cyclomatic 19) Starcat/Features/Agents/Core/AgentWorkspaceViewModel.swift:935— AgentWorkspaceViewModel.apply 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.
RAGNetworkIntentResolver.resolve (cyclomatic 19) Starcat/Features/RAG/Core/RAGNetworkIntentResolver.swift:23— RAGNetworkIntentResolver.resolve 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.
entry.applyVisibleGraph (cyclomatic 19) resources/follow-graph/entry.js:630— entry.applyVisibleGraph 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.
RepoSkillInstaller.install (cyclomatic 18) Starcat/Core/Skills/RepoSkillInstaller.swift:43— RepoSkillInstaller.install 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.
AIProviderProfile.mergedDiscoveredModels (cyclomatic 18) Starcat/Features/AI/AIConfiguration.swift:306— AIProviderProfile.mergedDiscoveredModels 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. This is NOT this file's highest cyclomatic complexity: AIServiceProvider.defaultProfileName (cyclomatic 27) 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.
BatchAIQueueService.applySelectedSuggestedTags (cyclomatic 18) Starcat/Features/AI/BatchAIQueueService.swift:1007— BatchAIQueueService.applySelectedSuggestedTags 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.
RepoAIInsightService.generateInsight (cyclomatic 18) Starcat/Features/AI/RepoAIInsightService.swift:409— RepoAIInsightService.generateInsight 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.
TagTaxonomyBootstrapAnalyzer.analyze (cyclomatic 18) Starcat/Features/AI/TagTaxonomyBootstrapService.swift:235— TagTaxonomyBootstrapAnalyzer.analyze 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.
ActivityView.body (cyclomatic 18) Starcat/Features/Activity/ActivityView.swift:94— ActivityView.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.
GitHubNotificationIssueSummary.makeContext (cyclomatic 18) Starcat/Features/Activity/GitHubNotificationIssueSummary.swift:28— GitHubNotificationIssueSummary.makeContext 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.
HomeViewModel.hasActiveFilter (cyclomatic 18) Starcat/Features/Home/HomeViewModel.swift:1288— HomeViewModel.hasActiveFilter 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.
HomeViewModel.matchesSmartCollection (cyclomatic 18) Starcat/Features/Home/HomeViewModel.swift:4162— HomeViewModel.matchesSmartCollection 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.
ReadmeTranslationViewModel.performTranslation (cyclomatic 18) Starcat/Features/Home/ReadmeTranslationViewModel.swift:438— ReadmeTranslationViewModel.performTranslation 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.
RepoListView.manageCategoryContent (cyclomatic 18) Starcat/Features/Home/RepoListView.swift:1530— RepoListView.manageCategoryContent 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.
RepoRecommendationViewModel.loadInitial (cyclomatic 18) Starcat/Features/Recommendations/RepoRecommendationViewModel.swift:48— RepoRecommendationViewModel.loadInitial 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.
DatabaseMigrations.ensureKnowledgeRAGSchema (cyclomatic 18) Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:3067— DatabaseMigrations.ensureKnowledgeRAGSchema 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.
LocalAISharedModelCoordinator.migrateLegacyModels (cyclomatic 18) Starcat/Features/AI/LocalAI/LocalAISharedModelCoordinator.swift:257— LocalAISharedModelCoordinator.migrateLegacyModels 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.
AgentHarnessProcessView.traceIcon (cyclomatic 18) Starcat/Features/Agents/Core/AgentHarnessProcessView.swift:284— AgentHarnessProcessView.traceIcon has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
AgentWorkspaceViewModel.canSubmit (cyclomatic 18) Starcat/Features/Agents/Core/AgentWorkspaceViewModel.swift:331— AgentWorkspaceViewModel.canSubmit 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.
RAGRepoFilter.hasEffectiveConditions (cyclomatic 18) Starcat/Features/RAG/Core/KnowledgeRAGModels.swift:231— RAGRepoFilter.hasEffectiveConditions 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.
RAGRepoContextXMLProjector.project (cyclomatic 18) Starcat/Features/RAG/Core/RAGRepoContextXMLProjector.swift:30— RAGRepoContextXMLProjector.project 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.
KnowledgeRAGWorkspaceViewModel.scheduleHistoricalRepoContextLoad (cyclomatic 18) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:1313— KnowledgeRAGWorkspaceViewModel.scheduleHistoricalRepoContextLoad 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.
KnowledgeRAGBrowserView.repositoryDetail (cyclomatic 18) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:2380— KnowledgeRAGBrowserView.repositoryDetail 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.
RAGWorkspaceInspector.indexBuildStageMetrics (cyclomatic 18) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:4166— RAGWorkspaceInspector.indexBuildStageMetrics 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. This is NOT this file's highest cyclomatic complexity: RAGWorkspaceInspector.debugStageKey (cyclomatic 25) 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.
RepositoryReleaseDeepLink.init (cyclomatic 17) Starcat/Core/Navigation/RepositoryDeepLink.swift:178— RepositoryReleaseDeepLink.init 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.
BatchAIQueueService.processSingle (cyclomatic 17) Starcat/Features/AI/BatchAIQueueService.swift:1576— BatchAIQueueService.processSingle 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.
GitHubStarListAIGroupingSession.integrate (cyclomatic 17) Starcat/Features/AI/GitHubStarListAIGroupingSession.swift:1613— GitHubStarListAIGroupingSession.integrate 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.
ChangelogSectionKind.infer (cyclomatic 17) Starcat/Features/About/ReleaseNotesView.swift:512— ChangelogSectionKind.infer 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.
ActivityViewModel.formatFollowingTitle (cyclomatic 17) Starcat/Features/Activity/ActivityViewModel.swift:1916— ActivityViewModel.formatFollowingTitle has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
GitHubNotificationCommentCard.body (cyclomatic 17) Starcat/Features/Activity/GitHubNotificationDetailView.swift:1143— GitHubNotificationCommentCard.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.
GitHubNotificationCommentCard.== (cyclomatic 17) Starcat/Features/Activity/GitHubNotificationDetailView.swift:1582— GitHubNotificationCommentCard.== 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.
GitHubNotificationIssueSummarySession.start (cyclomatic 17) Starcat/Features/Activity/GitHubNotificationIssueSummarySession.swift:48— GitHubNotificationIssueSummarySession.start 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.
ExploreDiscoveryListView.body (cyclomatic 17) Starcat/Features/Explore/ExploreView.swift:204— ExploreDiscoveryListView.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.
HomeView.syncViewModelSettingsFromAppSettings (cyclomatic 17) Starcat/Features/Home/HomeView.swift:2139— HomeView.syncViewModelSettingsFromAppSettings 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.
RepositoryInsightsView.commitChart (cyclomatic 17) Starcat/Features/Insights/RepositoryInsightsView.swift:1841— RepositoryInsightsView.commitChart 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.
StarcatMCPWriteFacade.batchOrganizeRepos (cyclomatic 17) Starcat/Features/MCP/StarcatMCPWriteFacade.swift:160— StarcatMCPWriteFacade.batchOrganizeRepos 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.
AISettingsTab.aiConfigurationForm (cyclomatic 17) Starcat/Features/Settings/AISettingsView.swift:140— AISettingsTab.aiConfigurationForm 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.
IntegrationSettingsTab.body (cyclomatic 17) Starcat/Features/Settings/IntegrationSettingsView.swift:53— IntegrationSettingsTab.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.
RuntimeDownloadInstaller.run (cyclomatic 17) Starcat/Features/Settings/RuntimeDownloadInstaller.swift:312— RuntimeDownloadInstaller.run has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DatabaseMigrations.registerV20 (cyclomatic 17) Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:276— DatabaseMigrations.registerV20 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.
AnthropicMessagesCodec.decodeMessageObject (cyclomatic 17) Starcat/Features/AI/Anthropic/AnthropicMessagesCodec.swift:93— AnthropicMessagesCodec.decodeMessageObject 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.
AnthropicSSEStreamParser.handle (cyclomatic 17) Starcat/Features/AI/Anthropic/AnthropicMessagesCodec.swift:491— AnthropicSSEStreamParser.handle has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LocalMLXRuntime.performRecorded (cyclomatic 17) Starcat/Features/AI/LocalAI/LocalMLXRuntime.swift:129— LocalMLXRuntime.performRecorded 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.
AgentWorkspaceRunSurface.loadCodexModelCatalogIfNeeded (cyclomatic 17) Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:373— AgentWorkspaceRunSurface.loadCodexModelCatalogIfNeeded 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.
KnowledgeRAGService.runPlanningPhase (cyclomatic 17) Starcat/Features/RAG/Core/KnowledgeRAGService.swift:614— KnowledgeRAGService.runPlanningPhase 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.
KnowledgeRAGWorkspaceViewModel.schedulePagedMentionQueryIfNeeded (cyclomatic 17) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:2144— KnowledgeRAGWorkspaceViewModel.schedulePagedMentionQueryIfNeeded 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.
KnowledgeRAGWorkspaceViewModel.finalizeCancelledTurn (cyclomatic 17) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:3436— KnowledgeRAGWorkspaceViewModel.finalizeCancelledTurn 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.
KnowledgeRAGWorkspaceViewModel.detectGitHubLink (cyclomatic 17) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:4389— KnowledgeRAGWorkspaceViewModel.detectGitHubLink 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.
RAGAssistantMessageBlock.assistantMessageContent (cyclomatic 17) Starcat/Features/RAG/UI/RAGAssistantMessageBlock.swift:87— RAGAssistantMessageBlock.assistantMessageContent 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.
useAudioPlayer.useAudioPlayer (cyclomatic 17) starcat-promo-video/presentation/src/hooks/useAudioPlayer.ts:46— useAudioPlayer.useAudioPlayer has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 62, 127, 79, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
useStepper.useStepper (cyclomatic 17) starcat-promo-video/presentation/src/hooks/useStepper.ts:41— useStepper.useStepper has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 140, 42, 58, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
StarsSyncFollowUpCoordinator.schedule (cyclomatic 16) Starcat/Core/Sync/StarsSyncFollowUpCoordinator.swift:43— StarsSyncFollowUpCoordinator.schedule 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.
WeeklyBulkRepository.makeSQLFilter (cyclomatic 16) Starcat/Core/Sync/WeeklyBulkRepository.swift:410— WeeklyBulkRepository.makeSQLFilter 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.
GitHubStarListAIGroupingSession.applyOne (cyclomatic 16) Starcat/Features/AI/GitHubStarListAIGroupingSession.swift:1777— GitHubStarListAIGroupingSession.applyOne 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.
RepoAIInsightService.generateLLMTagSuggestions (cyclomatic 16) Starcat/Features/AI/RepoAIInsightService.swift:671— RepoAIInsightService.generateLLMTagSuggestions 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.
RepoAIInsightService.makeSource (cyclomatic 16) Starcat/Features/AI/RepoAIInsightService.swift:1806— RepoAIInsightService.makeSource 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.
RepoAIWindowContentView.summarySection (cyclomatic 16) Starcat/Features/AI/RepoAIWindowContentView.swift:480— RepoAIWindowContentView.summarySection 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.
SemanticIndexBuilder.execute (cyclomatic 16) Starcat/Features/AI/SemanticIndexBuilder.swift:306— SemanticIndexBuilder.execute 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.
WikiKnowledgeBackfillCoordinator.start (cyclomatic 16) Starcat/Features/AI/WikiKnowledgeBackfillCoordinator.swift:45— WikiKnowledgeBackfillCoordinator.start 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.
LinuxDoView.filteredRepositories (cyclomatic 16) Starcat/Features/Explore/LinuxDoView.swift:190— LinuxDoView.filteredRepositories 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.
Coordinator.flush (cyclomatic 16) Starcat/Features/FollowGraph/FollowGraphWebView.swift:130— Coordinator.flush 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.
ProjectAccessSheet.actionArea (cyclomatic 16) Starcat/Features/Home/ProjectAccessSheet.swift:199— ProjectAccessSheet.actionArea 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.
SidebarView.applyExploreSelection (cyclomatic 16) Starcat/Features/Home/SidebarView.swift:960— SidebarView.applyExploreSelection has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
StarcatMCPService.start (cyclomatic 16) Starcat/Features/MCP/StarcatMCPService.swift:258— StarcatMCPService.start 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.
SearchCenterView.resultContent (cyclomatic 16) Starcat/Features/Search/SearchCenterView.swift:526— SearchCenterView.resultContent 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.
RuntimeDownloadInstaller.validate (cyclomatic 16) Starcat/Features/Settings/RuntimeDownloadInstaller.swift:223— RuntimeDownloadInstaller.validate 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.
RSSParserDelegate.parser (cyclomatic 16) Starcat/Core/Network/GitHubBlog/GitHubBlogRSSAPI.swift:154— RSSParserDelegate.parser 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.
KnowledgeRAGService.runGenerationPhase (cyclomatic 16) Starcat/Features/RAG/Core/KnowledgeRAGService.swift:1449— KnowledgeRAGService.runGenerationPhase 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.
RAGRepositoryInsightsXMLProjector.project (cyclomatic 16) Starcat/Features/RAG/Core/RAGRepositoryInsightsContext.swift:250— RAGRepositoryInsightsXMLProjector.project 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.
RAGWorkspaceInspector.evidenceInspector (cyclomatic 16) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:265— RAGWorkspaceInspector.evidenceInspector has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: RAGWorkspaceInspector.debugStageKey (cyclomatic 25) 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.
CCSwitchConfigStore.parseSQLValueList (cyclomatic 16) Starcat/Features/Settings/CCSwitchImport/CCSwitchConfigStore.swift:196— CCSwitchConfigStore.parseSQLValueList 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.
starcat-localization.scan_json_value (cyclomatic 16) supports/scripts/starcat-localization.py:263— starcat-localization.scan_json_value 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.
starcat-localization.load_manifest (cyclomatic 16) supports/scripts/starcat-localization.py:578— starcat-localization.load_manifest 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.
entry.drawFlow (cyclomatic 16) resources/follow-graph/entry.js:462— entry.drawFlow 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.
KnowledgeRAGWorkspaceViewModel.runQuestion (cognitive 132) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:2908— KnowledgeRAGWorkspaceViewModel.runQuestion has cognitive complexity 132 (threshold 15). Drivers by points: if/else 45 (106 pts), boolean chains 12, match/switch 2 (7 pts), ternaries 2 (3 pts), error handling 2, loops 1 (2 pts) (nesting depth added 68). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RepoSkillScanner.scan (cognitive 110) Starcat/Core/Skills/RepoSkillScanner.swift:18— RepoSkillScanner.scan has cognitive complexity 110 (threshold 15). Drivers by points: if/else 12 (40 pts), loops 9 (25 pts), error handling 5 (18 pts), boolean chains 15, ternaries 3 (12 pts) (nesting depth added 66). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CodexAppServerDriver.receiveNotificationOrRequest (cognitive 98) Starcat/Features/Agents/ExternalRuntime/CodexAppServerAdapter.swift:293— CodexAppServerDriver.receiveNotificationOrRequest has cognitive complexity 98 (threshold 15). Drivers by points: if/else 35 (70 pts), boolean chains 19, ternaries 3 (6 pts), match/switch 2 (3 pts) (nesting depth added 39). 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.
entry.update (cognitive 93) resources/follow-graph/entry.js:704— entry.update has cognitive complexity 93 (threshold 15). Drivers by points: if/else 34 (53 pts), loops 6 (16 pts), ternaries 6 (15 pts), boolean chains 9 (nesting depth added 38). Of this number, 65 points are the body's own statements and 28 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RAGWorkspaceInspector.planInspector (cognitive 85) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:1560— RAGWorkspaceInspector.planInspector has cognitive complexity 85 (threshold 15). Drivers by points: if/else 25 (70 pts), ternaries 3 (13 pts), boolean chains 2 (nesting depth added 55). 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.
ExternalAgentProcessSession.run (cognitive 84) Starcat/Features/Agents/ExternalRuntime/ExternalAgentRuntimeHost.swift:115— ExternalAgentProcessSession.run has cognitive complexity 84 (threshold 15). Drivers by points: if/else 20 (61 pts), loops 6 (15 pts), boolean chains 6, error handling 2 (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StorageSettingsTab.perform (cognitive 83) Starcat/Features/Settings/SettingsView.swift:2324— StorageSettingsTab.perform has cognitive complexity 83 (threshold 15). Drivers by points: error handling 24 (48 pts), if/else 12 (34 pts), match/switch 1 (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HomeViewModel.reloadItems (cognitive 79) Starcat/Features/Home/HomeViewModel.swift:2757— HomeViewModel.reloadItems has cognitive complexity 79 (threshold 15). Drivers by points: if/else 32 (54 pts), boolean chains 16, match/switch 2 (4 pts), ternaries 2 (3 pts), error handling 1, loops 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DeepSeekHarnessDriver.mapEvent (cognitive 78) Starcat/Features/Agents/ExternalRuntime/DeepSeekHarnessAdapter.swift:360— DeepSeekHarnessDriver.mapEvent has cognitive complexity 78 (threshold 15). Drivers by points: if/else 23 (47 pts), ternaries 7 (17 pts), boolean chains 11, match/switch 2 (3 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
analyze.analyze (cognitive 73) skills/starcat-diagnostics/scripts/analyze.py:206— analyze.analyze has cognitive complexity 73 (threshold 15). Drivers by points: if/else 19 (35 pts), boolean chains 19, ternaries 8 (13 pts), loops 6 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SyncManager.runSyncBody (cognitive 70) Starcat/Core/Sync/SyncManager.swift:262— SyncManager.runSyncBody has cognitive complexity 70 (threshold 15). Drivers by points: if/else 20 (44 pts), error handling 8 (12 pts), boolean chains 7, ternaries 2 (5 pts), loops 1 (2 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
analyze.collect (cognitive 67) skills/starcat-diagnostics/scripts/analyze.py:103— analyze.collect has cognitive complexity 67 (threshold 15). Drivers by points: if/else 23 (42 pts), boolean chains 13, loops 4 (7 pts), error handling 2 (5 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.
LocalAIModelManager.runInstall (cognitive 64) Starcat/Features/AI/LocalAI/LocalAIModelManager.swift:367— LocalAIModelManager.runInstall has cognitive complexity 64 (threshold 15). Drivers by points: if/else 10 (37 pts), ternaries 3 (13 pts), error handling 4 (8 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CodebaseMemoryViewModel.generate (cognitive 62) Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryViewModel.swift:217— CodebaseMemoryViewModel.generate has cognitive complexity 62 (threshold 15). Drivers by points: if/else 17 (38 pts), ternaries 4 (13 pts), error handling 5 (7 pts), boolean chains 4 (nesting depth added 32). 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.
DailyRadarWorkspaceViewModel.reload (cognitive 60) Starcat/Features/DailyRadar/DailyRadarWorkspaceViewModel.swift:238— DailyRadarWorkspaceViewModel.reload has cognitive complexity 60 (threshold 15). Drivers by points: if/else 16 (38 pts), boolean chains 15, ternaries 2 (4 pts), error handling 1 (2 pts), loops 1 (nesting depth added 25). 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.
FollowGraphViewModel.explore (cognitive 60) Starcat/Features/FollowGraph/FollowGraphViewModel.swift:477— FollowGraphViewModel.explore has cognitive complexity 60 (threshold 15). Drivers by points: if/else 12 (30 pts), error handling 5 (17 pts), loops 4 (10 pts), boolean chains 3 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DiagnosticLogStore.append (cognitive 60) Starcat/Shared/Diagnostics/DiagnosticLogStore.swift:238— DiagnosticLogStore.append has cognitive complexity 60 (threshold 15). Drivers by points: if/else 14 (45 pts), loops 2 (7 pts), boolean chains 4, error handling 2 (4 pts) (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LoopAgentRuntime.execute (cognitive 60) Starcat/Features/Agents/Core/LoopAgentRuntime.swift:378— LoopAgentRuntime.execute has cognitive complexity 60 (threshold 15). Drivers by points: if/else 17 (42 pts), boolean chains 10, ternaries 2 (4 pts), loops 2 (3 pts), match/switch 1 (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.
SmartCollectionRuleFilter.apply (cognitive 56) Starcat/Features/Collections/SmartCollectionRuleSummary.swift:235— SmartCollectionRuleFilter.apply has cognitive complexity 56 (threshold 15). Drivers by points: if/else 34 (42 pts), ternaries 5 (10 pts), boolean chains 2, match/switch 1 (2 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.
HomeViewModel.reloadDatabasePagedItems (cognitive 56) Starcat/Features/Home/HomeViewModel.swift:3156— HomeViewModel.reloadDatabasePagedItems has cognitive complexity 56 (threshold 15). Drivers by points: if/else 24 (40 pts), boolean chains 9, error handling 2 (3 pts), match/switch 2 (3 pts), ternaries 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExploreDiscoveryViewModel.reload (cognitive 55) Starcat/Features/Explore/ExploreDiscoveryViewModel.swift:68— ExploreDiscoveryViewModel.reload has cognitive complexity 55 (threshold 15). Drivers by points: if/else 22 (39 pts), boolean chains 13, error handling 2, ternaries 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.
BatchAIQueueService.applyResult (cognitive 54) Starcat/Features/AI/BatchAIQueueService.swift:1681— BatchAIQueueService.applyResult has cognitive complexity 54 (threshold 15). Drivers by points: if/else 18 (34 pts), boolean chains 10, ternaries 3 (7 pts), loops 1 (3 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KnowledgeRAGIndexBuilder.embedPendingChunks (cognitive 53) Starcat/Core/RAG/KnowledgeRAGIndexBuilder.swift:885— KnowledgeRAGIndexBuilder.embedPendingChunks has cognitive complexity 53 (threshold 15). Drivers by points: if/else 20 (42 pts), error handling 3 (7 pts), boolean chains 3, loops 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.
KnowledgeRAGPromptBuilder.build (cognitive 53) Starcat/Features/RAG/Core/KnowledgeRAGPromptBuilder.swift:59— KnowledgeRAGPromptBuilder.build has cognitive complexity 53 (threshold 15). Drivers by points: if/else 13 (21 pts), ternaries 12 (15 pts), boolean chains 11, loops 4 (6 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReadmeViewModel.loadInternal (cognitive 52) Starcat/Features/Home/ReadmeViewModel.swift:378— ReadmeViewModel.loadInternal has cognitive complexity 52 (threshold 15). Drivers by points: if/else 28 (39 pts), boolean chains 8, match/switch 2 (3 pts), error handling 1, 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.
DiskChatHistoryStore.migrate (cognitive 51) Starcat/Shared/Services/DiskChatHistoryStore.swift:232— DiskChatHistoryStore.migrate has cognitive complexity 51 (threshold 15). Drivers by points: if/else 17 (32 pts), loops 5 (9 pts), match/switch 2 (6 pts), boolean chains 3, error handling 1 (nesting depth added 23). Of this number, 42 points are the body's own statements and 9 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KnowledgeRAGService.runPromptPhase (cognitive 51) Starcat/Features/RAG/Core/KnowledgeRAGService.swift:1220— KnowledgeRAGService.runPromptPhase has cognitive complexity 51 (threshold 15). Drivers by points: boolean chains 22, if/else 15 (16 pts), ternaries 6 (13 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.
ActivityViewModel.reload (cognitive 50) Starcat/Features/Activity/ActivityViewModel.swift:496— ActivityViewModel.reload has cognitive complexity 50 (threshold 15). Drivers by points: if/else 23 (31 pts), boolean chains 14, match/switch 2 (4 pts), ternaries 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.
ExternalAgentEventProjector.consume (cognitive 50) Starcat/Features/Agents/ExternalRuntime/ExternalAgentRuntime.swift:535— ExternalAgentEventProjector.consume has cognitive complexity 50 (threshold 15). Drivers by points: if/else 17 (35 pts), ternaries 5 (10 pts), boolean chains 4, match/switch 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SmartCollectionRuleSummary.appendAdvancedLines (cognitive 48) Starcat/Features/Collections/SmartCollectionRuleSummary.swift:68— SmartCollectionRuleSummary.appendAdvancedLines has cognitive complexity 48 (threshold 15). Drivers by points: if/else 34, ternaries 5 (10 pts), boolean chains 4 (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.
LayaDecisionModelManager.runInstall (cognitive 48) Starcat/Features/AI/LocalAI/LayaDecisionModelManager.swift:142— LayaDecisionModelManager.runInstall has cognitive complexity 48 (threshold 15). Drivers by points: if/else 10 (27 pts), ternaries 3 (11 pts), error handling 4 (5 pts), loops 1 (3 pts), boolean chains 2 (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.
LocalMLXRuntime.generate (cognitive 48) Starcat/Features/AI/LocalAI/LocalMLXRuntime.swift:499— LocalMLXRuntime.generate has cognitive complexity 48 (threshold 15). Drivers by points: if/else 12 (28 pts), match/switch 3 (7 pts), loops 3 (6 pts), ternaries 5, boolean chains 1, error handling 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GRDBRAGChunkRepository.replaceSource (cognitive 47) Starcat/Core/RAG/RAGChunkRepository.swift:156— GRDBRAGChunkRepository.replaceSource has cognitive complexity 47 (threshold 15). Drivers by points: if/else 15 (33 pts), boolean chains 7, ternaries 2 (6 pts), loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReadmeStarJourney.growthEvent (cognitive 46) Starcat/Features/Insights/ReadmeStarHistoryChartModel.swift:204— ReadmeStarJourney.growthEvent has cognitive complexity 46 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 15, loops 4 (6 pts) (nesting depth added 14). Of this number, 28 points are the body's own statements and 18 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.
SkillFrontmatter.parse (cognitive 45) Starcat/Core/Skills/SkillFrontmatter.swift:34— SkillFrontmatter.parse has cognitive complexity 45 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 15, loops 3 (7 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.
AppBackgroundTaskSnapshot.current (cognitive 45) Starcat/Features/Home/AppBackgroundTaskSnapshot.swift:41— AppBackgroundTaskSnapshot.current has cognitive complexity 45 (threshold 15). Drivers by points: if/else 21 (26 pts), boolean chains 7, ternaries 3 (6 pts), loops 2 (3 pts), match/switch 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HomeViewModel.selection (cognitive 44) Starcat/Features/Home/HomeViewModel.swift:46— HomeViewModel.selection has cognitive complexity 44 (threshold 15). Drivers by points: if/else 26 (41 pts), boolean chains 3 (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.
KnowledgeRAGIndexBuilder.startObservingSourceChanges (cognitive 43) Starcat/Core/RAG/KnowledgeRAGIndexBuilder.swift:356— KnowledgeRAGIndexBuilder.startObservingSourceChanges has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (28 pts), loops 10 (12 pts), boolean chains 3 (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.
TrendingViewModel.reload (cognitive 43) Starcat/Features/Trending/TrendingViewModel.swift:425— TrendingViewModel.reload has cognitive complexity 43 (threshold 15). Drivers by points: if/else 25 (38 pts), boolean chains 4, 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.
GRDBRepoRepository.makeListQuery (cognitive 42) Starcat/Core/Sync/RepoRepository.swift:793— GRDBRepoRepository.makeListQuery has cognitive complexity 42 (threshold 15). Drivers by points: if/else 22 (27 pts), match/switch 13 (14 pts), boolean chains 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.
RepoAIChatViewModel.performSendMessage (cognitive 42) Starcat/Features/AI/RepoAIChatViewModel.swift:504— RepoAIChatViewModel.performSendMessage has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (32 pts), boolean chains 5, ternaries 2 (4 pts), error handling 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WeeklyContentViewModel.deriveLocalItems (cognitive 42) Starcat/Features/Activity/WeeklyContentView.swift:1760— WeeklyContentViewModel.deriveLocalItems has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (32 pts), boolean chains 9, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RAGCLIJSONLineParser.parseClaude (cognitive 42) Starcat/Features/RAG/Core/RAGCLIModelClient.swift:305— RAGCLIJSONLineParser.parseClaude has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 14, match/switch 1 (3 pts), ternaries 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BatchAIQueueService.confirmPendingTagExpansion (cognitive 41) Starcat/Features/AI/BatchAIQueueService.swift:1962— BatchAIQueueService.confirmPendingTagExpansion has cognitive complexity 41 (threshold 15). Drivers by points: if/else 9 (17 pts), ternaries 3 (12 pts), loops 3 (6 pts), boolean chains 5, error handling 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BatchAIQueueService.runLoop (cognitive 40) Starcat/Features/AI/BatchAIQueueService.swift:1405— BatchAIQueueService.runLoop has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (16 pts), ternaries 2 (8 pts), loops 3 (7 pts), boolean chains 6, error handling 1 (3 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.
DailyRadarPreviewWorkspace.home (cognitive 40) Starcat/Features/DailyRadar/DailyRadarPreviewWorkspace.swift:176— DailyRadarPreviewWorkspace.home has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (19 pts), ternaries 9 (14 pts), boolean chains 7 (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.
FollowGraphStore.load (cognitive 39) Starcat/Features/FollowGraph/FollowGraphStore.swift:53— FollowGraphStore.load has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 11, ternaries 3 (6 pts), error handling 2 (4 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KnowledgeRAGWorkspaceViewModel.finalizeCancelledTurn (cognitive 39) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:3436— KnowledgeRAGWorkspaceViewModel.finalizeCancelledTurn has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (28 pts), error handling 4 (8 pts), boolean chains 3 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
starcat-localization.analyze_repository (cognitive 39) supports/scripts/starcat-localization.py:1159— starcat-localization.analyze_repository has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 4, loops 2 (3 pts), error handling 1 (2 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.
LibraryHTMLRenderer.renderMarkdown (cognitive 38) Starcat/Features/Profile/ShareCard/LibraryExportRenderer.swift:415— LibraryHTMLRenderer.renderMarkdown has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 5 (12 pts), boolean chains 8 (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.
SemanticIndexBuilder.execute (cognitive 37) Starcat/Features/AI/SemanticIndexBuilder.swift:306— SemanticIndexBuilder.execute has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (28 pts), loops 2 (5 pts), boolean chains 3, error handling 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WeeklyContentViewModel.makeLocalSorter (cognitive 37) Starcat/Features/Activity/WeeklyContentView.swift:1881— WeeklyContentViewModel.makeLocalSorter has cognitive complexity 37 (threshold 15). Drivers by points: if/else 18 (36 pts), match/switch 1 (nesting depth added 18). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
DailyRadarWorkspaceViewModel.reloadWeeklyTopic (cognitive 37) Starcat/Features/DailyRadar/DailyRadarWorkspaceViewModel.swift:139— DailyRadarWorkspaceViewModel.reloadWeeklyTopic has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 14, error handling 1 (2 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StarcatMCPWriteFacade.batchOrganizeRepos (cognitive 37) Starcat/Features/MCP/StarcatMCPWriteFacade.swift:160— StarcatMCPWriteFacade.batchOrganizeRepos has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (23 pts), loops 3 (7 pts), error handling 2 (4 pts), boolean chains 3 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CodexAppServerDriver.traceEvent (cognitive 37) Starcat/Features/Agents/ExternalRuntime/CodexAppServerAdapter.swift:771— CodexAppServerDriver.traceEvent has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (31 pts), boolean chains 3, ternaries 1 (2 pts), match/switch 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
starcat-localization.patch_catalog_text (cognitive 37) supports/scripts/starcat-localization.py:433— starcat-localization.patch_catalog_text has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 5 (9 pts), boolean chains 2, error handling 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AppDependencies.init (cognitive 36) Starcat/App/AppDependencies.swift:880— AppDependencies.init has cognitive complexity 36 (threshold 15). Drivers by points: if/else 19 (20 pts), boolean chains 9, error handling 4, ternaries 2, 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.
GitHubStarListAIGroupingSession.integrate (cognitive 36) Starcat/Features/AI/GitHubStarListAIGroupingSession.swift:1613— GitHubStarListAIGroupingSession.integrate has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (23 pts), ternaries 2 (6 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 19). 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.
RuntimeDownloadInstaller.run (cognitive 36) Starcat/Features/Settings/RuntimeDownloadInstaller.swift:312— RuntimeDownloadInstaller.run has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 2 (6 pts), boolean chains 3, error handling 1, ternaries 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReadmeAssetURLRewriter.rewriteSourceSet (cognitive 36) Starcat/Core/Network/GitHubAPI/ReadmeAssetURLRewriter.swift:345— ReadmeAssetURLRewriter.rewriteSourceSet has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 6 (11 pts), boolean chains 10 (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.
AgentTimelineProjection.makeItems (cognitive 36) Starcat/Features/Agents/Core/AgentTimelineProjection.swift:184— AgentTimelineProjection.makeItems has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (20 pts), ternaries 2 (7 pts), loops 4 (6 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KnowledgeRAGWorkspaceViewModel.selectConversation (cognitive 36) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:1111— KnowledgeRAGWorkspaceViewModel.selectConversation has cognitive complexity 36 (threshold 15). Drivers by points: if/else 17 (30 pts), boolean chains 5, 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.
CCSwitchConfigStore.parseSQLDump (cognitive 36) Starcat/Features/Settings/CCSwitchImport/CCSwitchConfigStore.swift:104— CCSwitchConfigStore.parseSQLDump has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (26 pts), boolean chains 7, loops 2 (3 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.
BatchAIQueueService.applySelectedSuggestedTags (cognitive 35) Starcat/Features/AI/BatchAIQueueService.swift:1007— BatchAIQueueService.applySelectedSuggestedTags has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (29 pts), error handling 2, loops 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReadmeViewModel.loadTrending (cognitive 34) Starcat/Features/Home/ReadmeViewModel.swift:256— ReadmeViewModel.loadTrending has cognitive complexity 34 (threshold 15). Drivers by points: if/else 20 (25 pts), boolean chains 8, 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.
AutoTidyScheduler.executeRound (cognitive 33) Starcat/Features/AI/AutoTidyScheduler.swift:335— AutoTidyScheduler.executeRound has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 9, ternaries 3 (8 pts), match/switch 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.
KnowledgeRAGWorkspaceViewModel.applyExecution (cognitive 33) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:3850— KnowledgeRAGWorkspaceViewModel.applyExecution has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 5 (9 pts), ternaries 3 (6 pts), boolean chains 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.
RAGWorkspaceError.classify (cognitive 33) Starcat/Features/RAG/UI/RAGWorkspaceErrorSheet.swift:171— RAGWorkspaceError.classify has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 10, 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.
drainImages (cognitive 33) resources/follow-graph/entry.js:75— drainImages has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 5, ternaries 1 (3 pts), loops 1 (nesting depth added 15). Most of this is not in the body itself: 6 of the 33 points are its own statements and the rest belongs to 4 function items inside it that branch (onload, onerror, finish, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
GRDBRepoStarHistoryRepository.performRefresh (cognitive 32) Starcat/Core/Insights/RepoStarHistoryRepository.swift:326— GRDBRepoStarHistoryRepository.performRefresh has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 9, error handling 3 (8 pts), 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.
RepoAIInsightViewModel.generate (cognitive 32) Starcat/Features/AI/RepoAIInsightViewModel.swift:296— RepoAIInsightViewModel.generate has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 8, ternaries 2 (4 pts), error handling 2, match/switch 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.
RepoSkillSession.start (cognitive 32) Starcat/Features/Home/RepoSkillSession.swift:239— RepoSkillSession.start has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 7, loops 3 (4 pts), ternaries 2 (4 pts), error handling 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.
LocalAIModelDownloader.streamDownload (cognitive 32) Starcat/Features/AI/LocalAI/LocalAIModelDownloader.swift:193— LocalAIModelDownloader.streamDownload has cognitive complexity 32 (threshold 15). Drivers by points: if/else 17 (19 pts), boolean chains 9, loops 2 (3 pts), match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
RAGWorkspaceInspector.evidenceInspector (cognitive 32) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:265— RAGWorkspaceInspector.evidenceInspector has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 9 (21 pts), if/else 6 (10 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CCSwitchConfigStore.parseSQLValueList (cognitive 32) Starcat/Features/Settings/CCSwitchImport/CCSwitchConfigStore.swift:196— CCSwitchConfigStore.parseSQLValueList has cognitive complexity 32 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 4 (9 pts), boolean chains 6, ternaries 1 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AppSettings.init (cognitive 31) Starcat/Core/Settings/AppSettings.swift:1917— AppSettings.init has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 9, boolean chains 4, loops 2 (4 pts), error handling 1 (3 pts) (nesting depth added 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.
AwesomeCustomSourceService.parse (cognitive 31) Starcat/Core/Sync/AwesomeCustomSourceService.swift:103— AwesomeCustomSourceService.parse has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (20 pts), error handling 3 (6 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DailyRadarProgrammaticCover.drawInterference (cognitive 31) Starcat/Features/DailyRadar/DailyRadarProgrammaticCover.swift:340— DailyRadarProgrammaticCover.drawInterference has cognitive complexity 31 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 4 (10 pts), ternaries 3 (10 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.
RepositoryInsightsViewModel.loadReleaseCadenceFallback (cognitive 31) Starcat/Features/Insights/RepositoryInsightsViewModel.swift:870— RepositoryInsightsViewModel.loadReleaseCadenceFallback has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (17 pts), ternaries 2 (6 pts), match/switch 2 (4 pts), boolean chains 3, 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.
EncoderConfigurationFile.validated (cognitive 31) Starcat/Features/AI/LocalAI/LayaMLXDecisionRuntime.swift:440— EncoderConfigurationFile.validated has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 10, 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.
LoopAgentRuntime.requestModel (cognitive 31) Starcat/Features/Agents/Core/LoopAgentRuntime.swift:663— LoopAgentRuntime.requestModel has cognitive complexity 31 (threshold 15). Drivers by points: loops 5 (13 pts), if/else 5 (7 pts), match/switch 2 (7 pts), boolean chains 3, 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.
ExternalAgentStderrSummary.classification (cognitive 31) Starcat/Features/Agents/ExternalRuntime/ExternalAgentRuntimeHost.swift:604— ExternalAgentStderrSummary.classification has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 11 (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.
entry.applyVisibleGraph (cognitive 31) resources/follow-graph/entry.js:630— entry.applyVisibleGraph has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 7 (13 pts), boolean chains 3 (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.
drawNode (cognitive 31) resources/follow-graph/entry.js:266— drawNode has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 10 (17 pts), if/else 7 (8 pts), boolean chains 6 (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.
OpenAIClient.makeChatQuery (cognitive 30) Starcat/Features/AI/OpenAIClient.swift:859— OpenAIClient.makeChatQuery has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 10 (14 pts), if/else 5 (9 pts), loops 2 (3 pts), boolean chains 2, match/switch 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.
FollowGraphViewModel.refresh (cognitive 30) Starcat/Features/FollowGraph/FollowGraphViewModel.swift:381— FollowGraphViewModel.refresh has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 9, error handling 2 (3 pts), ternaries 1 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GitHubStarListAIGroupingPresentationSnapshot.init (cognitive 30) Starcat/Features/Home/GitHubStarListAIGroupingPresentation.swift:321— GitHubStarListAIGroupingPresentationSnapshot.init has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 6, match/switch 2 (5 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.
HomeViewModel.computeFilteredSorted (cognitive 30) Starcat/Features/Home/HomeViewModel.swift:3711— HomeViewModel.computeFilteredSorted has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 5, match/switch 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.
AgentWorkspaceRunSurface.agentComposerInputBox (cognitive 30) Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:536— AgentWorkspaceRunSurface.agentComposerInputBox has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 12, if/else 11, ternaries 7. 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.
drawFlow (cognitive 30) resources/follow-graph/entry.js:462— drawFlow has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 4 (9 pts), ternaries 2 (5 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RepoSkillStore.detect (cognitive 29) Starcat/Core/Skills/RepoSkillStore.swift:162— RepoSkillStore.detect has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 4, ternaries 4, 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.
AIProviderProfile.mergedDiscoveredModels (cognitive 29) Starcat/Features/AI/AIConfiguration.swift:306— AIProviderProfile.mergedDiscoveredModels has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 11). Of this number, 24 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.
LocalAISharedModelCoordinator.migrateLegacyModels (cognitive 29) Starcat/Features/AI/LocalAI/LocalAISharedModelCoordinator.swift:257— LocalAISharedModelCoordinator.migrateLegacyModels has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 8, error handling 2 (5 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.
KnowledgeRAGChunkEditor.body (cognitive 29) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:3145— KnowledgeRAGChunkEditor.body has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 6, ternaries 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProgressiveReveal.sync (cognitive 29) resources/follow-graph/progressive-reveal.mjs:21— ProgressiveReveal.sync has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 5 (9 pts), loops 5 (6 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BatchAIWorkspaceView.footer (cognitive 28) Starcat/Features/AI/BatchAIWorkspaceView.swift:283— BatchAIWorkspaceView.footer has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 7, match/switch 1 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
GitHubStarListAIGroupingSession.applyOne (cognitive 28) Starcat/Features/AI/GitHubStarListAIGroupingSession.swift:1777— GitHubStarListAIGroupingSession.applyOne has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (18 pts), ternaries 2 (4 pts), error handling 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Coordinator.userContentController (cognitive 28) Starcat/Features/FollowGraph/FollowGraphWebView.swift:89— Coordinator.userContentController has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 14, if/else 9 (13 pts), match/switch 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.
RepoDetailScaffold.trailingActionsView (cognitive 28) Starcat/Shared/Components/RepoDetailScaffold.swift:862— RepoDetailScaffold.trailingActionsView has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 5 (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.
CodexProviderCatalog.parse (cognitive 28) Starcat/Features/Agents/ExternalRuntime/AgentRuntimeProviderCatalog.swift:88— CodexProviderCatalog.parse has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 11, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GitHubNotificationIssueSummary.makeContext (cognitive 27) Starcat/Features/Activity/GitHubNotificationIssueSummary.swift:28— GitHubNotificationIssueSummary.makeContext has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 4, loops 2, match/switch 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.
DailyRadarPreviewReader.body (cognitive 27) Starcat/Features/DailyRadar/DailyRadarPreviewReader.swift:31— DailyRadarPreviewReader.body has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 8, ternaries 4 (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.
FollowGraphViewModel.toggleFollow (cognitive 27) Starcat/Features/FollowGraph/FollowGraphViewModel.swift:230— FollowGraphViewModel.toggleFollow has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 6, error handling 2 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReadmeTranslationViewModel.performTranslation (cognitive 27) Starcat/Features/Home/ReadmeTranslationViewModel.swift:438— ReadmeTranslationViewModel.performTranslation has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (18 pts), error handling 4, match/switch 1 (2 pts), ternaries 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.
RepositoryInsightsView.contributorSection (cognitive 27) Starcat/Features/Insights/RepositoryInsightsView.swift:2117— RepositoryInsightsView.contributorSection has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 4 (14 pts), if/else 6 (11 pts), match/switch 1 (2 pts) (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.
SearchCenterView.resultContent (cognitive 27) Starcat/Features/Search/SearchCenterView.swift:526— SearchCenterView.resultContent has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JevConnectionSettingsModel.testConnection (cognitive 27) Starcat/Features/Settings/JevConnectionSettingsModel.swift:168— JevConnectionSettingsModel.testConnection has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (21 pts), error handling 4 (6 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DiagnosticArchiveBuilder.report (cognitive 27) Starcat/Shared/Diagnostics/DiagnosticArchiveBuilder.swift:210— DiagnosticArchiveBuilder.report has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 11, if/else 6 (10 pts), loops 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KnowledgeRAGBrowserViewModel.loadRepositories (cognitive 27) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:1183— KnowledgeRAGBrowserViewModel.loadRepositories has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 5, error handling 1, ternaries 1 (nesting depth added 11). 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.
starcat-localization.scan_json_value (cognitive 27) supports/scripts/starcat-localization.py:263— starcat-localization.scan_json_value has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 2 (6 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WeeklyContentViewModel.reload (cognitive 26) Starcat/Features/Activity/WeeklyContentView.swift:1170— WeeklyContentViewModel.reload has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 1, 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.
FollowGraphOverlayView.body (cognitive 26) Starcat/Features/FollowGraph/FollowGraphOverlayView.swift:33— FollowGraphOverlayView.body has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 8 (11 pts), if/else 9 (10 pts), boolean chains 4, error handling 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
RepositoryInsightsViewModel.loadActivity (cognitive 26) Starcat/Features/Insights/RepositoryInsightsViewModel.swift:975— RepositoryInsightsViewModel.loadActivity has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5, ternaries 2 (4 pts), match/switch 2 (3 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RepositoryInsightsViewModel.refreshWithGeneratingRetry (cognitive 26) Starcat/Features/Insights/RepositoryInsightsViewModel.swift:1524— RepositoryInsightsViewModel.refreshWithGeneratingRetry has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (16 pts), error handling 3 (7 pts), boolean chains 2, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DiskReadmeTranslationCache.reload (cognitive 26) Starcat/Shared/Services/DiskReadmeTranslationCache.swift:301— DiskReadmeTranslationCache.reload has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (15 pts), loops 3 (6 pts), boolean chains 5 (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.
DatabaseMigrations.ensureKnowledgeRAGSchema (cognitive 26) Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:3067— DatabaseMigrations.ensureKnowledgeRAGSchema has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17 (26 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.
KnowledgeRAGQueryPlanner.decodeAndValidate (cognitive 26) Starcat/Features/RAG/Core/KnowledgeRAGQueryPlanner.swift:292— KnowledgeRAGQueryPlanner.decodeAndValidate has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 5, loops 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RAGNetworkIntentResolver.resolve (cognitive 26) Starcat/Features/RAG/Core/RAGNetworkIntentResolver.swift:23— RAGNetworkIntentResolver.resolve has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 6, ternaries 2 (6 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GitHubNotificationInboxService.hydrate (cognitive 25) Starcat/Core/Sync/GitHubNotificationInboxService.swift:236— GitHubNotificationInboxService.hydrate has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 10, if/else 7 (10 pts), ternaries 1 (3 pts), error handling 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.
AIModelCapability.inferred (cognitive 25) Starcat/Features/AI/AIConfiguration.swift:82— AIModelCapability.inferred has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 19, if/else 6. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
GithubWebFlowService.exchangeCodeForToken (cognitive 25) Starcat/Features/Auth/GithubWebFlowService.swift:134— GithubWebFlowService.exchangeCodeForToken has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 5, match/switch 1 (3 pts), error handling 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.
HomeViewModel.refreshSidebar (cognitive 25) Starcat/Features/Home/HomeViewModel.swift:1925— HomeViewModel.refreshSidebar has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (16 pts), match/switch 2 (6 pts), boolean chains 2, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RepositoryInsightsViewModel.loadCommunityProfile (cognitive 25) Starcat/Features/Insights/RepositoryInsightsViewModel.swift:1261— RepositoryInsightsViewModel.loadCommunityProfile has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 2 (4 pts), boolean chains 3, match/switch 2 (3 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StarcatMCPToolRegistry.callTool (cognitive 25) Starcat/Features/MCP/StarcatMCPToolRegistry.swift:379— StarcatMCPToolRegistry.callTool has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (21 pts), match/switch 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RepoRecommendationViewModel.loadInitial (cognitive 25) Starcat/Features/Recommendations/RepoRecommendationViewModel.swift:48— RepoRecommendationViewModel.loadInitial has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (14 pts), error handling 4 (6 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Coordinator.userContentController (cognitive 25) Starcat/Shared/Components/ReadmeWebView.swift:1667— Coordinator.userContentController has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 9 (nesting depth added 6). Of this number, 17 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.
DiagnosticArchiveBuilder.writePayload (cognitive 25) Starcat/Shared/Diagnostics/DiagnosticArchiveBuilder.swift:65— DiagnosticArchiveBuilder.writePayload has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 5, ternaries 3 (5 pts), loops 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AnthropicClient.runStream (cognitive 25) Starcat/Features/AI/Anthropic/AnthropicClient.swift:188— AnthropicClient.runStream has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 4 (10 pts), error handling 4 (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.
starcat-localization.import_package_paths (cognitive 25) supports/scripts/starcat-localization.py:1059— starcat-localization.import_package_paths has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 3 (9 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KnowledgeRAGIndexBuilder.drainPendingAutoIfNeeded (cognitive 24) Starcat/Core/RAG/KnowledgeRAGIndexBuilder.swift:1377— KnowledgeRAGIndexBuilder.drainPendingAutoIfNeeded has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (5 pts), error handling 1 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BatchAIQueueService.applySelectedTagReviewRepositories (cognitive 24) Starcat/Features/AI/BatchAIQueueService.swift:1109— BatchAIQueueService.applySelectedTagReviewRepositories has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (8 pts), error handling 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RepositoryDecisionService.generateBatchTagSuggestions (cognitive 24) Starcat/Features/AI/RepositoryDecisionService.swift:167— RepositoryDecisionService.generateBatchTagSuggestions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 5 (8 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.
ActivityViewModel.supplementNetworks (cognitive 24) Starcat/Features/Activity/ActivityViewModel.swift:754— ActivityViewModel.supplementNetworks has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 6, match/switch 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.
RepositoryInsightsViewModel.loadCommitActivity (cognitive 24) Starcat/Features/Insights/RepositoryInsightsViewModel.swift:1091— RepositoryInsightsViewModel.loadCommitActivity has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (13 pts), ternaries 2 (4 pts), boolean chains 3, match/switch 2 (3 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (RepositoryInsightsViewModel.loadContributors, RepositoryInsightsViewModel.loadRecentActivity) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
RepositoryInsightsViewModel.loadContributors (cognitive 24) Starcat/Features/Insights/RepositoryInsightsViewModel.swift:1180— RepositoryInsightsViewModel.loadContributors has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (13 pts), ternaries 2 (4 pts), boolean chains 3, match/switch 2 (3 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (RepositoryInsightsViewModel.loadCommitActivity, RepositoryInsightsViewModel.loadRecentActivity) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
RepositoryInsightsViewModel.loadRecentActivity (cognitive 24) Starcat/Features/Insights/RepositoryInsightsViewModel.swift:1434— RepositoryInsightsViewModel.loadRecentActivity has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (13 pts), ternaries 2 (4 pts), boolean chains 3, match/switch 2 (3 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (RepositoryInsightsViewModel.loadCommitActivity, RepositoryInsightsViewModel.loadContributors) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
AgentHarnessProcessView.contentRow (cognitive 24) Starcat/Features/Agents/Core/AgentHarnessProcessView.swift:203— AgentHarnessProcessView.contentRow has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 5 (10 pts), boolean chains 1, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
GreedySnakeAnimator.buildGreedyPath (cognitive 24) Starcat/Features/Profile/SnakeAnimator/GreedySnakeAnimator.swift:56— GreedySnakeAnimator.buildGreedyPath has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 5 (10 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RAGWorkspaceAnswerSurface.commandComposer (cognitive 24) Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:643— RAGWorkspaceAnswerSurface.commandComposer has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 13 (14 pts), if/else 8, boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
analyze.load_files (cognitive 24) skills/starcat-diagnostics/scripts/analyze.py:62— analyze.load_files has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2 (4 pts), boolean chains 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.
StarsSyncFollowUpCoordinator.schedule (cognitive 23) Starcat/Core/Sync/StarsSyncFollowUpCoordinator.swift:43— StarsSyncFollowUpCoordinator.schedule has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (20 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.
OpenAIClient.chatStream (cognitive 23) Starcat/Features/AI/OpenAIClient.swift:167— OpenAIClient.chatStream has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 6 (16 pts), match/switch 2 (7 pts), error handling 5 (6 pts), boolean chains 1, ternaries 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. This shape REPEATS in the file: one other method here (OpenAIClient.chatStream::consume) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
RepoAIWindowContentView.summarySection (cognitive 23) Starcat/Features/AI/RepoAIWindowContentView.swift:480— RepoAIWindowContentView.summarySection has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 5 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReadmeStarHistoryViewModel.loadIfNeeded (cognitive 23) Starcat/Features/Insights/ReadmeStarHistoryPreview.swift:121— ReadmeStarHistoryViewModel.loadIfNeeded has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 8 (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.
DirectPassConstellation.drawPixelArchipelagos (cognitive 23) Starcat/Features/Settings/ProSettingsView.swift:1873— DirectPassConstellation.drawPixelArchipelagos has cognitive complexity 23 (threshold 15). Drivers by points: if/else 2 (8 pts), loops 3 (6 pts), ternaries 3 (6 pts), boolean chains 3 (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.
TrendingListFilter.matches (cognitive 23) Starcat/Features/Trending/TrendingListPipeline.swift:91— TrendingListFilter.matches has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 4, match/switch 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
AnthropicMessagesCodec.decodeMessageObject (cognitive 23) Starcat/Features/AI/Anthropic/AnthropicMessagesCodec.swift:93— AnthropicMessagesCodec.decodeMessageObject has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, ternaries 3, match/switch 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.
AnthropicSSEStreamParser.handle (cognitive 23) Starcat/Features/AI/Anthropic/AnthropicMessagesCodec.swift:491— AnthropicSSEStreamParser.handle has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 5, 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.
AgentTraceTimelinePresentation.inferredParents (cognitive 23) Starcat/Features/Agents/Core/AgentTraceDetailPresentation.swift:309— AgentTraceTimelinePresentation.inferredParents has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 4, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LibraryMarkdownRenderer.buildRepoEntries (cognitive 23) Starcat/Features/Profile/ShareCard/LibraryExportRenderer.swift:122— LibraryMarkdownRenderer.buildRepoEntries has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 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.
RAGRepoContextXMLProjector.project (cognitive 23) Starcat/Features/RAG/Core/RAGRepoContextXMLProjector.swift:30— RAGRepoContextXMLProjector.project has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5, loops 3 (5 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.
RAGAssistantMessageBlock.assistantMessageContent (cognitive 23) Starcat/Features/RAG/UI/RAGAssistantMessageBlock.swift:87— RAGAssistantMessageBlock.assistantMessageContent has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 4 (8 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
submit_import.load_and_validate (cognitive 23) skills/starcat-weekly-import/scripts/submit_import.py:99— submit_import.load_and_validate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
starcat-localization.load_manifest (cognitive 23) supports/scripts/starcat-localization.py:578— starcat-localization.load_manifest has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4, 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.
RepoHealthCalculator.maintenanceScore (cognitive 22) Starcat/Core/Health/RepoHealthCalculator.swift:69— RepoHealthCalculator.maintenanceScore has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (14 pts), ternaries 2 (4 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
LinuxDoPayload.validate (cognitive 22) Starcat/Core/Network/LinuxDoModels.swift:69— LinuxDoPayload.validate has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 14, if/else 4 (7 pts), match/switch 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
BatchAIJob.== (cognitive 22) Starcat/Features/AI/BatchAIQueueModels.swift:258— BatchAIJob.== has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 18, if/else 2 (3 pts), loops 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
GitHubStarListAIGroupingSession.applyExactMemberships (cognitive 22) Starcat/Features/AI/GitHubStarListAIGroupingSession.swift:1852— GitHubStarListAIGroupingSession.applyExactMemberships has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (15 pts), error handling 2 (3 pts), boolean chains 2, loops 1, ternaries 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.
RepoAIInsightService.generateInsight (cognitive 22) Starcat/Features/AI/RepoAIInsightService.swift:409— RepoAIInsightService.generateInsight has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 6, error handling 1 (2 pts), ternaries 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TagTaxonomyBootstrapAnalyzer.analyze (cognitive 22) Starcat/Features/AI/TagTaxonomyBootstrapService.swift:235— TagTaxonomyBootstrapAnalyzer.analyze has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (16 pts), loops 2 (3 pts), boolean chains 2, ternaries 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.
GitHubNotificationCommentComposer.generateComment (cognitive 22) Starcat/Features/Activity/GitHubNotificationDetailView.swift:2611— GitHubNotificationCommentComposer.generateComment has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), error handling 3, 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.
GitHubNotificationIssueSummarySession.start (cognitive 22) Starcat/Features/Activity/GitHubNotificationIssueSummarySession.swift:48— GitHubNotificationIssueSummarySession.start has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 8, 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.
AwesomeGlobalFilterPolicy.matches (cognitive 22) Starcat/Features/Explore/AwesomeView.swift:588— AwesomeGlobalFilterPolicy.matches has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 3, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RepositoryInsightsViewModel.loadSecurityAdvisories (cognitive 22) Starcat/Features/Insights/RepositoryInsightsViewModel.swift:1354— RepositoryInsightsViewModel.loadSecurityAdvisories has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 2 (4 pts), boolean chains 3, match/switch 2 (3 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Coordinator.update (cognitive 22) Starcat/Features/AI/LocalAI/LocalAILogTextView.swift:84— Coordinator.update has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 2 (6 pts), boolean chains 4, 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.
RepositoryAgentRunContextProvider.loadBusinessRepos (cognitive 22) Starcat/Features/Agents/Core/AgentRunContextProvider.swift:111— RepositoryAgentRunContextProvider.loadBusinessRepos has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 7, match/switch 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
AgentWorkspaceRunSurface.loadCodexModelCatalogIfNeeded (cognitive 22) Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:373— AgentWorkspaceRunSurface.loadCodexModelCatalogIfNeeded has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 6, error handling 2, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FoodChaseSnakeAnimator.simulate (cognitive 22) Starcat/Features/Profile/SnakeAnimator/FoodChaseSnakeAnimator.swift:57— FoodChaseSnakeAnimator.simulate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (7 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RAGChunkBuilder.markdownBlocks (cognitive 21) Starcat/Core/RAG/RAGChunkBuilder.swift:374— RAGChunkBuilder.markdownBlocks has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 10). Of this number, 20 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BatchAIQueueService.processSingle (cognitive 21) Starcat/Features/AI/BatchAIQueueService.swift:1576— BatchAIQueueService.processSingle has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9, boolean chains 8, ternaries 2 (4 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
RepoAIInsightService.generateText (cognitive 21) Starcat/Features/AI/RepoAIInsightService.swift:1472— RepoAIInsightService.generateText has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 1 (3 pts), loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HomeView.confirmTagTaxonomyBootstrap (cognitive 21) Starcat/Features/Home/HomeView.swift:2443— HomeView.confirmTagTaxonomyBootstrap has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (4 pts), boolean chains 3, 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.
ReadmeStarJourney.init (cognitive 21) Starcat/Features/Insights/ReadmeStarHistoryChartModel.swift:118— ReadmeStarJourney.init has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 12, if/else 6 (8 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.
AnySearchClient.perform (cognitive 21) Starcat/Core/Network/AnySearch/AnySearchClient.swift:91— AnySearchClient.perform has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, ternaries 2 (4 pts), error handling 1, 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.
LoopAgentRuntime.emitTraceEvents (cognitive 21) Starcat/Features/Agents/Core/LoopAgentRuntime.swift:1148— LoopAgentRuntime.emitTraceEvents has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 5 (15 pts), match/switch 2 (3 pts), if/else 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.
FoodChaseSnakeAnimator.bfsPathAvoiding (cognitive 21) Starcat/Features/Profile/SnakeAnimator/FoodChaseSnakeAnimator.swift:171— FoodChaseSnakeAnimator.bfsPathAvoiding has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KnowledgeRAGService.runRetrievalPhase (cognitive 21) Starcat/Features/RAG/Core/KnowledgeRAGService.swift:940— KnowledgeRAGService.runRetrievalPhase has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 3 (5 pts), boolean chains 4 (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.
KnowledgeRAGService.runRemoteContextPhase (cognitive 21) Starcat/Features/RAG/Core/KnowledgeRAGService.swift:1116— KnowledgeRAGService.runRemoteContextPhase has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (19 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.
starcat-localization.json_object_members (cognitive 21) supports/scripts/starcat-localization.py:300— starcat-localization.json_object_members has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 5, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RepoSkillInstaller.install (cognitive 20) Starcat/Core/Skills/RepoSkillInstaller.swift:43— RepoSkillInstaller.install has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 7, ternaries 1 (2 pts), error handling 1, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RepoSkillInstaller.verifyFiles (cognitive 20) Starcat/Core/Skills/RepoSkillInstaller.swift:107— RepoSkillInstaller.verifyFiles has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GitHubNotificationInboxService.mergeConfirmedTimelineComments (cognitive 20) Starcat/Core/Sync/GitHubNotificationInboxService.swift:469— GitHubNotificationInboxService.mergeConfirmedTimelineComments has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReadmeTranslationService.jsonObjectCandidates (cognitive 20) Starcat/Features/AI/ReadmeTranslationService.swift:981— ReadmeTranslationService.jsonObjectCandidates has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RepoAIInsightService.generateLLMTagSuggestions (cognitive 20) Starcat/Features/AI/RepoAIInsightService.swift:671— RepoAIInsightService.generateLLMTagSuggestions has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 5 (6 pts), loops 3 (4 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.
WikiKnowledgeBackfillCoordinator.start (cognitive 20) Starcat/Features/AI/WikiKnowledgeBackfillCoordinator.swift:45— WikiKnowledgeBackfillCoordinator.start has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, loops 2 (3 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.
ActivityView.matchesGlobalFilters (cognitive 20) Starcat/Features/Activity/ActivityView.swift:363— ActivityView.matchesGlobalFilters has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 3, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WeeklyContentView.matchesGlobalFilters (cognitive 20) Starcat/Features/Activity/WeeklyContentView.swift:728— WeeklyContentView.matchesGlobalFilters has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 3, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CompanionLocalServer.bind (cognitive 20) Starcat/Features/Companion/CompanionLocalServer.swift:75— CompanionLocalServer.bind has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 1 (2 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.
ExploreDiscoveryListView.matchesGlobalFilters (cognitive 20) Starcat/Features/Explore/ExploreView.swift:670— ExploreDiscoveryListView.matchesGlobalFilters has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 3, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FollowGraphAvatarURL.request (cognitive 20) Starcat/Features/FollowGraph/FollowGraphAvatarCache.swift:29— FollowGraphAvatarURL.request has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 16, if/else 3 (4 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
FollowGraphViewModel.open (cognitive 20) Starcat/Features/FollowGraph/FollowGraphViewModel.swift:92— FollowGraphViewModel.open has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11, boolean chains 9. 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.
RepoListView.manageCategoryContent (cognitive 20) Starcat/Features/Home/RepoListView.swift:1530— RepoListView.manageCategoryContent has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 7, 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.
RepoListView.unifiedListContent (cognitive 20) Starcat/Features/Home/RepoListView.swift:1936— RepoListView.unifiedListContent has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13, boolean chains 6, ternaries 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ReadmeStarHistoryHTMLRenderer.render (cognitive 20) Starcat/Features/Insights/ReadmeStarHistoryHTMLRenderer.swift:82— ReadmeStarHistoryHTMLRenderer.render has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 11 (12 pts), boolean chains 4, if/else 4 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RepositoryInsightsView.commitChart (cognitive 20) Starcat/Features/Insights/RepositoryInsightsView.swift:1841— RepositoryInsightsView.commitChart has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 8, 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.
StarcatMCPService.start (cognitive 20) Starcat/Features/MCP/StarcatMCPService.swift:258— StarcatMCPService.start has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4, error handling 2, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KnowledgeRAGService.runGenerationPhase (cognitive 20) Starcat/Features/RAG/Core/KnowledgeRAGService.swift:1449— KnowledgeRAGService.runGenerationPhase has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RAGWorkspaceInspector.repoContextCitationDetail (cognitive 20) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:1331— RAGWorkspaceInspector.repoContextCitationDetail has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 4 (8 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RAGWorkspaceInspector.repositoryInsightsCitationDetail (cognitive 20) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:1419— RAGWorkspaceInspector.repositoryInsightsCitationDetail has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 3 (6 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sync-starcat-readme-promo.promo (cognitive 20) supports/scripts/sync-starcat-readme-promo.py:252— sync-starcat-readme-promo.promo has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 16, boolean chains 4. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
StarHistoryAPI.fetch (cognitive 19) Starcat/Core/Network/StarHistoryAPI.swift:154— StarHistoryAPI.fetch has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, error handling 4, 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.
GitHubStarListSyncService.reconcilePendingBatches (cognitive 19) Starcat/Core/Sync/GitHubStarListSyncService.swift:618— GitHubStarListSyncService.reconcilePendingBatches has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (13 pts), error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InitialRepoWarmupCoordinator.runReadmePhase (cognitive 19) Starcat/Core/Warmup/InitialRepoWarmupCoordinator.swift:202— InitialRepoWarmupCoordinator.runReadmePhase has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, 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.
WidgetAvatarCache.cacheAvatar (cognitive 19) Starcat/Core/Widget/WidgetAvatarCache.swift:99— WidgetAvatarCache.cacheAvatar has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 7, 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.
AITagSuggestionPolicy.normalizedSuggestions (cognitive 19) Starcat/Features/AI/RepoAIInsightModels.swift:244— AITagSuggestionPolicy.normalizedSuggestions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RepoAIInsightService.makeSource (cognitive 19) Starcat/Features/AI/RepoAIInsightService.swift:1806— RepoAIInsightService.makeSource has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 5, match/switch 1 (2 pts), ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
SystemTranslationSessionBroker.consumeSession (cognitive 19) Starcat/Features/AI/SystemTranslationSessionBroker.swift:263— SystemTranslationSessionBroker.consumeSession has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 5, 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.
DailyRadarProgrammaticCover.drawNetwork (cognitive 19) Starcat/Features/DailyRadar/DailyRadarProgrammaticCover.swift:155— DailyRadarProgrammaticCover.drawNetwork has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 3 (8 pts), if/else 2 (5 pts), loops 4 (5 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.
ExploreCatalogStore.reload (cognitive 19) Starcat/Features/Explore/ExploreCatalogStore.swift:38— ExploreCatalogStore.reload has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 1, 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.
ExploreDiscoveryViewModel.deriveLocalRepos (cognitive 19) Starcat/Features/Explore/ExploreDiscoveryViewModel.swift:484— ExploreDiscoveryViewModel.deriveLocalRepos has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 1, 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.
HomeViewModel.refreshSidebarFacetCounts (cognitive 19) Starcat/Features/Home/HomeViewModel.swift:665— HomeViewModel.refreshSidebarFacetCounts has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 2 (7 pts), boolean chains 3, 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.
HomeViewModel.prefetch (cognitive 19) Starcat/Features/Home/HomeViewModel.swift:3511— HomeViewModel.prefetch has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 1 (2 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.
RepoFileBrowserViewModel.runDownload (cognitive 19) Starcat/Features/Home/RepoFileBrowserViewModel.swift:419— RepoFileBrowserViewModel.runDownload has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), error handling 2, loops 2, match/switch 1 (2 pts) (nesting depth added 5). Of this number, 16 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.
RepositoryInsightsView.timelineSection (cognitive 19) Starcat/Features/Insights/RepositoryInsightsView.swift:3198— RepositoryInsightsView.timelineSection has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 4 (11 pts), if/else 4 (6 pts), match/switch 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.
StarHistoryViewModel.refreshLoop (cognitive 19) Starcat/Features/Insights/StarHistoryViewModel.swift:172— StarHistoryViewModel.refreshLoop has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (7 pts), error handling 3 (6 pts), ternaries 1 (3 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.
DirectPassConstellation.body (cognitive 19) Starcat/Features/Settings/ProSettingsView.swift:1841— DirectPassConstellation.body has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 2 (5 pts), loops 3 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RuntimeDownloadButton.body (cognitive 19) Starcat/Features/Settings/RuntimeDownloadButton.swift:39— RuntimeDownloadButton.body has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DiagnosticBundleExporter.export (cognitive 19) Starcat/Shared/Diagnostics/DiagnosticBundleExporter.swift:66— DiagnosticBundleExporter.export has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 11, if/else 5, 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.
UserFacingError.map (cognitive 19) Starcat/Shared/Diagnostics/UserFacingError.swift:33— UserFacingError.map has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, ternaries 1 (2 pts), boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
LocalMLXRuntime.performRecorded (cognitive 19) Starcat/Features/AI/LocalAI/LocalMLXRuntime.swift:129— LocalMLXRuntime.performRecorded has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 5, error handling 2 (3 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
AgentMessageTimelineView.timeline (cognitive 19) Starcat/Features/Agents/Core/AgentMessageTimelineView.swift:84— AgentMessageTimelineView.timeline has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KnowledgeRAGRetriever.retrieve (cognitive 19) Starcat/Features/RAG/Core/KnowledgeRAGRetriever.swift:108— KnowledgeRAGRetriever.retrieve has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9, boolean chains 5, ternaries 5. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
KnowledgeRAGService.runPlanningPhase (cognitive 19) Starcat/Features/RAG/Core/KnowledgeRAGService.swift:614— KnowledgeRAGService.runPlanningPhase has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 5, error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SQLiteRAGVectorSearchProvider.search (cognitive 19) Starcat/Features/RAG/Core/RAGSearchProviders.swift:211— SQLiteRAGVectorSearchProvider.search has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (6 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.
KnowledgeRAGWorkspaceViewModel.schedulePagedMentionQueryIfNeeded (cognitive 19) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:2144— KnowledgeRAGWorkspaceViewModel.schedulePagedMentionQueryIfNeeded has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 8, error handling 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KnowledgeRAGBrowserView.repositoryDetail (cognitive 19) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:2380— KnowledgeRAGBrowserView.repositoryDetail has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, ternaries 3, 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.
RAGWorkspaceInspector.debugRepoContextGroup (cognitive 19) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:3021— RAGWorkspaceInspector.debugRepoContextGroup has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 5 (6 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GitLFSPointer.parse (cognitive 18) Starcat/Core/Download/GitLFS.swift:20— GitLFSPointer.parse has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RepositoryReleaseDeepLink.init (cognitive 18) Starcat/Core/Navigation/RepositoryDeepLink.swift:178— RepositoryReleaseDeepLink.init has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (7 pts), match/switch 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
TypeSafeClient.sendWithRetry (cognitive 18) Starcat/Core/Network/TypeSafeClient.swift:348— TypeSafeClient.sendWithRetry has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (9 pts), error handling 3 (7 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.
RepoSkillStore.runWorkerIfNeeded (cognitive 18) Starcat/Core/Skills/RepoSkillStore.swift:330— RepoSkillStore.runWorkerIfNeeded has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 7, 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.
BatchStarService.runBatch (cognitive 18) Starcat/Core/Sync/BatchStarService.swift:183— BatchStarService.runBatch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), error handling 2 (4 pts), match/switch 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AIOrganizationBannerState.tags (cognitive 18) Starcat/Features/AI/AIOrganizationBannerState.swift:79— AIOrganizationBannerState.tags has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 1, 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.
LayaDecisionRuntimeStore.evaluate (cognitive 18) Starcat/Features/AI/LayaDecisionEngine.swift:121— LayaDecisionRuntimeStore.evaluate has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 4 (8 pts), error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MarkdownHeadingDemoter.demoteToH3 (cognitive 18) Starcat/Features/AI/MarkdownHeadingDemoter.swift:39— MarkdownHeadingDemoter.demoteToH3 has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ActivityView.body (cognitive 18) Starcat/Features/Activity/ActivityView.swift:94— ActivityView.body has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, boolean chains 5. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
WeeklyContentViewModel.loadMoreIfNeeded (cognitive 18) Starcat/Features/Activity/WeeklyContentView.swift:1246— WeeklyContentViewModel.loadMoreIfNeeded has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, ternaries 1 (2 pts), error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SmartCollectionsOverviewView.systemCollectionCard (cognitive 18) Starcat/Features/Collections/SmartCollectionsOverviewView.swift:178— SmartCollectionsOverviewView.systemCollectionCard has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 14, if/else 3, boolean chains 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CompanionEventHub.init (cognitive 18) Starcat/Features/Companion/CompanionEventHub.swift:31— CompanionEventHub.init has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), error handling 2 (4 pts), loops 3, 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.
LinuxDoStore.load (cognitive 18) Starcat/Features/Explore/LinuxDoStore.swift:139— LinuxDoStore.load has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, 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.
ExternalSearchCredentialTester.test (cognitive 18) Starcat/Features/ExternalSearch/ExternalSearchCredentialTester.swift:47— ExternalSearchCredentialTester.test has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RepoNotesSection.body (cognitive 18) Starcat/Features/Notes/RepoNotesSection.swift:109— RepoNotesSection.body has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RuntimeDownloadInstaller.validate (cognitive 18) Starcat/Features/Settings/RuntimeDownloadInstaller.swift:223— RuntimeDownloadInstaller.validate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (5 pts), match/switch 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.
StorageSettingsTab.body (cognitive 18) Starcat/Features/Settings/SettingsView.swift:1760— StorageSettingsTab.body has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9, boolean chains 8, error handling 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.
AgentWorkspaceRunSurface.handleComposerCommand (cognitive 18) Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:706— AgentWorkspaceRunSurface.handleComposerCommand has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 2 (3 pts), boolean chains 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.
ExternalAgentLineReader.lines (cognitive 18) Starcat/Features/Agents/ExternalRuntime/ExternalAgentRuntimeHost.swift:501— ExternalAgentLineReader.lines has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (6 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.
StarredExporter.collectLibrarySupplements (cognitive 18) Starcat/Features/Profile/ShareCard/StarredExporter.swift:192— StarredExporter.collectLibrarySupplements has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 4, 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.
GreedySnakeAnimator.bfsPath (cognitive 18) Starcat/Features/Profile/SnakeAnimator/GreedySnakeAnimator.swift:125— GreedySnakeAnimator.bfsPath has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RAGRepositoryInsightsXMLProjector.project (cognitive 18) Starcat/Features/RAG/Core/RAGRepositoryInsightsContext.swift:250— RAGRepositoryInsightsXMLProjector.project has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, loops 3 (4 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.
KnowledgeRAGBrowserView.retrievalTestSettingsPanel (cognitive 18) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:2072— KnowledgeRAGBrowserView.retrievalTestSettingsPanel has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 7 (12 pts), if/else 4 (6 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.
RAGWorkspaceInspector.citationDetail (cognitive 18) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:1180— RAGWorkspaceInspector.citationDetail has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RAGWorkspaceInspector.debugInspector (cognitive 18) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2778— RAGWorkspaceInspector.debugInspector has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 3 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RAGWorkspaceInspector.indexBuildStageMetrics (cognitive 18) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:4166— RAGWorkspaceInspector.indexBuildStageMetrics has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 7, ternaries 1 (2 pts), match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
GlobCompiler.toRegex (cognitive 18) Starcat/Shared/Services/RepoContextPacker/Internal/GlobCompiler.swift:44— GlobCompiler.toRegex has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
entry.syncAnimation (cognitive 18) resources/follow-graph/entry.js:592— entry.syncAnimation has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6, loops 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DailyRadarRepository.fetch (cognitive 17) Starcat/Core/Sync/DailyRadarRepository.swift:106— DailyRadarRepository.fetch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, 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.
GitHubNotificationMapper.autolinkIssueReferences (cognitive 17) Starcat/Core/Sync/GitHubNotificationMapper.swift:328— GitHubNotificationMapper.autolinkIssueReferences has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (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.
StarActionService.unstar (cognitive 17) Starcat/Core/Sync/StarringSubsystem.swift:373— StarActionService.unstar has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, error handling 4 (6 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.
AIStreamReasoningNormalizer.ingest (cognitive 17) Starcat/Features/AI/AIClient.swift:195— AIStreamReasoningNormalizer.ingest has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 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.
AIOrganizationBannerState.grouping (cognitive 17) Starcat/Features/AI/AIOrganizationBannerState.swift:40— AIOrganizationBannerState.grouping has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), match/switch 2 (4 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ChangelogParser.parseBody (cognitive 17) Starcat/Features/About/ReleaseNotesView.swift:608— ChangelogParser.parseBody has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, ternaries 2, loops 1 (nesting depth added 5). Of this number, 13 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GitHubNotificationCommentCard.body (cognitive 17) Starcat/Features/Activity/GitHubNotificationDetailView.swift:1143— GitHubNotificationCommentCard.body has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, ternaries 6 (7 pts), boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DailyRadarWorkspaceViewModel.loadMore (cognitive 17) Starcat/Features/DailyRadar/DailyRadarWorkspaceViewModel.swift:331— DailyRadarWorkspaceViewModel.loadMore has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, 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.
ExploreDiscoveryListView.fillSkillResults (cognitive 17) Starcat/Features/Explore/ExploreView.swift:818— ExploreDiscoveryListView.fillSkillResults has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (6 pts), ternaries 3 (6 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Coordinator.flush (cognitive 17) Starcat/Features/FollowGraph/FollowGraphWebView.swift:130— Coordinator.flush has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 6 (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.
HomeViewModel.hasActiveFilter (cognitive 17) Starcat/Features/Home/HomeViewModel.swift:1288— HomeViewModel.hasActiveFilter has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 17. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
WatchersMenu.body (cognitive 17) Starcat/Features/Home/RepoDetailView.swift:1411— WatchersMenu.body has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RepoListNavigationSubtitleModifier.exploreRepoCounts (cognitive 17) Starcat/Features/Home/RepoListView.swift:226— RepoListNavigationSubtitleModifier.exploreRepoCounts has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 5 (7 pts), boolean chains 1, match/switch 1 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SidebarView.isExploreSelectionCurrent (cognitive 17) Starcat/Features/Home/SidebarView.swift:927— SidebarView.isExploreSelectionCurrent has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 16, 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.
SidebarView.manageSidebarContent (cognitive 17) Starcat/Features/Home/SidebarView.swift:1180— SidebarView.manageSidebarContent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DiagnosticSystemDiagnostics.sanitize (cognitive 17) Starcat/Shared/Diagnostics/DiagnosticSystemDiagnostics.swift:103— DiagnosticSystemDiagnostics.sanitize has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DiskReadmeTranslationCache.lruSweep (cognitive 17) Starcat/Shared/Services/DiskReadmeTranslationCache.swift:248— DiskReadmeTranslationCache.lruSweep has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 5 (8 pts) (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
AgentWorkspaceViewModel.canSubmit (cognitive 17) Starcat/Features/Agents/Core/AgentWorkspaceViewModel.swift:331— AgentWorkspaceViewModel.canSubmit has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (7 pts), match/switch 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
CodebaseMemoryStorage.migrateProjects (cognitive 17) Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:540— CodebaseMemoryStorage.migrateProjects has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4 (6 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.
RAGRepoFilter.hasEffectiveConditions (cognitive 17) Starcat/Features/RAG/Core/KnowledgeRAGModels.swift:231— RAGRepoFilter.hasEffectiveConditions has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 17. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
KnowledgeRAGWorkspaceViewModel.scheduleHistoricalRepositoryInsightsLoad (cognitive 17) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:1268— KnowledgeRAGWorkspaceViewModel.scheduleHistoricalRepositoryInsightsLoad has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KnowledgeRAGWorkspaceViewModel.scheduleHistoricalRepoContextLoad (cognitive 17) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:1313— KnowledgeRAGWorkspaceViewModel.scheduleHistoricalRepoContextLoad has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, if/else 6. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
KnowledgeRAGWorkspaceViewModel.scheduleConversationPrefetch (cognitive 17) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:1432— KnowledgeRAGWorkspaceViewModel.scheduleConversationPrefetch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, 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.
KnowledgeRAGWorkspaceViewModel.detectGitHubLink (cognitive 17) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:4389— KnowledgeRAGWorkspaceViewModel.detectGitHubLink has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (6 pts), ternaries 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
KnowledgeRAGBrowserViewModel.generateRepoContext (cognitive 17) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:740— KnowledgeRAGBrowserViewModel.generateRepoContext has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 2, error handling 2, 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.
CCSwitchConfigStore.matchingParenEnd (cognitive 17) Starcat/Features/Settings/CCSwitchImport/CCSwitchConfigStore.swift:163— CCSwitchConfigStore.matchingParenEnd has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
useAudioPlayer.useAudioPlayer (cognitive 17) starcat-promo-video/presentation/src/hooks/useAudioPlayer.ts:46— useAudioPlayer.useAudioPlayer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 2 (nesting depth added 2). None of this is in the body itself: all 17 points belong to 7 function literals inside it that branch (lines 62, 127, 79, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
useStepper.useStepper (cognitive 17) starcat-promo-video/presentation/src/hooks/useStepper.ts:41— useStepper.useStepper has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 4, error handling 2, ternaries 1 (nesting depth added 1). None of this is in the body itself: all 17 points belong to 4 function literals inside it that branch (lines 140, 42, 58, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
RepositoryTagCapabilityExecutor.apply (cognitive 16) Starcat/Core/Capabilities/RepositoryTagCapability.swift:246— RepositoryTagCapabilityExecutor.apply has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 5 (6 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.
RAGChunkBuilder.parseSections (cognitive 16) Starcat/Core/RAG/RAGChunkBuilder.swift:312— RAGChunkBuilder.parseSections has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 7). Of this number, 15 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.
SubscriptionManager.refreshEntitlements (cognitive 16) Starcat/Core/Subscription/SubscriptionManager.swift:234— SubscriptionManager.refreshEntitlements has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UserProjectSyncCoordinator.syncAffiliation (cognitive 16) Starcat/Core/Sync/UserProjectSyncCoordinator.swift:203— UserProjectSyncCoordinator.syncAffiliation has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), ternaries 1 (3 pts), error handling 2, loops 1 (2 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.
BatchAIQueueService.makeTagExpansionSession (cognitive 16) Starcat/Features/AI/BatchAIQueueService.swift:1859— BatchAIQueueService.makeTagExpansionSession has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
GitHubStarListAIGroupingSession.applyMembershipRequestBatches (cognitive 16) Starcat/Features/AI/GitHubStarListAIGroupingSession.swift:1728— GitHubStarListAIGroupingSession.applyMembershipRequestBatches 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.
OpenAIClient.chatStream::consume (cognitive 16) Starcat/Features/AI/OpenAIClient.swift:201— OpenAIClient.chatStream::consume has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 3 (5 pts), match/switch 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (OpenAIClient.chatStream) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ChangelogSectionKind.infer (cognitive 16) Starcat/Features/About/ReleaseNotesView.swift:512— ChangelogSectionKind.infer has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 12, if/else 4. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ActivityViewModel.formatFollowingTitle (cognitive 16) Starcat/Features/Activity/ActivityViewModel.swift:1916— ActivityViewModel.formatFollowingTitle has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 4 (7 pts), ternaries 2 (5 pts), if/else 4 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
GitHubNotificationCommentCard.== (cognitive 16) Starcat/Features/Activity/GitHubNotificationDetailView.swift:1582— GitHubNotificationCommentCard.== 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.
DailyRadarProgrammaticCover.drawArchitecture (cognitive 16) Starcat/Features/DailyRadar/DailyRadarProgrammaticCover.swift:251— DailyRadarProgrammaticCover.drawArchitecture has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 2 (6 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
DailyRadarWorkspaceViewModel.open (cognitive 16) Starcat/Features/DailyRadar/DailyRadarWorkspaceViewModel.swift:383— DailyRadarWorkspaceViewModel.open has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, 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.
ExploreDiscoveryListView.body (cognitive 16) Starcat/Features/Explore/ExploreView.swift:204— ExploreDiscoveryListView.body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 3, ternaries 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HomeView.detailColumnBody (cognitive 16) Starcat/Features/Home/HomeView.swift:1543— HomeView.detailColumnBody has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 5 (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.
HomeView.syncViewModelSettingsFromAppSettings (cognitive 16) Starcat/Features/Home/HomeView.swift:2139— HomeView.syncViewModelSettingsFromAppSettings has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16. 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.
HomeView.startBatchAIIntegration (cognitive 16) Starcat/Features/Home/HomeView.swift:2364— HomeView.startBatchAIIntegration has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), error handling 4 (6 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.
HomeView.handleAuthenticatedEntry (cognitive 16) Starcat/Features/Home/HomeView.swift:2685— HomeView.handleAuthenticatedEntry has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HomeViewModel.buildSmartCollectionFilterContext (cognitive 16) Starcat/Features/Home/HomeViewModel.swift:2177— HomeViewModel.buildSmartCollectionFilterContext has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 7 (8 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
WatchersMenu.updateSubscription (cognitive 16) Starcat/Features/Home/RepoDetailView.swift:1537— WatchersMenu.updateSubscription has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 1, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RepoListView.body (cognitive 16) Starcat/Features/Home/RepoListView.swift:568— RepoListView.body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (14 pts), 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.
RepoNoteAIGenerationViewModel.run (cognitive 16) Starcat/Features/Notes/RepoNoteAIGenerationViewModel.swift:208— RepoNoteAIGenerationViewModel.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExploreCatalogSettingsSection.groupRow (cognitive 16) Starcat/Features/Settings/ExploreCatalogSettingsSection.swift:96— ExploreCatalogSettingsSection.groupRow has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 4 (5 pts), boolean chains 3 (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.
Coordinator.loadMermaidRuntimeIfNeeded (cognitive 16) Starcat/Shared/Components/ReadmeWebView.swift:796— Coordinator.loadMermaidRuntimeIfNeeded has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, error handling 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.
ToastModifier.body (cognitive 16) Starcat/Shared/Components/ToastOverlay.swift:50— ToastModifier.body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 3 (5 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.
SharedSnapshotService.archiveIfNeeded (cognitive 16) Starcat/Shared/Services/SharedSnapshotService.swift:124— SharedSnapshotService.archiveIfNeeded has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (15 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.
DatabaseMigrations.registerV20 (cognitive 16) Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:276— DatabaseMigrations.registerV20 has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16. 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.
ReadmeAPI.performRefreshReadme (cognitive 16) Starcat/Core/Network/GitHubAPI/ReadmeAPI.swift:238— ReadmeAPI.performRefreshReadme has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 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. This shape REPEATS in the file: one other method here (ReadmeAPI.performRefreshTrendingReadme) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ReadmeAPI.performRefreshTrendingReadme (cognitive 16) Starcat/Core/Network/GitHubAPI/ReadmeAPI.swift:368— ReadmeAPI.performRefreshTrendingReadme has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 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. This shape REPEATS in the file: one other method here (ReadmeAPI.performRefreshReadme) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
LocalAIModelManager.resolveFileSizes (cognitive 16) Starcat/Features/AI/LocalAI/LocalAIModelManager.swift:606— LocalAIModelManager.resolveFileSizes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 1 (3 pts), match/switch 2 (3 pts), boolean chains 2, 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.
AgentJSONSchema.validate (cognitive 16) Starcat/Features/Agents/Core/AgentJSON.swift:175— AgentJSONSchema.validate has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (7 pts), if/else 4 (6 pts), boolean chains 2, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LoopAgentRuntime.executeWithPolicy (cognitive 16) Starcat/Features/Agents/Core/LoopAgentRuntime.swift:939— LoopAgentRuntime.executeWithPolicy has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), ternaries 2 (4 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExternalAgentRuntimeError.errorDescription (cognitive 16) Starcat/Features/Agents/ExternalRuntime/ExternalAgentProtocol.swift:282— ExternalAgentRuntimeError.errorDescription has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, 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.
ExternalAgentRuntime.run (cognitive 16) Starcat/Features/Agents/ExternalRuntime/ExternalAgentRuntime.swift:54— ExternalAgentRuntime.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), error handling 4 (5 pts), ternaries 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SpiralSnakeAnimator.buildSpiralPath (cognitive 16) Starcat/Features/Profile/SnakeAnimator/MultiModeSnakeAnimator.swift:110— SpiralSnakeAnimator.buildSpiralPath has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 3 (6 pts), boolean chains 1 (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
RAGCLIJSONLineParser.parseCodex (cognitive 16) Starcat/Features/RAG/Core/RAGCLIModelClient.swift:286— RAGCLIJSONLineParser.parseCodex has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7 (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.
KnowledgeRAGWorkspaceViewModel.loadIndexIssueChunks (cognitive 16) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:2576— KnowledgeRAGWorkspaceViewModel.loadIndexIssueChunks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 3 (6 pts), loops 1 (3 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.
analyze.public_event (cognitive 16) skills/starcat-diagnostics/scripts/analyze.py:181— analyze.public_event has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 6, ternaries 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.
FunctionTooLong: render-app-store.htmlFor resources/screenshots/1.2.0-app-store/manifest/render-app-store.mjs:105— FunctionTooLong — htmlFor runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× 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.
Change coupling clique: ActivityRepoDetailContent.swift, WeeklyDetailContent.swift, ManageDetailContent.swift, TrendingDetailContent.swift Starcat/Features/Activity/ActivityRepoDetailContent.swift— 4 files — `Starcat/Features/Activity/ActivityRepoDetailContent.swift`, `Starcat/Features/Activity/WeeklyDetailContent.swift`, `Starcat/Features/Home/ManageDetailContent.swift`, `Starcat/Features/Trending/TrendingDetailContent.swift` — all change together with no explicit dependency: a fully-connected co-change clique, not 6 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
Near-duplicate member pair (100 shared lines) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:3363— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:3363-3470 | Starcat/Features/RAG/UI/RAGCitationChunkPopover.swift:157-275 — These two members are variants of one another: 100 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (69 shared lines) Starcat/Features/Home/LocalAIStatusSection.swift:165— Starcat/Features/Home/LocalAIStatusSection.swift:165-258 | Starcat/Features/Home/LocalAIStatusSection.swift:262-355 — These two members are variants of one another: 69 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (44 shared lines) Starcat/Features/RAG/Core/KnowledgeRAGService.swift:1582— Starcat/Features/RAG/Core/KnowledgeRAGService.swift:1582-1685 | Starcat/Features/RAG/Core/KnowledgeRAGService.swift:1691-1777 — These two members are variants of one another: 44 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (29 shared lines) Starcat/Features/Agents/Core/AgentMessageTimelineView.swift:231— Starcat/Features/Agents/Core/AgentMessageTimelineView.swift:231-274 | Starcat/Features/Agents/Core/AgentMessageTimelineView.swift:278-358 — These two members are variants of one another: 29 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (26 shared lines) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:2805— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:2805-2870 | Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:2874-2947 — These two members are variants of one another: 26 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Members sharing a duplicated core (11 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (11 members, 50+ identical tokens) Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:378— Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:378-409 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:637-708 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:1730-1748 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:1789-1805 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2416-2467 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2512-2553 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2566-2580 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2586-2633 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2686-2733 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2881-3030 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:3208-3221 — These 11 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 11 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 11 times.
D4 · Code Duplication· Members sharing a duplicated core (10 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (10 members, 50+ identical tokens) Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:369— Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:369-398 | Starcat/Features/Settings/AISettingsView.swift:404-436 | Starcat/Features/Settings/AISettingsView.swift:930-961 | Starcat/Features/Settings/ExternalSearchSettingsSection.swift:48-80 | Starcat/Features/Settings/GeneralSettingsView.swift:55-87 | Starcat/Features/Settings/SettingsView.swift:703-785 | Starcat/Features/Settings/SettingsView.swift:814-970 | Starcat/Features/Settings/SettingsView.swift:975-1113 | Starcat/Features/Settings/TranslationSettingsView.swift:77-109 | Starcat/Shared/Components/SettingsPageIntroduction.swift:19-53 — These 10 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 10 times. The repair is at the members' 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 10 times.
D4 · Code Duplication· Edited copy of a member (74 corresponding lines) · ×1
Edited copy of a member (74 corresponding lines) Starcat/Features/Agents/WeeklyReport/RepoAlternativesArtifactBuilder.swift:160— Starcat/Features/Agents/WeeklyReport/RepoAlternativesArtifactBuilder.swift:160-233 | Starcat/Features/Agents/WeeklyReport/RepoInsightArtifactBuilder.swift:85-160 — These two members are one piece of code written twice and then edited apart: 74 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (85 corresponding lines) · ×1
Edited copy of a member (85 corresponding lines) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:1331— Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:1331-1415 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:1419-1528 — These two members are one piece of code written twice and then edited apart: 85 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (81 corresponding lines) · ×1
Edited copy of a member (81 corresponding lines) Starcat/Core/Network/GitHubAPI/ReadmeAPI.swift:238— Starcat/Core/Network/GitHubAPI/ReadmeAPI.swift:238-318 | Starcat/Core/Network/GitHubAPI/ReadmeAPI.swift:368-452 — These two members are one piece of code written twice and then edited apart: 81 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (66 corresponding lines) · ×1
Edited copy of a member (66 corresponding lines) Starcat/Features/MCP/MCPSettingsView.swift:515— Starcat/Features/MCP/MCPSettingsView.swift:515-580 | Starcat/Features/Settings/IntegrationSettingsView.swift:700-771 — These two members are one piece of code written twice and then edited apart: 66 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 71+ corresponding lines) · ×1
Edited copies of one member (6 members, 71+ corresponding lines) Starcat/Features/Insights/RepositoryInsightsViewModel.swift:975— Starcat/Features/Insights/RepositoryInsightsViewModel.swift:975-1079 | Starcat/Features/Insights/RepositoryInsightsViewModel.swift:1091-1174 | Starcat/Features/Insights/RepositoryInsightsViewModel.swift:1180-1259 | Starcat/Features/Insights/RepositoryInsightsViewModel.swift:1261-1342 | Starcat/Features/Insights/RepositoryInsightsViewModel.swift:1354-1424 | Starcat/Features/Insights/RepositoryInsightsViewModel.swift:1434-1513 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 71 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (67 corresponding lines) · ×1
Edited copy of a member (67 corresponding lines) Starcat/Features/Insights/RepositoryInsightsView.swift:2900— Starcat/Features/Insights/RepositoryInsightsView.swift:2900-2966 | Starcat/Features/Insights/RepositoryInsightsView.swift:3354-3421 — These two members are one piece of code written twice and then edited apart: 67 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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, 51+ corresponding lines) · ×1
Edited copies of one member (3 members, 51+ corresponding lines) Starcat/Features/CodeGraph/CodeFlowStorage.swift:578— Starcat/Features/CodeGraph/CodeFlowStorage.swift:578-628 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:540-611 | Starcat/Shared/Services/RepoContextStorage.swift:816-867 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 51 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 (78 corresponding lines) · ×1
Edited copy of a member (78 corresponding lines) Starcat/Features/RAG/Core/RAGRepoCandidateRepository.swift:97— Starcat/Features/RAG/Core/RAGRepoCandidateRepository.swift:97-195 | Starcat/Features/RAG/Core/RAGRepoCandidateRepository.swift:434-511 — These two members are one piece of code written twice and then edited apart: 78 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (61 corresponding lines) · ×1
Edited copy of a member (61 corresponding lines) Starcat/Features/Home/SidebarView.swift:1762— Starcat/Features/Home/SidebarView.swift:1762-1837 | Starcat/Features/Home/SidebarView.swift:1841-1901 — These two members are one piece of code written twice and then edited apart: 61 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (51 corresponding lines) · ×1
Edited copy of a member (51 corresponding lines) Starcat/Features/RAG/UI/RAGCitationChunkPopover.swift:448— Starcat/Features/RAG/UI/RAGCitationChunkPopover.swift:448-503 | Starcat/Features/RAG/UI/RAGRepoContextXMLPopover.swift:111-161 — These two members are one piece of code written twice and then edited apart: 51 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (56 corresponding lines) · ×1
Edited copy of a member (56 corresponding lines) Starcat/Features/Home/SidebarView.swift:601— Starcat/Features/Home/SidebarView.swift:601-672 | Starcat/Features/Home/SidebarView.swift:674-729 — These two members are one piece of code written twice and then edited apart: 56 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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) Starcat/Core/Network/AwesomeModels.swift:134— Starcat/Core/Network/AwesomeModels.swift:134-192 | Starcat/Core/Network/GitHubAPI/GitHubDTOs.swift:261-317 — 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 copies of one member (3 members, 40+ corresponding lines) · ×1
Edited copies of one member (3 members, 40+ corresponding lines) Starcat/Core/Sync/GitHubNotificationInboxService.swift:521— Starcat/Core/Sync/GitHubNotificationInboxService.swift:521-563 | Starcat/Core/Sync/GitHubNotificationInboxService.swift:566-612 | Starcat/Core/Sync/GitHubNotificationInboxService.swift:615-654 — 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 copies of one member (3 members, 47+ corresponding lines) · ×1
Edited copies of one member (3 members, 47+ corresponding lines) Starcat/Core/Database/Models/TrendingRepoRecord.swift:290— Starcat/Core/Database/Models/TrendingRepoRecord.swift:290-344 | Starcat/Core/Network/AwesomeModels.swift:378-424 | Starcat/Core/Network/StarcatRepoCardDTO.swift:258-310 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 47 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, 41+ corresponding lines) · ×1
Edited copies of one member (3 members, 41+ corresponding lines) Starcat/Features/Agents/Core/AgentRepositoryCatalog.swift:178— Starcat/Features/Agents/Core/AgentRepositoryCatalog.swift:178-218 | Starcat/Features/Agents/Core/AgentRepositoryCatalog.swift:220-265 | Starcat/Features/Agents/Core/AgentRepositoryCatalog.swift:267-308 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 41 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, 35+ corresponding lines) · ×1
Edited copies of one member (3 members, 35+ corresponding lines) Starcat/Features/AI/AIChatInputView.swift:350— Starcat/Features/AI/AIChatInputView.swift:350-384 | Starcat/Shared/Components/AICommandComposer/AICommandTextEditor.swift:46-88 | Starcat/Shared/Components/ImagePasteTextEditor.swift:43-82 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 35 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, 28+ corresponding lines) · ×1
Edited copies of one member (3 members, 28+ corresponding lines) Starcat/Core/Network/GitHubAPI/ReadmeAssetURLRewriter.swift:123— Starcat/Core/Network/GitHubAPI/ReadmeAssetURLRewriter.swift:123-150 | Starcat/Core/Network/GitHubAPI/ReadmeAssetURLRewriter.swift:400-427 | Starcat/Core/Network/GitHubAPI/ReadmeAssetURLRewriter.swift:430-457 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 28 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, 22+ corresponding lines) · ×1
Edited copies of one member (3 members, 22+ corresponding lines) Starcat/Features/Activity/ActivityViewModel.swift:1798— Starcat/Features/Activity/ActivityViewModel.swift:1798-1819 | Starcat/Features/Activity/ActivityViewModel.swift:1821-1842 | Starcat/Features/Activity/ActivityViewModel.swift:1844-1870 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 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, 24+ corresponding lines) · ×1
Edited copies of one member (3 members, 24+ corresponding lines) Starcat/Features/CodeGraph/CodeFlowStorage.swift:462— Starcat/Features/CodeGraph/CodeFlowStorage.swift:462-491 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:683-706 | Starcat/Shared/Services/RepoContextStorage.swift:714-747 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 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, 16+ corresponding lines) · ×1
Edited copies of one member (4 members, 16+ corresponding lines) Starcat/Features/Home/SidebarItem.swift:84— Starcat/Features/Home/SidebarItem.swift:84-100 | Starcat/Features/Home/SidebarItem.swift:103-122 | Starcat/Features/Home/SidebarItem.swift:126-142 | Starcat/Features/Home/SidebarItem.swift:336-351 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (8 members, 27+ corresponding lines) · ×1
Edited copies of one member (8 members, 27+ corresponding lines) Starcat/Features/Home/SidebarView.swift:1096— Starcat/Features/Home/SidebarView.swift:1096-1123 | Starcat/Features/Home/SidebarView.swift:1613-1641 | Starcat/Features/Home/SidebarView.swift:1905-1931 | Starcat/Features/Home/SidebarView.swift:1933-1960 | Starcat/Features/Home/SidebarView.swift:1962-1989 | Starcat/Features/Home/SidebarView.swift:1991-2020 | Starcat/Features/Home/SidebarView.swift:2022-2052 | Starcat/Features/Home/SidebarView.swift:2054-2081 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 27 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 8 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 23+ corresponding lines) · ×1
Edited copies of one member (4 members, 23+ corresponding lines) Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:1095— Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:1095-1117 | Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:1152-1174 | Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:1277-1300 | Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:1384-1408 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 23 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, 27+ corresponding lines) · ×1
Edited copies of one member (3 members, 27+ corresponding lines) Starcat/Features/Settings/IntegrationSettingsView.swift:184— Starcat/Features/Settings/IntegrationSettingsView.swift:184-211 | Starcat/Features/Settings/IntegrationSettingsView.swift:213-243 | Starcat/Features/Settings/RepoContextSettingsSection.swift:90-116 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 27 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 11+ corresponding lines) · ×1
Edited copies of one member (5 members, 11+ corresponding lines) Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2118— Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2118-2130 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2155-2166 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2639-2649 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2842-2854 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2858-2871 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 29+ corresponding lines) · ×1
Edited copies of one member (6 members, 29+ corresponding lines) Starcat/Features/MCP/StarcatMCPWriteFacade.swift:344— Starcat/Features/MCP/StarcatMCPWriteFacade.swift:344-373 | Starcat/Features/MCP/StarcatMCPWriteFacade.swift:375-404 | Starcat/Features/MCP/StarcatMCPWriteFacade.swift:406-434 | Starcat/Features/MCP/StarcatMCPWriteFacade.swift:436-468 | Starcat/Features/MCP/StarcatMCPWriteFacade.swift:470-500 | Starcat/Features/MCP/StarcatMCPWriteFacade.swift:502-534 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 29 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 (4 members, 29+ corresponding lines) · ×1
Edited copies of one member (4 members, 29+ corresponding lines) Starcat/Features/Home/RepoListView.swift:997— Starcat/Features/Home/RepoListView.swift:997-1029 | Starcat/Features/Home/RepoListView.swift:1034-1062 | Starcat/Features/Home/RepoListView.swift:1067-1097 | Starcat/Features/Home/RepoListView.swift:1100-1135 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 29 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, 20+ corresponding lines) · ×1
Edited copies of one member (3 members, 20+ corresponding lines) Starcat/Core/Capabilities/RepositoryTagCapability.swift:379— Starcat/Core/Capabilities/RepositoryTagCapability.swift:379-400 | Starcat/Core/Capabilities/RepositoryTagCapability.swift:402-422 | Starcat/Core/Capabilities/RepositoryTagCapability.swift:424-443 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 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) Starcat/Features/AI/ReadmePreprocessor.swift:157— Starcat/Features/AI/ReadmePreprocessor.swift:157-166 | Starcat/Features/DailyRadar/DailyRadarMarkdownView.swift:49-55 | Starcat/Features/Insights/ReadmeStarHistoryHTMLRenderer.swift:604-610 | Starcat/Features/Insights/RepositoryInsightsContextModels.swift:479-486 | Starcat/Features/Profile/ShareCard/LibraryExportRenderer.swift:663-670 | Starcat/Shared/Services/RepoContextPacker/Internal/XMLEscape.swift:36-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, 19+ corresponding lines) · ×1
Edited copies of one member (6 members, 19+ corresponding lines) Starcat/Features/Insights/RepositoryInsightsAIContextProvider.swift:230— Starcat/Features/Insights/RepositoryInsightsAIContextProvider.swift:230-248 | Starcat/Features/Insights/RepositoryInsightsAIContextProvider.swift:250-268 | Starcat/Features/Insights/RepositoryInsightsAIContextProvider.swift:270-288 | Starcat/Features/Insights/RepositoryInsightsAIContextProvider.swift:290-308 | Starcat/Features/Insights/RepositoryInsightsAIContextProvider.swift:310-328 | Starcat/Features/Insights/RepositoryInsightsAIContextProvider.swift:330-348 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 12+ corresponding lines) · ×1
Edited copies of one member (4 members, 12+ corresponding lines) Starcat/Core/Sync/GitHubStarListRepository.swift:302— Starcat/Core/Sync/GitHubStarListRepository.swift:302-320 | Starcat/Core/Sync/RepoNoteRepository.swift:108-119 | Starcat/Core/Sync/RepoNoteRepository.swift:121-132 | Starcat/Core/Sync/RepoTagRepository.swift:181-201 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 11+ corresponding lines) · ×1
Edited copies of one member (4 members, 11+ corresponding lines) Starcat/Features/Agents/Core/AgentRunRepository.swift:341— Starcat/Features/Agents/Core/AgentRunRepository.swift:341-355 | Starcat/Features/Agents/Core/AgentRunRepository.swift:357-367 | Starcat/Features/Agents/Core/AgentRunRepository.swift:445-455 | Starcat/Features/Agents/Core/AgentRunRepository.swift:457-469 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 6+ corresponding lines) · ×1
Edited copies of one member (3 members, 6+ corresponding lines) Starcat/Core/Capabilities/RepositoryTagCapability.swift:515— Starcat/Core/Capabilities/RepositoryTagCapability.swift:515-520 | Starcat/Core/Capabilities/RepositoryTagCapability.swift:522-527 | Starcat/Core/Capabilities/RepositoryTagCapability.swift:529-534 — 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, 15+ corresponding lines) · ×1
Edited copies of one member (6 members, 15+ corresponding lines) Starcat/Features/Insights/RepositoryInsightsRemoteProvider.swift:777— Starcat/Features/Insights/RepositoryInsightsRemoteProvider.swift:777-794 | Starcat/Features/Insights/RepositoryInsightsRemoteProvider.swift:843-858 | Starcat/Features/Insights/RepositoryInsightsRemoteProvider.swift:919-934 | Starcat/Features/Insights/RepositoryInsightsRemoteProvider.swift:1005-1020 | Starcat/Features/Insights/RepositoryInsightsRemoteProvider.swift:1224-1240 | Starcat/Features/Insights/RepositoryInsightsRemoteProvider.swift:1309-1323 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 10+ corresponding lines) · ×1
Edited copies of one member (6 members, 10+ corresponding lines) Starcat/Core/Warmup/InitialRepoWarmupCoordinator.swift:128— Starcat/Core/Warmup/InitialRepoWarmupCoordinator.swift:128-142 | Starcat/Core/Warmup/InitialRepoWarmupCoordinator.swift:326-336 | Starcat/Core/Warmup/InitialRepoWarmupCoordinator.swift:338-347 | Starcat/Core/Warmup/InitialRepoWarmupCoordinator.swift:397-406 | Starcat/Core/Warmup/InitialRepoWarmupCoordinator.swift:408-417 | Starcat/Core/Warmup/InitialRepoWarmupCoordinator.swift:419-428 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 5+ corresponding lines) · ×1
Edited copies of one member (4 members, 5+ corresponding lines) Starcat/Features/RAG/Core/KnowledgeBaseAnalytics.swift:295— Starcat/Features/RAG/Core/KnowledgeBaseAnalytics.swift:295-299 | Starcat/Features/RAG/Core/KnowledgeBaseAnalytics.swift:301-305 | Starcat/Features/RAG/Core/RAGRepoCandidateRepository.swift:612-622 | Starcat/Features/RAG/Core/RAGRepoCandidateRepository.swift:624-634 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 10+ corresponding lines) · ×1
Edited copies of one member (4 members, 10+ corresponding lines) Starcat/Shared/Services/DiskIssueDraftCache.swift:221— Starcat/Shared/Services/DiskIssueDraftCache.swift:221-232 | Starcat/Shared/Services/DiskIssueTimelineCache.swift:120-129 | Starcat/Shared/Services/DiskNotificationCommentDraftCache.swift:225-236 | Starcat/Shared/Services/DiskRecommendationCacheStorage.swift:89-98 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (8 members, 11+ corresponding lines) · ×1
Edited copies of one member (8 members, 11+ corresponding lines) StarcatWidgets/CollectionTrend/StarcatCollectionTrendWidget.swift:19— StarcatWidgets/CollectionTrend/StarcatCollectionTrendWidget.swift:19-33 | StarcatWidgets/Contributions/StarcatContributionHeatmapWidget.swift:15-25 | StarcatWidgets/Contributions/StarcatContributionOverviewWidget.swift:15-25 | StarcatWidgets/Contributions/StarcatContributionRadarWidget.swift:15-25 | StarcatWidgets/Contributions/StarcatContributionSummaryWidget.swift:15-25 | StarcatWidgets/Focus/StarcatFocusWidget.swift:15-29 | StarcatWidgets/Rediscovery/StarcatRediscoveryWidget.swift:14-24 | StarcatWidgets/ReleaseWatch/StarcatReleaseWatchWidget.swift:14-24 — These 8 members are one piece of code written 8 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 8 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 6+ corresponding lines) · ×1
Edited copies of one member (4 members, 6+ corresponding lines) Starcat/Core/Database/Models/ActivityAnnouncementRecord.swift:121— Starcat/Core/Database/Models/ActivityAnnouncementRecord.swift:121-126 | Starcat/Core/Database/Models/ReleaseRecord.swift:123-128 | Starcat/Core/Database/Models/WeeklyBulkRepoRecord.swift:249-254 | Starcat/Core/Network/TrendingModels.swift:208-215 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (7 members, 4+ corresponding lines) · ×1
Edited copies of one member (7 members, 4+ corresponding lines) Starcat/Core/Database/Models/RAGChunk.swift:117— Starcat/Core/Database/Models/RAGChunk.swift:117-120 | Starcat/Core/Database/Models/ReadmeTranslation.swift:82-85 | Starcat/Core/Screensaver/ScreensaverSharedConfiguration.swift:51-54 | Starcat/Core/Widget/WidgetAvatarCache.swift:93-97 | Starcat/Features/AI/ReadmeTranslationService.swift:1072-1075 | Starcat/Features/AI/RepoAIInsightService.swift:2177-2180 | Starcat/Shared/Services/DiskExternalSearchCache.swift:235-238 — These 7 members are one piece of code written 7 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 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 6+ corresponding lines) · ×1
Edited copies of one member (5 members, 6+ corresponding lines) Starcat/Core/Settings/AppSettings.swift:2641— Starcat/Core/Settings/AppSettings.swift:2641-2647 | Starcat/Core/Subscription/DirectLicenseManager.swift:579-584 | Starcat/Features/AI/IndexedTextBuilder.swift:148-153 | Starcat/Features/Explore/ExploreDiscoveryViewModel.swift:756-762 | Starcat/Features/Profile/ShareCard/LibraryExportRenderer.swift:682-687 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 7+ corresponding lines) · ×1
Edited copies of one member (4 members, 7+ corresponding lines) Starcat/Shared/Services/DiskChatHistoryStore.swift:644— Starcat/Shared/Services/DiskChatHistoryStore.swift:644-651 | Starcat/Shared/Services/DiskExternalSearchCache.swift:119-125 | Starcat/Shared/Services/DiskIssueTimelineCache.swift:139-145 | Starcat/Shared/Services/DiskReadmeTranslationCache.swift:231-238 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 3+ corresponding lines) · ×1
Edited copies of one member (5 members, 3+ corresponding lines) Starcat/Features/AI/Usage/AIUsageDashboardView.swift:543— Starcat/Features/AI/Usage/AIUsageDashboardView.swift:543-545 | Starcat/Features/Home/RepoContributorsStatItem.swift:382-384 | Starcat/Features/Insights/MyInsightsView.swift:1079-1081 | Starcat/Features/Insights/RepositoryInsightsView.swift:2254-2256 | Starcat/Features/Settings/SearchIndexSettingsView.swift:279-281 — These 5 members are one piece of code written 5 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 5 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) Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:1507— Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:1507-1509 | Starcat/Features/Agents/Core/AgentWorkspaceView.swift:424-426 | Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:44-46 | Starcat/Features/RAG/UI/RAGWorkspaceConversationRail.swift:169-171 | Starcat/Features/RAG/UI/RAGWorkspaceConversationRow.swift:246-248 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:108-110 — 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 (60 lines × 2) Starcat/Features/CodeGraph/CodeFlowPanel.swift:278— Starcat/Features/CodeGraph/CodeFlowPanel.swift:278-337 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryPanel.swift:298-357 — before extracting anything, compare `Starcat/Features/CodeGraph/CodeFlowPanel.swift` and `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryPanel.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 123 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (54 lines × 2) Starcat/Features/Activity/GitHubNotificationDetailView.swift:1766— Starcat/Features/Activity/GitHubNotificationDetailView.swift:1766-1819 | Starcat/Features/Home/RepoDetailView.swift:1226-1279 — 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 `Starcat/Features/Activity/GitHubNotificationDetailView.swift:1766` 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 (43–52 lines × 2) Starcat/Core/Database/DatabaseManager.swift:312— Starcat/Core/Database/DatabaseManager.swift:312-363 | Starcat/Core/Database/DatabaseManager.swift:393-435 — 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 `Starcat/Core/Database/DatabaseManager.swift:312` 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 (12–49 lines × 2) Starcat/Core/Database/DatabaseManager.swift:327— Starcat/Core/Database/DatabaseManager.swift:327-375 | Starcat/Core/Database/DatabaseManager.swift:437-448 — 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 `Starcat/Core/Database/DatabaseManager.swift:327` 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 (40–46 lines × 3) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:3431— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:3431-3470 | Starcat/Features/RAG/UI/RAGCitationChunkPopover.swift:234-275 | Starcat/Features/RAG/UI/RAGMarkdownText.swift:235-280 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:3431` 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 (43 lines × 2) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:3364— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:3364-3406 | Starcat/Features/RAG/UI/RAGCitationChunkPopover.swift:158-200 — 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 (42 lines × 2) Starcat/Core/Sync/RepoRepository.swift:981— Starcat/Core/Sync/RepoRepository.swift:981-1022 | Starcat/Features/RAG/Core/RAGRepoCandidateRepository.swift:232-273 — 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 `Starcat/Core/Sync/RepoRepository.swift:981` 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 (40 lines × 2) Starcat/Features/MCP/MCPSettingsView.swift:515— Starcat/Features/MCP/MCPSettingsView.swift:515-554 | Starcat/Features/Settings/IntegrationSettingsView.swift:700-739 — 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 `Starcat/Features/MCP/MCPSettingsView.swift:515` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (36 lines × 2) Starcat/Shared/Components/Toolbar/ExternalLinksMenu.swift:120— Starcat/Shared/Components/Toolbar/ExternalLinksMenu.swift:120-155 | Starcat/Shared/Components/Toolbar/ExternalLinksMenu.swift:210-245 — 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 `Starcat/Shared/Components/Toolbar/ExternalLinksMenu.swift:120` 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 (23–35 lines × 3) Starcat/Features/Activity/WeeklyDetailContent.swift:76— Starcat/Features/Activity/WeeklyDetailContent.swift:76-104 | Starcat/Features/Explore/DiscoveryDetailView.swift:173-195 | Starcat/Features/Trending/TrendingDetailContent.swift:59-93 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Starcat/Features/Activity/WeeklyDetailContent.swift:105` calls `environment` and `Starcat/Features/Explore/DiscoveryDetailView.swift:196` 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 (35 lines × 2) Starcat/Features/Activity/WeeklyContentView.swift:732— Starcat/Features/Activity/WeeklyContentView.swift:732-766 | Starcat/Features/Explore/ExploreView.swift:672-706 — 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 `Starcat/Features/Activity/WeeklyContentView.swift:732` 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 (34 lines × 2) Starcat/Features/Agents/Core/LoopAgentRuntime.swift:233— Starcat/Features/Agents/Core/LoopAgentRuntime.swift:233-266 | Starcat/Features/Agents/Core/LoopAgentRuntime.swift:336-369 — 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 `Starcat/Features/Agents/Core/LoopAgentRuntime.swift:233` 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 (31–34 lines × 2) StarcatWidgets/Focus/StarcatFocusWidget.swift:127— StarcatWidgets/Focus/StarcatFocusWidget.swift:127-157 | StarcatWidgets/Rediscovery/StarcatRediscoveryWidget.swift:98-131 — 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 `StarcatWidgets/Focus/StarcatFocusWidget.swift:127` 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 before the matched lines, `StarcatWidgets/Focus/StarcatFocusWidget.swift:125` calls `StarcatFocusStatusLabel` and `StarcatWidgets/Rediscovery/StarcatRediscoveryWidget.swift:95` 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 (33 lines × 2) Starcat/Features/RAG/UI/RAGRepoContextXMLPopover.swift:34— Starcat/Features/RAG/UI/RAGRepoContextXMLPopover.swift:34-66 | Starcat/Features/RAG/UI/RAGRepositoryInsightsXMLPopover.swift:29-61 — before extracting anything, compare `Starcat/Features/RAG/UI/RAGRepoContextXMLPopover.swift` and `Starcat/Features/RAG/UI/RAGRepositoryInsightsXMLPopover.swift` as WHOLE FILES: this scan already matched 3 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 (31 lines × 3) Starcat/Core/Network/GitHubAPI/GitHubAPIClient.swift:506— Starcat/Core/Network/GitHubAPI/GitHubAPIClient.swift:506-536 | Starcat/Core/Network/GitHubAPI/GitHubAPIClient.swift:585-615 | Starcat/Core/Network/GitHubAPI/GitHubAPIClient.swift:642-672 — 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 `Starcat/Core/Network/GitHubAPI/GitHubAPIClient.swift:506` 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) Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:1033— Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:1033-1062 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2917-2946 — 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 `Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:1033` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (29–30 lines × 2) Starcat/Core/Database/Models/DiscoveryCacheRecords.swift:117— Starcat/Core/Database/Models/DiscoveryCacheRecords.swift:117-145 | Starcat/Core/Database/Models/DiscoveryCacheRecords.swift:345-374 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Core/Database/Models/DiscoveryCacheRecords.swift:117` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (26–30 lines × 2) Starcat/Core/Network/GitHubAPI/GitHubStarListsAPI.swift:58— Starcat/Core/Network/GitHubAPI/GitHubStarListsAPI.swift:58-83 | Starcat/Core/Network/GitHubAPI/GitHubStarListsAPI.swift:94-123 — 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 `Starcat/Core/Network/GitHubAPI/GitHubStarListsAPI.swift:58` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (29 lines × 2) Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryPortAvailability.swift:25— Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryPortAvailability.swift:25-53 | Starcat/Features/MCP/StarcatMCPPortAvailability.swift:45-73 — 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 `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryPortAvailability.swift:25` 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. 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 (27–29 lines × 2) Starcat/Features/Home/LocalAIStatusSection.swift:190— Starcat/Features/Home/LocalAIStatusSection.swift:190-216 | Starcat/Features/Home/LocalAIStatusSection.swift:286-314 — 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 `Starcat/Features/Home/LocalAIStatusSection.swift:190` 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 (28–29 lines × 2) Starcat/Features/RAG/Core/RAGRepoCandidateRepository.swift:104— Starcat/Features/RAG/Core/RAGRepoCandidateRepository.swift:104-131 | Starcat/Features/RAG/Core/RAGRepoCandidateRepository.swift:446-474 — 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 `Starcat/Features/RAG/Core/RAGRepoCandidateRepository.swift:104` 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 (28 lines × 2) Starcat/Core/Database/Models/DiscoveryCacheRecords.swift:162— Starcat/Core/Database/Models/DiscoveryCacheRecords.swift:162-189 | Starcat/Core/Database/Models/DiscoveryCacheRecords.swift:389-416 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (23–27 lines × 2) Starcat/Features/Agents/UntaggedTidy/UntaggedTidyAgentTools.swift:294— Starcat/Features/Agents/UntaggedTidy/UntaggedTidyAgentTools.swift:294-320 | Starcat/Features/Agents/WeeklyReport/GitHubWeeklyReportTools.swift:211-233 — 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 `Starcat/Features/Agents/UntaggedTidy/UntaggedTidyAgentTools.swift:294` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (24–27 lines × 2) Starcat/Features/RAG/Core/RAGRepoCandidateRepository.swift:145— Starcat/Features/RAG/Core/RAGRepoCandidateRepository.swift:145-171 | Starcat/Features/RAG/Core/RAGRepoCandidateRepository.swift:476-499 — 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 `Starcat/Features/RAG/Core/RAGRepoCandidateRepository.swift:145` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (26 lines × 2) Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:3249— Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:3249-3274 | Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:3288-3313 — 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 `Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift:3249` 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 (22–25 lines × 3) Starcat/Features/CodeGraph/CodeFlowStorage.swift:600— Starcat/Features/CodeGraph/CodeFlowStorage.swift:600-622 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:563-587 | Starcat/Shared/Services/RepoContextStorage.swift:838-859 — before extracting anything, compare `Starcat/Features/CodeGraph/CodeFlowStorage.swift` and `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/CodeGraph/CodeFlowStorage.swift:600` 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 (25 lines × 2) Starcat/Core/Insights/RepoStarHistoryRepository.swift:371— Starcat/Core/Insights/RepoStarHistoryRepository.swift:371-395 | Starcat/Core/Insights/RepoStarHistoryRepository.swift:482-506 — 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 `Starcat/Core/Insights/RepoStarHistoryRepository.swift:371` 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 (22–25 lines × 2) Starcat/Features/AI/ReadmeTranslationService.swift:445— Starcat/Features/AI/ReadmeTranslationService.swift:445-469 | Starcat/Features/AI/ReadmeTranslationService.swift:622-643 — 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 `Starcat/Features/AI/ReadmeTranslationService.swift:445` 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–25 lines × 2) Starcat/Features/Explore/DiscoveryDetailView.swift:73— Starcat/Features/Explore/DiscoveryDetailView.swift:73-84 | Starcat/Features/Trending/TrendingScaffoldShell.swift:85-109 — 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 `Starcat/Features/Explore/DiscoveryDetailView.swift:73` 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 (21–24 lines × 3) Starcat/Features/AI/BatchAITagFlowLayout.swift:42— Starcat/Features/AI/BatchAITagFlowLayout.swift:42-65 | Starcat/Features/Home/GitHubStarListAIGroupingResultList.swift:775-795 | Starcat/Features/Settings/SettingsView.swift:1558-1578 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `subviews` to `Subviews ) -> (origins: [CGPoint]` in one and `Subviews) -> (origins: [CGPoint]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (23–24 lines × 2) Starcat/Core/Screensaver/ScreensaverSnapshotStore.swift:95— Starcat/Core/Screensaver/ScreensaverSnapshotStore.swift:95-117 | Starcat/Core/Widget/Shared/WidgetSnapshotStore.swift:77-100 — 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 `Starcat/Core/Screensaver/ScreensaverSnapshotStore.swift:95` 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 (21–23 lines × 2) Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:1344— Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:1344-1364 | Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:1374-1396 — 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 `Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:1344` 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, `Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:1366` calls `contains` and `Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:1398` 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 (22 lines × 2) Starcat/Features/CodeGraph/CodeFlowPanel.swift:25— Starcat/Features/CodeGraph/CodeFlowPanel.swift:25-46 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryPanel.swift:34-55 — before extracting anything, compare `Starcat/Features/CodeGraph/CodeFlowPanel.swift` and `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryPanel.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 123 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/CodeGraph/CodeFlowPanel.swift:25` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18–21 lines × 2) Starcat/Features/Agents/WeeklyReport/GitHubWeeklyReportTools.swift:468— Starcat/Features/Agents/WeeklyReport/GitHubWeeklyReportTools.swift:468-485 | Starcat/Features/Agents/WeeklyReport/GitHubWeeklyReportTools.swift:658-678 — 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 `Starcat/Features/Agents/WeeklyReport/GitHubWeeklyReportTools.swift:468` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Starcat/Features/Agents/WeeklyReport/GitHubWeeklyReportTools.swift:487` calls `l10n` and `Starcat/Features/Agents/WeeklyReport/GitHubWeeklyReportTools.swift:679` 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 (18–37 lines × 2) Starcat/Features/Recommendations/RepoRecommendationItem+ViewData.swift:65— Starcat/Features/Recommendations/RepoRecommendationItem+ViewData.swift:65-82 | Starcat/Shared/Components/SemanticScoreBadge+Recommendation.swift:29-65 — 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 `Starcat/Features/Recommendations/RepoRecommendationItem+ViewData.swift:65` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 × 3) Starcat/Features/Insights/RepositoryInsightsView.swift:2736— Starcat/Features/Insights/RepositoryInsightsView.swift:2736-2755 | Starcat/Features/Insights/RepositoryInsightsView.swift:2875-2894 | Starcat/Features/Insights/RepositoryInsightsView.swift:3210-3229 — 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 `Starcat/Features/Insights/RepositoryInsightsView.swift:2736` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18–20 lines × 3) StarcatWidgets/Focus/StarcatFocusWidget.swift:137— StarcatWidgets/Focus/StarcatFocusWidget.swift:137-154 | StarcatWidgets/Rediscovery/StarcatRediscoveryWidget.swift:109-128 | StarcatWidgets/Rediscovery/StarcatRediscoveryWidget.swift:180-197 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `8` in one and `10` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `StarcatWidgets/Rediscovery/StarcatRediscoveryWidget.swift:178` calls `Spacer` and `StarcatWidgets/Focus/StarcatFocusWidget.swift:135` 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–20 lines × 2) Starcat/Features/AI/AIChatBubble.swift:129— Starcat/Features/AI/AIChatBubble.swift:129-148 | Starcat/Features/AI/AIChatBubble.swift:225-236 — 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 (17–20 lines × 2) Starcat/Features/CodeGraph/CodeFlowPanel.swift:78— Starcat/Features/CodeGraph/CodeFlowPanel.swift:78-94 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryPanel.swift:117-136 — before extracting anything, compare `Starcat/Features/CodeGraph/CodeFlowPanel.swift` and `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryPanel.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 123 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/CodeGraph/CodeFlowPanel.swift:78` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16–20 lines × 2) Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:1436— Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:1436-1455 | Starcat/Features/Settings/TranslationPromptSheet.swift:108-123 — 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 (19–20 lines × 2) Starcat/Features/Releases/ReleaseAssetDownloadCoordinator.swift:151— Starcat/Features/Releases/ReleaseAssetDownloadCoordinator.swift:151-170 | Starcat/Features/Releases/ReleaseAssetRowView.swift:292-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.
Duplicated block (18–19 lines × 3) Starcat/Features/AI/ReadmeTranslationService.swift:387— Starcat/Features/AI/ReadmeTranslationService.swift:387-404 | Starcat/Features/AI/ReadmeTranslationService.swift:493-511 | Starcat/Features/AI/ReadmeTranslationService.swift:671-689 — 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 `Starcat/Features/AI/ReadmeTranslationService.swift:387` 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 (15–19 lines × 3) Starcat/Features/CodeGraph/CodeFlowStorage.swift:516— Starcat/Features/CodeGraph/CodeFlowStorage.swift:516-534 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:729-743 | Starcat/Shared/Services/RepoContextStorage.swift:773-791 — before extracting anything, compare `Starcat/Features/CodeGraph/CodeFlowStorage.swift` and `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (19 lines × 3) Starcat/Features/CodeGraph/CodeFlowStorage.swift:630— Starcat/Features/CodeGraph/CodeFlowStorage.swift:630-648 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:439-457 | Starcat/Shared/Services/RepoContextStorage.swift:869-887 — before extracting anything, compare `Starcat/Features/CodeGraph/CodeFlowStorage.swift` and `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/CodeGraph/CodeFlowStorage.swift:630` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–19 lines × 2) Starcat/Core/Widget/WidgetSnapshotBuilder.swift:335— Starcat/Core/Widget/WidgetSnapshotBuilder.swift:335-343 | Starcat/Core/Widget/WidgetSnapshotBuilder.swift:362-380 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Core/Widget/WidgetSnapshotBuilder.swift:335` 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 (16–19 lines × 2) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:1358— Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:1358-1373 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:1460-1478 — 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 `Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:1358` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 4) Starcat/Features/Settings/AISettingsView.swift:414— Starcat/Features/Settings/AISettingsView.swift:414-431 | Starcat/Features/Settings/AISettingsView.swift:939-956 | Starcat/Features/Settings/ExternalSearchSettingsSection.swift:58-75 | Starcat/Features/Settings/TranslationSettingsView.swift:87-104 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (18 lines × 3) Starcat/Core/Network/GitHubAPI/ReadmeAssetURLRewriter.swift:124— Starcat/Core/Network/GitHubAPI/ReadmeAssetURLRewriter.swift:124-141 | Starcat/Core/Network/GitHubAPI/ReadmeAssetURLRewriter.swift:401-418 | Starcat/Core/Network/GitHubAPI/ReadmeAssetURLRewriter.swift:431-448 — 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 `Starcat/Core/Network/GitHubAPI/ReadmeAssetURLRewriter.swift:124` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17–18 lines × 2) Starcat/Features/RAG/Core/KnowledgeRAGService.swift:1629— Starcat/Features/RAG/Core/KnowledgeRAGService.swift:1629-1645 | Starcat/Features/RAG/Core/KnowledgeRAGService.swift:1717-1734 — 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 `Starcat/Features/RAG/Core/KnowledgeRAGService.swift:1629` 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 (16–18 lines × 2) Starcat/Features/RAG/Storage/RAGConversationStore.swift:283— Starcat/Features/RAG/Storage/RAGConversationStore.swift:283-298 | Starcat/Features/RAG/Storage/RAGConversationStore.swift:424-441 — 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 `Starcat/Features/RAG/Storage/RAGConversationStore.swift:283` 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 (17 lines × 4) Starcat/Features/Settings/GeneralSettingsView.swift:66— Starcat/Features/Settings/GeneralSettingsView.swift:66-82 | Starcat/Features/Settings/SettingsView.swift:717-733 | Starcat/Features/Settings/SettingsView.swift:828-844 | Starcat/Features/Settings/SettingsView.swift:989-1005 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (14–17 lines × 3) Starcat/Features/CodeGraph/CodeFlowStorage.swift:338— Starcat/Features/CodeGraph/CodeFlowStorage.swift:338-353 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:396-409 | Starcat/Shared/Services/RepoContextStorage.swift:555-571 — before extracting anything, compare `Starcat/Features/CodeGraph/CodeFlowStorage.swift` and `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (15–17 lines × 2) Starcat/Features/Agents/ExternalRuntime/CodexAppServerAdapter.swift:93— Starcat/Features/Agents/ExternalRuntime/CodexAppServerAdapter.swift:93-109 | Starcat/Features/Agents/ExternalRuntime/CodexModelCatalog.swift:179-193 — 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 `Starcat/Features/Agents/ExternalRuntime/CodexAppServerAdapter.swift:93` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15–16 lines × 5) Starcat/Features/Activity/ActivityDetailScaffoldShell.swift:199— Starcat/Features/Activity/ActivityDetailScaffoldShell.swift:199-214 | Starcat/Features/Activity/ActivityReleaseDetailScaffoldShell.swift:129-144 | Starcat/Features/Activity/WeeklyDetailScaffoldShell.swift:366-381 | Starcat/Features/Explore/DiscoveryDetailView.swift:116-130 | Starcat/Features/Trending/TrendingScaffoldShell.swift:200-215 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 times. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Activity/ActivityDetailScaffoldShell.swift:199` 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, `Starcat/Features/Activity/WeeklyDetailScaffoldShell.swift:382` calls `resolveRepo` and `Starcat/Features/Activity/ActivityDetailScaffoldShell.swift:215` 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 (13–16 lines × 3) Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryExtractor.swift:131— Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryExtractor.swift:131-143 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:180-192 | Starcat/Shared/Services/RepoContextPacker/Internal/SourceZipExtractor.swift:184-199 — 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 `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryExtractor.swift:131` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12–16 lines × 2) Starcat/Features/About/AboutView.swift:239— Starcat/Features/About/AboutView.swift:239-254 | Starcat/Shared/Components/LaunchSplashView.swift:539-550 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9–16 lines × 2) Starcat/Features/Insights/MyInsightsSnapshotProvider.swift:574— Starcat/Features/Insights/MyInsightsSnapshotProvider.swift:574-589 | Starcat/Features/RAG/Core/KnowledgeBaseMetadataSnapshot.swift:850-858 — 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 `Starcat/Features/Insights/MyInsightsSnapshotProvider.swift:574` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13–15 lines × 3) Starcat/Features/CodeGraph/CodeFlowStorage.swift:397— Starcat/Features/CodeGraph/CodeFlowStorage.swift:397-409 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:625-637 | Starcat/Shared/Services/RepoContextStorage.swift:619-633 — before extracting anything, compare `Starcat/Features/CodeGraph/CodeFlowStorage.swift` and `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/CodeGraph/CodeFlowStorage.swift:397` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 3) Starcat/Features/Home/SidebarView.swift:2006— Starcat/Features/Home/SidebarView.swift:2006-2020 | Starcat/Features/Home/SidebarView.swift:2038-2052 | Starcat/Features/Home/SidebarView.swift:2067-2081 — 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 `Starcat/Features/Home/SidebarView.swift:2006` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–15 lines × 2) Starcat/Features/MCP/StarcatMCPLoopbackHTTPServer.swift:267— Starcat/Features/MCP/StarcatMCPLoopbackHTTPServer.swift:267-281 | Starcat/Features/MCP/StarcatMCPLoopbackHTTPServer.swift:294-306 — 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 `Starcat/Features/MCP/StarcatMCPLoopbackHTTPServer.swift:267` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7–14 lines × 3) Starcat/Features/Activity/WeeklyContentView.swift:491— Starcat/Features/Activity/WeeklyContentView.swift:491-497 | Starcat/Features/Trending/TrendingViewModel.swift:107-120 | Starcat/Shared/Components/Toolbar/UnifiedSortMenu.swift:227-238 — 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 `Starcat/Features/Activity/WeeklyContentView.swift:491` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Starcat/Features/Trending/TrendingViewModel.swift:122` calls `business` and `Starcat/Shared/Components/Toolbar/UnifiedSortMenu.swift:239` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (2–14 lines × 4) Starcat/Features/CodeGraph/CodeFlowStorage.swift:678— Starcat/Features/CodeGraph/CodeFlowStorage.swift:678-679 | Starcat/Features/CodeGraph/CodeFlowStorage.swift:680-690 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:754-764 | Starcat/Shared/Services/RepoContextStorage.swift:933-946 — before extracting anything, compare `Starcat/Features/CodeGraph/CodeFlowStorage.swift` and `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/CodeGraph/CodeFlowStorage.swift:678` 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 before the matched lines, `Starcat/Features/CodeGraph/CodeFlowStorage.swift:677` calls `contentsOfDirectory`, `where`, `resourceValues` and `Starcat/Features/CodeGraph/CodeFlowStorage.swift:676` 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–14 lines × 2) Starcat/Features/Activity/ActivityRepoDetailContent.swift:55— Starcat/Features/Activity/ActivityRepoDetailContent.swift:55-64 | Starcat/Features/Home/ManageDetailContent.swift:95-108 — 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 `Starcat/Features/Activity/ActivityRepoDetailContent.swift:55` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–13 lines × 4) Starcat/Core/Scheduling/OpenSSFScorePoller.swift:42— Starcat/Core/Scheduling/OpenSSFScorePoller.swift:42-52 | Starcat/Core/Scheduling/ReadmePrefetchPoller.swift:49-59 | Starcat/Core/Scheduling/ReleasePoller.swift:75-87 | Starcat/Core/Scheduling/RepoHealthPoller.swift:49-59 — before extracting anything, compare `Starcat/Core/Scheduling/OpenSSFScorePoller.swift` and `Starcat/Core/Scheduling/RepoHealthPoller.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 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 `Starcat/Core/Scheduling/OpenSSFScorePoller.swift:42` 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 first that the copies are not typed on the same thing: the declarations holding them bind `interval` to `TimeInterval = OpenSSFScorePoller.defaultInterval` in one and `TimeInterval = ReadmePrefetchPoller.defaultInterval` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7–13 lines × 2) Starcat/Core/Network/GitHubAPI/ReadmeAssetURLRewriter.swift:261— Starcat/Core/Network/GitHubAPI/ReadmeAssetURLRewriter.swift:261-273 | Starcat/Core/Network/GitHubAPI/ReadmeAssetURLRewriter.swift:318-324 — 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 `Starcat/Core/Network/GitHubAPI/ReadmeAssetURLRewriter.swift:261` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8–13 lines × 2) Starcat/Core/Sync/RepoNoteRepository.swift:47— Starcat/Core/Sync/RepoNoteRepository.swift:47-59 | Starcat/Core/Sync/RepoNoteRepository.swift:84-91 — 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 `Starcat/Core/Sync/RepoNoteRepository.swift:47` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9–13 lines × 2) Starcat/Features/AI/ExternalSearchContextProvider.swift:45— Starcat/Features/AI/ExternalSearchContextProvider.swift:45-53 | Starcat/Features/AI/ExternalSearchContextProvider.swift:72-84 — 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 `Starcat/Features/AI/ExternalSearchContextProvider.swift:45` 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–12 lines × 4) Starcat/Features/Auth/AuthSession.swift:249— Starcat/Features/Auth/AuthSession.swift:249-253 | Starcat/Features/Auth/AuthSession.swift:467-473 | Starcat/Features/Auth/AuthSession.swift:512-523 | Starcat/Features/Auth/AuthSession.swift:705-715 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Starcat/Features/Auth/AuthSession.swift:249` calls `authenticated` and `Starcat/Features/Auth/AuthSession.swift:705` 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 (9–12 lines × 2) Starcat/Features/Home/ReadmeViewModel.swift:341— Starcat/Features/Home/ReadmeViewModel.swift:341-349 | Starcat/Features/Home/ReadmeViewModel.swift:534-545 — 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 `Starcat/Features/Home/ReadmeViewModel.swift:341` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (3–12 lines × 5) Starcat/Shared/Services/DiskChatHistoryStore.swift:760— Starcat/Shared/Services/DiskChatHistoryStore.swift:760-762 | Starcat/Shared/Services/DiskChatHistoryStore.swift:872-883 | Starcat/Shared/Services/DiskReadmeTranslationCache.swift:256-258 | Starcat/Shared/Services/DiskReadmeTranslationCache.swift:315-317 | Starcat/Shared/Services/DiskReadmeTranslationCache.swift:379-390 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Shared/Services/DiskChatHistoryStore.swift:760` 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–11 lines × 3) Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:285— Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:285-294 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:382-391 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:539-549 — 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 `Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:285` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (4–11 lines × 4) Starcat/Core/RAG/RAGChunkRepository.swift:494— Starcat/Core/RAG/RAGChunkRepository.swift:494-497 | Starcat/Core/RAG/RAGChunkRepository.swift:558-568 | Starcat/Core/RAG/RAGChunkRepository.swift:581-591 | Starcat/Core/RAG/RAGChunkRepository.swift:602-605 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Core/RAG/RAGChunkRepository.swift:494` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Starcat/Core/RAG/RAGChunkRepository.swift:556` calls `idBatches`, `Array`, `joined` and `Starcat/Core/RAG/RAGChunkRepository.swift:602` 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–10 lines × 10) Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:373— Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:373-380 | Starcat/Features/Settings/AISettingsView.swift:409-418 | Starcat/Features/Settings/AISettingsView.swift:934-943 | Starcat/Features/Settings/ExternalSearchSettingsSection.swift:53-62 | Starcat/Features/Settings/GeneralSettingsView.swift:61-70 | Starcat/Features/Settings/SettingsView.swift:712-721 | Starcat/Features/Settings/SettingsView.swift:823-832 | Starcat/Features/Settings/SettingsView.swift:984-993 | Starcat/Features/Settings/TranslationSettingsView.swift:82-91 | Starcat/Shared/Components/SettingsPageIntroduction.swift:24-33 — there are 10 copies across 7 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 10 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/RAG/UI/RAGWorkspaceSettingsView.swift:373` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (3–10 lines × 4) Starcat/Core/Download/RepoFileDownloader.swift:159— Starcat/Core/Download/RepoFileDownloader.swift:159-168 | Starcat/Core/Download/RepoFileDownloader.swift:339-348 | Starcat/Core/Download/RepoFileDownloader.swift:392-401 | Starcat/Features/CodeGraph/CodeFlowRunner.swift:112-114 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/CodeGraph/CodeFlowRunner.swift:112` 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 before the matched lines, `Starcat/Core/Download/RepoFileDownloader.swift:155` calls `url`, `repoGitBlob` and `Starcat/Core/Download/RepoFileDownloader.swift:391` 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–10 lines × 3) Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:1141— Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:1141-1148 | Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:1167-1174 | Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:1233-1242 — 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 `Starcat/Features/Agents/Core/AgentWorkspaceRunSurface.swift:1141` 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–10 lines × 3) Starcat/Features/CodeGraph/CodeFlowStorage.swift:300— Starcat/Features/CodeGraph/CodeFlowStorage.swift:300-309 | Starcat/Features/CodeGraph/CodeFlowStorage.swift:316-324 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:365-374 — before extracting anything, compare `Starcat/Features/CodeGraph/CodeFlowStorage.swift` and `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/CodeGraph/CodeFlowStorage.swift:300` 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 first that the copies are not typed on the same thing: the declarations holding them bind `metadata` to `CodeFlowMetadata` in one and `CodebaseMemoryMetadata` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Starcat/Features/CodeGraph/CodeFlowStorage.swift:297` calls `appendingPathComponent`, `write` and `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:364` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (4–9 lines × 6) Starcat/Features/Activity/ActivityView.swift:656— Starcat/Features/Activity/ActivityView.swift:656-664 | Starcat/Features/Activity/WeeklyContentView.swift:799-807 | Starcat/Features/Explore/AwesomeView.swift:502-510 | Starcat/Features/Explore/ExploreView.swift:743-751 | Starcat/Features/Home/HomeViewModel.swift:1239-1242 | Starcat/Features/Trending/TrendingView.swift:299-307 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 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 6 times. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Home/HomeViewModel.swift:1239` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8–9 lines × 4) Starcat/Features/Activity/WeeklyContentView.swift:219— Starcat/Features/Activity/WeeklyContentView.swift:219-227 | Starcat/Features/Explore/AwesomeView.swift:150-157 | Starcat/Features/Explore/ExploreView.swift:435-443 | Starcat/Features/Trending/TrendingView.swift:506-514 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Activity/WeeklyContentView.swift:219` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 4) Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:199— Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:199-207 | Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:958-966 | Starcat/Features/RAG/UI/RAGWorkspaceConversationRail.swift:91-99 | Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2856-2864 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/RAG/UI/RAGWorkspaceAnswerSurface.swift:199` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Starcat/Features/RAG/UI/RAGWorkspaceInspector.swift:2866` calls `padding` and `Starcat/Features/RAG/UI/RAGWorkspaceConversationRail.swift:100` 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–9 lines × 3) Starcat/Features/Explore/ExploreView.swift:226— Starcat/Features/Explore/ExploreView.swift:226-234 | Starcat/Features/Explore/ExploreView.swift:349-356 | Starcat/Features/Explore/ExploreView.swift:543-550 — 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 `Starcat/Features/Explore/ExploreView.swift:226` 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 (7–9 lines × 3) Starcat/Features/Profile/ContributionService.swift:180— Starcat/Features/Profile/ContributionService.swift:180-186 | Starcat/Features/Profile/DeveloperLanguageService.swift:235-243 | Starcat/Features/Profile/UserProfileService.swift:276-282 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Profile/ContributionService.swift:180` 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 (4–9 lines × 3) Starcat/Features/Insights/InsightsCardIllustration.swift:113— Starcat/Features/Insights/InsightsCardIllustration.swift:113-116 | Starcat/Features/Insights/InsightsCardIllustration.swift:223-231 | Starcat/Features/Insights/InsightsCardIllustration.swift:340-348 — 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 `Starcat/Features/Insights/InsightsCardIllustration.swift:223` 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 (7–9 lines × 2) Starcat/Features/MCP/AgentToolMCPRuntime.swift:83— Starcat/Features/MCP/AgentToolMCPRuntime.swift:83-89 | Starcat/Features/MCP/StarcatMCPRuntime.swift:112-120 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6–9 lines × 2) Starcat/Features/MCP/AgentToolMCPRuntime.swift:125— Starcat/Features/MCP/AgentToolMCPRuntime.swift:125-133 | Starcat/Features/MCP/StarcatMCPToolRegistry.swift:60-65 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 4) Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:1668— Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:1668-1675 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:3134-3141 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:3161-3168 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:3196-3203 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:3142` calls `ensureRAGConversationGroupsSchema` and `Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:1676` 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–8 lines × 4) Starcat/Features/Agents/Core/AgentRunInspectorView.swift:56— Starcat/Features/Agents/Core/AgentRunInspectorView.swift:56-62 | Starcat/Features/RAG/UI/RAGAssistantMessageBlock.swift:144-151 | Starcat/Features/RAG/UI/RAGMarkdownText.swift:55-61 | Starcat/Features/RAG/UI/RAGMarkdownText.swift:352-358 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/Agents/Core/AgentRunInspectorView.swift:56` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (6–8 lines × 3) Starcat/Features/CodeGraph/CodeFlowStorage.swift:326— Starcat/Features/CodeGraph/CodeFlowStorage.swift:326-331 | Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:378-383 | Starcat/Shared/Services/RepoContextStorage.swift:536-543 — before extracting anything, compare `Starcat/Features/CodeGraph/CodeFlowStorage.swift` and `Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Features/CodeGraph/CodeFlowStorage.swift:326` 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 (4–8 lines × 7) Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:623— Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:623-630 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:921-928 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:1724-1727 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:1761-1764 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:1775-1778 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2310-2314 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2953-2959 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — 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 `Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:623` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:621` calls `column`, `notNull`, `defaults` and `Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:920` 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 (3–8 lines × 3) Starcat/Features/Insights/InsightsMetricMotifBackground.swift:178— Starcat/Features/Insights/InsightsMetricMotifBackground.swift:178-185 | Starcat/Features/Insights/InsightsMetricMotifBackground.swift:211-213 | Starcat/Features/Insights/InsightsMetricMotifBackground.swift:293-300 — 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 `Starcat/Features/Insights/InsightsMetricMotifBackground.swift:178` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (6–8 lines × 2) Starcat/Shared/Services/WikiAvailabilitySnapshotLoader.swift:59— Starcat/Shared/Services/WikiAvailabilitySnapshotLoader.swift:59-66 | Starcat/Shared/Services/WikiAvailabilitySnapshotLoader.swift:120-125 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 6) Starcat/Core/Settings/AppSettings.swift:323— Starcat/Core/Settings/AppSettings.swift:323-329 | Starcat/Core/Settings/AppSettings.swift:359-365 | Starcat/Core/Settings/AppSettings.swift:428-434 | Starcat/Core/Settings/AppSettings.swift:460-466 | Starcat/Core/Settings/AppSettings.swift:493-507 | Starcat/Features/AI/AIConfiguration.swift:1663-1669 — there are 6 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 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Core/Settings/AppSettings.swift:323` 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 (6–7 lines × 2) Starcat/Shared/Models/RepoDetailViewData.swift:136— Starcat/Shared/Models/RepoDetailViewData.swift:136-141 | Starcat/Shared/Models/RepoDetailViewData.swift:162-168 — 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. 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 (3–6 lines × 13) Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:391— Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:391-393 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:642-645 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:671-674 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:1741-1743 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:1794-1797 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2425-2430 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2519-2522 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2570-2572 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2590-2593 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2690-2695 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2718-2721 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:2993-2997 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:3213-3215 — all 13 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:394` calls `column`, `notNull`, `defaults` and `Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:1744` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 6) Starcat/Features/Companion/CompanionLocalServer.swift:291— Starcat/Features/Companion/CompanionLocalServer.swift:291-296 | Starcat/Features/Companion/CompanionLocalServer.swift:321-326 | Starcat/Features/Companion/CompanionLocalServer.swift:377-382 | Starcat/Features/Companion/CompanionLocalServer.swift:408-413 | Starcat/Features/Companion/CompanionLocalServer.swift:446-451 | Starcat/Features/Companion/CompanionLocalServer.swift:475-480 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — 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 `Starcat/Features/Companion/CompanionLocalServer.swift:291` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 5) Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:716— Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:716-720 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:941-945 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:955-959 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:3104-3108 | Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:3149-3153 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Core/Database/Migrations/DatabaseMigrationsV1.swift:716` 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 (3–5 lines × 5) Starcat/Core/Network/GitHubAPI/DeveloperLanguageAPI.swift:27— Starcat/Core/Network/GitHubAPI/DeveloperLanguageAPI.swift:27-29 | Starcat/Core/Network/GitHubAPI/OrganizationIssuesAPI.swift:69-73 | Starcat/Core/Network/GitHubAPI/RepoIssuesAPI.swift:78-82 | Starcat/Core/Network/GitHubAPI/RepoIssuesAPI.swift:116-120 | Starcat/Core/Network/GitHubAPI/UserProjectsAPI.swift:135-137 — there are 5 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 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Starcat/Core/Network/GitHubAPI/OrganizationIssuesAPI.swift:69` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Starcat/Core/Network/GitHubAPI/UserProjectsAPI.swift:137` calls `URLQueryItem` and `Starcat/Core/Network/GitHubAPI/DeveloperLanguageAPI.swift:29` 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 (4–5 lines × 3) Starcat/Features/About/AboutView.swift:170— Starcat/Features/About/AboutView.swift:170-174 | Starcat/Features/About/ReleaseNotesView.swift:91-94 | Starcat/Features/Onboarding/FirstRunWelcomeSheet.swift:712-716 — 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 `Starcat/Features/About/ReleaseNotesView.swift:91` 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.
Duplication concentrated across 9 sibling directories (20 clone groups) starcat-promo-video/presentation/src/chapters/07-assess/Assess.tsx:19— 20 duplicated blocks under starcat-promo-video/presentation/src/chapters/ have copies in at least two of the sibling directories 01-coldopen, 02-product, 03-find, 04-understand, 05-tags, 06-organize (+3 more sibling(s) not listed) — 2 of them are reported below, and 18 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 20 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 20 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 20 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication· Duplicated block with local edits (51 matched lines × 2 locations) · ×1
Duplicated block with local edits (51 matched lines × 2 locations) starcat-promo-video/presentation/src/chapters/07-assess/Assess.tsx:19— starcat-promo-video/presentation/src/chapters/07-assess/Assess.tsx:19 · starcat-promo-video/presentation/src/chapters/08-local-native/LocalNative.tsx:83 — the two spans are one implementation copied and then locally edited — 262 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (41 matched lines × 2 locations) · ×1
Duplicated block with local edits (41 matched lines × 2 locations) starcat-promo-video/presentation/src/chapters/06-organize/Organize.tsx:30— starcat-promo-video/presentation/src/chapters/06-organize/Organize.tsx:30 · starcat-promo-video/presentation/src/chapters/09-cta/Cta.tsx:26 — the two spans are one implementation copied and then locally edited — 263 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Complex function update (cyclomatic 44, cognitive 65) resources/follow-graph/entry.js:704— update has cyclomatic complexity 44 and cognitive complexity 65; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function drawNode (cyclomatic 25, cognitive 31) resources/follow-graph/entry.js:266— drawNode has cyclomatic complexity 25 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function sync (cyclomatic 21, cognitive 29) resources/follow-graph/progressive-reveal.mjs:21— sync has cyclomatic complexity 21 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function syncAnimation (cyclomatic 20, cognitive 17) resources/follow-graph/entry.js:592— syncAnimation has cyclomatic complexity 20 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function applyVisibleGraph (cyclomatic 19, cognitive 31) resources/follow-graph/entry.js:630— applyVisibleGraph has cyclomatic complexity 19 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function drawFlow (cyclomatic 16, cognitive 30) resources/follow-graph/entry.js:462— drawFlow has cyclomatic complexity 16 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function drawDirections (cyclomatic 13, cognitive 11) resources/follow-graph/entry.js:525— drawDirections has cyclomatic complexity 13 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 12, cognitive 12) resources/follow-graph/renderer.test.mjs:42— (anonymous) has cyclomatic complexity 12 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function onKey (cyclomatic 11, cognitive 11) starcat-promo-video/presentation/src/hooks/useStepper.ts:140— onKey has cyclomatic complexity 11 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files· resources/follow-graph/entry.js · ×1
resources/follow-graph/entry.js: 842 lines of code resources/follow-graph/entry.js:1— resources/follow-graph/entry.js has 842 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R6 · Tooling· This package's lint script runs in no CI job · ×1
This package's lint script runs in no CI job starcat-promo-video/presentation/package.json:9— The package in `starcat-promo-video/presentation` declares the lint script `lint` (`oxlint`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run lint` in `starcat-promo-video/presentation` (or the workspace's task runner).
Third-party script without Subresource Integrity Starcat/Resources/CodeFlow/codeflow.html:30— `https://cdn.jsdelivr.net/npm/mermaid@11.16.0/dist/mermaid.min.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. 2 such include(s) across the repository's markup.
Duplicated predicate resources/screenshots/1.2.0-app-store/manifest/render-app-store.mjs:243— `image.complete && image.naturalWidth > 0` appears character-identically in 2 files — resources/screenshots/1.2.0-app-store/manifest/render-app-store.mjs, resources/screenshots/2026-06-23-app-store/manifest/render-landing.mjs. 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 scripts/publish-direct-github-release.py:117— `dmg.name != f"Starcat-{marketing_version}-arm64.dmg" or checksum.name != dmg.name + ".sha256"` appears character-identically in 2 files — scripts/publish-direct-github-release.py, scripts/verify-direct-release-artifacts.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate Starcat/Features/Home/RepositoryContributorHeroViewModel.swift:115— `!Task.isCancelled && activeRequestID == requestID` appears character-identically in 2 files — Starcat/Features/Home/RepositoryContributorHeroViewModel.swift, Starcat/Features/Home/RepositoryLanguageDistributionViewModel.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 Starcat/App/AppDependencies.swift:858— `!apiKey.isEmpty || profile.provider.allowsEmptyAPIKey` appears character-identically in 5 files — Starcat/App/AppDependencies.swift, Starcat/Features/AI/ReadmeTranslationEngineAvailability.swift, Starcat/Features/AI/ReadmeTranslationService.swift, Starcat/Features/AI/RepoAIInsightService.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 Starcat/Core/RAG/KnowledgeRAGIndexBuilder.swift:1260— `!apiKey.isEmpty || selection.profile.provider.allowsEmptyAPIKey` appears character-identically in 2 files — Starcat/Core/RAG/KnowledgeRAGIndexBuilder.swift, Starcat/Features/AI/SemanticSearchService.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 Starcat/Features/Agents/WeeklyReport/RepoInsightArtifactBuilder.swift:171— `!trimmed.hasPrefix("<external_context") && trimmed != "</external_context>"` appears character-identically in 2 files — Starcat/Features/Agents/WeeklyReport/RepoInsightArtifactBuilder.swift, Starcat/Features/Agents/WeeklyReport/WeeklyReportArtifactBuilder.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 Starcat/Features/Explore/ExploreView.swift:290— `!viewModel.isRefreshing && !viewModel.isLoading` appears character-identically in 2 files — Starcat/Features/Explore/ExploreView.swift, Starcat/Features/Trending/TrendingView.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 Starcat/App/AppDependencies.swift:836— `$0.id == task.providerID && $0.isEnabled` appears character-identically in 2 files — Starcat/App/AppDependencies.swift, Starcat/Features/Agents/Core/AgentLoopModelClient.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 Starcat/Features/Agents/ExternalRuntime/AgentRuntimeProviderCatalog.swift:284— `$0.isEnabled && ($0.capability == .chat || $0.capability == .unknown)` appears character-identically in 2 files — Starcat/Features/Agents/ExternalRuntime/AgentRuntimeProviderCatalog.swift, Starcat/Features/Settings/TranslationSettingsView.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 Starcat/Features/RAG/Core/KnowledgeRAGPromptBuilder.swift:166— `$0.outcome == .success && $0.resultCount > 0 && !$0.content.isEmpty` appears character-identically in 2 files — Starcat/Features/RAG/Core/KnowledgeRAGPromptBuilder.swift, Starcat/Features/RAG/Core/KnowledgeRAGService.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 Starcat/Features/Agents/Core/AgentRepositoryReadCapabilitySource.swift:43— `$0.owner.caseInsensitiveCompare(owner) == .orderedSame && $0.name.caseInsensitiveCompare(name) == .orderedSame` appears character-identically in 2 files — Starcat/Features/Agents/Core/AgentRepositoryReadCapabilitySource.swift, Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.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 Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift:68— `currentFrame.width < minimumFrameSize.width || currentFrame.height < minimumFrameSize.height` appears character-identically in 2 files — Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceWindowController.swift, Starcat/Shared/Utilities/AIWorkspaceSceneCoordinator.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 Starcat/Features/Settings/AISettingsView.swift:123— `dependencies.entitlementGate.isProUser || LocalAIHardwareSupport.isLocalAIAvailable` appears character-identically in 2 files — Starcat/Features/Settings/AISettingsView.swift, Starcat/Features/Settings/SearchIndexSettingsView.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 Starcat/Core/Sync/AwesomeRepository.swift:137— `error is CancellationError || Task.isCancelled` appears character-identically in 3 files — Starcat/Core/Sync/AwesomeRepository.swift, Starcat/Core/Sync/DiscoveryRepository.swift, Starcat/Features/AI/RepoAIInsightService.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 Starcat/Features/AI/AIChatInputView.swift:546— `event.keyCode == 36 || event.keyCode == 76` appears character-identically in 2 files — Starcat/Features/AI/AIChatInputView.swift, Starcat/Shared/Components/AICommandComposer/AICommandTextEditor.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 Starcat/Features/Agents/Core/AgentHarnessProcessPresentation.swift:102— `event.status == .failed || event.status == .waiting` appears character-identically in 2 files — Starcat/Features/Agents/Core/AgentHarnessProcessPresentation.swift, Starcat/Features/Agents/Core/AgentHarnessProcessView.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 Starcat/Features/CodeGraph/CodeFlowStorage.swift:191— `fixedRootURL == nil && defaults.data(forKey: Self.bookmarkKey) != nil` appears character-identically in 2 files — Starcat/Features/CodeGraph/CodeFlowStorage.swift, Starcat/Shared/Services/RepoContextStorage.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 Starcat/Core/Network/GitHubAPI/RepositoryMarkdownLink.swift:82— `host == "github.com" || host == "www.github.com"` appears character-identically in 3 files — Starcat/Core/Network/GitHubAPI/RepositoryMarkdownLink.swift, Starcat/Features/RAG/UI/KnowledgeRAGWorkspaceViewModel.swift, Starcat/Features/RAG/UI/RAGMarkdownText.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 Starcat/Features/AI/AIOrganizationBannerState.swift:93— `job.status == .queued || job.status == .processing` appears character-identically in 2 files — Starcat/Features/AI/AIOrganizationBannerState.swift, Starcat/Features/AI/BatchAIQueuePresentationStore.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 Starcat/Features/AI/GitHubStarListAIGroupingSession.swift:624— `job.status == .queued || job.status == .stopped || job.status == .failed` appears character-identically in 2 files — Starcat/Features/AI/GitHubStarListAIGroupingSession.swift, Starcat/Features/Home/GitHubStarListAIGroupingPresentation.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 Starcat/Core/Models/LicenseKnowledge.swift:91— `lowered.isEmpty || lowered == "noassertion"` appears character-identically in 2 files — Starcat/Core/Models/LicenseKnowledge.swift, Starcat/Core/Models/RepoLicenseFilter.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 Starcat/Features/AI/Anthropic/AnthropicClient.swift:483— `nsError.domain == NSURLErrorDomain && nsError.code == NSURLErrorCancelled` appears character-identically in 3 files — Starcat/Features/AI/Anthropic/AnthropicClient.swift, Starcat/Features/AI/OpenAIClient.swift, Starcat/Features/Explore/AwesomeSourceCard.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 Starcat/Features/Home/HomeView.swift:1075— `repo.isStarred || dependencies.starredRegistry.contains(ghRepoId: repo.id)` appears character-identically in 3 files — Starcat/Features/Home/HomeView.swift, Starcat/Features/Home/RepoListView.swift, Starcat/Shared/Components/RepoDetailScaffold.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 Starcat/Core/Sync/ReleaseMonitor.swift:149— `repo.isStarred || libraryState == .inLibrary` appears character-identically in 6 files — Starcat/Core/Sync/ReleaseMonitor.swift, Starcat/Features/Companion/CompanionActionHandler.swift, Starcat/Features/Companion/CompanionContextProvider.swift, Starcat/Features/Companion/CompanionNoteWriter.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 Starcat/Core/Sync/StarringSubsystem.swift:555— `repo.isStarred || registry.contains(ghRepoId: repo.id)` appears character-identically in 2 files — Starcat/Core/Sync/StarringSubsystem.swift, Starcat/Features/Home/RepoListView.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Silent fallback default in catch Starcat/Core/Cache/ReadmeAttachmentImageCache.swift:105— `diskSize` turns every thrown error into `0` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Starcat/Core/Sync/GitHubNotificationInboxService.swift:131— `fetchCached` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Starcat/Features/AI/SemanticSearchService.swift:420— `indexedCount` turns every thrown error into `0` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Starcat/Features/Companion/CompanionContextProvider.swift:259— `tagDTOs` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Starcat/Features/Companion/CompanionContextProvider.swift:268— `allTagDTOs` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Starcat/Features/Home/HomeViewModel.swift:2590— `selectionSnapshotsForCurrentQuery` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Starcat/Features/Trending/TrendingLanguageStore.swift:220— `loadDiskCache` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Starcat/Shared/Services/DiskWikiCache.swift:321— `freshRepositoryIDs` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Starcat/Shared/Services/DiskWikiCache.swift:365— `cachedRepositoryKeys` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Starcat/Core/Sync/AwesomeRepository.swift:886— `encodeLanguageBytes` turns every thrown error into `"{}"` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Starcat/Core/Sync/AwesomeRepository.swift:891— `decodeLanguageBytes` turns every thrown error into `[:]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Starcat/Core/Network/GitHubAPI/NotificationsAPI.swift:178— `parseIssueComments` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Starcat/Core/Network/GitHubAPI/ReadmeAssetURLRewriter.swift:536— `readmeDocumentDirectory` turns every thrown error into `""` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Starcat/Core/Widget/Shared/FocusWidgetConfigurationIntent.swift:78— `availableEntities` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Starcat/Features/AI/LocalAI/LayaDecisionModelStorage.swift:119— `totalDiskUsage` turns every thrown error into `0` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Starcat/Features/AI/LocalAI/LocalAIModelStorage.swift:281— `totalDiskUsage` turns every thrown error into `0` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:243— `outputDirectoryDisplayPath` turns every thrown error into `""` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Starcat/Features/RAG/Core/KnowledgeRAGService.swift:230— `storedPayloadUTF8ByteCount` turns every thrown error into `0` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Starcat/Features/RAG/Core/RAGSearchProviders.swift:98— `identityTerms` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Starcat/Features/Settings/CCSwitchImport/CCSwitchCredentialExtractor.swift:195— `tomlValue` turns every thrown error into `""` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Starcat/Shared/Components/AICommandComposer/AIComposerModels.swift:38— `links` 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.
README/code drift docs/0-总览/README.md:99— docs/0-总览/README.md links to `1-立项/`, but `docs/0-总览/1-立项` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs/0-总览/README.md:100— docs/0-总览/README.md links to `2-产品/需求讨论/正式方案/`, but `docs/0-总览/2-产品/需求讨论/正式方案` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs/0-总览/README.md:101— docs/0-总览/README.md links to `3-设计/详细设计/`, but `docs/0-总览/3-设计/详细设计` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs/0-总览/README.md:102— docs/0-总览/README.md links to `2-产品/里程碑/`, but `docs/0-总览/2-产品/里程碑` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs/0-总览/README.md:102— docs/0-总览/README.md links to `4-工程进度/`, but `docs/0-总览/4-工程进度` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs/0-总览/README.md:103— docs/0-总览/README.md links to `5-规范/`, but `docs/0-总览/5-规范` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs/0-总览/README.md:105— docs/0-总览/README.md links to `6-发版与上架/`, but `docs/0-总览/6-发版与上架` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs/0-总览/README.md:107— docs/0-总览/README.md links to `7-工具与脚本/`, but `docs/0-总览/7-工具与脚本` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs/0-总览/README.md:108— docs/0-总览/README.md links to `8-原型设计/`, but `docs/0-总览/8-原型设计` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
Fat interface: RAGChunkRepositoryProtocol (32 requirements) Starcat/Core/RAG/RAGChunkRepository.swift:15— `RAGChunkRepositoryProtocol` declares 32 requirements: `replaceSource`, `fetchChunks`, `fetchChunkIdentities`, `fetchActiveMetadata`, `countChunksNeedingEmbedding`, `fetchVectorizationProgress`, `fetchChunksNeedingEmbedding`, `claimChunksForEmbedding`, `releaseEmbeddingClaim`, `clearOrphanEmbeddingClaims`, `hasReadyVectorChunks`, `fetchReadyEmbeddings`, `fetchReadyChunks`, `fetchKeywordSearchableChunks`, `keywordSearch`, `markReady`, `markFailed`, `markStaleForOtherModels`, `coverage`, `fetchLastIndexRefreshSummary`, `saveLastIndexRefreshSummary`, `knowledgeRepositoryIndexes`, `fetchIndexIssueChunks`, `fetchKnowledgeChunks`, `fetchManagedKnowledgeChunks`, `fetchManagedKnowledgeChunkOffset`, `saveKnowledgeChunkOverride`, `setKnowledgeChunkExcluded`, `permanentlyDeleteKnowledgeChunk`, `restoreKnowledgeChunk`, `totalBytes`, `deleteAll`. Counted over its method requirements (members with no body), once per name; a default supplied by a protocol extension is not counted, because no conformer is forced to write it. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: AwesomeRepositoryProtocol (16 requirements) Starcat/Core/Sync/AwesomeRepository.swift:22— `AwesomeRepositoryProtocol` declares 16 requirements: `sources`, `enabledSources`, `repositories`, `hasCompletedSourceSetup`, `refreshCatalog`, `refreshEnabledEntries`, `completeSourceSetup`, `updateSubscriptions`, `saveCustomSource`, `customSourceParseStates`, `updateCustomSourceParseState`, `customSourceEntryFullNames`, `customSourceEntryCount`, `saveCustomSourceEntries`, `completeCustomSourceParsing`, `removeCustomSource`. Counted over its method requirements (members with no body), once per name; a default supplied by a protocol extension is not counted, because no conformer is forced to write it. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: GitHubNotificationThreadRepositoryProtocol (19 requirements) Starcat/Core/Sync/GitHubNotificationThreadRepositoryProtocol.swift:25— `GitHubNotificationThreadRepositoryProtocol` declares 19 requirements: `fetchAll`, `fetch`, `unreadCount`, `totalCount`, `upsertMany`, `upsertOrganizationIssues`, `updateLocalUnread`, `updateHydration`, `updatePersistedIssueState`, `fetchIDsMissingIssueState`, `markNotified`, `fetchFailedMarkRead`, `fetchUnnotified`, `maxUpdatedAt`, `organizationIssueSyncState`, `updateOrganizationIssueSyncState`, `deleteIDs`, `delete`, `removeNotificationThread`. Counted over its method requirements (members with no body), once per name; a default supplied by a protocol extension is not counted, because no conformer is forced to write it. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: GitHubStarListRepositoryProtocol (20 requirements) Starcat/Core/Sync/GitHubStarListRepositoryProtocol.swift:15— `GitHubStarListRepositoryProtocol` declares 20 requirements: `replaceRemoteSnapshot`, `upsertList`, `deleteList`, `setListIds`, `setLocalListIds`, `fetchAllLists`, `findList`, `listIds`, `remoteListIds`, `hasLocalListOverrides`, `fetchPendingLocalMembershipSyncs`, `repoCountsByList`, `ungroupedRepoCount`, `fetchAllListAssignments`, `upsertAIRule`, `findAIRule`, `fetchAllAIRules`, `fetchAIAutoIgnoredRepos`, `upsertAIAutoIgnoredRepo`, `deleteAIAutoIgnoredRepo`. Counted over its method requirements (members with no body), once per name; a default supplied by a protocol extension is not counted, because no conformer is forced to write it. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: RepoNoteRepositoryProtocol (16 requirements) Starcat/Core/Sync/RepoNoteRepositoryProtocol.swift:21— `RepoNoteRepositoryProtocol` declares 16 requirements: `find`, `fetchStatusMap`, `fetchLibraryState`, `fetchLibraryStateMap`, `fetchAllLibraryStateMap`, `fetchAllStatusMap`, `fetchRepos`, `fetchRepoIdsWithNonEmptyContent`, `statusCounts`, `libraryStateCounts`, `upsert`, `updateContent`, `updateStatus`, `updateLibraryState`, `ensureRepoRowExists`, `markAsReadIfNeeded`. Counted over its method requirements (members with no body), once per name; a default supplied by a protocol extension is not counted, because no conformer is forced to write it. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: RepoRepositoryProtocol (34 requirements) Starcat/Core/Sync/RepoRepositoryProtocol.swift:30— `RepoRepositoryProtocol` declares 34 requirements: `upsertStarred`, `markUnstarredExcept`, `markUnstarred`, `upsertExternalRepoForLibrary`, `upsertRepoMetadataForLibrary`, `updateAccessState`, `starredCount`, `knowledgeCount`, `fetchAllStarred`, `fetchKnowledgeRepos`, `fetchRecentStarred`, `findById`, `findByOwnerName`, `fetchUntagged`, `fetchByLanguage`, `languageStats`, `knowledgeLanguageStats`, `searchFTS`, `searchAllLocalFTS`, `searchKnowledgeFTS`, `fetchListPage`, `fetchListCount`, `fetchListFacetCounts`, `fetchListIDs`, `fetchListSelectionSnapshots`, `fetchPinnedRepoTimestamps`, `setPinned`, `updateSyncState`, `fetchStarsETag`, `updateStarsETag`, `fetchLastSyncAt`, `fetchStarredRepoIDs`, `fetchKnowledgeRepoIDs`, `upsertSingleStarred`. Counted over its method requirements (members with no body), once per name; a default supplied by a protocol extension is not counted, because no conformer is forced to write it. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: GitHubAPIClientProtocol (18 requirements) Starcat/Core/Network/GitHubAPI/GitHubAPIClientProtocol.swift:28— `GitHubAPIClientProtocol` declares 18 requirements: `starredRepos`, `unstar`, `star`, `getCurrentUser`, `getUser`, `isFollowing`, `follow`, `unfollow`, `contributionCalendar`, `repo`, `readmeHTML`, `readmeMarkdown`, `getSubscription`, `putSubscription`, `deleteSubscription`, `releases`, `receivedEvents`, `securityAdvisories`. Counted over its method requirements (members with no body), once per name; a default supplied by a protocol extension is not counted, because no conformer is forced to write it. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: RAGConversationStoring (18 requirements) Starcat/Features/RAG/Storage/RAGConversationStore.swift:85— `RAGConversationStoring` declares 18 requirements: `createConversation`, `listConversations`, `findEmptyConversation`, `loadConversation`, `saveContextSummary`, `appendTurn`, `appendUserMessage`, `deleteMessage`, `renameConversation`, `setConversationPinned`, `setConversationGroup`, `deleteConversation`, `deleteAll`, `statistics`, `createGroup`, `listGroups`, `renameGroup`, `deleteGroup`. Counted over its method requirements (members with no body), once per name; a default supplied by a protocol extension is not counted, because no conformer is forced to write it. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Orphaned file Starcat/Core/Cache/ReadmeMetrics.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Starcat/Core/Cache/ReadmeHTMLCodec.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Starcat/Core/Cache/ReadmeAvailability.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Starcat/Core/Database/Models/ReadmeContent.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
D21 · Naming Consistency· `subjectApiURL` spells `Api` where 167 names in the project spell it `API` · ×2
`subjectApiURL` spells `Api` where 167 names in the project spell it `API` Starcat/Core/Sync/GitHubNotificationMapper.swift:688— 167 of 171 names in project repository spell the token `API` (167 of 171; unit: names in project repository containing `API`). Peers: AppDependencies.readmeAPI (Starcat/App/AppDependencies.swift:102); AppDependencies.projectReadmeAPI (Starcat/App/AppDependencies.swift:104); AppDependencies.projectGitHubAPIClient (Starcat/App/AppDependencies.swift:175); AppDependencies.trendingAPI (Starcat/App/AppDependencies.swift:239); AppDependencies.weeklyAPI (Starcat/App/AppDependencies.swift:285). Rename to `subjectAPIURL`. [rule N6]
`subjectApiURL` spells `Api` where 167 names in the project spell it `API` Starcat/Core/Sync/GitHubNotificationMapper.swift:702— 167 of 171 names in project repository spell the token `API` (167 of 171; unit: names in project repository containing `API`). Peers: AppDependencies.readmeAPI (Starcat/App/AppDependencies.swift:102); AppDependencies.projectReadmeAPI (Starcat/App/AppDependencies.swift:104); AppDependencies.projectGitHubAPIClient (Starcat/App/AppDependencies.swift:175); AppDependencies.trendingAPI (Starcat/App/AppDependencies.swift:239); AppDependencies.weeklyAPI (Starcat/App/AppDependencies.swift:285). Rename to `subjectAPIURL`. [rule N6]
D20 · ADR Quality· ADR has no Context and Decision section · ×1
ADR has no Context and Decision section docs/adr/0001-external-search-provider-view-and-context-aggregation.md:1— docs/adr/0001-external-search-provider-view-and-context-aggregation.md has no Context and Decision section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
D21 · Naming Consistency· `subjectApiUrl` spells `Api` where 167 names in the project spell it `API` · ×1
`subjectApiUrl` spells `Api` where 167 names in the project spell it `API` Starcat/Core/Database/Models/GitHubNotificationThreadRecord.swift:39— 167 of 171 names in project repository spell the token `API` (167 of 171; unit: names in project repository containing `API`). Peers: AppDependencies.readmeAPI (Starcat/App/AppDependencies.swift:102); AppDependencies.projectReadmeAPI (Starcat/App/AppDependencies.swift:104); AppDependencies.projectGitHubAPIClient (Starcat/App/AppDependencies.swift:175); AppDependencies.trendingAPI (Starcat/App/AppDependencies.swift:239); AppDependencies.weeklyAPI (Starcat/App/AppDependencies.swift:285). Rename to `subjectAPIUrl`. [rule N6]
D21 · Naming Consistency· `stripSPDXSuffixes` spells `SPDX` where 13 names in the project spell it `Spdx` · ×1
`stripSPDXSuffixes` spells `SPDX` where 13 names in the project spell it `Spdx` Starcat/Core/Models/LicenseKnowledge.swift:97— 13 of 14 names in project repository spell the token `Spdx` (13 of 14; unit: names in project repository containing `Spdx`). Peers: AwesomeEntryRecord.licenseSpdx (Starcat/Core/Database/Models/AwesomeRecords.swift:139); DiscoveryListItemRecord.licenseSpdx (Starcat/Core/Database/Models/DiscoveryCacheRecords.swift:61); DiscoveryBulkRepoRecord.licenseSpdx (Starcat/Core/Database/Models/DiscoveryCacheRecords.swift:280); WeeklyBulkRepoRecord.licenseSpdx (Starcat/Core/Database/Models/WeeklyBulkRepoRecord.swift:56); AwesomeEntryDTO.licenseSpdx (Starcat/Core/Network/AwesomeModels.swift:87). Rename to `stripSpdxSuffixes`. [rule N6]
D21 · Naming Consistency· `fromApiURL` spells `Api` where 167 names in the project spell it `API` · ×1
`fromApiURL` spells `Api` where 167 names in the project spell it `API` Starcat/Core/Sync/GitHubNotificationMapper.swift:634— 167 of 171 names in project repository spell the token `API` (167 of 171; unit: names in project repository containing `API`). Peers: AppDependencies.readmeAPI (Starcat/App/AppDependencies.swift:102); AppDependencies.projectReadmeAPI (Starcat/App/AppDependencies.swift:104); AppDependencies.projectGitHubAPIClient (Starcat/App/AppDependencies.swift:175); AppDependencies.trendingAPI (Starcat/App/AppDependencies.swift:239); AppDependencies.weeklyAPI (Starcat/App/AppDependencies.swift:285). Rename to `fromAPIURL`. [rule N6]
D21 · Naming Consistency· `verificationUri` spells `Uri` where 14 names in the project spell it `URI` · ×1
`verificationUri` spells `Uri` where 14 names in the project spell it `URI` Starcat/Features/Auth/GithubDeviceFlowService.swift:240— 14 of 15 names in project repository spell the token `URI` (14 of 15; unit: names in project repository containing `URI`). Peers: RSSParserDelegate.parser(namespaceURI) (Starcat/Core/Network/GitHubBlog/GitHubBlogRSSAPI.swift:130); RSSParserDelegate.parser(namespaceURI) (Starcat/Core/Network/GitHubBlog/GitHubBlogRSSAPI.swift:154); OAuthDeviceCodeInfo.verificationURI (Starcat/Features/Auth/GithubOAuthServiceProtocol.swift:34); ReadmeStarHistoryHTMLRenderer.render(avatarDataURI) (Starcat/Features/Insights/ReadmeStarHistoryHTMLRenderer.swift:82); RenderFingerprint.avatarDataURI (Starcat/Features/Insights/ReadmeStarHistoryPreview.swift:91). Rename to `verificationURI`. [rule N6]
D21 · Naming Consistency· `delayInMS` spells `MS` where 13 names in the project spell it `Ms` · ×1
`delayInMS` spells `MS` where 13 names in the project spell it `Ms` Starcat/Features/MCP/StarcatMCPService.swift:388— 13 of 14 names in project repository spell the token `Ms` (13 of 14; unit: names in project repository containing `Ms`). Peers: AIUsageEvent.durationMs (Starcat/Core/Database/Models/AIUsageEvent.swift:84); AnySearchMetadata.searchTimeMs (Starcat/Core/Network/AnySearch/AnySearchModels.swift:67); CodebaseMemoryIndexResult.durationMs (Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryRunner.swift:22); Execution.durationMs (Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryStorage.swift:116); CodebaseMemoryViewModel.setStep(durationMs) (Starcat/Features/CodeGraph/CodebaseMemory/CodebaseMemoryViewModel.swift:576). Rename to `delayInMs`. [rule N6]
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion project.yml:1— `(repository root)` (338867 LoC, 3531 module-visible types across 105 directories) overshoots its size bounds. 1 of 6 build unit(s) (Go, SwiftPM, XcodeGen, npm) overshoot their size bounds, lowering Project Cohesion to 6.7/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 4 of 969 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 969 of the 1205 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: Starcat/Core/Cache/ReadmeMetrics.swift, Starcat/Core/Cache/ReadmeHTMLCodec.swift, Starcat/Core/Cache/ReadmeAvailability.swift, Starcat/Core/Database/Models/ReadmeContent.swift. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
No dependency-update automation resources/follow-graph/package.json:14— `resources/follow-graph/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
Changelog looks stale/thin — The changelog this check read carries 0 versioned entries, against a bar of 3. Counted as either the distinct `x.y.z` versions it names (a link's target is not counted) or its version-shaped section headings (`## [1.2.0]`, `## V14.x.x`, `## Updates in 8.0.x`), whichever is the larger — so a log sectioned by minor series counts its sections, not its individual patch numbers. Entries recorded somewhere this check does not read — release notes generated at tag time from a generator config it did not recognise, or a log kept outside the repository — are not counted here, and this row is about what is re-findable in the tree rather than about how often you release.
X5 · Nullable reference types· Strict null checking is not enabled everywhere the repository type-checks · ×1
Strict null checking is not enabled everywhere the repository type-checks — 0/2 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
Null assertions (`!`) override strict null checking — ~5.5 `!` null assertions per 1k TypeScript source lines — 12 assertion(s) across the 2171 source line(s) of the 33 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: starcat-promo-video/presentation/src/hooks/useStepper.ts (7), starcat-promo-video/presentation/scripts/extract-narrations.ts (2), starcat-promo-video/presentation/src/App.tsx (1). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
Skipped (documented): endToEndFixturePipeline StarcatTests/EndToEndIntegrationTests.swift:54— Skipped with a documented reason — a deferral, not lazy debt: wrapped in withKnownIssue — the body is expected to fail, so its failure is not reported
Skipped (documented): installedCodexCompletesModelCatalogAndRealTurn StarcatTests/ExternalAgentProtocolAdapterTests.swift:706— Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
Skipped (documented): installedDeepSeekHarnessCompletesRealTurn StarcatTests/ExternalAgentProtocolAdapterTests.swift:790— Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
Skipped (documented): realDatabaseBaseline StarcatTests/RAGVectorScanBenchmarkTests.swift:28— Skipped with a documented reason — a deferral, not lazy debt: disabled by a .disabled(…) trait
Skipped (documented): productionKeyMissingInCI StarcatTests/StarcatAPIKeyTests.swift:51— Skipped with a documented reason — a deferral, not lazy debt: disabled by a .disabled(…) trait
Skipped (documented): resolveAllMissing StarcatTests/StarcatAPIKeyTests.swift:61— Skipped with a documented reason — a deferral, not lazy debt: disabled by a .disabled(…) trait
Skipped (documented): resolvePerServiceIsolation StarcatTests/StarcatAPIKeyTests.swift:82— Skipped with a documented reason — a deferral, not lazy debt: disabled by a .disabled(…) trait
Skipped (documented): resolveEmptyStringTreatedAsReset StarcatTests/StarcatAPIKeyTests.swift:96— Skipped with a documented reason — a deferral, not lazy debt: disabled by a .disabled(…) trait
Skipped (documented): resolveWhitespaceOnlyTreatedAsReset StarcatTests/StarcatAPIKeyTests.swift:108— Skipped with a documented reason — a deferral, not lazy debt: disabled by a .disabled(…) trait
Skipped (documented): resolveAfterReset StarcatTests/StarcatAPIKeyTests.swift:129— Skipped with a documented reason — a deferral, not lazy debt: disabled by a .disabled(…) trait
Outdated: modernc.org/sqlite — `modernc.org/sqlite` is required at v1.52.0 in REDACTED, but v1.62.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get modernc.org/sqlite@v1.62.0 && go mod tidy` and commit the updated REDACTED and go.sum.
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.
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 111 file(s) — `Starcat/Core/Capabilities/RepositoryTagCapability.swift`, `Starcat/Core/Database/DatabaseManager.swift`, `Starcat/Core/Network/GitHubAPI/ReadmeAPI.swift`, `Starcat/Core/Network/GitHubAPI/ReadmeAssetURLRewriter.swift`, `Starcat/Core/Network/TypeSafeClient.swift`, … (+106 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
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 01a1eaf1-0523-7b4d-a093-5d6acdf531ac · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 55 · Warnings: 2431 · Recommendations: 94 · Info: 11 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 17-11-2026 @ 19:17 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.