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

KartikLabhshetwar/better-shot

Measured 15 November 2026, 01:12 UTC, at code version 0e005e9

Code coverage is not measured: Xcode and a simulator are needed to run it.

Test reliability is not measured: The suite is built by Xcode and needs an Apple platform to run.

Supply-chain provenance & signing is not measured: Supply-chain provenance is not scored (this pipeline releases no artifact), but its build steps or GitHub Actions workflows have integrity defects, or nothing watches its dependency set for published advisories.

CAI score 41out of 100 At risk Down 1 since the last survey

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

A medium codebase: 67,034 lines of product code in 3 projects, tests not counted · Estimated rebuild effort: about 0.4 person-years · Weakest lens: Production Readiness, 28

Findings by how serious they are

38 critical 508 serious 73 minor

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

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
15 November 2026, 01:12 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.

A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.

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 ▸

56of 56 dimensions measured by tools.
556of 619 findings point to an exact file and line, so you can open each one in the code. The other 63 concern the repository as a whole, such as missing documentation.
56dimensions across 7 lenses, read from 67,034 lines of product code in 3 projects.
Chapters

Executive summary

KartikLabhshetwar/better-shot is rated At risk because critical security findings are open, most of them in the packages it uses. Its score is held back because we found no automated security scanning of the code, its secrets or its dependencies, and it has packages under a licence on your banned list. It scores 41 out of 100, which the At risk rating leaves unchanged. We judged it as a preview release, against a lower bar.

Production Readiness, at 28, is the weakest lens and counts most in the score. The best first step for the work it takes is replacing each deprecated dependency, worth about 6 points. Replacing the 14 packages under a banned licence would lift Production Readiness itself, worth about 11 points. Raising Production Readiness to 62 would lift the score to about 51.

Fifteen known security holes in the packages the code depends on can be used by attackers. Fourteen packages carry licence risk, and four controls can't be used without a mouse. Updating the vulnerable packages, replacing or clearing the banned-licence packages and making the controls work with a keyboard would close these risks. Pinning each tool to an exact version would fix the pipeline tool referenced by a changeable name, and the password or key in the code's history needs replacing, with the old one switched off. The button or link with no name needs a name, even when it only shows an icon.

The product code is 67,034 lines, about €63,000 to rebuild.

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

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Production Readiness 28 · counts for 46%Code Health 42 · counts for 25%Accessibility 47 · counts for 14%Maturity 65 · counts for 8%Architecture 84 · counts for 4%Performance 85 · counts for 2%Security and Compliance 85 · counts for 1%

If Production Readiness rose from 28 to 62, the lowest score rated Strong, the score would rise from 41 to about 51.

Code composition: what the lines of code are
Product code 91%Tests 9%
New since the last survey: 102 findings

These 102 critical or serious findings weren't in the previous survey, on 29 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.

  • Code Duplication · Edited copy of a member (44 corresponding lines) Sources/BetterShot/InkPath.swift
  • Code Duplication · Edited copy of a member (37 corresponding lines) Sources/Services/AppUpdater.swift
  • Code Duplication · Edited copy of a member (67 corresponding lines) Sources/BetterShot/AnnotationBackgroundPresetBar.swift
  • Code Duplication · Edited copy of a member (54 corresponding lines) Sources/BetterShot/AnnotationBackgroundPresetBar.swift
  • Code Duplication · Edited copy of a member (28 corresponding lines) Sources/BetterShot/RecordingStudioWindow.swift
  • Code Duplication · Edited copy of a member (38 corresponding lines) Sources/Sharing/R2Uploader.swift
  • Code Duplication · Edited copy of a member (34 corresponding lines) Sources/BetterShot/AnnotationEditorWindow.swift
  • Code Duplication · Edited copy of a member (31 corresponding lines) Sources/BetterShot/ScreenshotHistoryStore.swift
  • Code Duplication · Edited copy of a member (16 corresponding lines) Sources/BetterShot/RecordingExportReframe.swift
  • Code Duplication · Edited copy of a member (12 corresponding lines) Sources/BetterShot/Recording3DInspector.swift
  • Code Duplication · Edited copy of a member (19 corresponding lines) Sources/Settings/SettingsComponents.swift
  • Code Duplication · Edited copy of a member (21 corresponding lines) Sources/BetterShot/AnnotationBackgroundPresetStore.swift
  • Code Duplication · Edited copy of a member (12 corresponding lines) Sources/BetterShot/StrokePipeline.swift
  • Code Duplication · Edited copy of a member (30 corresponding lines) Sources/BetterShot/TeleprompterComposerPresenter.swift
  • Code Duplication · Edited copy of a member (30 corresponding lines) Sources/BetterShot/AnnotationCameraGeometry.swift
  • Code Duplication · Edited copy of a member (20 corresponding lines) Sources/Settings/PreferencesView.swift
  • Code Duplication · Edited copy of a member (12 corresponding lines) Sources/BetterShot/AnnotationEditorZoom.swift
  • Code Duplication · Edited copy of a member (8 corresponding lines) Sources/BetterShot/Arrowheads.swift
  • Code Duplication · Edited copy of a member (23 corresponding lines) Sources/Views/TransferStatusCard.swift
  • Code Duplication · Edited copy of a member (10 corresponding lines) REDACTED
  • Code Duplication · Edited copy of a member (10 corresponding lines) Sources/Sharing/R2Uploader.swift
  • Code Duplication · Edited copy of a member (12 corresponding lines) Sources/BetterShot/RecordingStudioModel.swift
  • Code Duplication · Edited copy of a member (17 corresponding lines) Sources/BetterShot/RecordingClipTimelineView.swift
  • Code Duplication · Edited copy of a member (17 corresponding lines) Sources/BetterShot/AnnotationBackgroundPresetBar.swift
  • Code Duplication · Edited copy of a member (20 corresponding lines) Sources/BetterShot/AnnotationBackgroundPreviewViews.swift
  • Code Duplication · Edited copy of a member (10 corresponding lines) Sources/BetterShot/Intersect.swift
  • Code Duplication · Edited copy of a member (13 corresponding lines) Sources/Views/TransferStatusCard.swift
  • Code Duplication · Edited copy of a member (9 corresponding lines) Sources/Settings/SharingSettingsTab.swift
  • Code Duplication · Edited copy of a member (6 corresponding lines) Sources/BetterShot/Arrowheads.swift
  • Code Duplication · Edited copy of a member (8 corresponding lines) Sources/BetterShot/VideoFileActions.swift
  • Code Duplication · Edited copy of a member (19 corresponding lines) Sources/BetterShot/RecordingStudioModel.swift
  • Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) Sources/BetterShot/Intersect.swift
  • Code Duplication · Edited copy of a member (17 corresponding lines) Sources/BetterShot/RecordingPointerTimeline.swift
  • Code Duplication · Edited copy of a member (13 corresponding lines) Sources/BetterShot/RecordingStudioWindow.swift
  • Code Duplication · Edited copy of a member (5 corresponding lines) Sources/BetterShot/Arrowheads.swift
  • Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) Sources/BetterShot/RecordingClipTimeline.swift
  • Code Duplication · Edited copy of a member (7 corresponding lines) Sources/BetterShot/RecordingAudioExport.swift
  • Code Duplication · Edited copy of a member (19 corresponding lines) Sources/BetterShot/CloudUploadOptions.swift
  • Code Duplication · Edited copy of a member (14 corresponding lines) Sources/BetterShot/AnnotationBackgroundPresetStore.swift
  • Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) Sources/BetterShot/RecordingSession.swift
  • Code Duplication · Edited copy of a member (12 corresponding lines) Sources/BetterShot/AnnotationEditorWindow.swift
  • Code Duplication · Edited copy of a member (9 corresponding lines) Sources/BetterShot/AnnotationRedactionImageProcessor.swift
  • Code Duplication · Edited copy of a member (11 corresponding lines) Sources/BetterShot/AnnotationBackgroundPresetBar.swift
  • Code Duplication · Edited copy of a member (9 corresponding lines) Sources/BetterShot/AnnotationBackgroundRenderer.swift
  • Code Duplication · Edited copy of a member (9 corresponding lines) Sources/Settings/PreferencesView.swift
  • Code Duplication · Edited copy of a member (11 corresponding lines) Sources/BetterShot/AnnotationBackgroundPresetBar.swift
  • Code Duplication · Edited copy of a member (8 corresponding lines) Sources/BetterShot/AnnotationCanvas.swift
  • Code Duplication · Edited copy of a member (19 corresponding lines) Sources/BetterShot/AnnotationMockupEffectsRenderer.swift
  • Code Duplication · Edited copy of a member (6 corresponding lines) Sources/BetterShot/Shapes2d.swift
  • Code Duplication · Edited copy of a member (9 corresponding lines) Sources/Views/GlassSurface.swift
  • Code Duplication · Edited copy of a member (16 corresponding lines) Sources/BetterShot/CameraRecordingManager.swift
  • Code Duplication · Edited copy of a member (10 corresponding lines) Sources/BetterShot/AnnotationBackgroundPresetStore.swift
  • Code Duplication · Edited copy of a member (13 corresponding lines) Sources/BetterShot/Shapes2d.swift
  • Code Duplication · Edited copy of a member (8 corresponding lines) Sources/BetterShot/RecordingStudioWindow.swift
  • Code Duplication · Edited copy of a member (7 corresponding lines) Sources/BetterShot/AnnotationCameraGeometry.swift
  • Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) Sources/BetterShot/RecordingSessionRenderer.swift
  • Code Duplication · Edited copy of a member (6 corresponding lines) Sources/BetterShot/RecordingSession.swift
  • Code Duplication · Edited copy of a member (9 corresponding lines) Sources/BetterShot/AnnotationBackgroundPresetStore.swift
  • Code Duplication · Edited copy of a member (9 corresponding lines) Sources/BetterShot/InkPath.swift
  • Code Duplication · Edited copy of a member (7 corresponding lines) Sources/Capture/RegionSelectionOverlay.swift
  • Code Duplication · Edited copy of a member (9 corresponding lines) Sources/BetterShot/AnnotationBackgroundInspector.swift
  • Code Duplication · Edited copy of a member (3 corresponding lines) Sources/BetterShot/Intersect.swift
  • Code Duplication · Edited copy of a member (9 corresponding lines) Sources/BetterShot/AnnotationBackgroundPresetBar.swift
  • Code Duplication · Edited copy of a member (8 corresponding lines) Sources/BetterShot/AnnotationDocument.swift
  • Code Duplication · Edited copy of a member (3 corresponding lines) Sources/BetterShot/AnnotationBackgroundRenderer.swift
  • Code Duplication · Edited copy of a member (8 corresponding lines) Sources/BetterShot/AnnotationEditorWindow.swift
  • Code Duplication · Edited copy of a member (3 corresponding lines) Sources/BetterShot/Box.swift
  • Code Duplication · Edited copy of a member (6 corresponding lines) Sources/BetterShot/AnnotationBackgroundInspector.swift
  • Code Duplication · Edited copy of a member (4 corresponding lines) Sources/BetterShot/AnnotationBackgroundPresetBar.swift
  • Code Duplication · Edited copy of a member (4 corresponding lines) Sources/BetterShot/AnnotationEditorModel.swift
  • Code Duplication · Edited copy of a member (3 corresponding lines) Sources/BetterShot/CloudUploader.swift
  • Code Duplication · Edited copy of a member (4 corresponding lines) Sources/BetterShot/AnnotationBackgroundPresetStore.swift
  • Code Duplication · Edited copy of a member (4 corresponding lines) Sources/BetterShot/AnnotationBackgroundPresetBar.swift
  • Code Duplication · Edited copy of a member (4 corresponding lines) Sources/BetterShot/AnnotationBackgroundPresetBar.swift
  • Code Duplication · Edited copy of a member (4 corresponding lines) Sources/BetterShot/AnnotationBackgroundPresetBar.swift
  • Code Duplication · Edited copy of a member (4 corresponding lines) Sources/BetterShot/AnnotationBackgroundPresetStore.swift
  • Code Duplication · Edited copy of a member (7 corresponding lines) Sources/BetterShot/CameraRecordingManager.swift
  • Code Duplication · Edited copy of a member (4 corresponding lines) Sources/BetterShot/RecordingViewportTimeline.swift
  • Code Duplication · Edited copy of a member (4 corresponding lines) Sources/BetterShot/AnnotationBackgroundPresetStore.swift
  • Code Duplication · Duplicated block (16–18 lines × 2) Sources/BetterShot/AnnotationBackgroundPreviewViews.swift
  • Code Duplication · Duplicated block (14 lines × 2) Sources/BetterShot/AnnotationBackgroundPresetStore.swift
  • Code Duplication · Duplicated block (8 lines × 2) Sources/BetterShot/AnnotationBackgroundPresetStore.swift
  • License Compliance · Banned license: @img/sharp-libvips-darwin-arm64 REDACTED
  • License Compliance · Banned license: @img/sharp-libvips-darwin-x64 REDACTED
  • License Compliance · Banned license: @img/sharp-libvips-linux-arm REDACTED
  • License Compliance · Banned license: @img/sharp-libvips-linux-arm64 REDACTED
  • License Compliance · Banned license: @img/sharp-libvips-linux-ppc64 REDACTED
  • License Compliance · Banned license: @img/sharp-libvips-linux-riscv64 REDACTED
  • License Compliance · Banned license: @img/sharp-libvips-linux-s390x REDACTED
  • License Compliance · Banned license: @img/sharp-libvips-linux-x64 REDACTED
  • License Compliance · Banned license: @img/sharp-libvips-linuxmusl-arm64 REDACTED
  • License Compliance · Banned license: @img/sharp-libvips-linuxmusl-x64 REDACTED
  • License Compliance · Banned license: @img/sharp-wasm32 REDACTED
  • License Compliance · Banned license: @img/sharp-win32-arm64 REDACTED
  • License Compliance · Banned license: @img/sharp-win32-ia32 REDACTED
  • License Compliance · Banned license: @img/sharp-win32-x64 REDACTED
  • Dependency Hygiene · Unused dependency 'tailwindcss-animate'
  • Cancellation propagation · Async function without AbortSignal: GET bettershot-landing/app/s/[id]/download/route.ts
  • Exception handling · Swallowed exception (empty catch) bettershot-landing/components/share/use-player.ts
  • Exception handling · Swallowed exception (empty catch) bettershot-landing/components/share/use-player.ts

We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 50 findings

These 50 critical or serious findings were in the previous survey, on 29 October 2026, and are gone from this one.

  • Cognitive Complexity · check-sf-symbols.main (cognitive 23) scripts/check-sf-symbols.py
  • Code Duplication · Near-duplicate member pair (40 shared lines) Sources/BetterShot/InkPath.swift
  • Code Duplication · Duplicated block (28 lines × 2) Sources/BetterShot/AnnotationTool.swift
  • Code Duplication · Duplicated block (16–18 lines × 2) Sources/BetterShot/AnnotationBackgroundPreviewViews.swift
  • Code Duplication · Duplicated block (14 lines × 2) Sources/BetterShot/AnnotationBackgroundPresetStore.swift
  • Code Duplication · Duplicated block (14 lines × 2) Sources/BetterShot/InkPath.swift
  • Code Duplication · Duplicated block (12 lines × 2) Sources/BetterShot/RecordingStudioExporter.swift
  • Code Duplication · Duplicated block (12 lines × 2) Sources/Settings/PreferencesView.swift
  • Code Duplication · Duplicated block (7 lines × 2) Sources/BetterShot/RecordingPointerStream.swift
  • Code Duplication · Duplicated block (6 lines × 2) Sources/BetterShot/InkPath.swift
  • Code Duplication · Duplicated block (6 lines × 2) Sources/Views/MenuBarContentView.swift
  • Code Duplication · Duplicated block (5 lines × 2) REDACTED
  • Code Duplication · Duplicated block (8 lines × 2) Sources/BetterShot/AnnotationBackgroundPresetStore.swift
  • Churn × Complexity Hotspots · Hotspot: REDACTED REDACTED
  • Dead Code · Dead file (~59 LoC) bettershot-landing/components/ui/following-pointer-demo.tsx
  • Dead Code · Dead file (~58 LoC) bettershot-landing/components/ui/scroll-area.tsx
  • Dead Code · Dead file (~56 LoC) bettershot-landing/components/ui/resizable.tsx
  • Dead Code · Dead file (~53 LoC) bettershot-landing/components/ui/avatar.tsx
  • Dead Code · Dead file (~48 LoC) bettershot-landing/components/ui/popover.tsx
  • Dead Code · Dead file (~47 LoC) bettershot-landing/components/ui/toggle.tsx
  • Dead Code · Dead file (~45 LoC) bettershot-landing/components/ui/radio-group.tsx
  • Dead Code · Dead file (~44 LoC) bettershot-landing/components/ui/hover-card.tsx
  • Dead Code · Dead file (~42 LoC) bettershot-landing/components/ui/pulse-card.tsx
  • Dead Code · Dead file (~35 LoC) bettershot-landing/components/ui/toaster.tsx
  • Dead Code · Dead file (~33 LoC) bettershot-landing/components/ui/collapsible.tsx
  • Dead Code · Dead file (~32 LoC) bettershot-landing/components/ui/checkbox.tsx
  • Dead Code · Dead file (~31 LoC) bettershot-landing/components/ui/progress.tsx
  • Dead Code · Dead file (~31 LoC) bettershot-landing/components/ui/switch.tsx
  • Dead Code · Dead file (~29 LoC) bettershot-landing/components/ui/badge.tsx
  • Dead Code · Dead file (~28 LoC) bettershot-landing/components/download-link.tsx
  • Dead Code · Dead file (~28 LoC) bettershot-landing/components/ui/kbd.tsx
  • Dead Code · Dead file (~28 LoC) bettershot-landing/components/ui/separator.tsx
  • Dead Code · Dead file (~25 LoC) bettershot-landing/components/ui/sonner.tsx
  • Dead Code · Dead file (~24 LoC) bettershot-landing/components/ui/label.tsx
  • Dead Code · Dead file (~21 LoC) bettershot-landing/components/ui/input.tsx
  • Dead Code · Dead file (~19 LoC) bettershot-landing/components/ui/use-mobile.tsx
  • Dead Code · Dead file (~19 LoC) bettershot-landing/hooks/use-mobile.ts
  • Dead Code · Dead file (~18 LoC) bettershot-landing/components/ui/textarea.tsx
  • Dead Code · Dead file (~16 LoC) bettershot-landing/components/ui/spinner.tsx
  • Dead Code · Dead file (~14 LoC) bettershot-landing/components/ui/home-badge.tsx
  • Dead Code · Dead file (~13 LoC) bettershot-landing/components/ui/skeleton.tsx
  • Dead Code · Dead file (~11 LoC) bettershot-landing/components/theme-provider.tsx
  • Dead Code · Dead file (~11 LoC) bettershot-landing/components/ui/aspect-ratio.tsx
  • Dead Code · Dead file (~9 LoC) bettershot-landing/lib/load-script.ts
  • Dead Code · Dead file (~5 LoC) bettershot-landing/components/ui/gridbeam.tsx
  • Exception handling · Swallowed exception (empty catch) bettershot-landing/components/share/use-player.ts
  • Exception handling · Swallowed exception (empty catch) bettershot-landing/components/share/use-player.ts
  • Exception handling · Swallowed exception (empty catch) bettershot-landing/components/share/use-player.ts
  • Exception handling · Swallowed exception (empty catch) bettershot-landing/components/share/use-player.ts
  • A11y enforcement · Accessibility enforcement below the top rung
Rebuild cost: about €63,000 · Estimate
Cost to rebuild€21,000 to €110,000, for 349 to 1,107 hours of work, about 0.4 person-years for one engineer
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 41. 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.
SizeMedium: 67,034 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Resolve the 1 Deprecated finding(s) in Dependency Hygiene — start with REDACTED.
Raises the score by about 6 points · Low effort · Dependency Hygiene
2
Resolve the 1 Outdated (npm) finding(s) in Dependency Hygiene — start with REDACTED.
Raises the score by about 6 points · Low effort · Dependency Hygiene
3
Resolve the 14 Banned license finding(s) in License Compliance — start with REDACTED (14).
Raises the score by about 11 points · Medium effort · License Compliance

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 €63,000 to build again, about 0.4 person-years of work. Its weakest lens is Production Readiness, at 28 (Weak). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 1 Deprecated finding(s) in Dependency Hygiene. Of all the actions in this report, it raises the score most for the work it takes: about 6 points for low effort, because it clears the 1 Dependency Hygiene findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort

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.

60 modules, with 55 dependencies between them. One loop runs through 8 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 20 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 bettershot-landing.app2 bettershot-landing.app.blog3 bettershot-landing.app.blog.bettershot-0-5-24 bettershot-landing.app.s.[id].download.route5 bettershot-landing.app.s.[id].page6 bettershot-landing.components.count-up7 bettershot-landing.components.download-link8 bettershot-landing.components.reveal9 bettershot-landing.components.share.image-viewer10 bettershot-landing.components.share.scrubber11 bettershot-landing.components.share.use-player12 bettershot-landing.components.share.video-player13 bettershot-landing.components.ui.badge14 bettershot-landing.components.ui.hero-video-dialog15 bettershot-landing.components.ui.pixelcards16 bettershot-landing.components.ui.pulse-card17 bettershot-landing.components.ui.use-toast18 bettershot-landing.lib.analytics19 bettershot-landing.lib.downloads20 bettershot-landing.lib.share21 Capture22 History23 Services24 bettershot-landing.app.s.[id]25 bettershot-landing.app.s.[id].download26 bettershot-landing.components.download-dropdown27 bettershot-landing.components.share.share-view28 bettershot-landing.components.ui29 bettershot-landing.hooks30 bettershot-landing.lib31 Views32 bettershot-landing.components33 bettershot-landing.components.share34 Settings35 Models36 Sharing37 BetterShot38 App39 Preview40 repository
1 bettershot-landing.app
2 bettershot-landing.app.blog
3 bettershot-landing.app.blog.bettershot-0-5-2
4 bettershot-landing.app.s.[id].download.route
5 bettershot-landing.app.s.[id].page
6 bettershot-landing.components.count-up
7 bettershot-landing.components.download-link
8 bettershot-landing.components.reveal
9 bettershot-landing.components.share.image-viewer
10 bettershot-landing.components.share.scrubber
11 bettershot-landing.components.share.use-player
12 bettershot-landing.components.share.video-player
13 bettershot-landing.components.ui.badge
14 bettershot-landing.components.ui.hero-video-dialog
15 bettershot-landing.components.ui.pixelcards
16 bettershot-landing.components.ui.pulse-card
17 bettershot-landing.components.ui.use-toast
18 bettershot-landing.lib.analytics
19 bettershot-landing.lib.downloads
20 bettershot-landing.lib.share
21 Capture515
22 History231
23 Services423
24 bettershot-landing.app.s.[id]1
25 bettershot-landing.app.s.[id].download1
26 bettershot-landing.components.download-dropdown1
27 bettershot-landing.components.share.share-view1
28 bettershot-landing.components.ui11112
29 bettershot-landing.hooks2
30 bettershot-landing.lib11
31 Views1261291
32 bettershot-landing.components1111
33 bettershot-landing.components.share11111
34 Settings1361441
35 Models39
36 Sharing3
37 BetterShot3703
38 App321
39 Preview14412
40 repository11
Uses a module listed above itPart of a loopThe module itself
1 bettershot-landing.app2 bettershot-landing.app.blog3 bettershot-landing.app.blog.bettershot-0-5-24 bettershot-landing.app.s.[id].download.route5 bettershot-landing.app.s.[id].page6 bettershot-landing.components.count-up7 bettershot-landing.components.download-link8 bettershot-landing.components.reveal9 bettershot-landing.components.share.image-viewer10 bettershot-landing.components.share.scrubber11 bettershot-landing.components.share.use-player12 bettershot-landing.components.share.video-player13 bettershot-landing.components.ui.badge14 bettershot-landing.components.ui.hero-video-dialog15 bettershot-landing.components.ui.pixelcards16 bettershot-landing.components.ui.pulse-card17 bettershot-landing.components.ui.use-toast18 bettershot-landing.lib.analytics19 bettershot-landing.lib.downloads20 bettershot-landing.lib.share21 Capture22 History23 Services24 bettershot-landing.app.s.[id]25 bettershot-landing.app.s.[id].download26 bettershot-landing.components.download-dropdown27 bettershot-landing.components.share.share-view28 bettershot-landing.components.ui29 bettershot-landing.hooks30 bettershot-landing.lib31 Views32 bettershot-landing.components33 bettershot-landing.components.share34 Settings35 Models36 Sharing37 BetterShot38 App39 Preview40 repositorybettershot-landing.app1bettershot-landing.app.blog2bettershot-landing.app.blog.bettershot-0-5-23bettershot-landing.app.s.[id].download.route4bettershot-landing.app.s.[id].page5bettershot-landing.components.count-up6bettershot-landing.components.download-link7bettershot-landing.components.reveal8bettershot-landing.components.share.image-viewer9bettershot-landing.components.share.scrubber10bettershot-landing.components.share.use-player11bettershot-landing.components.share.video-player12bettershot-landing.components.ui.badge13bettershot-landing.components.ui.hero-video-dialog14bettershot-landing.components.ui.pixelcards15bettershot-landing.components.ui.pulse-card16bettershot-landing.components.ui.use-toast17bettershot-landing.lib.analytics18bettershot-landing.lib.downloads19bettershot-landing.lib.share20Capture21History22Services23bettershot-landing.app.s.[id]24bettershot-landing.app.s.[id].download25bettershot-landing.components.download-dropdown26bettershot-landing.components.share.share-view27bettershot-landing.components.ui28bettershot-landing.hooks29bettershot-landing.lib30Views31bettershot-landing.components32bettershot-landing.components.share33Settings34Models35Sharing36BetterShot37App38Preview39repository405152314231111111122111261291111111111136144139337033211441211+20 more modules (most-connected shown)

At a glance — Code Health · 42% · Weak · gated by R10, R7 ·

At a glance — Architecture · 84% · Adequate · gated by D26 ·

At a glance — Maturity · 65% · Adequate · gated by M2 ·

At a glance — Readiness · 28% · Weak · gated by D14, R4, R6, P3 ·

At a glance — Security · 85% · Strong ·

At a glance — Accessibility · 47% · Adequate · gated by AC4 ·

At a glance — Performance · 85% · Exemplary ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A03:2025 — Software Supply Chain Failures17High / Critical
A07:2025 — Authentication Failures2High / Critical
A05:2025 — Injection2High / Critical

Roadmap

Top priorities: Resolve the 14 Banned license finding(s) in License Compliance — start with REDACTED (14); Resolve the 1 Deprecated finding(s) in Dependency Hygiene — start with REDACTED; Resolve the 1 Outdated (npm) finding(s) in Dependency Hygiene — start with REDACTED.

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

Do thisHelpsEffortDimension
Resolve the 1 Deprecated finding(s) in Dependency Hygiene — start with REDACTED.+5.7 ptsLowDependency Hygiene
Resolve the 1 Outdated (npm) finding(s) in Dependency Hygiene — start with REDACTED.+5.7 ptsLowDependency Hygiene
Resolve the 14 Banned license finding(s) in License Compliance — start with REDACTED (14).+11.1 ptsMediumLicense Compliance
Add a SAST step to CI running what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.+5.2 ptsMediumSecurity & performance tooling
Add tests that import the unreached modules (directly or through their public entry).+5.2 ptsMediumTest Coverage
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with project.pbxproj.+1.7 ptsLowADR Quality
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.+2.9 ptsMediumDead Code
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.+2.6 ptsMediumCode Duplication

File quality

Per-file score 0–10 — a quality signature. Of 113 files carrying findings, judged against the Preview bar: 2% slop · 5% mixed · 93% near-clean.

FileScoreBandWorst signal
REDACTED0.0SlopLicense Compliance: Banned license: @img/sharp-libvips-darwin-arm64
REDACTED2.4SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED3.8MixedDependency Vulnerabilities: Critical vulnerability: REDACTED
REDACTED5.0MixedSecrets (history): REDACTED: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
Sources/Settings/PreferencesView.swift5.6MixedGod Classes: FileTooLong: Settings/PreferencesView.swift
REDACTED5.7MixedStatic Analysis (SAST): Medium: REDACTED
Sources/Views/MenuBarContentView.swift5.9MixedCognitive Complexity: TrayGridMenuButton.mouseDown (cognitive 30)
Sources/BetterShot/RecordingStudioExporter.swift7.0Near-cleanCyclomatic Complexity: StudioFrameCompositor.composedImage (cyclomatic 33)
Sources/BetterShot/RecordingStudioWindow.swift7.0Near-cleanCyclomatic Complexity: StudioInspector.inspectorContent (cyclomatic 25)
Sources/BetterShot/RecordingStudioModel.swift7.0Near-cleanCyclomatic Complexity: RecordingStudioModel.load (cyclomatic 21)
Sources/BetterShot/AnnotationBackgroundPresetBar.swift7.0Near-cleanCode Duplication: Members sharing a duplicated core (4 members, 50+ identical tokens)
Sources/BetterShot/AnnotationBackgroundPresetStore.swift7.0Near-cleanCode Duplication: Edited copy of a member (21 corresponding lines)
Sources/BetterShot/StrokePipeline.swift7.0Near-cleanCyclomatic Complexity: StrokePipeline.ingest (cyclomatic 33)
Sources/BetterShot/AnnotationEditorWindow.swift7.0Near-cleanCyclomatic Complexity: AnnotationEditorWindow.performShortcut (cyclomatic 28)
Sources/BetterShot/AnnotationCanvas.swift7.0Near-cleanCyclomatic Complexity: AnnotationCanvas.body (cyclomatic 23)
Sources/Settings/MediaGallery.swift7.0Near-cleanCyclomatic Complexity: MediaGalleryContent.body (cyclomatic 20)
Sources/BetterShot/PathBuilder.swift7.0Near-cleanCyclomatic Complexity: PathBuilder.drawCommands (cyclomatic 19)
Sources/BetterShot/StrokeOutline.swift7.1Near-cleanCyclomatic Complexity: StrokeOutline.buildTracks (cyclomatic 26)
Sources/BetterShot/ScreenRecordingManager.swift7.1Near-cleanCyclomatic Complexity: ScreenRecordingManager.finalizeSession (cyclomatic 22)

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 — 38

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 — 508

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 — 73

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

Could not be resolved — 20

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 56 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.8, the weighted average across measured dimensions.

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

What we checked — 56 dimensions across the health lenses
D1D2D3D4D5D6D12D13D14D15D17D19D20D26D27D28D29D30D34D35D43AC1AC2AC3AC4AC5AC6AX10AX3AX4AX9M1M2M3M4P1P2P3P4P6PF3R1R10R11R2R3R4R6R7R8R9S1X14X26X3X5

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

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

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a1dcc2-e758-744e-8a98-069c19b15830.

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

Run transparency — what happened this run

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

  • 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 (10 contributor(s) across 445 commit(s) sampled, automation and bot accounts excluded). One of them holds 87% of the history; the other 9 hold 1.4% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
  • D21 Naming Consistency — 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. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is an ADMISSION gap, not an environment fault: no published-package marker D22 reads admitted any project here. D22 DOES collect the public API of every language in this tree, and admits a project only when its manifest makes that ecosystem's publication act in a form the marker recognises — so what is missing is not a collector but an admission rule for the publication act this repository makes, if it makes one. The remedy is a better discriminator for that marker — not a collector, and no change to the scan image can close it. The marker's rules are measured to refuse applications, so one refused repository is the rule working as calibrated; several are the evidence that it is too strict. For npm the surface is what a published REDACTED's entry points (exports, main, module, types) export, followed through the source; an entry that names build output the tree does not commit (dist/, build/) is not followed back to source, because only a tsconfig outDir/rootDir pair states that mapping and a bundler's input lives in executable configuration this engine does not evaluate.
  • D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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.
  • D27 Navigability — 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. Tracing effort is measured over resolved call sites, and all 634 sampled here came from .swift files. This repository's .tsx source is a material share of its production lines and contributed none, so the score above is a verdict about the part that was read. Not a finding that the unread half navigates well — it is unmeasured.
  • 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. `Sources/BetterShot/AnnoShapeDrawing.swift`, `Sources/BetterShot/AnnotationBackground.swift`, `Sources/BetterShot/AnnotationBackgroundRenderer.swift`, `Sources/BetterShot/AnnotationCameraGeometry.swift`, `Sources/BetterShot/AnnotationEditorWindow.swift`, … (+23 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • D44 Platform End-of-Life — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a Dockerfile) is simply not read here yet.
  • AXB2 Runtime readiness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `npm run` found no REDACTED in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. (rule: no-root-manifest). The renderer reported: the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no REDACTED in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read REDACTED: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
  • AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (dev). the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no REDACTED in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read REDACTED: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
  • C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Swift is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's 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.
  • P1 CI/CD gates — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. A CI pipeline exists and the word "test" appears, but no explicit test-runner invocation (your stack's test command, or a test job) was matched — so either the gate runs tests through a step this pass could not recognise, or "test" is incidental here (a path, "latest", a reporter). Which of the two it is cannot be settled from this dimension's evidence; the coverage dimensions report whether a suite exists at all. You can widen what we reach: name the test runner explicitly in the pipeline step (your stack's test command, or a job named for the suite) so the gate is unambiguous to a reader and to this pass.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • R7 Dead Code — 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. 37 further occurrence(s) are not listed individually; the score already reflects all 77.
  • 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'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.
  • X21 Side-effecting pattern guard — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check'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.
  • 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.
  • X26 Unsynchronised callback handoff — 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 check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X27 Collection changed while being enumerated — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded, no Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala or Kotlin was found, and this repository's Swift (Foundation mutable collections) is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X29 Per-element action decided by a fixed element — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check'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.
  • X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP make no call through a named logger, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • 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 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • 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.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity6.7 / 10Adequate✓ Tool-verified

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

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

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

55 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was PointerTimeline.build at 52. A further 1 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 Recording3DProperty.title at 17 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: Sources/BetterShot/Recording3DAnimation.swift (Recording3DProperty.title at 17). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

PointerTimeline.build (cyclomatic 52)Sources/BetterShot/RecordingPointerTimeline.swift:125
CurvedArrow.info (cyclomatic 44)Sources/BetterShot/CurvedArrow.swift:7
video-player.VideoPlayer (cyclomatic 44)bettershot-landing/components/share/video-player.tsx:30
StraightArrow.info (cyclomatic 40)Sources/BetterShot/StraightArrow.swift:6
ShortcutService.performGlobal (cyclomatic 36)Sources/Services/ShortcutActions.swift:5

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

What to do

  1. Bring the 9 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with PointerTimeline.build (cyclomatic 52), CurvedArrow.info (cyclomatic 44), video-player.VideoPlayer (cyclomatic 44). — 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 9 together lifts Cyclomatic Complexity from 6.7 to about 7.3/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.

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

D2 · Cognitive Complexity6.3 / 10Adequate✓ Tool-verified

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

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

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

84 method(s) exceeded the cognitive complexity threshold of 15; the worst was PointerTimeline.build at 79.

PointerTimeline.build (cognitive 79)Sources/BetterShot/RecordingPointerTimeline.swift:125
CurvedArrow.info (cognitive 62)Sources/BetterShot/CurvedArrow.swift:7
StudioFrameCompositor.composedImage (cognitive 61)Sources/BetterShot/RecordingStudioExporter.swift:838
StrokeOutline.buildTracks (cognitive 52)Sources/BetterShot/StrokeOutline.swift:78
StrokePipeline.ingest (cognitive 51)Sources/BetterShot/StrokePipeline.swift:60

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

What to do

  1. Bring the 3 bodies over 60 down to 60 or less in Cognitive Complexity — start with PointerTimeline.build (cognitive 79), CurvedArrow.info (cognitive 62), StudioFrameCompositor.composedImage (cognitive 61). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 3 together lifts Cognitive Complexity from 6.3 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

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

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

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

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

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

50 god class(es) detected.

MethodTooLong: RecordingStudioExporter.run · ×13Sources/BetterShot/RecordingStudioExporter.swift:156
FileTooLong: BetterShot/RecordingStudioWindow.swift · ×12Sources/BetterShot/RecordingStudioWindow.swift
FunctionTooLong: page.Article · ×12bettershot-landing/app/blog/bettershot-0-5-2/page.tsx:73
TooManyMethods: RecordingStudioModel · ×7Sources/BetterShot/RecordingStudioModel.swift:56
ClassTooLong: RecordingStudioModel · ×6Sources/BetterShot/RecordingStudioModel.swift:56

What to do

  1. Resolve the 13 MethodTooLong finding(s) in God Classes — start with RecordingStudioExporter.swift (2), RecordingStudioWindow.swift (2), PreferencesView.swift. — One of this dimension's main actionable groups (13 warning-level).
  2. Resolve the 12 FileTooLong finding(s) in God Classes — start with RecordingStudioWindow.swift, RecordingStudioModel.swift, PreferencesView.swift. — One of this dimension's main actionable groups (12 warning-level).
  3. Resolve the 12 FunctionTooLong finding(s) in God Classes — start with page.tsx (5), video-player.tsx, use-player.ts. — One of this dimension's main actionable groups (12 warning-level).

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

D4 · Code Duplication8.2 / 10Strong✓ Tool-verified

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

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

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

61 duplicated block group(s) detected. 4.5 % of the production lines (3,040 of 67,034) are in a reported copy. A further 81 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. Measured on part of this repository only: .tsx (17% of production source) was not exposed to THIS dimension's token comparison and is not in this count; duplication there is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream.

Edited copy of a member (9 corresponding lines) · ×9Sources/Settings/SharingSettingsTab.swift:272
Edited copy of a member (4 corresponding lines) · ×9Sources/BetterShot/AnnotationBackgroundPresetBar.swift:396
Duplicated block (8 lines × 2) · ×7Sources/BetterShot/AnnotationBackground.swift:199
Edited copy of a member (8 corresponding lines) · ×6Sources/BetterShot/Arrowheads.swift:95
Duplicated block (10 lines × 2) · ×6Sources/BetterShot/CurvedArrow.swift:129

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

What to do

  1. Resolve the 9 Edited copy of a member (9 corresponding lines) finding(s) in Code Duplication — start with SharingSettingsTab.swift, AnnotationRedactionImageProcessor.swift, AnnotationBackgroundRenderer.swift. — One of this dimension's main actionable groups (9 warning-level).
  2. Resolve the 9 Edited copy of a member (4 corresponding lines) finding(s) in Code Duplication — start with AnnotationBackgroundPresetBar.swift (4), AnnotationBackgroundPresetStore.swift (3), AnnotationEditorModel.swift. — One of this dimension's main actionable groups (9 warning-level).
  3. Resolve the 7 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with AnnotationBackgroundPresetStore.swift (2), AnnotationBackground.swift, AnnotationTextStyleControls.swift. — One of this dimension's main actionable groups (7 warning-level).

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

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.

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

3 production modules (npm+Xcode), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; a workspace's implicit (product-name) dependency is not visible there; 0 module(s) off the main sequence.

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

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

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

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

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

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

3 of 91 classes have LCOM4 above 3.

Low cohesion: BetterShotDelegate (LCOM4 6) · ×3Sources/App/BetterShotDelegate.swift:5

What to do

  1. Resolve the 3 Low cohesion finding(s) in Cohesion (LCOM4) — start with BetterShotDelegate.swift, Document.swift, MenuBarContentView.swift. — One of this dimension's main actionable groups (3 warning-level).

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

D12 · Dependency Hygiene7.5 / 10Strong✓ Tool-verified

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.

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

52 outdated direct production npm dependency(ies) of 59 graded, 0 pinning defect(s), across 2 REDACTED (2 of them the product) and 2 committed lockfile(s). Development dependencies are deliberately not graded for currency: that grade is about what SHIPS. 1 direct dependency(ies) — production, development or optional — are marked DEPRECATED by their publisher (the registry's per-version mark, or the lockfile's copy of it when the registry could not be asked); deprecated transitive packages are listed but not charged. Whether any is UNMAINTAINED is not graded — the registry 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, and the frontend dependency lens (R8) answers it in this same run. Known CVEs in this dependency graph are D30's question, read from the manifest there.

Deprecated: rechartsREDACTED:62
Outdated (npm): @hookform/resolversREDACTED:13
Outdated (npm): @radix-ui/react-accordion · ×51

What to do

  1. Resolve the 1 Deprecated finding(s) in Dependency Hygiene — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 Outdated (npm) finding(s) in Dependency Hygiene — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).

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

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

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

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

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

REDACTED scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D14 · License Compliance0.0 / 10Critical✓ Tool-verified

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.

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

14 of 387 shipped npm package(s) use a banned license. Licences were resolved from registry.npmjs.org over the 387 package(s) this repository's committed lockfile installs for a consumer — its 59 production, optional and peer dependency(ies), across 2 product REDACTED manifest(s), and everything those install in turn. Its 8 `devDependencies` declaration(s), and every package only they reach, are excluded: a consumer installs none of them. ★ Each licence is the one the registry publishes for the package's CURRENT release rather than for the pinned version, which is the same caveat the Hex and RubyGems arms carry. 12 of them publish no licence this pass can read on registry.npmjs.org — an absent field, `UNLICENSED`, or a `SEE LICENSE IN <file>` pointer into a tarball this pass does not download; that is missing data, not a violation, and none of them is charged.

Banned license: @img/sharp-libvips-darwin-arm64 · ×14REDACTED:263

What to do

  1. Resolve the 14 Banned license finding(s) in License Compliance — start with REDACTED (14). — One of this dimension's main actionable groups (14 issue-level).

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

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

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

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

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

Top hotspots: Sources/BetterShot/RecordingStudioWindow.swift (37×25=925); Sources/BetterShot/AnnotationEditorWindow.swift (26×28=728); Sources/Preview/PreviewOverlay.swift (40×17=680) Repeated repair below the complexity floor: Sources/History/HistoryStore.swift (11 of 16 changes were fixes); Sources/BetterShot/BetterShotPreferences.swift (10 of 15 changes were fixes); Sources/BetterShot/ScreenshotFileNaming.swift (5 of 6 changes were fixes)

Hotspot: Sources/BetterShot/RecordingStudioWindow.swift · ×18Sources/BetterShot/RecordingStudioWindow.swift:2923
Repeated repair: Sources/History/HistoryStore.swift · ×8Sources/History/HistoryStore.swift:193

What to do

  1. Resolve the 18 Hotspot finding(s) in Churn × Complexity Hotspots — start with RecordingStudioWindow.swift, AnnotationEditorWindow.swift, PreviewOverlay.swift. — One of this dimension's main actionable groups (18 warning-level).
  2. Resolve the 8 Repeated repair finding(s) in Churn × Complexity Hotspots — start with HistoryStore.swift, BetterShotPreferences.swift, ScreenshotFileNaming.swift. — One of this dimension's main actionable groups (8 warning-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.md.

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

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

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

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

1 of 1 documentation facets pass in full. 6 document(s) read across 3 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

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.

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

No architecture decision records were found.

No ADRs foundBetterShot.xcodeproj/project.pbxproj:1

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality — start with project.pbxproj. — One of this dimension's main actionable groups (1 recommendation-level).

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

D26 · Project Cohesion0.0 / 10Critical✓ Tool-verified

What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.

Method: Project size overshoot penalties (LoC / public-type count / namespace count, 2-of-3 flag) weighted by log magnitude. Exhaustive across projects, deterministic.

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

2 of 3 build units (Xcode, npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

  1. Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).

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

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

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

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

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

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

4 % of calls cross a namespace and 0 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated. Measured over the .swift source only — this repository's .tsx was not sampled for call sites, so this score covers part of the tree, not all of it.

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

D28 · Secrets (history)9.0 / 10Adequategated by 1 critical finding✓ Tool-verified

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

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

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

1 finding(s): 0 critical, 1 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

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

D29 · Static Analysis (SAST)9.5 / 10Adequategated by 1 critical finding✓ Tool-verified

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

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

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

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

2 finding(s): 0 critical, 1 high, 1 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 6 file(s) — `Sources/BetterShot/BetterShotPreferences.swift` (lines 108–111), `Sources/Models/AppPreferences.swift` (lines 126–129, lines 149–151), `Sources/Models/ReleaseNotes.swift`, `REDACTED` (line 23), `Tests/ExportIntegration.swift` (line 355), … (+1 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

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

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

D30 · Dependency Vulnerabilities0.0 / 10Critical✓ Tool-verified

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md.

D35 · Change Coupling9.7 / 10Stronggated by 3 serious findings✓ Tool-verified

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

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

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

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

Strongest change-coupling: BetterShotDelegate.swift↔PreferencesView.swift 62%; ScreenshotHistoryStore.swift↔PreferencesView.swift 60%; layout.tsx↔page.tsx 60%

Change coupling: layout.tsx ↔ page.tsx · ×2bettershot-landing/app/layout.tsx:1
Change-coupling hub: PreferencesView.swift → BetterShotApp.swift, BetterShotDelegate.swift, ScreenshotHistoryStore.swift, CaptureOrchestrator.swift, ScreenCapture.swiftSources/Settings/PreferencesView.swift

What to do

  1. Resolve the 2 Change coupling finding(s) in Change Coupling — start with layout.tsx, BetterShotApp.swift. — One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 1 Change-coupling hub finding(s) in Change Coupling — start with PreferencesView.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.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

Frontend & cross-cutting dimensions

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

AC1 · Text alternatives4.2 / 10Weak✓ 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.

  • Video with no captions <track> offers no captions. Add a <track kind="captions"> pointing at a WebVTT file for this video (or confirm captions are provided another way). — bettershot-landing/components/demo-gallery.tsx:59
  • Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation). — bettershot-landing/components/share/video-player.tsx:160
  • 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. (×2) — bettershot-landing/components/ui/globe.tsx:76, bettershot-landing/components/ui/pixelcards.tsx:71

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.
AC2 · Forms & labels7.1 / 10Strong✓ Tool-verified

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.

  • This <video> carries a click handler, which makes it a control, and its only name is a title attribute. A plain element maps to role="generic", which does not support a name from the author, so the title is announced as nothing at all — it is a mouse-only tooltip, unreachable on touch. Give it role="button" (which it needs anyway to be operable) so the title becomes a real name, or add an aria-label. — bettershot-landing/components/share/video-player.tsx:160

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure7.0 / 10Strong✓ Tool-verified

Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.

Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one. — bettershot-landing/app/changelog/page.tsx:90
  • A page with no <title> gives no name in the tab, history or screen-reader page list. Declare it the way this router does — Next App Router `export const metadata = { title }`, React Router/Remix `export function meta`, TanStack Start `head`, or a Helmet/Head component. — bettershot-landing/app/layout.tsx:118

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.
AC4 · Keyboard semantics2.0 / 10Weak✓ Tool-verified

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> binds pointerdown, pointerup, pointermove and double-click — pointer gestures with no keyboard form, a double-click among them. No click, no key handler, and no tabIndex={0}, so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabIndex={0} + a key handler alongside the double-click. — bettershot-landing/components/share/image-viewer.tsx:118
  • A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. — bettershot-landing/components/share/video-player.tsx:160
  • This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus. — bettershot-landing/components/ui/following-pointer.tsx:68
  • A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabIndex={0}. — bettershot-landing/components/ui/hero-video-dialog.tsx:86

What to do

  • Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
AC5 · ARIA correctness10.0 / 10Exemplary○ Nothing flagged

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.

AC6 · Visual & motion safety4.8 / 10Adequate✓ Tool-verified

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.

  • <a> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). (×10) — bettershot-landing/app/blog/bettershot-0-5-2/page.tsx:448, bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:430, bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:480, …
  • <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). — bettershot-landing/components/copy-command.tsx:17
  • <summary> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). — bettershot-landing/components/home/faq.tsx:69
  • <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). — bettershot-landing/components/ui/input.tsx:7
  • <textarea> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). — bettershot-landing/components/ui/textarea.tsx:7

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.
AX10 · Code composition10.0 / 10Exemplary✓ Tool-verified

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

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

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

AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

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.

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

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.

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

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

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

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

M1 · Documentation (README)6.7 / 10Strong✓ Tool-verified

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

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

What to do

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

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

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

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

What to do

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

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

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

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

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

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

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

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

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

What to do

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

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

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

  • Only 1/2 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `bettershot-landing`.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
  • Add a health-check endpoint (a /health route on your Vapor/Hummingbird router) so orchestrators and load balancers can probe liveness/readiness.
P3 · Security & performance tooling0.0 / 10Critical✓ Tool-verified

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

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

  • No static application security testing detected. For this repository's stack, add CodeQL's Swift pack (Swift/Xcode) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 1 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:6
  • `bettershot-landing/media/remotion/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`. — bettershot-landing/media/remotion/package.json:5

What to do

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

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

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

What to do

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

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

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

PF3 · Async & latency hygiene8.5 / 10Exemplary✓ Tool-verified

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

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

  • `installUpdate` is async and calls .waitUntilExit() — a blocking call inside async code stalls the cooperative pool's thread — one per core — and every task scheduled on it for as long as it runs. — Sources/Services/AppUpdater.swift:181

What to do

  • Swift: await instead of blocking — `try await Task.sleep(for:)` for Thread.sleep/sleep, a checked continuation instead of a DispatchSemaphore or DispatchGroup wait, the async Process and URLSession APIs; never park a thread waiting on a Task — the cooperative pool cannot guarantee it progress.
R1 · Type Safety9.8 / 10Exemplary✓ 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.

R10 · Code Duplication0.6 / 10Critical✓ Tool-verified

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.

  • 12 duplicated blocks under bettershot-landing/app/blog/ have copies in at least two of the sibling directories bettershot-0-5-2, cleanshot-x-alternative, cleanshot-x-capcut-loom-alternative, loom-alternative — 10 of them are reported below, and 2 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 12 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 12 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 12 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. — bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:445
  • bettershot-landing/components/ui/context-menu.tsx:110 · bettershot-landing/components/ui/menubar.tsx:87 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bettershot-landing/components/ui/context-menu.tsx:110
  • bettershot-landing/components/ui/item.tsx:8 · bettershot-landing/components/ui/sidebar.tsx:346 — the two spans are one implementation copied and then locally edited — 394 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. — bettershot-landing/components/ui/item.tsx:8
  • bettershot-landing/components/ui/use-toast.ts:4 · bettershot-landing/hooks/use-toast.ts:4 — these 2 files are line-for-line copies of one another — 103 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — bettershot-landing/components/ui/use-toast.ts:4
  • bettershot-landing/components/ui/dropdown-menu.tsx:131 · bettershot-landing/components/ui/menubar.tsx:149 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bettershot-landing/components/ui/dropdown-menu.tsx:131
  • bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:445 · bettershot-landing/app/blog/cleanshot-x-capcut-loom-alternative/page.tsx:433 · bettershot-landing/app/blog/loom-alternative/page.tsx:426 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:445
  • bettershot-landing/app/blog/bettershot-0-5-2/page.tsx:9 · bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:9 · bettershot-landing/app/blog/cleanshot-x-capcut-loom-alternative/page.tsx:9 · bettershot-landing/app/blog/loom-alternative/page.tsx:9 — the 4 copies are spread across 4 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — bettershot-landing/app/blog/bettershot-0-5-2/page.tsx:9
  • bettershot-landing/components/ui/alert-dialog.tsx:61 · bettershot-landing/components/ui/dialog.tsx:78 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bettershot-landing/components/ui/alert-dialog.tsx:61
  • bettershot-landing/components/ui/avatar.tsx:8 · bettershot-landing/components/ui/tabs.tsx:8 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — bettershot-landing/components/ui/avatar.tsx:8
  • bettershot-landing/components/ui/dialog.tsx:9 · bettershot-landing/components/ui/sheet.tsx:9 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — bettershot-landing/components/ui/dialog.tsx:9
  • bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:193 · bettershot-landing/app/blog/loom-alternative/page.tsx:293 — the two spans are one implementation copied and then locally edited — 304 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. — bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:193
  • bettershot-landing/app/privacy/page.tsx:90 · bettershot-landing/app/terms/page.tsx:98 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — bettershot-landing/app/privacy/page.tsx:90
  • bettershot-landing/components/ui/drawer.tsx:88 · bettershot-landing/components/ui/sheet.tsx:94 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — bettershot-landing/components/ui/drawer.tsx:88
  • bettershot-landing/app/blog/bettershot-0-5-2/page.tsx:62 · bettershot-landing/app/blog/loom-alternative/page.tsx:66 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bettershot-landing/app/blog/bettershot-0-5-2/page.tsx:62
  • bettershot-landing/app/blog/bettershot-0-5-2/page.tsx:425 · bettershot-landing/app/blog/loom-alternative/page.tsx:388 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — bettershot-landing/app/blog/bettershot-0-5-2/page.tsx:425
  • bettershot-landing/components/ui/context-menu.tsx:54 · bettershot-landing/components/ui/dropdown-menu.tsx:199 · bettershot-landing/components/ui/menubar.tsx:217 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bettershot-landing/components/ui/context-menu.tsx:54
  • bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:66 · bettershot-landing/app/blog/cleanshot-x-capcut-loom-alternative/page.tsx:67 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:66
  • bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:397 · bettershot-landing/app/blog/cleanshot-x-capcut-loom-alternative/page.tsx:385 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:397
  • bettershot-landing/components/ui/carousel.tsx:174 · bettershot-landing/components/ui/carousel.tsx:204 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — bettershot-landing/components/ui/carousel.tsx:174
  • bettershot-landing/components/ui/empty.tsx:37 · bettershot-landing/components/ui/item.tsx:82 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bettershot-landing/components/ui/empty.tsx:37
  • bettershot-landing/components/share/image-viewer.tsx:181 · bettershot-landing/components/share/video-player.tsx:319 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — bettershot-landing/components/share/image-viewer.tsx:181
  • bettershot-landing/components/ui/command.tsx:153 · bettershot-landing/components/ui/context-menu.tsx:215 · bettershot-landing/components/ui/empty.tsx:79 · bettershot-landing/components/ui/input-group.tsx:141 · +1 more site(s) not listed — the 5 copies are spread across 5 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bettershot-landing/components/ui/command.tsx:153
  • bettershot-landing/components/ui/alert-dialog.tsx:73 · bettershot-landing/components/ui/dialog.tsx:87 · bettershot-landing/components/ui/field.tsx:91 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bettershot-landing/components/ui/alert-dialog.tsx:73
  • bettershot-landing/components/ui/alert-dialog.tsx:96 · bettershot-landing/components/ui/avatar.tsx:25 · bettershot-landing/components/ui/command.tsx:130 · bettershot-landing/components/ui/dialog.tsx:107 · +5 more site(s) not listed — the 9 copies are spread across 9 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bettershot-landing/components/ui/alert-dialog.tsx:96
  • bettershot-landing/components/ui/alert-dialog.tsx:86 · bettershot-landing/components/ui/avatar.tsx:15 · bettershot-landing/components/ui/context-menu.tsx:198 · bettershot-landing/components/ui/dialog.tsx:97 · +3 more site(s) not listed — the 7 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 7 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — bettershot-landing/components/ui/alert-dialog.tsx:86
  • bettershot-landing/components/ui/alert-dialog.tsx:74 · bettershot-landing/components/ui/alert.tsx:32 · bettershot-landing/components/ui/card.tsx:46 · bettershot-landing/components/ui/dialog.tsx:88 · +10 more site(s) not listed — the 14 copies are spread across 11 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bettershot-landing/components/ui/alert-dialog.tsx:74
  • bettershot-landing/components/ui/alert.tsx:37 · bettershot-landing/components/ui/breadcrumb.tsx:11 · bettershot-landing/components/ui/card.tsx:5 · bettershot-landing/components/ui/card.tsx:51 · +7 more site(s) not listed — the 11 copies are spread across 8 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bettershot-landing/components/ui/alert.tsx:37
  • bettershot-landing/components/ui/select.tsx:138 · bettershot-landing/components/ui/select.tsx:156 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — bettershot-landing/components/ui/select.tsx:138
  • bettershot-landing/components/ui/use-mobile.tsx:5 · bettershot-landing/hooks/use-mobile.ts:5 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — bettershot-landing/components/ui/use-mobile.tsx:5
  • bettershot-landing/components/ui/breadcrumb.tsx:19 · bettershot-landing/components/ui/card.tsx:26 · bettershot-landing/components/ui/card.tsx:59 · bettershot-landing/components/ui/drawer.tsx:83 · +6 more site(s) not listed — the 10 copies are spread across 9 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bettershot-landing/components/ui/breadcrumb.tsx:19
  • bettershot-landing/components/ui/button-group.tsx:26 · bettershot-landing/components/ui/field.tsx:83 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bettershot-landing/components/ui/button-group.tsx:26
  • bettershot-landing/app/blog/bettershot-0-5-2/page.tsx:243 · bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:193 · bettershot-landing/app/blog/loom-alternative/page.tsx:293 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bettershot-landing/app/blog/bettershot-0-5-2/page.tsx:243
  • bettershot-landing/components/copy-command.tsx:8 · bettershot-landing/components/share/share-view.tsx:157 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bettershot-landing/components/copy-command.tsx:8
  • bettershot-landing/components/download-dropdown.tsx:65 · bettershot-landing/components/download-dropdown.tsx:75 · bettershot-landing/components/download-dropdown.tsx:85 — 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. — bettershot-landing/components/download-dropdown.tsx:65
  • bettershot-landing/components/ui/accordion.tsx:1 · bettershot-landing/components/ui/alert-dialog.tsx:1 · bettershot-landing/components/ui/dialog.tsx:1 · bettershot-landing/components/ui/sheet.tsx:1 — the 4 copies are spread across 4 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — bettershot-landing/components/ui/accordion.tsx:1
  • bettershot-landing/app/blog/bettershot-0-5-2/page.tsx:225 · bettershot-landing/app/blog/bettershot-0-5-2/page.tsx:308 · bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:163 · bettershot-landing/app/blog/loom-alternative/page.tsx:266 — the 3 copies are spread across 3 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — bettershot-landing/app/blog/bettershot-0-5-2/page.tsx:225
  • bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:161 · bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:299 · bettershot-landing/app/blog/loom-alternative/page.tsx:264 · bettershot-landing/app/blog/loom-alternative/page.tsx:302 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:161
  • bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:290 · bettershot-landing/app/blog/cleanshot-x-capcut-loom-alternative/page.tsx:276 · bettershot-landing/app/page.tsx:116 · bettershot-landing/app/page.tsx:181 — the 4 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:290
  • bettershot-landing/components/ui/alert-dialog.tsx:6 · bettershot-landing/components/ui/context-menu.tsx:5 · bettershot-landing/components/ui/dialog.tsx:5 · bettershot-landing/components/ui/drawer.tsx:4 · +5 more site(s) not listed — the 9 copies are spread across 9 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — bettershot-landing/components/ui/alert-dialog.tsx:6
  • bettershot-landing/components/ui/alert-dialog.tsx:7 · bettershot-landing/components/ui/collapsible.tsx:3 · bettershot-landing/components/ui/context-menu.tsx:7 · bettershot-landing/components/ui/dialog.tsx:7 · +6 more site(s) not listed — the 10 copies are spread across 10 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — bettershot-landing/components/ui/alert-dialog.tsx:7

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.
R11 · Import Boundaries6.3 / 10Adequate✓ Tool-verified

React / JS · Architecture — Conformance to the detected frontend architecture layout (feature-sliced / layered src) plus cross-package deep-import rules (D-386).

Method: Conformance to the detected frontend layout (feature-sliced / layered src) plus cross-package deep-import rules, over the module graph. Deterministic.

  • bettershot-landing/components/copy-command.tsx:4 imports @phosphor-icons/react/dist/ssr, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — bettershot-landing/components/copy-command.tsx:4
  • bettershot-landing/components/download-dropdown.tsx:3 imports @phosphor-icons/react/dist/ssr, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — bettershot-landing/components/download-dropdown.tsx:3
  • bettershot-landing/components/home/faq.tsx:1 imports @phosphor-icons/react/dist/ssr, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — bettershot-landing/components/home/faq.tsx:1
  • bettershot-landing/components/share/share-view.tsx:5 imports @phosphor-icons/react/dist/ssr, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — bettershot-landing/components/share/share-view.tsx:5

What to do

  • Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
R2 · Cyclomatic Complexity9.8 / 10Exemplary✓ Tool-verified

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.

  • isBlockedHost has cyclomatic complexity 21 and cognitive complexity 22; 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. — bettershot-landing/lib/share.ts:50
  • VideoPlayer has cyclomatic complexity 21 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. — bettershot-landing/components/share/video-player.tsx:30
  • getChangelog has cyclomatic complexity 17 and cognitive complexity 25; 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. — bettershot-landing/lib/changelog.ts:16
  • generateMetadata has cyclomatic complexity 17 and cognitive complexity 16; 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. — bettershot-landing/app/s/[id]/page.tsx:15
  • (anonymous) has cyclomatic complexity 17 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 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. — REDACTED:182
  • ShareView has cyclomatic complexity 16 and cognitive complexity 15; 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. — bettershot-landing/components/share/share-view.tsx:18
  • getPayloadConfigFromPayload has cyclomatic complexity 12 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. — REDACTED:308
  • resolveShare has cyclomatic complexity 12 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. — bettershot-landing/lib/share.ts:117
  • Scrubber has cyclomatic complexity 12 and cognitive complexity 10; 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. — bettershot-landing/components/share/scrubber.tsx:17
R3 · Large Files8.4 / 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.

  • bettershot-landing/components/ui/sidebar.tsx has 672 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — bettershot-landing/components/ui/sidebar.tsx:1
  • bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx has 505 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:1
  • bettershot-landing/app/blog/cleanshot-x-capcut-loom-alternative/page.tsx has 493 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — bettershot-landing/app/blog/cleanshot-x-capcut-loom-alternative/page.tsx:1
  • bettershot-landing/app/blog/loom-alternative/page.tsx has 484 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — bettershot-landing/app/blog/loom-alternative/page.tsx:1
  • bettershot-landing/app/blog/bettershot-0-5-2/page.tsx has 481 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — bettershot-landing/app/blog/bettershot-0-5-2/page.tsx:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage0.0 / 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.

  • 0% of 129 production file(s) reachable from 0 test file(s) via the import graph — 'production' here is the RESIDUE: every source file left once tests, tooling, generated output, config, declarations and declaration-only modules, fixture corpora, type fixtures, behaviour-free data modules, re-export barrels, registration/constant data modules and service workers are set aside, so the percentage is taken over a smaller denominator than the workspace's file count

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R6 · Tooling3.3 / 10Weak✓ Tool-verified

React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each REDACTED 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: REDACTED scanned for test/lint/typecheck script wiring. Deterministic presence check.

  • test ✗ · lint ✓ · typecheck ✗ — read from this repository's REDACTED scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.

What to do

  • Add a test runner (vitest / jest / playwright) and `tsc --noEmit` as REDACTED scripts and run them in CI.
R7 · Dead Code0.0 / 10Critical✓ 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.

  • Unreachable from the 26 application, 2 tooling and 0 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
  • no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×33) — bettershot-landing/components/ui/sidebar.tsx, REDACTED, bettershot-landing/components/ui/menubar.tsx, …
  • no import path from any entry point (26 application, 2 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (bettershot-landing/components/ui/toaster.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — bettershot-landing/hooks/use-toast.ts
  • no import path from any entry point (26 application, 2 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (bettershot-landing/components/ui/following-pointer-demo.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — bettershot-landing/components/ui/following-pointer.tsx
  • no import path from any entry point (26 application, 2 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (bettershot-landing/components/ui/command.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — bettershot-landing/components/ui/dialog.tsx
  • no import path from any entry point (26 application, 2 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (bettershot-landing/components/ui/sidebar.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it (×2) — bettershot-landing/components/ui/sheet.tsx, bettershot-landing/components/ui/tooltip.tsx
  • no import path from any entry point (26 application, 2 tooling, 0 test roots considered), but 3 in-repo import(s) from 3 other file(s) do name it (bettershot-landing/components/ui/toaster.tsx, bettershot-landing/components/ui/use-toast.ts, bettershot-landing/hooks/use-toast.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — bettershot-landing/components/ui/toast.tsx

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency Hygiene6.0 / 10Adequate✓ Tool-verified

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.

  • Imported but not declared in any reachable REDACTED — installs work only by hoisting accident. — bettershot-landing/media/native/prepare-demos.mjs:10
  • Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×4)

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports10.0 / 10Exemplary✓ Tool-verified

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.

S1 · Web-Security Posture8.0 / 10Strong✓ Tool-verified

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://cloud.umami.is/script.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. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository. 2 such include(s) across the repository's markup. — bettershot-landing/app/layout.tsx:124

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.
X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

X26 · Unsynchronised callback handoff10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

  • `.catch(() => {})` 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. (×4) — bettershot-landing/components/demo-gallery.tsx:25, bettershot-landing/components/star-count.tsx:12, bettershot-landing/components/share/use-player.ts:250, …
  • 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. (×4) — bettershot-landing/components/share/use-player.ts:57, bettershot-landing/components/share/use-player.ts:260, Sources/Services/AppUpdater.swift:74, …
  • `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×9) — Sources/Views/OnboardingView.swift:340, Sources/Capture/CaptureOrchestrator.swift:206, Sources/Capture/CaptureOrchestrator.swift:286, …

What to do

  • Swallowed exception (empty catch)
X5 · Nullable reference types9.8 / 10Exemplary✓ Tool-verified

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.4 `!` null assertions per 1k TypeScript source lines — 6 assertion(s) across the 14107 source line(s) of the 126 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: bettershot-landing/app/blog/bettershot-0-5-2/page.tsx (1), bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx (1), bettershot-landing/app/blog/cleanshot-x-capcut-loom-alternative/page.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 `?`).

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).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC1 · Text alternatives1.1.1, 1.2.2, 1.2.5Partial signal
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC4 · Keyboard semantics2.1.1, 2.4.3Partial signal
AC5 · ARIA correctness4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only

Not statically assessed — these 40 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.2.1, 1.2.3, 1.2.4, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.4, 2.4.5, 2.4.6, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

Reference — by lens

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

LensScoreRatingImpact
Code Health42%Weak — gated by R10, R7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture84%Adequate — gated by D26Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity65%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness28%Weak — gated by D14, R4, R6, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security85%StrongStrongest area.
Accessibility47%Adequate — gated by AC4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance85%ExemplarySolid.
Unscored — 3 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.

  • D36 Supply-chain Provenance & Signing — 1 observation(s) recorded · The CI pipeline publishes no artifact — no package publish, container push or release with files to download. Supply-chain provenance, signing and an SBOM describe a PUBLISHED artifact for the people who obtain it, so there is nothing to attest here; a deployment of the service itself publishes nothing for anyone else to verify. Add them to the release pipeline when this repo starts publishing artifacts (a package, a container image, or a release with downloadable files). Build integrity and workflow-token hygiene are reported below: they describe what the CI runs and the token it runs with, neither of which is affected by whether the pipeline ships an artifact.
  • X10 Duplicated predicate — 8 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 4 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 control(s) we could not find positive evidence for

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

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

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

  • AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Swift imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's TypeScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. No Swift request handler (a Vapor, Hummingbird, Kitura, Swifter or Perfect route handler, as a method or a registered closure) is declared, so no state is shared between request threads. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — no exported interface declares behaviour
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no REDACTED in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read REDACTED: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named property (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a SwiftData @Model, a Core Data, Realm, GRDB or Fluent type, a GRDB or SQLite.swift column, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (CoreData, SwiftData, GRDB, RealmSwift, SQLite, Firebase, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named property (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a SwiftData @Model, a Core Data, Realm, GRDB or Fluent type, a GRDB or SQLite.swift column, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (CoreData, SwiftData, GRDB, RealmSwift, SQLite, Firebase, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D10 Test Quality — ~6983 lines of test source are present (.swift) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test source is present (.swift) and this repository's suite is reachable only from an Apple platform: it ships BetterShot.xcodeproj and no SwiftPM manifest, so it is built by Xcode rather than by `swift test`. The analyzer runs on Linux, where no simulator exists, so the suite was not re-run. Not scored: nothing was exercised.
  • D16 Bus Factor — single-maintainer repository — bus factor is not applicable
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D21 Naming Consistency — D21 withholds its case and prefix conventions rows: 2 candidate(s) found and not reported.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only; comments in this repository's .py, .swift source were not judged.
  • D25 ADR Conformance — no ADRs to check
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — 28 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage NOT MEASURED: this repository's test suite is reachable only from an Apple platform — it ships BetterShot.xcodeproj and no SwiftPM manifest, so it is built by Xcode rather than by `swift test`. The analyzer runs on Linux, where no simulator exists, so the suite was not run and no coverage was instrumented. Not scored.
  • DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript, Swift source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `Benchmark("…")` in a file importing package-benchmark, or package-benchmark in Package.swift, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • R5 Dependency Freshness — uses a pnpm lockfile — dependency freshness not measured here; JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
  • 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 19% of this repository's production lines — swift (54,114 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 19% of this repository's production lines — swift (54,114 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X16 Unfloored truncation loop — X16 reached only 19% of this repository's production lines — swift (54,114 lines), python (137 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 — X2 reached only 19% of this repository's production lines — swift (54,114 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • 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 — X21 reached only 19% of this repository's production lines — swift (54,114 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • 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 19% of this repository's production lines — swift (54,114 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 — 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
  • X28 Index access outside its own emptiness guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X29 Per-element action decided by a fixed element — X29 reached only 19% of this repository's production lines — swift (54,114 lines), python (137 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 38 finding(s)
D14 · License Compliance · Banned license · ×14
  • Banned license: @img/sharp-libvips-darwin-arm64 REDACTED:263 — `@img/sharp-libvips-darwin-arm64` 1.2.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-libvips-darwin-x64 REDACTED:268 — `@img/sharp-libvips-darwin-x64` 1.2.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-libvips-linux-arm REDACTED:278 — `@img/sharp-libvips-linux-arm` 1.2.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-libvips-linux-arm64 REDACTED:273 — `@img/sharp-libvips-linux-arm64` 1.2.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-libvips-linux-ppc64 REDACTED:283 — `@img/sharp-libvips-linux-ppc64` 1.2.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-libvips-linux-riscv64 REDACTED:288 — `@img/sharp-libvips-linux-riscv64` 1.2.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-libvips-linux-s390x REDACTED:293 — `@img/sharp-libvips-linux-s390x` 1.2.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-libvips-linux-x64 REDACTED:298 — `@img/sharp-libvips-linux-x64` 1.2.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-libvips-linuxmusl-arm64 REDACTED:303 — `@img/sharp-libvips-linuxmusl-arm64` 1.2.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-libvips-linuxmusl-x64 REDACTED:308 — `@img/sharp-libvips-linuxmusl-x64` 1.2.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-wasm32 REDACTED:361 — `@img/sharp-wasm32` 0.34.5 is published on registry.npmjs.org under `Apache-2.0 AND LGPL-3.0-or-later AND MIT`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-win32-arm64 REDACTED:366 — `@img/sharp-win32-arm64` 0.34.5 is published on registry.npmjs.org under `Apache-2.0 AND LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-win32-ia32 REDACTED:372 — `@img/sharp-win32-ia32` 0.34.5 is published on registry.npmjs.org under `Apache-2.0 AND LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-win32-x64 REDACTED:378 — `@img/sharp-win32-x64` 0.34.5 is published on registry.npmjs.org under `Apache-2.0 AND LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
D30 · Dependency Vulnerabilities · High CVE · ×13
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · Custom control named only by title on <video> · ×1
  • Custom control named only by title on <video> bettershot-landing/components/share/video-player.tsx:160 — This <video> carries a click handler, which makes it a control, and its only name is a title attribute. A plain element maps to role="generic", which does not support a name from the author, so the title is announced as nothing at all — it is a mouse-only tooltip, unreachable on touch. Give it role="button" (which it needs anyway to be operable) so the title becomes a real name, or add an aria-label.
AC3 · Page structure · Document without a <title> · ×1
  • Document without a <title> bettershot-landing/app/layout.tsx:118 — A page with no <title> gives no name in the tab, history or screen-reader page list. Declare it the way this router does — Next App Router `export const metadata = { title }`, React Router/Remix `export function meta`, TanStack Start `head`, or a Helmet/Head component.
AC4 · Keyboard semantics · Double-click handler on a non-interactive <div> · ×1
  • Double-click handler on a non-interactive <div> bettershot-landing/components/share/image-viewer.tsx:118 — This <div> binds pointerdown, pointerup, pointermove and double-click — pointer gestures with no keyboard form, a double-click among them. No click, no key handler, and no tabIndex={0}, so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabIndex={0} + a key handler alongside the double-click.
AC4 · Keyboard semantics · Click handler on a non-interactive <video> · ×1
  • Click handler on a non-interactive <video> bettershot-landing/components/share/video-player.tsx:160 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
AC4 · Keyboard semantics · Hover-only interaction on <div> · ×1
  • Hover-only interaction on <div> bettershot-landing/components/ui/following-pointer.tsx:68 — This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus.
AC4 · Keyboard semantics · Click handler on a non-interactive <div> · ×1
  • Click handler on a non-interactive <div> bettershot-landing/components/ui/hero-video-dialog.tsx:86 — A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabIndex={0}.
D28 · Secrets (history) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Critical CVE · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Critical vulnerability · ×1
  • REDACTED
R8 · Dependency Hygiene · Unlisted import 'sharp' · ×1
  • Unlisted import 'sharp' bettershot-landing/media/native/prepare-demos.mjs:10 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
Serious — 508 finding(s)
D15 · Churn × Complexity Hotspots · Hotspot · ×18
  • Hotspot: Sources/BetterShot/RecordingStudioWindow.swift Sources/BetterShot/RecordingStudioWindow.swift:2923 — Sources/BetterShot/RecordingStudioWindow.swift changed 37 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in StudioInspector.inspectorContent at line 2923. 12 of those changes were fix/bug commits, and the other 25 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 23:52:33 +05:30' --until='2026-10-24 23:52:33 +05:30' --full-history --no-merges -- Sources/BetterShot/RecordingStudioWindow.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: Sources/BetterShot/AnnotationEditorWindow.swift Sources/BetterShot/AnnotationEditorWindow.swift:145 — Sources/BetterShot/AnnotationEditorWindow.swift changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in AnnotationEditorWindow.performShortcut at line 145. 8 of those changes were fix/bug commits, and the other 18 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 23:52:33 +05:30' --until='2026-10-24 23:52:33 +05:30' --full-history --no-merges -- Sources/BetterShot/AnnotationEditorWindow.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: Sources/Preview/PreviewOverlay.swift Sources/Preview/PreviewOverlay.swift:566 — Sources/Preview/PreviewOverlay.swift changed 40 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in PreviewCardView.body at line 566. 23 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 23:52:33 +05:30' --until='2026-10-24 23:52:33 +05:30' --full-history --no-merges -- Sources/Preview/PreviewOverlay.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: Sources/Capture/CaptureOrchestrator.swift Sources/Capture/CaptureOrchestrator.swift:190 — Sources/Capture/CaptureOrchestrator.swift changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in CaptureOrchestrator.processCapturedImage at line 190. 10 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 23:52:33 +05:30' --until='2026-10-24 23:52:33 +05:30' --full-history --no-merges -- Sources/Capture/CaptureOrchestrator.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: Sources/BetterShot/RecordingStudioModel.swift Sources/BetterShot/RecordingStudioModel.swift:264 — Sources/BetterShot/RecordingStudioModel.swift changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in RecordingStudioModel.load at line 264. 9 of those changes were fix/bug commits, and the other 15 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 23:52:33 +05:30' --until='2026-10-24 23:52:33 +05:30' --full-history --no-merges -- Sources/BetterShot/RecordingStudioModel.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: Sources/BetterShot/RecordingStudioExporter.swift Sources/BetterShot/RecordingStudioExporter.swift:838 — Sources/BetterShot/RecordingStudioExporter.swift changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in StudioFrameCompositor.composedImage at line 838. 5 of those changes were fix/bug commits, and the other 7 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 23:52:33 +05:30' --until='2026-10-24 23:52:33 +05:30' --full-history --no-merges -- Sources/BetterShot/RecordingStudioExporter.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: Sources/Services/ShortcutActions.swift Sources/Services/ShortcutActions.swift:5 — Sources/Services/ShortcutActions.swift changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in ShortcutService.performGlobal at line 5. 4 of those changes were fix/bug commits, and the other 4 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 23:52:33 +05:30' --until='2026-10-24 23:52:33 +05:30' --full-history --no-merges -- Sources/Services/ShortcutActions.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: Sources/Capture/ScrollCaptureController.swift Sources/Capture/ScrollCaptureController.swift:192 — Sources/Capture/ScrollCaptureController.swift changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in ScrollCaptureController.process at line 192. 10 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 23:52:33 +05:30' --until='2026-10-24 23:52:33 +05:30' --full-history --no-merges -- Sources/Capture/ScrollCaptureController.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: Sources/BetterShot/EditorChrome.swift Sources/BetterShot/EditorChrome.swift:50 — Sources/BetterShot/EditorChrome.swift changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in EditorButtonStyle.makeBody at line 50. 1 of those changes was a fix/bug commit, and the other 8 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 23:52:33 +05:30' --until='2026-10-24 23:52:33 +05:30' --full-history --no-merges -- Sources/BetterShot/EditorChrome.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: Sources/Capture/RegionSelectionOverlay.swift Sources/Capture/RegionSelectionOverlay.swift:385 — Sources/Capture/RegionSelectionOverlay.swift changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in SelectionView.cursor at line 385. 2 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 23:52:33 +05:30' --until='2026-10-24 23:52:33 +05:30' --full-history --no-merges -- Sources/Capture/RegionSelectionOverlay.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: Sources/BetterShot/RecordingStudioStyle.swift Sources/BetterShot/RecordingStudioStyle.swift:457 — Sources/BetterShot/RecordingStudioStyle.swift changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in RecordingStudioLayout.make at line 457. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 23:52:33 +05:30' --until='2026-10-24 23:52:33 +05:30' --full-history --no-merges -- Sources/BetterShot/RecordingStudioStyle.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: Sources/BetterShot/RecordingSessionRenderer.swift Sources/BetterShot/RecordingSessionRenderer.swift:29 — Sources/BetterShot/RecordingSessionRenderer.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in RecordingSessionRenderer.ensureDeliverable at line 29. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 23:52:33 +05:30' --until='2026-10-24 23:52:33 +05:30' --full-history --no-merges -- Sources/BetterShot/RecordingSessionRenderer.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: Sources/Settings/MediaGallery.swift Sources/Settings/MediaGallery.swift:205 — Sources/Settings/MediaGallery.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in MediaGalleryContent.body at line 205. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 23:52:33 +05:30' --until='2026-10-24 23:52:33 +05:30' --full-history --no-merges -- Sources/Settings/MediaGallery.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: Sources/BetterShot/RecordingPointerArtworkCapture.swift Sources/BetterShot/RecordingPointerArtworkCapture.swift:16 — Sources/BetterShot/RecordingPointerArtworkCapture.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in PointerArtworkCapture.styledArtwork at line 16. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 23:52:33 +05:30' --until='2026-10-24 23:52:33 +05:30' --full-history --no-merges -- Sources/BetterShot/RecordingPointerArtworkCapture.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: Sources/BetterShot/Recording3DInspector.swift Sources/BetterShot/Recording3DInspector.swift:17 — Sources/BetterShot/Recording3DInspector.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in Recording3DInspector.body at line 17. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 23:52:33 +05:30' --until='2026-10-24 23:52:33 +05:30' --full-history --no-merges -- Sources/BetterShot/Recording3DInspector.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: Sources/BetterShot/AnnotationRenderer.swift Sources/BetterShot/AnnotationRenderer.swift:92 — Sources/BetterShot/AnnotationRenderer.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in AnnotationRenderer.render at line 92. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 23:52:33 +05:30' --until='2026-10-24 23:52:33 +05:30' --full-history --no-merges -- Sources/BetterShot/AnnotationRenderer.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: bettershot-landing/components/share/share-view.tsx bettershot-landing/components/share/share-view.tsx:18 — bettershot-landing/components/share/share-view.tsx changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in share-view.ShareView at line 18. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 23:52:33 +05:30' --until='2026-10-24 23:52:33 +05:30' --full-history --no-merges -- bettershot-landing/components/share/share-view.tsx`: 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: bettershot-landing/components/share/image-viewer.tsx bettershot-landing/components/share/image-viewer.tsx:25 — bettershot-landing/components/share/image-viewer.tsx changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in image-viewer.ImageViewer at line 25. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 23:52:33 +05:30' --until='2026-10-24 23:52:33 +05:30' --full-history --no-merges -- bettershot-landing/components/share/image-viewer.tsx`: 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.
AC6 · Visual & motion safety · Focus outline removed inline · ×14
  • Focus outline removed inline bettershot-landing/app/blog/bettershot-0-5-2/page.tsx:448 — <a> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:430 — <a> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:480 — <a> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline bettershot-landing/app/blog/cleanshot-x-capcut-loom-alternative/page.tsx:417 — <a> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline bettershot-landing/app/blog/cleanshot-x-capcut-loom-alternative/page.tsx:468 — <a> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline bettershot-landing/app/blog/loom-alternative/page.tsx:411 — <a> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline bettershot-landing/app/blog/loom-alternative/page.tsx:461 — <a> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline bettershot-landing/app/not-found.tsx:52 — <a> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline bettershot-landing/components/copy-command.tsx:17 — <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline bettershot-landing/components/download-link.tsx:15 — <a> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline bettershot-landing/components/home/faq.tsx:69 — <summary> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline bettershot-landing/components/site-footer.tsx:73 — <a> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline bettershot-landing/components/ui/input.tsx:7 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline bettershot-landing/components/ui/textarea.tsx:7 — <textarea> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
D3 · God Classes · MethodTooLong · ×13
  • MethodTooLong: RecordingStudioExporter.run Sources/BetterShot/RecordingStudioExporter.swift:156 — MethodTooLong — run 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: GeneralSettingsTab.body Sources/Settings/PreferencesView.swift:200 — MethodTooLong — body runs 151 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 51 over it, 1.51× 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: StudioInspector.inspectorContent Sources/BetterShot/RecordingStudioWindow.swift:2923 — MethodTooLong — inspectorContent runs 149 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 49 over it, 1.49× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: CurvedArrow.info Sources/BetterShot/CurvedArrow.swift:7 — MethodTooLong — info runs 148 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 48 over it, 1.48× 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: PointerTimeline.build Sources/BetterShot/RecordingPointerTimeline.swift:125 — MethodTooLong — build runs 144 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 44 over it, 1.44× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: StrokeOutline.buildTracks Sources/BetterShot/StrokeOutline.swift:78 — MethodTooLong — buildTracks runs 142 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 42 over it, 1.42× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AnnotationEditorInspector.body Sources/BetterShot/AnnotationInspector.swift:48 — MethodTooLong — body runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AnnotationCanvas.body Sources/BetterShot/AnnotationCanvas.swift:45 — MethodTooLong — body runs 122 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× 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: StudioCanvas.body Sources/BetterShot/RecordingStudioWindow.swift:463 — MethodTooLong — body runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: StrokePipeline.ingest Sources/BetterShot/StrokePipeline.swift:60 — MethodTooLong — ingest runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MediaGalleryContent.body Sources/Settings/MediaGallery.swift:205 — MethodTooLong — body runs 119 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× 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: RecordingSessionRenderer.ensureDeliverable Sources/BetterShot/RecordingSessionRenderer.swift:29 — MethodTooLong — ensureDeliverable runs 115 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 15 over it, 1.15× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: StudioFrameCompositor.composedImage Sources/BetterShot/RecordingStudioExporter.swift:838 — MethodTooLong — composedImage runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D3 · God Classes · FileTooLong · ×12
  • FileTooLong: BetterShot/RecordingStudioWindow.swift Sources/BetterShot/RecordingStudioWindow.swift — FileTooLong — 2824 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2324 over it, 5.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: BetterShot/RecordingStudioModel.swift Sources/BetterShot/RecordingStudioModel.swift — FileTooLong — 1831 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: RecordingStudioModel (58-2783). The bar is 500 significant lines; this is 1331 over it, 3.66× 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/PreferencesView.swift Sources/Settings/PreferencesView.swift — FileTooLong — 1084 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 584 over it, 2.17× 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: BetterShot/RecordingStudioExporter.swift Sources/BetterShot/RecordingStudioExporter.swift — FileTooLong — 1081 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 581 over it, 2.16× 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: BetterShot/ScreenRecordingManager.swift Sources/BetterShot/ScreenRecordingManager.swift — FileTooLong — 939 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 439 over it, 1.88× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: BetterShot/RecordingClipTimelineView.swift Sources/BetterShot/RecordingClipTimelineView.swift — FileTooLong — 652 significant lines (blank, comment-only and punctuation-only lines excluded), about 83% of them inside a single declaration: RecordingClipTimelineControl (154-894). The bar is 500 significant lines; this is 152 over it, 1.30× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: BetterShot/AnnotationEditorWindow.swift Sources/BetterShot/AnnotationEditorWindow.swift — FileTooLong — 592 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: AnnotationEditorWindow (25-816). The bar is 500 significant lines; this is 92 over it, 1.18× 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: BetterShot/AnnotationCanvas.swift Sources/BetterShot/AnnotationCanvas.swift — FileTooLong — 578 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: AnnotationCanvas (32-698). The bar is 500 significant lines; this is 78 over it, 1.16× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: ui/sidebar.tsx bettershot-landing/components/ui/sidebar.tsx — FileTooLong — 561 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 61 over it, 1.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: BetterShot/AnnotationEditorModel.swift Sources/BetterShot/AnnotationEditorModel.swift — FileTooLong — 558 significant lines (blank, comment-only and punctuation-only lines excluded), about 64% of them inside a single declaration: AnnotationEditorModel (18-580). The bar is 500 significant lines; this is 58 over it, 1.12× 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: BetterShot/RecordingPointerCapture.swift Sources/BetterShot/RecordingPointerCapture.swift — FileTooLong — 530 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 30 over it, 1.06× 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: Preview/PreviewOverlay.swift Sources/Preview/PreviewOverlay.swift — FileTooLong — 518 significant lines (blank, comment-only and punctuation-only lines excluded), about 68% of them inside a single declaration: PreviewOverlay (7-487). The bar is 500 significant lines; this is 18 over it, 1.04× 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.
D3 · God Classes · FunctionTooLong · ×12
  • FunctionTooLong: page.Article bettershot-landing/app/blog/bettershot-0-5-2/page.tsx:73 — FunctionTooLong — Article runs 364 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 264 over it, 3.64× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: page.Article bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:77 — FunctionTooLong — Article runs 339 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 239 over it, 3.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: page.Article bettershot-landing/app/blog/cleanshot-x-capcut-loom-alternative/page.tsx:79 — FunctionTooLong — Article runs 328 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 228 over it, 3.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: page.Article bettershot-landing/app/blog/loom-alternative/page.tsx:78 — FunctionTooLong — Article runs 325 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 225 over it, 3.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: video-player.VideoPlayer bettershot-landing/components/share/video-player.tsx:30 — FunctionTooLong — VideoPlayer runs 240 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 140 over it, 2.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: use-player.usePlayer bettershot-landing/components/share/use-player.ts:62 — FunctionTooLong — usePlayer runs 178 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 78 over it, 1.78× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: page.Home bettershot-landing/app/page.tsx:61 — FunctionTooLong — Home runs 165 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 65 over it, 1.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: image-viewer.ImageViewer bettershot-landing/components/share/image-viewer.tsx:25 — FunctionTooLong — ImageViewer runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: calendar.Calendar bettershot-landing/components/ui/calendar.tsx:14 — FunctionTooLong — Calendar runs 123 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: scrubber.Scrubber bettershot-landing/components/share/scrubber.tsx:17 — FunctionTooLong — Scrubber runs 117 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 17 over it, 1.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.
  • FunctionTooLong: scramble.ScrambleHover bettershot-landing/components/ui/scramble.tsx:24 — FunctionTooLong — ScrambleHover runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: share-view.ShareView bettershot-landing/components/share/share-view.tsx:18 — FunctionTooLong — ShareView runs 109 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 9 over it, 1.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×9
  • Edited copy of a member (9 corresponding lines) Sources/Settings/SharingSettingsTab.swift:272 — Sources/Settings/SharingSettingsTab.swift:272-280 | Sources/Settings/SharingSettingsTab.swift:282-290 — 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) Sources/BetterShot/AnnotationRedactionImageProcessor.swift:77 — Sources/BetterShot/AnnotationRedactionImageProcessor.swift:77-85 | Sources/BetterShot/AnnotationRedactionImageProcessor.swift:144-152 — 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) Sources/BetterShot/AnnotationBackgroundRenderer.swift:391 — Sources/BetterShot/AnnotationBackgroundRenderer.swift:391-399 | Sources/BetterShot/ScreenshotImageLoader.swift:12-21 — 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) Sources/Settings/PreferencesView.swift:469 — Sources/Settings/PreferencesView.swift:469-480 | Sources/Views/OnboardingView.swift:317-325 — 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) Sources/Views/GlassSurface.swift:74 — Sources/Views/GlassSurface.swift:74-82 | Sources/Views/GlassSurface.swift:84-98 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) Sources/BetterShot/AnnotationBackgroundPresetStore.swift:204 — Sources/BetterShot/AnnotationBackgroundPresetStore.swift:204-216 | Sources/BetterShot/RecordingStudioStylePresetStore.swift:153-161 — 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) Sources/BetterShot/InkPath.swift:141 — Sources/BetterShot/InkPath.swift:141-149 | Sources/BetterShot/StrokeOutline.swift:418-426 — 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) Sources/BetterShot/AnnotationBackgroundInspector.swift:220 — Sources/BetterShot/AnnotationBackgroundInspector.swift:220-228 | Sources/Settings/PreferencesView.swift:595-603 — 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) Sources/BetterShot/AnnotationBackgroundPresetBar.swift:126 — Sources/BetterShot/AnnotationBackgroundPresetBar.swift:126-135 | Sources/BetterShot/RecordingStudioStylePresetBar.swift:114-122 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×9
  • Edited copy of a member (4 corresponding lines) Sources/BetterShot/AnnotationBackgroundPresetBar.swift:396 — Sources/BetterShot/AnnotationBackgroundPresetBar.swift:396-399 | Sources/BetterShot/RecordingStudioStylePresetBar.swift:376-379 — 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) Sources/BetterShot/AnnotationEditorModel.swift:684 — Sources/BetterShot/AnnotationEditorModel.swift:684-687 | Sources/BetterShot/RecordingStudioModel.swift:2018-2021 — 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) Sources/BetterShot/AnnotationBackgroundPresetStore.swift:69 — Sources/BetterShot/AnnotationBackgroundPresetStore.swift:69-72 | Sources/BetterShot/RecordingStudioStylePresetStore.swift:43-46 — 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) Sources/BetterShot/AnnotationBackgroundPresetBar.swift:405 — Sources/BetterShot/AnnotationBackgroundPresetBar.swift:405-408 | Sources/BetterShot/RecordingStudioStylePresetBar.swift:385-388 — 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) Sources/BetterShot/AnnotationBackgroundPresetBar.swift:414 — Sources/BetterShot/AnnotationBackgroundPresetBar.swift:414-417 | Sources/BetterShot/RecordingStudioStylePresetBar.swift:394-397 — 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) Sources/BetterShot/AnnotationBackgroundPresetBar.swift:419 — Sources/BetterShot/AnnotationBackgroundPresetBar.swift:419-422 | Sources/BetterShot/RecordingStudioStylePresetBar.swift:399-402 — 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) Sources/BetterShot/AnnotationBackgroundPresetStore.swift:136 — Sources/BetterShot/AnnotationBackgroundPresetStore.swift:136-139 | Sources/BetterShot/RecordingStudioStylePresetStore.swift:88-91 — 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) Sources/BetterShot/RecordingViewportTimeline.swift:131 — Sources/BetterShot/RecordingViewportTimeline.swift:131-134 | Sources/BetterShot/RecordingZoomFocusPad.swift:123-126 — 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) Sources/BetterShot/AnnotationBackgroundPresetStore.swift:108 — Sources/BetterShot/AnnotationBackgroundPresetStore.swift:108-111 | Sources/BetterShot/RecordingStudioStylePresetStore.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.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×9
  • Swallowed exception (caught, then discarded) Sources/Views/OnboardingView.swift:340 — `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) Sources/Capture/CaptureOrchestrator.swift:206 — `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) Sources/Capture/CaptureOrchestrator.swift:286 — `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) Sources/BetterShot/AnnotationCanvas.swift:443 — `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) Sources/BetterShot/AnnotationCanvas.swift:534 — `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) Sources/BetterShot/CloudUploader.swift:95 — `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) Sources/BetterShot/CloudUploader.swift:151 — `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) Sources/BetterShot/RecordingStudioWindow.swift:1956 — `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) Sources/BetterShot/SmartRedactionRecognizer.swift:42 — `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.
D15 · Churn × Complexity Hotspots · Repeated repair · ×8
  • Repeated repair: Sources/History/HistoryStore.swift Sources/History/HistoryStore.swift:193 — Sources/History/HistoryStore.swift changed 16 times in last 90 days and 11 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is HistoryStore.decodeThumbnail at line 193), 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: keep a capture's format in its library name”; “fix: close naming gaps from the second review”; “fix: store a capture's name on its record so storage details never rename it”; “fix: name a capture once, when it is taken, instead of guessing at save time”. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 23:52:33 +05:30' --until='2026-10-24 23:52:33 +05:30' --full-history --no-merges -- Sources/History/HistoryStore.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: Sources/BetterShot/BetterShotPreferences.swift Sources/BetterShot/BetterShotPreferences.swift:337 — Sources/BetterShot/BetterShotPreferences.swift changed 15 times in last 90 days and 10 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is ScreenshotFileActions.saveCapture at line 337), 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: preserve capture names and safely publish video saves”; “fix: apply filename template to saved screenshots”; “fix: close naming gaps from the second review”; “fix: store a capture's name on its record so storage details never rename it”. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 23:52:33 +05:30' --until='2026-10-24 23:52:33 +05:30' --full-history --no-merges -- Sources/BetterShot/BetterShotPreferences.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: Sources/BetterShot/ScreenshotFileNaming.swift Sources/BetterShot/ScreenshotFileNaming.swift:211 — Sources/BetterShot/ScreenshotFileNaming.swift changed 6 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is ScreenshotFileNaming.value at line 211), 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: close naming gaps from the second review”; “fix: name a capture once, when it is taken, instead of guessing at save time”; “fix: treat .preview/.raw companions of working files as scratch names”; “fix: name clipboard files and deck saves from the file name template”. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 23:52:33 +05:30' --until='2026-10-24 23:52:33 +05:30' --full-history --no-merges -- Sources/BetterShot/ScreenshotFileNaming.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: Sources/Preview/DeckStaging.swift Sources/Preview/DeckStaging.swift:58 — Sources/Preview/DeckStaging.swift changed 5 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 6 (its worst body is DeckStaging.promote at line 58), 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: keep a capture's format in its library name”; “fix: close naming gaps from the second review”; “fix: store a capture's name on its record so storage details never rename it”; “fix: name a capture once, when it is taken, instead of guessing at save time”. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 23:52:33 +05:30' --until='2026-10-24 23:52:33 +05:30' --full-history --no-merges -- Sources/Preview/DeckStaging.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: Sources/Capture/ScrollCaptureSessionPresenter.swift Sources/Capture/ScrollCaptureSessionPresenter.swift:33 — Sources/Capture/ScrollCaptureSessionPresenter.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 10 (its worst body is ScrollCaptureSessionPresenter.capture at line 33), 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: port MacShot scrolling capture engine and bar”; “Fix scrolling capture with MacShot registration and auto-scroll”; “fix: keep scrolling capture in step with fast scrolling and flag lost tracking”; “fix: keep scrolling capture manual”. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 23:52:33 +05:30' --until='2026-10-24 23:52:33 +05:30' --full-history --no-merges -- Sources/Capture/ScrollCaptureSessionPresenter.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: Sources/BetterShot/RecordingDeliverable.swift Sources/BetterShot/RecordingDeliverable.swift:36 — Sources/BetterShot/RecordingDeliverable.swift changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is RecordingDeliverable.save at line 36), 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: close naming gaps from the second review”; “fix: name a recording once, when it is recorded”; “fix: save finished recordings to the configured folder”. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 23:52:33 +05:30' --until='2026-10-24 23:52:33 +05:30' --full-history --no-merges -- Sources/BetterShot/RecordingDeliverable.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: Sources/BetterShot/ViewModifiers.swift Sources/BetterShot/ViewModifiers.swift:304 — Sources/BetterShot/ViewModifiers.swift changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is EditorFullScreenModifier.enterFullScreenIfReady at line 304), 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: open editors windowed by default and bump to 0.5.7”; “fix: restore editor fullscreen and polish Scenes for 0.5.5”; “fix: restore editor full screen and menu tray capture handoff”. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 23:52:33 +05:30' --until='2026-10-24 23:52:33 +05:30' --full-history --no-merges -- Sources/BetterShot/ViewModifiers.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: Sources/BetterShot/VideoFileActions.swift Sources/BetterShot/VideoFileActions.swift:141 — Sources/BetterShot/VideoFileActions.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 4 (its worst body is VideoFileActions.remuxTarget at line 141), 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: preserve capture names and safely publish video saves”; “fix: name clipboard files and deck saves from the file name template”; “fix: detect missing recording on copy, keep card open and toast on the card's screen”. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 23:52:33 +05:30' --until='2026-10-24 23:52:33 +05:30' --full-history --no-merges -- Sources/BetterShot/VideoFileActions.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.
X3 · Exception handling · Swallowed exception (empty catch) · ×8
  • Swallowed exception (empty catch) bettershot-landing/components/demo-gallery.tsx:25 — `.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) bettershot-landing/components/star-count.tsx:12 — `.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) bettershot-landing/components/share/use-player.ts:57 — 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) bettershot-landing/components/share/use-player.ts:250 — `.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) bettershot-landing/components/share/use-player.ts:251 — `.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) bettershot-landing/components/share/use-player.ts:260 — 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) Sources/Services/AppUpdater.swift:74 — 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) Sources/BetterShot/CloudUploader.swift:140 — 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.
D3 · God Classes · TooManyMethods · ×7
  • TooManyMethods: RecordingStudioModel Sources/BetterShot/RecordingStudioModel.swift:56 — TooManyMethods — 161 methods. The bar is 30 methods; this is 131 over it, 5.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AnnotationEditorModel Sources/BetterShot/AnnotationEditorModel.swift:16 — TooManyMethods — 72 methods, declared across 3 files: BetterShot/AnnotationEditorModel.swift (51), BetterShot/AnnotationEditorZoom.swift (14), BetterShot/AnnotationEditorTextStyle.swift (7). The bar is 30 methods; this is 42 over it, 2.40× 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: AnnoEditor Sources/BetterShot/AnnoEditor.swift:116 — TooManyMethods — 48 methods, declared across 2 files: BetterShot/AnnoEditorInteraction.swift (26), BetterShot/AnnoEditor.swift (22). The bar is 30 methods; this is 18 over it, 1.60× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: RecordingClipTimelineControl Sources/BetterShot/RecordingClipTimelineView.swift:154 — TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PreviewOverlay Sources/Preview/PreviewOverlay.swift:5 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Vec Sources/BetterShot/Vec.swift:5 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.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: ScreenshotHistoryStore Sources/BetterShot/ScreenshotHistoryStore.swift:102 — TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×7
  • Duplicated block (8 lines × 2) Sources/BetterShot/AnnotationBackground.swift:199 — Sources/BetterShot/AnnotationBackground.swift:199-206 | Sources/BetterShot/AnnotationSwatch.swift:17-24 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) Sources/BetterShot/AnnotationTextStyleControls.swift:121 — Sources/BetterShot/AnnotationTextStyleControls.swift:121-128 | Sources/BetterShot/AnnotationTextStyleControls.swift:144-151 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/BetterShot/AnnotationTextStyleControls.swift:121` it begins part-way through the construct above it, so those exact lines 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) Sources/BetterShot/RecordingClipTimelineView.swift:89 — Sources/BetterShot/RecordingClipTimelineView.swift:89-96 | Sources/BetterShot/RecordingClipTimelineView.swift:109-116 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/BetterShot/RecordingClipTimelineView.swift:89` 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) Sources/Views/MenuBarContentView.swift:287 — Sources/Views/MenuBarContentView.swift:287-294 | Sources/Views/MenuBarContentView.swift:535-542 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Views/MenuBarContentView.swift:287` it does not close everything it opens, so those exact lines 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) Sources/BetterShot/AnnotationBackgroundPresetStore.swift:195 — Sources/BetterShot/AnnotationBackgroundPresetStore.swift:195-202 | Sources/BetterShot/RecordingStudioStylePresetStore.swift:144-151 — before extracting anything, compare `Sources/BetterShot/AnnotationBackgroundPresetStore.swift` and `Sources/BetterShot/RecordingStudioStylePresetStore.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) Sources/BetterShot/AnnotationBackgroundPresetStore.swift:167 — Sources/BetterShot/AnnotationBackgroundPresetStore.swift:167-174 | Sources/BetterShot/RecordingStudioStylePresetStore.swift:116-123 — before extracting anything, compare `Sources/BetterShot/AnnotationBackgroundPresetStore.swift` and `Sources/BetterShot/RecordingStudioStylePresetStore.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 61 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 `id` to `AnnotationBackgroundPreset.ID?` in one and `RecordingStudioStylePreset.ID?` 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 lines × 2) Sources/BetterShot/AnnotationMockupEffectsInspector.swift:246 — Sources/BetterShot/AnnotationMockupEffectsInspector.swift:246-253 | Sources/BetterShot/RecordingZoomFocusPad.swift:130-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.
D3 · God Classes · ClassTooLong · ×6
  • ClassTooLong: RecordingStudioModel Sources/BetterShot/RecordingStudioModel.swift:56 — ClassTooLong — 1794 significant lines (blank, comment-only and punctuation-only lines excluded), 161 methods. The bar is 400 significant lines; this is 1394 over it, 4.49× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: StudioInspector Sources/BetterShot/RecordingStudioWindow.swift:2883 — ClassTooLong — 840 significant lines (blank, comment-only and punctuation-only lines excluded), 15 methods. The bar is 400 significant lines; this is 440 over it, 2.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: AnnotationEditorWindow Sources/BetterShot/AnnotationEditorWindow.swift:25 — ClassTooLong — 564 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 164 over it, 1.41× 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: RecordingClipTimelineControl Sources/BetterShot/RecordingClipTimelineView.swift:154 — ClassTooLong — 542 significant lines (blank, comment-only and punctuation-only lines excluded), 45 methods. The bar is 400 significant lines; this is 142 over it, 1.36× 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: ScreenRecordingManager Sources/BetterShot/ScreenRecordingManager.swift:113 — ClassTooLong — 511 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 111 over it, 1.28× 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: AnnotationCanvas Sources/BetterShot/AnnotationCanvas.swift:32 — ClassTooLong — 503 significant lines (blank, comment-only and punctuation-only lines excluded), 16 methods. The bar is 400 significant lines; this is 103 over it, 1.26× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×6
  • Edited copy of a member (8 corresponding lines) Sources/BetterShot/Arrowheads.swift:95 — Sources/BetterShot/Arrowheads.swift:95-102 | Sources/BetterShot/Arrowheads.swift:104-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) Sources/BetterShot/VideoFileActions.swift:13 — Sources/BetterShot/VideoFileActions.swift:13-30 | Sources/History/HistoryStore.swift:218-225 — 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) Sources/BetterShot/AnnotationCanvas.swift:644 — Sources/BetterShot/AnnotationCanvas.swift:644-651 | Sources/BetterShot/RecordingStudioWindow.swift:646-653 — 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) Sources/BetterShot/RecordingStudioWindow.swift:359 — Sources/BetterShot/RecordingStudioWindow.swift:359-366 | Sources/BetterShot/RecordingStudioWindow.swift:369-380 — 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) Sources/BetterShot/AnnotationDocument.swift:260 — Sources/BetterShot/AnnotationDocument.swift:260-267 | Sources/BetterShot/AnnotationPresetStore.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) Sources/BetterShot/AnnotationEditorWindow.swift:442 — Sources/BetterShot/AnnotationEditorWindow.swift:442-450 | Sources/BetterShot/RecordingStudioWindow.swift:220-227 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×6
  • Duplicated block (10 lines × 2) Sources/BetterShot/CurvedArrow.swift:129 — Sources/BetterShot/CurvedArrow.swift:129-138 | Sources/BetterShot/CurvedArrow.swift:157-166 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) Sources/BetterShot/ScreenshotHistoryStore.swift:171 — Sources/BetterShot/ScreenshotHistoryStore.swift:171-180 | Sources/BetterShot/ScreenshotHistoryStore.swift:203-212 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/BetterShot/ScreenshotHistoryStore.swift:171` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) Sources/Capture/CountdownOverlay.swift:119 — Sources/Capture/CountdownOverlay.swift:119-128 | Sources/Preview/PinnedScreenshot.swift:88-97 — 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 `Sources/Capture/CountdownOverlay.swift:119` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (10 lines × 2) Sources/Settings/MediaGallery.swift:219 — Sources/Settings/MediaGallery.swift:219-228 | Sources/Settings/PreferencesView.swift:85-94 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Settings/MediaGallery.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sources/Settings/MediaGallery.swift:218` calls `scrollContentBackground` and `Sources/Settings/PreferencesView.swift:84` 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 × 2) Sources/BetterShot/AnnotationBackgroundPresetBar.swift:144 — Sources/BetterShot/AnnotationBackgroundPresetBar.swift:144-153 | Sources/BetterShot/RecordingStudioStylePresetBar.swift:131-140 — before extracting anything, compare `Sources/BetterShot/AnnotationBackgroundPresetBar.swift` and `Sources/BetterShot/RecordingStudioStylePresetBar.swift` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 221 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) Sources/BetterShot/AnnotationDocument.swift:269 — Sources/BetterShot/AnnotationDocument.swift:269-278 | Sources/BetterShot/AnnotationPresetStore.swift:80-89 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×5
  • Edited copy of a member (12 corresponding lines) Sources/BetterShot/Recording3DInspector.swift:259 — Sources/BetterShot/Recording3DInspector.swift:259-270 | Sources/BetterShot/Recording3DInspector.swift:272-287 — 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) Sources/BetterShot/StrokePipeline.swift:34 — Sources/BetterShot/StrokePipeline.swift:34-46 | Sources/BetterShot/StrokePipeline.swift:338-349 — 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) Sources/BetterShot/AnnotationEditorZoom.swift:71 — Sources/BetterShot/AnnotationEditorZoom.swift:71-87 | Sources/Settings/PreferencesView.swift:855-866 — 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) Sources/BetterShot/RecordingStudioModel.swift:1206 — Sources/BetterShot/RecordingStudioModel.swift:1206-1221 | Sources/BetterShot/RecordingStudioModel.swift:1225-1236 — 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) Sources/BetterShot/AnnotationEditorWindow.swift:614 — Sources/BetterShot/AnnotationEditorWindow.swift:614-630 | Sources/BetterShot/RecordingStudioWindow.swift:3342-3353 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×5
  • Duplicated block (9 lines × 2) Sources/BetterShot/AnnotationBackgroundPresetBar.swift:386 — Sources/BetterShot/AnnotationBackgroundPresetBar.swift:386-394 | Sources/BetterShot/RecordingStudioStylePresetBar.swift:366-374 — before extracting anything, compare `Sources/BetterShot/AnnotationBackgroundPresetBar.swift` and `Sources/BetterShot/RecordingStudioStylePresetBar.swift` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 221 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 `Sources/BetterShot/AnnotationBackgroundPresetBar.swift:386` 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) Sources/BetterShot/AnnotationEditorWindow.swift:76 — Sources/BetterShot/AnnotationEditorWindow.swift:76-84 | Sources/BetterShot/RecordingStudioWindow.swift:81-89 — the copies sit in sibling files of 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 `Sources/BetterShot/AnnotationEditorWindow.swift:76` it begins part-way through the construct above it, so those exact lines 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) Sources/BetterShot/RecordingViewportTimeline.swift:522 — Sources/BetterShot/RecordingViewportTimeline.swift:522-530 | Sources/BetterShot/RecordingViewportTimeline.swift:538-546 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/BetterShot/RecordingViewportTimeline.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 (9 lines × 2) Sources/Settings/PreferencesView.swift:616 — Sources/Settings/PreferencesView.swift:616-624 | Sources/Settings/PreferencesView.swift:637-645 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Settings/PreferencesView.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 × 2) Sources/BetterShot/AnnotationMockupEffectsInspector.swift:125 — Sources/BetterShot/AnnotationMockupEffectsInspector.swift:125-133 | Sources/BetterShot/AnnotationScreenshotBorderInspector.swift:46-56 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×5
  • Duplicated block (7 lines × 2) Sources/BetterShot/AnnotationCanvas.swift:645 — Sources/BetterShot/AnnotationCanvas.swift:645-651 | Sources/BetterShot/RecordingStudioWindow.swift:647-653 — the copies sit in sibling files of 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) Sources/BetterShot/PathBuilder.swift:205 — Sources/BetterShot/PathBuilder.swift:205-211 | Sources/BetterShot/PathBuilder.swift:253-259 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/BetterShot/PathBuilder.swift:205` it does not close everything it opens, so those exact lines 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) Sources/BetterShot/AnnotationBackgroundInspector.swift:14 — Sources/BetterShot/AnnotationBackgroundInspector.swift:14-20 | Sources/BetterShot/RecordingStudioWindow.swift:2850-2856 — the copies sit in sibling files of 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) Sources/BetterShot/AnnotationBackgroundPresetStore.swift:187 — Sources/BetterShot/AnnotationBackgroundPresetStore.swift:187-193 | Sources/BetterShot/RecordingStudioStylePresetStore.swift:136-142 — before extracting anything, compare `Sources/BetterShot/AnnotationBackgroundPresetStore.swift` and `Sources/BetterShot/RecordingStudioStylePresetStore.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) Sources/BetterShot/CameraRecordingManager.swift:462 — Sources/BetterShot/CameraRecordingManager.swift:462-468 | Sources/BetterShot/ScreenRecordingManager.swift:1130-1137 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×4
  • Edited copy of a member (19 corresponding lines) Sources/Settings/SettingsComponents.swift:248 — Sources/Settings/SettingsComponents.swift:248-274 | Sources/Views/OnboardingPermissionsView.swift:180-198 — 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) Sources/BetterShot/RecordingStudioModel.swift:1803 — Sources/BetterShot/RecordingStudioModel.swift:1803-1821 | Sources/BetterShot/RecordingTranscription.swift:125-144 — 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) Sources/BetterShot/CloudUploadOptions.swift:93 — Sources/BetterShot/CloudUploadOptions.swift:93-111 | Sources/BetterShot/RecordingExportOptions.swift:184-205 — 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) Sources/BetterShot/AnnotationMockupEffectsRenderer.swift:42 — Sources/BetterShot/AnnotationMockupEffectsRenderer.swift:42-62 | Sources/BetterShot/AnnotationMockupEffectsRenderer.swift:64-82 — 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 (10 corresponding lines) · ×4
  • Edited copy of a member (10 corresponding lines) REDACTED:256 — REDACTED:256-265 | REDACTED:268-277 — 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) Sources/Sharing/R2Uploader.swift:250 — Sources/Sharing/R2Uploader.swift:250-264 | Sources/Sharing/R2Uploader.swift:266-275 — 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) Sources/BetterShot/Intersect.swift:116 — Sources/BetterShot/Intersect.swift:116-125 | Sources/BetterShot/Intersect.swift:127-136 — 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) Sources/BetterShot/AnnotationBackgroundPresetStore.swift:176 — Sources/BetterShot/AnnotationBackgroundPresetStore.swift:176-185 | Sources/BetterShot/RecordingStudioStylePresetStore.swift:125-134 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×4
  • Edited copy of a member (6 corresponding lines) Sources/BetterShot/Arrowheads.swift:78 — Sources/BetterShot/Arrowheads.swift:78-83 | Sources/BetterShot/Arrowheads.swift:114-119 — 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) Sources/BetterShot/Shapes2d.swift:70 — Sources/BetterShot/Shapes2d.swift:70-77 | Sources/BetterShot/Shapes2d.swift:176-181 — 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) Sources/BetterShot/RecordingSession.swift:475 — Sources/BetterShot/RecordingSession.swift:475-481 | Sources/BetterShot/ScreenshotHistoryStore.swift:110-115 — 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) Sources/BetterShot/AnnotationBackgroundInspector.swift:134 — Sources/BetterShot/AnnotationBackgroundInspector.swift:134-139 | Sources/BetterShot/AnnotationInspectorStyle.swift:325-330 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×4
  • Edited copy of a member (7 corresponding lines) Sources/BetterShot/RecordingAudioExport.swift:194 — Sources/BetterShot/RecordingAudioExport.swift:194-202 | Sources/BetterShot/RecordingStudioExporter.swift:523-529 — 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) Sources/BetterShot/AnnotationCameraGeometry.swift:226 — Sources/BetterShot/AnnotationCameraGeometry.swift:226-232 | Sources/BetterShot/AnnotationCameraGeometry.swift:234-240 — 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) Sources/Capture/RegionSelectionOverlay.swift:245 — Sources/Capture/RegionSelectionOverlay.swift:245-258 | Sources/Views/MenuBarContentView.swift:387-393 — 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) Sources/BetterShot/CameraRecordingManager.swift:454 — Sources/BetterShot/CameraRecordingManager.swift:454-460 | Sources/BetterShot/ScreenRecordingManager.swift:1121-1128 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (3 corresponding lines) · ×4
  • Edited copy of a member (3 corresponding lines) Sources/BetterShot/Intersect.swift:108 — Sources/BetterShot/Intersect.swift:108-110 | Sources/BetterShot/Vec.swift:112-114 — 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) Sources/BetterShot/AnnotationBackgroundRenderer.swift:462 — Sources/BetterShot/AnnotationBackgroundRenderer.swift:462-469 | Sources/Capture/RegionGeometry.swift:13-15 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) Sources/BetterShot/Box.swift:11 — Sources/BetterShot/Box.swift:11-13 | Sources/BetterShot/Vec.swift:10-14 — 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) Sources/BetterShot/CloudUploader.swift:188 — Sources/BetterShot/CloudUploader.swift:188-190 | Sources/Sharing/ShareImageCompressor.swift:68-70 — 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 · Duplicated block (5 lines × 2) · ×4
  • Duplicated block (5 lines × 2) Sources/BetterShot/AnnotationCameraGeometry.swift:244 — Sources/BetterShot/AnnotationCameraGeometry.swift:244-248 | Sources/BetterShot/AnnotationProgressiveBlurGeometry.swift:50-54 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/BetterShot/AnnotationCameraGeometry.swift:244` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) Sources/BetterShot/AnnotationBackgroundPresetStore.swift:141 — Sources/BetterShot/AnnotationBackgroundPresetStore.swift:141-145 | Sources/BetterShot/RecordingStudioStylePresetStore.swift:93-97 — before extracting anything, compare `Sources/BetterShot/AnnotationBackgroundPresetStore.swift` and `Sources/BetterShot/RecordingStudioStylePresetStore.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 61 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 × 2) Sources/BetterShot/AnnotationBackgroundPreviewViews.swift:45 — Sources/BetterShot/AnnotationBackgroundPreviewViews.swift:45-49 | Sources/BetterShot/AnnotationBackgroundRenderer.swift:233-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.
  • Duplicated block (5 lines × 2) Sources/BetterShot/ScreenshotHistoryStore.swift:343 — Sources/BetterShot/ScreenshotHistoryStore.swift:343-347 | Sources/BetterShot/ScreenshotHistoryStore.swift:381-385 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/BetterShot/ScreenshotHistoryStore.swift:343` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
R11 · Import Boundaries · Boundary violation [package · ×4
  • Boundary violation [package:third-party-deep-import] bettershot-landing/components/copy-command.tsx:4 — bettershot-landing/components/copy-command.tsx:4 imports @phosphor-icons/react/dist/ssr, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] bettershot-landing/components/download-dropdown.tsx:3 — bettershot-landing/components/download-dropdown.tsx:3 imports @phosphor-icons/react/dist/ssr, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] bettershot-landing/components/home/faq.tsx:1 — bettershot-landing/components/home/faq.tsx:1 imports @phosphor-icons/react/dist/ssr, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] bettershot-landing/components/share/share-view.tsx:5 — bettershot-landing/components/share/share-view.tsx:5 imports @phosphor-icons/react/dist/ssr, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×3
  • Edited copy of a member (17 corresponding lines) Sources/BetterShot/RecordingClipTimelineView.swift:86 — Sources/BetterShot/RecordingClipTimelineView.swift:86-106 | Sources/BetterShot/RecordingClipTimelineView.swift:108-124 — 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) Sources/BetterShot/AnnotationBackgroundPresetBar.swift:106 — Sources/BetterShot/AnnotationBackgroundPresetBar.swift:106-124 | Sources/BetterShot/RecordingStudioStylePresetBar.swift:96-112 — 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) Sources/BetterShot/RecordingPointerTimeline.swift:383 — Sources/BetterShot/RecordingPointerTimeline.swift:383-399 | Sources/BetterShot/RecordingViewportTimeline.swift:483-504 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×3
  • Edited copy of a member (13 corresponding lines) Sources/Views/TransferStatusCard.swift:304 — Sources/Views/TransferStatusCard.swift:304-316 | Sources/Views/TransferStatusCard.swift:318-339 — 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) Sources/BetterShot/RecordingStudioWindow.swift:1847 — Sources/BetterShot/RecordingStudioWindow.swift:1847-1861 | Sources/Views/TransferStatusCard.swift:290-302 — 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) Sources/BetterShot/Shapes2d.swift:162 — Sources/BetterShot/Shapes2d.swift:162-174 | Sources/BetterShot/Shapes2d.swift:298-310 — 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 · Duplicated block (16 lines × 2) · ×3
  • Duplicated block (16 lines × 2) Sources/BetterShot/AnnotationBackgroundPresetBar.swift:434 — Sources/BetterShot/AnnotationBackgroundPresetBar.swift:434-449 | Sources/BetterShot/RecordingStudioStylePresetBar.swift:414-429 — before extracting anything, compare `Sources/BetterShot/AnnotationBackgroundPresetBar.swift` and `Sources/BetterShot/RecordingStudioStylePresetBar.swift` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 221 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) Sources/BetterShot/CloudUploadOptions.swift:93 — Sources/BetterShot/CloudUploadOptions.swift:93-108 | Sources/BetterShot/RecordingExportOptions.swift:184-199 — the copies sit in sibling files of 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 `Sources/BetterShot/CloudUploadOptions.swift:93` it does not close everything it opens, so those exact lines 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) Sources/Sharing/R2Uploader.swift:195 — Sources/Sharing/R2Uploader.swift:195-210 | Sources/Sharing/R2Uploader.swift:389-404 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×3
  • Duplicated block (14 lines × 2) Sources/BetterShot/AnnotationBackgroundPresetBar.swift:253 — Sources/BetterShot/AnnotationBackgroundPresetBar.swift:253-266 | Sources/BetterShot/RecordingStudioStylePresetBar.swift:235-248 — before extracting anything, compare `Sources/BetterShot/AnnotationBackgroundPresetBar.swift` and `Sources/BetterShot/RecordingStudioStylePresetBar.swift` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 221 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 (14 lines × 2) Sources/BetterShot/AnnotationBackgroundPresetStore.swift:262 — Sources/BetterShot/AnnotationBackgroundPresetStore.swift:262-275 | Sources/BetterShot/RecordingStudioStylePresetStore.swift:178-191 — before extracting anything, compare `Sources/BetterShot/AnnotationBackgroundPresetStore.swift` and `Sources/BetterShot/RecordingStudioStylePresetStore.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 61 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 `Sources/BetterShot/AnnotationBackgroundPresetStore.swift:262` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) Sources/BetterShot/RecordingStudioWindow.swift:2556 — Sources/BetterShot/RecordingStudioWindow.swift:2556-2569 | Sources/BetterShot/RecordingStudioWindow.swift:2624-2637 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/BetterShot/RecordingStudioWindow.swift:2556` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×3
  • Duplicated block (13 lines × 2) Sources/BetterShot/AnnotationBackgroundRenderer.swift:54 — Sources/BetterShot/AnnotationBackgroundRenderer.swift:54-66 | Sources/BetterShot/AnnotationRenderer.swift:230-242 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (13 lines × 2) Sources/BetterShot/AnnotationEditorWindow.swift:410 — Sources/BetterShot/AnnotationEditorWindow.swift:410-422 | Sources/BetterShot/RecordingStudioWindow.swift:185-197 — the copies sit in sibling files of 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 `Sources/BetterShot/AnnotationEditorWindow.swift:410` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (13 lines × 2) Sources/BetterShot/RecordingStudioWindow.swift:2518 — Sources/BetterShot/RecordingStudioWindow.swift:2518-2530 | Sources/BetterShot/RecordingStudioWindow.swift:2744-2756 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/BetterShot/RecordingStudioWindow.swift:2518` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×3
  • Duplicated block (6 lines × 2) Sources/BetterShot/AnnoEditorInteraction.swift:368 — Sources/BetterShot/AnnoEditorInteraction.swift:368-373 | Sources/BetterShot/AnnoEditorInteraction.swift:597-602 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) Sources/BetterShot/StrokePipeline.swift:356 — Sources/BetterShot/StrokePipeline.swift:356-361 | Sources/BetterShot/StrokePipeline.swift:410-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.
  • Duplicated block (6 lines × 2) Sources/Services/AppUpdater.swift:61 — Sources/Services/AppUpdater.swift:61-66 | Sources/Services/AppUpdater.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. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Services/AppUpdater.swift:61` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D6 · Cohesion (LCOM4) · Low cohesion · ×3
  • Low cohesion: BetterShotDelegate (LCOM4 6) Sources/App/BetterShotDelegate.swift:5 — BetterShotDelegate'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: AnnoDocument (LCOM4 4) Sources/BetterShot/Document.swift:6 — AnnoDocument'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: TrayGridMenuButton (LCOM4 4) Sources/Views/MenuBarContentView.swift:366 — TrayGridMenuButton'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.
R10 · Code Duplication · Duplicated block (8 lines × 4 locations) · ×3
  • Duplicated block (8 lines × 4 locations) bettershot-landing/app/blog/bettershot-0-5-2/page.tsx:225 — bettershot-landing/app/blog/bettershot-0-5-2/page.tsx:225 · bettershot-landing/app/blog/bettershot-0-5-2/page.tsx:308 · bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:163 · bettershot-landing/app/blog/loom-alternative/page.tsx:266 — the 3 copies are spread across 3 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
  • Duplicated block (8 lines × 4 locations) bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:161 — bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:161 · bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:299 · bettershot-landing/app/blog/loom-alternative/page.tsx:264 · bettershot-landing/app/blog/loom-alternative/page.tsx:302 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
  • Duplicated block (8 lines × 4 locations) bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:290 — bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:290 · bettershot-landing/app/blog/cleanshot-x-capcut-loom-alternative/page.tsx:276 · bettershot-landing/app/page.tsx:116 · bettershot-landing/app/page.tsx:181 — the 4 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R7 · Dead Code · Dead file (~66 LoC) · ×3
  • Dead file (~66 LoC) bettershot-landing/components/ui/accordion.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~66 LoC) bettershot-landing/components/ui/alert.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~66 LoC) bettershot-landing/components/ui/tabs.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
AC1 · Text alternatives · <video> without a captions track · ×2
  • <video> without a captions track bettershot-landing/components/demo-gallery.tsx:59 — Video with no captions <track> offers no captions. Add a <track kind="captions"> pointing at a WebVTT file for this video (or confirm captions are provided another way).
  • <video> without a captions track bettershot-landing/components/share/video-player.tsx:160 — Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation).
AC1 · Text alternatives · <canvas> without a text alternative · ×2
  • <canvas> without a text alternative bettershot-landing/components/ui/globe.tsx:76 — 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.
  • <canvas> without a text alternative bettershot-landing/components/ui/pixelcards.tsx:71 — 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.
D30 · Dependency Vulnerabilities · Medium CVE · ×2
  • REDACTED
  • REDACTED
D35 · Change Coupling · Change coupling · ×2
  • Change coupling: layout.tsx ↔ page.tsx bettershot-landing/app/layout.tsx:1 — `bettershot-landing/app/layout.tsx` and `bettershot-landing/app/page.tsx` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise 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 `3fb63868` docs: correct minimum macOS requirement to 14; `b9e08b5f` refactor: update landing, download, blog pages and global styles, rem…; `f29513cc` feat: add editor demo component and dynamic OpenGraph/Twitter images — run `git show` on any of them.
  • Change coupling: BetterShotApp.swift ↔ MenuBarContentView.swift Sources/App/BetterShotApp.swift:1 — `Sources/App/BetterShotApp.swift` and `Sources/Views/MenuBarContentView.swift` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `87c95b06` Remove notch toast notifications and keep action feedback inline; `60b019ca` fix: restore editor full screen and menu tray capture handoff; `6c89b175` refactor: replace MenuBarExtra with popover controller and add toast,… — run `git show` on any of them.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×2
  • Edited copy of a member (16 corresponding lines) Sources/BetterShot/RecordingExportReframe.swift:118 — Sources/BetterShot/RecordingExportReframe.swift:118-133 | Sources/BetterShot/RecordingViewportTimeline.swift:239-256 — 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) Sources/BetterShot/CameraRecordingManager.swift:559 — Sources/BetterShot/CameraRecordingManager.swift:559-574 | Sources/BetterShot/ScreenRecordingManager.swift:1276-1294 — 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 (30 corresponding lines) · ×2
  • Edited copy of a member (30 corresponding lines) Sources/BetterShot/TeleprompterComposerPresenter.swift:41 — Sources/BetterShot/TeleprompterComposerPresenter.swift:41-70 | Sources/BetterShot/TeleprompterOverlayPresenter.swift:224-262 — 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) Sources/BetterShot/AnnotationCameraGeometry.swift:136 — Sources/BetterShot/AnnotationCameraGeometry.swift:136-165 | Sources/BetterShot/AnnotationCameraGeometry.swift:168-197 — 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 (20 corresponding lines) · ×2
  • Edited copy of a member (20 corresponding lines) Sources/Settings/PreferencesView.swift:605 — Sources/Settings/PreferencesView.swift:605-624 | Sources/Settings/PreferencesView.swift:626-645 — 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) Sources/BetterShot/AnnotationBackgroundPreviewViews.swift:13 — Sources/BetterShot/AnnotationBackgroundPreviewViews.swift:13-35 | Sources/BetterShot/RecordingStudioWindow.swift:1263-1282 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 9+ corresponding lines) Sources/BetterShot/RecordingClipTimeline.swift:58 — Sources/BetterShot/RecordingClipTimeline.swift:58-66 | Sources/BetterShot/RecordingSession.swift:452-462 | Sources/BetterShot/RecordingTranscription.swift:63-71 — 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) Sources/BetterShot/RecordingSessionRenderer.swift:174 — Sources/BetterShot/RecordingSessionRenderer.swift:174-182 | Sources/BetterShot/ScreenRecordingManager.swift:570-579 | Sources/BetterShot/ScreenRecordingManager.swift:625-633 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×2
  • Edited copy of a member (11 corresponding lines) Sources/BetterShot/AnnotationBackgroundPresetBar.swift:384 — Sources/BetterShot/AnnotationBackgroundPresetBar.swift:384-394 | Sources/BetterShot/RecordingStudioStylePresetBar.swift:364-374 — 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) Sources/BetterShot/AnnotationBackgroundPresetBar.swift:280 — Sources/BetterShot/AnnotationBackgroundPresetBar.swift:280-292 | Sources/BetterShot/RecordingStudioStylePresetBar.swift:262-272 — 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 · Duplicated block (19 lines × 2) · ×2
  • Duplicated block (19 lines × 2) Sources/BetterShot/AnnotationBackgroundPresetBar.swift:155 — Sources/BetterShot/AnnotationBackgroundPresetBar.swift:155-173 | Sources/BetterShot/RecordingStudioStylePresetBar.swift:142-160 — before extracting anything, compare `Sources/BetterShot/AnnotationBackgroundPresetBar.swift` and `Sources/BetterShot/RecordingStudioStylePresetBar.swift` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 221 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 `Sources/BetterShot/AnnotationBackgroundPresetBar.swift:155` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) Sources/BetterShot/AnnotationBackgroundPresetStore.swift:284 — Sources/BetterShot/AnnotationBackgroundPresetStore.swift:284-302 | Sources/BetterShot/RecordingStudioStylePresetStore.swift:196-214 — before extracting anything, compare `Sources/BetterShot/AnnotationBackgroundPresetStore.swift` and `Sources/BetterShot/RecordingStudioStylePresetStore.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×2
  • Duplicated block (13–14 lines × 2) Sources/BetterShot/AnnotationCameraGeometry.swift:137 — Sources/BetterShot/AnnotationCameraGeometry.swift:137-150 | Sources/BetterShot/AnnotationCameraGeometry.swift:169-181 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/BetterShot/AnnotationCameraGeometry.swift:137` 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) Sources/BetterShot/RecordingExportReframe.swift:121 — Sources/BetterShot/RecordingExportReframe.swift:121-133 | Sources/BetterShot/RecordingViewportTimeline.swift:243-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 `Sources/BetterShot/RecordingExportReframe.swift:121` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×2
  • Duplicated block (12 lines × 2) Sources/BetterShot/AnnotationInspectorStyle.swift:272 — Sources/BetterShot/AnnotationInspectorStyle.swift:272-283 | Sources/BetterShot/RecordingStudioWindow.swift:1122-1133 — the copies sit in sibling files of 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 `Sources/BetterShot/AnnotationInspectorStyle.swift:272` it begins part-way through the construct above it, so those exact lines 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) Sources/Views/MenuBarContentView.swift:425 — Sources/Views/MenuBarContentView.swift:425-436 | Sources/Views/MenuBarContentView.swift:440-451 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×2
  • Duplicated block (5 lines × 3) Sources/BetterShot/RecordingExportReframe.swift:121 — Sources/BetterShot/RecordingExportReframe.swift:121-125 | Sources/BetterShot/RecordingPointerTimeline.swift:94-99 | Sources/BetterShot/RecordingViewportTimeline.swift:243-248 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 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 (5 lines × 3) Sources/BetterShot/StrokePipeline.swift:358 — Sources/BetterShot/StrokePipeline.swift:358-362 | Sources/BetterShot/StrokePipeline.swift:412-416 | Sources/BetterShot/StrokePipeline.swift:427-431 — 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.
R10 · Code Duplication · Duplicated block (32 lines × 2 locations) · ×2
  • Duplicated block (32 lines × 2 locations) bettershot-landing/app/blog/bettershot-0-5-2/page.tsx:62 — bettershot-landing/app/blog/bettershot-0-5-2/page.tsx:62 · bettershot-landing/app/blog/loom-alternative/page.tsx:66 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (32 lines × 2 locations) bettershot-landing/app/blog/bettershot-0-5-2/page.tsx:425 — bettershot-landing/app/blog/bettershot-0-5-2/page.tsx:425 · bettershot-landing/app/blog/loom-alternative/page.tsx:388 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (31 lines × 2 locations) · ×2
  • Duplicated block (31 lines × 2 locations) bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:66 — bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:66 · bettershot-landing/app/blog/cleanshot-x-capcut-loom-alternative/page.tsx:67 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (31 lines × 2 locations) bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:397 — bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:397 · bettershot-landing/app/blog/cleanshot-x-capcut-loom-alternative/page.tsx:385 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (10 lines × 3 locations) · ×2
  • Duplicated block (10 lines × 3 locations) bettershot-landing/app/blog/bettershot-0-5-2/page.tsx:243 — bettershot-landing/app/blog/bettershot-0-5-2/page.tsx:243 · bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:193 · bettershot-landing/app/blog/loom-alternative/page.tsx:293 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (10 lines × 3 locations) bettershot-landing/components/download-dropdown.tsx:65 — bettershot-landing/components/download-dropdown.tsx:65 · bettershot-landing/components/download-dropdown.tsx:75 · bettershot-landing/components/download-dropdown.tsx:85 — 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.
R7 · Dead Code · Dead file (~191 LoC) · ×2
  • Dead file (~191 LoC) bettershot-landing/components/ui/use-toast.ts — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~191 LoC) bettershot-landing/hooks/use-toast.ts — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (bettershot-landing/components/ui/toaster.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~166 LoC) · ×2
  • Dead file (~166 LoC) bettershot-landing/components/ui/navigation-menu.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~166 LoC) bettershot-landing/components/ui/scramble.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~157 LoC) · ×2
  • Dead file (~157 LoC) bettershot-landing/components/ui/alert-dialog.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~157 LoC) bettershot-landing/components/ui/following-pointer.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (bettershot-landing/components/ui/following-pointer-demo.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
AC3 · Page structure · Heading level jumps from h1 to h3 · ×1
  • Heading level jumps from h1 to h3 bettershot-landing/app/changelog/page.tsx:90 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
D1 · Cyclomatic Complexity · PointerTimeline.build (cyclomatic 52) · ×1
  • PointerTimeline.build (cyclomatic 52) Sources/BetterShot/RecordingPointerTimeline.swift:125 — PointerTimeline.build has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CurvedArrow.info (cyclomatic 44) · ×1
  • CurvedArrow.info (cyclomatic 44) Sources/BetterShot/CurvedArrow.swift:7 — CurvedArrow.info has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · video-player.VideoPlayer (cyclomatic 44) · ×1
  • video-player.VideoPlayer (cyclomatic 44) bettershot-landing/components/share/video-player.tsx:30 — video-player.VideoPlayer has cyclomatic complexity 44 (threshold 15). Of this number, 20 points are the body's own statements and 24 belong to 6 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · StraightArrow.info (cyclomatic 40) · ×1
  • StraightArrow.info (cyclomatic 40) Sources/BetterShot/StraightArrow.swift:6 — StraightArrow.info has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ShortcutService.performGlobal (cyclomatic 36) · ×1
  • ShortcutService.performGlobal (cyclomatic 36) Sources/Services/ShortcutActions.swift:5 — ShortcutService.performGlobal has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · StudioFrameCompositor.composedImage (cyclomatic 33) · ×1
  • StudioFrameCompositor.composedImage (cyclomatic 33) Sources/BetterShot/RecordingStudioExporter.swift:838 — StudioFrameCompositor.composedImage has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · StrokePipeline.ingest (cyclomatic 33) · ×1
  • StrokePipeline.ingest (cyclomatic 33) Sources/BetterShot/StrokePipeline.swift:60 — StrokePipeline.ingest has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RecordingSessionRenderer.ensureDeliverable (cyclomatic 32) · ×1
  • RecordingSessionRenderer.ensureDeliverable (cyclomatic 32) Sources/BetterShot/RecordingSessionRenderer.swift:29 — RecordingSessionRenderer.ensureDeliverable has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · chart.ChartTooltipContent (cyclomatic 31) · ×1
  • chart.ChartTooltipContent (cyclomatic 31) REDACTED:107 — chart.ChartTooltipContent has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 5 of the 31 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 182, 131). 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.
D1 · Cyclomatic Complexity · AnnotationEditorWindow.performShortcut (cyclomatic 28) · ×1
  • AnnotationEditorWindow.performShortcut (cyclomatic 28) Sources/BetterShot/AnnotationEditorWindow.swift:145 — AnnotationEditorWindow.performShortcut has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · scrubber.Scrubber (cyclomatic 28) · ×1
  • scrubber.Scrubber (cyclomatic 28) bettershot-landing/components/share/scrubber.tsx:17 — scrubber.Scrubber has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 12 of the 28 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 74, 54, 34, …). 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.
D1 · Cyclomatic Complexity · StrokeOutline.buildTracks (cyclomatic 26) · ×1
  • StrokeOutline.buildTracks (cyclomatic 26) Sources/BetterShot/StrokeOutline.swift:78 — StrokeOutline.buildTracks has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · scramble.ScrambleHover (cyclomatic 26) · ×1
  • scramble.ScrambleHover (cyclomatic 26) bettershot-landing/components/ui/scramble.tsx:24 — scramble.ScrambleHover has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 9 function literals inside it that branch (lines 46, 114, 153, …). 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.
D1 · Cyclomatic Complexity · StudioInspector.inspectorContent (cyclomatic 25) · ×1
  • StudioInspector.inspectorContent (cyclomatic 25) Sources/BetterShot/RecordingStudioWindow.swift:2923 — StudioInspector.inspectorContent has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Recording3DMetalView.renderFrame (cyclomatic 24) · ×1
  • Recording3DMetalView.renderFrame (cyclomatic 24) Sources/BetterShot/Recording3DPreview.swift:103 — Recording3DMetalView.renderFrame has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AnnotationCanvas.body (cyclomatic 23) · ×1
  • AnnotationCanvas.body (cyclomatic 23) Sources/BetterShot/AnnotationCanvas.swift:45 — AnnotationCanvas.body has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · EditorButtonStyle.makeBody (cyclomatic 23) · ×1
  • EditorButtonStyle.makeBody (cyclomatic 23) Sources/BetterShot/EditorChrome.swift:50 — EditorButtonStyle.makeBody has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · StrokeOutline.outline (cyclomatic 23) · ×1
  • StrokeOutline.outline (cyclomatic 23) Sources/BetterShot/StrokeOutline.swift:289 — StrokeOutline.outline has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ScrollCaptureController.process (cyclomatic 23) · ×1
  • ScrollCaptureController.process (cyclomatic 23) Sources/Capture/ScrollCaptureController.swift:192 — ScrollCaptureController.process has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · RecordingStudioExporter.pumpVideo (cyclomatic 22) · ×1
  • RecordingStudioExporter.pumpVideo (cyclomatic 22) Sources/BetterShot/RecordingStudioExporter.swift:377 — RecordingStudioExporter.pumpVideo has cyclomatic complexity 22 (threshold 15). Of this number, 16 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · StudioCanvas.body (cyclomatic 22) · ×1
  • StudioCanvas.body (cyclomatic 22) Sources/BetterShot/RecordingStudioWindow.swift:463 — StudioCanvas.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.
D1 · Cyclomatic Complexity · ScreenRecordingManager.finalizeSession (cyclomatic 22) · ×1
  • ScreenRecordingManager.finalizeSession (cyclomatic 22) Sources/BetterShot/ScreenRecordingManager.swift:379 — ScreenRecordingManager.finalizeSession has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AnnotationRenderer.render (cyclomatic 21) · ×1
  • AnnotationRenderer.render (cyclomatic 21) Sources/BetterShot/AnnotationRenderer.swift:92 — AnnotationRenderer.render has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Recording3DInspector.body (cyclomatic 21) · ×1
  • Recording3DInspector.body (cyclomatic 21) Sources/BetterShot/Recording3DInspector.swift:17 — Recording3DInspector.body has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RecordingStudioModel.load (cyclomatic 21) · ×1
  • RecordingStudioModel.load (cyclomatic 21) Sources/BetterShot/RecordingStudioModel.swift:264 — RecordingStudioModel.load has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · RecordingStudioModel.shareToCloud (cyclomatic 21) · ×1
  • RecordingStudioModel.shareToCloud (cyclomatic 21) Sources/BetterShot/RecordingStudioModel.swift:2632 — RecordingStudioModel.shareToCloud has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RecordingStudioLayout.make (cyclomatic 21) · ×1
  • RecordingStudioLayout.make (cyclomatic 21) Sources/BetterShot/RecordingStudioStyle.swift:457 — RecordingStudioLayout.make has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ScrollFrameAnalyzer.frame (cyclomatic 21) · ×1
  • ScrollFrameAnalyzer.frame (cyclomatic 21) Sources/Capture/ScrollFrameAnalyzer.swift:53 — ScrollFrameAnalyzer.frame has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · share.isBlockedHost (cyclomatic 21) · ×1
  • share.isBlockedHost (cyclomatic 21) bettershot-landing/lib/share.ts:50 — share.isBlockedHost has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AnnoEditor.resize (cyclomatic 20) · ×1
  • AnnoEditor.resize (cyclomatic 20) Sources/BetterShot/AnnoEditorInteraction.swift:444 — AnnoEditor.resize has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Recording3DKeyframeEditor.body (cyclomatic 20) · ×1
  • Recording3DKeyframeEditor.body (cyclomatic 20) Sources/BetterShot/Recording3DKeyframeEditor.swift:16 — Recording3DKeyframeEditor.body has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Recording3DTimeline.scene (cyclomatic 20) · ×1
  • Recording3DTimeline.scene (cyclomatic 20) Sources/BetterShot/Recording3DShot.swift:502 — Recording3DTimeline.scene has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PerfectDash.swift.perfectDashProps (cyclomatic 20) · ×1
  • PerfectDash.swift.perfectDashProps (cyclomatic 20) Sources/BetterShot/PerfectDash.swift:9 — PerfectDash.swift.perfectDashProps has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MediaGalleryContent.body (cyclomatic 20) · ×1
  • MediaGalleryContent.body (cyclomatic 20) Sources/Settings/MediaGallery.swift:205 — MediaGalleryContent.body has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PathBuilder.drawCommands (cyclomatic 19) · ×1
  • PathBuilder.drawCommands (cyclomatic 19) Sources/BetterShot/PathBuilder.swift:331 — PathBuilder.drawCommands has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CaptureOrchestrator.processCapturedImage (cyclomatic 19) · ×1
  • CaptureOrchestrator.processCapturedImage (cyclomatic 19) Sources/Capture/CaptureOrchestrator.swift:190 — CaptureOrchestrator.processCapturedImage has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AnnoEditor.pointerUp (cyclomatic 18) · ×1
  • AnnoEditor.pointerUp (cyclomatic 18) Sources/BetterShot/AnnoEditorInteraction.swift:218 — AnnoEditor.pointerUp has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PointerActivityRecorder.recordFrameGeometry (cyclomatic 18) · ×1
  • PointerActivityRecorder.recordFrameGeometry (cyclomatic 18) Sources/BetterShot/RecordingPointerCapture.swift:184 — PointerActivityRecorder.recordFrameGeometry has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · RecordingStudioExporter.run (cyclomatic 18) · ×1
  • RecordingStudioExporter.run (cyclomatic 18) Sources/BetterShot/RecordingStudioExporter.swift:156 — RecordingStudioExporter.run has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · StrokePipeline.computeRadii (cyclomatic 18) · ×1
  • StrokePipeline.computeRadii (cyclomatic 18) Sources/BetterShot/StrokePipeline.swift:225 — StrokePipeline.computeRadii has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · share-view.ShareView (cyclomatic 18) · ×1
  • share-view.ShareView (cyclomatic 18) bettershot-landing/components/share/share-view.tsx:18 — share-view.ShareView has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Recording3DShot.flip (cyclomatic 17) · ×1
  • Recording3DShot.flip (cyclomatic 17) Sources/BetterShot/Recording3DShot.swift:294 — Recording3DShot.flip has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PointerArtworkCapture.styledArtwork (cyclomatic 17) · ×1
  • PointerArtworkCapture.styledArtwork (cyclomatic 17) Sources/BetterShot/RecordingPointerArtworkCapture.swift:16 — PointerArtworkCapture.styledArtwork has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · RecordingStudioModel.makeExportConfiguration (cyclomatic 17) · ×1
  • RecordingStudioModel.makeExportConfiguration (cyclomatic 17) Sources/BetterShot/RecordingStudioModel.swift:1856 — RecordingStudioModel.makeExportConfiguration has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · RecordingStudioContent.performShortcut (cyclomatic 17) · ×1
  • RecordingStudioContent.performShortcut (cyclomatic 17) Sources/BetterShot/RecordingStudioWindow.swift:155 — RecordingStudioContent.performShortcut has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SelectionView.cursor (cyclomatic 17) · ×1
  • SelectionView.cursor (cyclomatic 17) Sources/Capture/RegionSelectionOverlay.swift:385 — SelectionView.cursor has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ImageAlignment.cornerMultipliers (cyclomatic 17) · ×1
  • ImageAlignment.cornerMultipliers (cyclomatic 17) Sources/Models/BackgroundStyle.swift:254 — ImageAlignment.cornerMultipliers has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PreviewCardView.body (cyclomatic 17) · ×1
  • PreviewCardView.body (cyclomatic 17) Sources/Preview/PreviewOverlay.swift:566 — PreviewCardView.body has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MediaGalleryItem.collect (cyclomatic 17) · ×1
  • MediaGalleryItem.collect (cyclomatic 17) Sources/Settings/MediaGallery.swift:33 — MediaGalleryItem.collect has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MediaGalleryCard.body (cyclomatic 17) · ×1
  • MediaGalleryCard.body (cyclomatic 17) Sources/Settings/MediaGallery.swift:391 — MediaGalleryCard.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.
D1 · Cyclomatic Complexity · changelog.getChangelog (cyclomatic 17) · ×1
  • changelog.getChangelog (cyclomatic 17) bettershot-landing/lib/changelog.ts:16 — changelog.getChangelog has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PathBuilder.arc (cyclomatic 16) · ×1
  • PathBuilder.arc (cyclomatic 16) Sources/BetterShot/PathBuilder.swift:73 — PathBuilder.arc has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PathBuilder.forEachDrawSegment (cyclomatic 16) · ×1
  • PathBuilder.forEachDrawSegment (cyclomatic 16) Sources/BetterShot/PathBuilder.swift:447 — PathBuilder.forEachDrawSegment has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ScreenRecordingManager.startRecording (cyclomatic 16) · ×1
  • ScreenRecordingManager.startRecording (cyclomatic 16) Sources/BetterShot/ScreenRecordingManager.swift:153 — ScreenRecordingManager.startRecording has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · image-viewer.ImageViewer (cyclomatic 16) · ×1
  • image-viewer.ImageViewer (cyclomatic 16) bettershot-landing/components/share/image-viewer.tsx:25 — image-viewer.ImageViewer has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 105, 32, 47, …). 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.
D12 · Dependency Hygiene · Deprecated · ×1
  • Deprecated: recharts REDACTED:62 — recharts 2.15.4, declared in REDACTED, is marked deprecated by its publisher: "1.x and 2.x branches are no longer active. Bump to Recharts v3 to receive latest features and bugfixes. See https://github.com/recharts/recharts/wiki/3.0-migration-guide". Replace it with the package or version that message names, or record why this one must stay.
D2 · Cognitive Complexity · PointerTimeline.build (cognitive 79) · ×1
  • PointerTimeline.build (cognitive 79) Sources/BetterShot/RecordingPointerTimeline.swift:125 — PointerTimeline.build has cognitive complexity 79 (threshold 15). Drivers by points: ternaries 16 (31 pts), if/else 11 (19 pts), boolean chains 17, loops 8 (12 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CurvedArrow.info (cognitive 62) · ×1
  • CurvedArrow.info (cognitive 62) Sources/BetterShot/CurvedArrow.swift:7 — CurvedArrow.info has cognitive complexity 62 (threshold 15). Drivers by points: if/else 24 (36 pts), ternaries 7 (14 pts), boolean chains 12 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StudioFrameCompositor.composedImage (cognitive 61) · ×1
  • StudioFrameCompositor.composedImage (cognitive 61) Sources/BetterShot/RecordingStudioExporter.swift:838 — StudioFrameCompositor.composedImage has cognitive complexity 61 (threshold 15). Drivers by points: if/else 22 (45 pts), boolean chains 8, loops 2 (5 pts), ternaries 3 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StrokeOutline.buildTracks (cognitive 52) · ×1
  • StrokeOutline.buildTracks (cognitive 52) Sources/BetterShot/StrokeOutline.swift:78 — StrokeOutline.buildTracks has cognitive complexity 52 (threshold 15). Drivers by points: if/else 16 (31 pts), boolean chains 8, ternaries 3 (8 pts), loops 2 (5 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StrokePipeline.ingest (cognitive 51) · ×1
  • StrokePipeline.ingest (cognitive 51) Sources/BetterShot/StrokePipeline.swift:60 — StrokePipeline.ingest has cognitive complexity 51 (threshold 15). Drivers by points: if/else 15 (25 pts), loops 7 (13 pts), boolean chains 9, ternaries 2 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StraightArrow.info (cognitive 49) · ×1
  • StraightArrow.info (cognitive 49) Sources/BetterShot/StraightArrow.swift:6 — StraightArrow.info has cognitive complexity 49 (threshold 15). Drivers by points: if/else 17 (26 pts), boolean chains 17, ternaries 6 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ShortcutService.performGlobal (cognitive 45) · ×1
  • ShortcutService.performGlobal (cognitive 45) Sources/Services/ShortcutActions.swift:5 — ShortcutService.performGlobal has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (34 pts), ternaries 2 (5 pts), error handling 1 (3 pts), boolean chains 2, match/switch 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RecordingStudioExporter.pumpVideo (cognitive 36) · ×1
  • RecordingStudioExporter.pumpVideo (cognitive 36) Sources/BetterShot/RecordingStudioExporter.swift:377 — RecordingStudioExporter.pumpVideo has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (28 pts), loops 6 (7 pts), boolean chains 1 (nesting depth added 15). Of this number, 27 points are the body's own statements and 9 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RecordingStudioModel.shareToCloud (cognitive 34) · ×1
  • RecordingStudioModel.shareToCloud (cognitive 34) Sources/BetterShot/RecordingStudioModel.swift:2632 — RecordingStudioModel.shareToCloud has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (21 pts), error handling 4 (6 pts), boolean chains 4, ternaries 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StudioInspector.inspectorContent (cognitive 34) · ×1
  • StudioInspector.inspectorContent (cognitive 34) Sources/BetterShot/RecordingStudioWindow.swift:2923 — StudioInspector.inspectorContent has cognitive complexity 34 (threshold 15). Drivers by points: if/else 18 (25 pts), boolean chains 6, ternaries 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PathBuilder.forEachDrawSegment (cognitive 33) · ×1
  • PathBuilder.forEachDrawSegment (cognitive 33) Sources/BetterShot/PathBuilder.swift:447 — PathBuilder.forEachDrawSegment has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (18 pts), ternaries 2 (6 pts), boolean chains 3, loops 2 (3 pts), match/switch 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.
D2 · Cognitive Complexity · RecordingSessionRenderer.ensureDeliverable (cognitive 33) · ×1
  • RecordingSessionRenderer.ensureDeliverable (cognitive 33) Sources/BetterShot/RecordingSessionRenderer.swift:29 — RecordingSessionRenderer.ensureDeliverable has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 14, ternaries 10, if/else 7 (8 pts), error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · StudioCanvas.body (cognitive 33) · ×1
  • StudioCanvas.body (cognitive 33) Sources/BetterShot/RecordingStudioWindow.swift:463 — StudioCanvas.body has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 8, ternaries 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StrokeOutline.simplifyTrack (cognitive 32) · ×1
  • StrokeOutline.simplifyTrack (cognitive 32) Sources/BetterShot/StrokeOutline.swift:37 — StrokeOutline.simplifyTrack has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 3 (15 pts), if/else 3 (8 pts), loops 3 (8 pts), boolean chains 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.
D2 · Cognitive Complexity · StrokePipeline.computeRadii (cognitive 32) · ×1
  • StrokePipeline.computeRadii (cognitive 32) Sources/BetterShot/StrokePipeline.swift:225 — StrokePipeline.computeRadii has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 4 (6 pts), ternaries 2 (6 pts), boolean chains 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MediaGalleryItem.collect (cognitive 32) · ×1
  • MediaGalleryItem.collect (cognitive 32) Sources/Settings/MediaGallery.swift:33 — MediaGalleryItem.collect has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 5 (11 pts), loops 5 (8 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Recording3DMetalView.renderFrame (cognitive 31) · ×1
  • Recording3DMetalView.renderFrame (cognitive 31) Sources/BetterShot/Recording3DPreview.swift:103 — Recording3DMetalView.renderFrame has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 10, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RecordingStudioModel.load (cognitive 31) · ×1
  • RecordingStudioModel.load (cognitive 31) Sources/BetterShot/RecordingStudioModel.swift:264 — RecordingStudioModel.load has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19 (25 pts), boolean chains 4, error handling 2 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · StrokeOutline.outline (cognitive 31) · ×1
  • StrokeOutline.outline (cognitive 31) Sources/BetterShot/StrokeOutline.swift:289 — StrokeOutline.outline has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 8, loops 3 (7 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ScreenRecordingManager.finalizeSession (cognitive 30) · ×1
  • ScreenRecordingManager.finalizeSession (cognitive 30) Sources/BetterShot/ScreenRecordingManager.swift:379 — ScreenRecordingManager.finalizeSession has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (21 pts), error handling 2 (5 pts), boolean chains 3, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrayGridMenuButton.mouseDown (cognitive 30) · ×1
  • TrayGridMenuButton.mouseDown (cognitive 30) Sources/Views/MenuBarContentView.swift:405 — TrayGridMenuButton.mouseDown has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (26 pts), loops 2 (4 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · scramble.ScrambleHover (cognitive 30) · ×1
  • scramble.ScrambleHover (cognitive 30) bettershot-landing/components/ui/scramble.tsx:24 — scramble.ScrambleHover has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 2 (4 pts), ternaries 3 (4 pts), boolean chains 3, match/switch 1 (nesting depth added 10). None of this is in the body itself: all 30 points belong to 9 function literals inside it that branch (lines 46, 71, 42, …). 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.
D2 · Cognitive Complexity · Recording3DKeyframeEditor.body (cognitive 29) · ×1
  • Recording3DKeyframeEditor.body (cognitive 29) Sources/BetterShot/Recording3DKeyframeEditor.swift:16 — Recording3DKeyframeEditor.body has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 7 (13 pts), if/else 9 (11 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.
D2 · Cognitive Complexity · Recording3DShot.flip (cognitive 29) · ×1
  • Recording3DShot.flip (cognitive 29) Sources/BetterShot/Recording3DShot.swift:294 — Recording3DShot.flip has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (21 pts), ternaries 6 (7 pts), loops 1 (nesting depth added 8). Of this number, 26 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PreviewCardView.body (cognitive 29) · ×1
  • PreviewCardView.body (cognitive 29) Sources/Preview/PreviewOverlay.swift:566 — PreviewCardView.body has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 9 (12 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.
D2 · Cognitive Complexity · AnnoEditor.resize (cognitive 28) · ×1
  • AnnoEditor.resize (cognitive 28) Sources/BetterShot/AnnoEditorInteraction.swift:444 — AnnoEditor.resize has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 7 (14 pts), if/else 8 (10 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AnnotationRenderer.render (cognitive 27) · ×1
  • AnnotationRenderer.render (cognitive 27) Sources/BetterShot/AnnotationRenderer.swift:92 — AnnotationRenderer.render has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 11, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScreenRecordingManager.startRecording (cognitive 27) · ×1
  • ScreenRecordingManager.startRecording (cognitive 27) Sources/BetterShot/ScreenRecordingManager.swift:153 — ScreenRecordingManager.startRecording has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 1, error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · chart.ChartTooltipContent (cognitive 27) · ×1
  • chart.ChartTooltipContent (cognitive 27) REDACTED:107 — chart.ChartTooltipContent has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 14, ternaries 6 (9 pts), if/else 4 (nesting depth added 3). Most of this is not in the body itself: 4 of the 27 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 182, 131). 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.
D2 · Cognitive Complexity · Recording3DInspector.body (cognitive 26) · ×1
  • Recording3DInspector.body (cognitive 26) Sources/BetterShot/Recording3DInspector.swift:17 — Recording3DInspector.body has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 4 (8 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · scrubber.Scrubber (cognitive 26) · ×1
  • scrubber.Scrubber (cognitive 26) bettershot-landing/components/share/scrubber.tsx:17 — scrubber.Scrubber has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11, ternaries 9, boolean chains 6. Most of this is not in the body itself: 10 of the 26 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 74, 54, 34, …). 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.
D2 · Cognitive Complexity · video-player.VideoPlayer (cognitive 26) · ×1
  • video-player.VideoPlayer (cognitive 26) bettershot-landing/components/share/video-player.tsx:30 — video-player.VideoPlayer has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 14, if/else 5 (6 pts), ternaries 5, match/switch 1 (nesting depth added 1). Of this number, 15 points are the body's own statements and 11 belong to 6 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · EditorButtonStyle.makeBody (cognitive 25) · ×1
  • EditorButtonStyle.makeBody (cognitive 25) Sources/BetterShot/EditorChrome.swift:50 — EditorButtonStyle.makeBody has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 14 (17 pts), boolean chains 7, if/else 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · MediaGalleryContent.body (cognitive 25) · ×1
  • MediaGalleryContent.body (cognitive 25) Sources/Settings/MediaGallery.swift:205 — MediaGalleryContent.body has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 8 (13 pts), if/else 9 (10 pts), match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · changelog.getChangelog (cognitive 25) · ×1
  • changelog.getChangelog (cognitive 25) bettershot-landing/lib/changelog.ts:16 — changelog.getChangelog has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 5, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AnnoEditor.pointerUp (cognitive 24) · ×1
  • AnnoEditor.pointerUp (cognitive 24) Sources/BetterShot/AnnoEditorInteraction.swift:218 — AnnoEditor.pointerUp has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 7, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · InspectorSliderMarkers.body (cognitive 24) · ×1
  • InspectorSliderMarkers.body (cognitive 24) Sources/BetterShot/AnnotationInspectorSlider.swift:499 — InspectorSliderMarkers.body has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (7 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PathBuilder.drawCommands (cognitive 24) · ×1
  • PathBuilder.drawCommands (cognitive 24) Sources/BetterShot/PathBuilder.swift:331 — PathBuilder.drawCommands has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 10, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CaptureOrchestrator.processCapturedImage (cognitive 24) · ×1
  • CaptureOrchestrator.processCapturedImage (cognitive 24) Sources/Capture/CaptureOrchestrator.swift:190 — CaptureOrchestrator.processCapturedImage has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5, error handling 2 (4 pts), match/switch 1, 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AppUpdater.checkForUpdates (cognitive 23) · ×1
  • AppUpdater.checkForUpdates (cognitive 23) Sources/Services/AppUpdater.swift:77 — AppUpdater.checkForUpdates has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4, ternaries 1 (2 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AnnoEditor.beginSelectInteraction (cognitive 22) · ×1
  • AnnoEditor.beginSelectInteraction (cognitive 22) Sources/BetterShot/AnnoEditorInteraction.swift:37 — AnnoEditor.beginSelectInteraction has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AnnotationCanvas.body (cognitive 22) · ×1
  • AnnotationCanvas.body (cognitive 22) Sources/BetterShot/AnnotationCanvas.swift:45 — AnnotationCanvas.body has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 12, ternaries 6, if/else 2 (3 pts), match/switch 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · Recording3DTimeline.scene (cognitive 22) · ×1
  • Recording3DTimeline.scene (cognitive 22) Sources/BetterShot/Recording3DShot.swift:502 — Recording3DTimeline.scene has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 12, if/else 6 (7 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · RecordingStudioLayout.make (cognitive 22) · ×1
  • RecordingStudioLayout.make (cognitive 22) Sources/BetterShot/RecordingStudioStyle.swift:457 — RecordingStudioLayout.make has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 5 (8 pts), if/else 6 (7 pts), boolean chains 6, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScreenshotHistoryStore.commitAnnotations (cognitive 22) · ×1
  • ScreenshotHistoryStore.commitAnnotations (cognitive 22) Sources/BetterShot/ScreenshotHistoryStore.swift:293 — ScreenshotHistoryStore.commitAnnotations has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 1, 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.
D2 · Cognitive Complexity · ScrollCaptureController.process (cognitive 22) · ×1
  • ScrollCaptureController.process (cognitive 22) Sources/Capture/ScrollCaptureController.swift:192 — ScrollCaptureController.process has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, if/else 9, ternaries 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · share.isBlockedHost (cognitive 22) · ×1
  • share.isBlockedHost (cognitive 22) bettershot-landing/lib/share.ts:50 — share.isBlockedHost has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 7 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CropRectEditor.resizeCorner (cognitive 21) · ×1
  • CropRectEditor.resizeCorner (cognitive 21) Sources/BetterShot/AnnotationCropModels.swift:288 — CropRectEditor.resizeCorner has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 8 (12 pts), if/else 5 (8 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RecordingAudioExporter.export (cognitive 21) · ×1
  • RecordingAudioExporter.export (cognitive 21) Sources/BetterShot/RecordingAudioExport.swift:100 — RecordingAudioExporter.export has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2 (5 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PerfectDash.swift.perfectDashProps (cognitive 21) · ×1
  • PerfectDash.swift.perfectDashProps (cognitive 21) Sources/BetterShot/PerfectDash.swift:9 — PerfectDash.swift.perfectDashProps has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), match/switch 3 (5 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ScrollCaptureController.autoScrollLoop (cognitive 21) · ×1
  • ScrollCaptureController.autoScrollLoop (cognitive 21) Sources/Capture/ScrollCaptureController.swift:300 — ScrollCaptureController.autoScrollLoop has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 6, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PreviewOverlay.share (cognitive 21) · ×1
  • PreviewOverlay.share (cognitive 21) Sources/Preview/PreviewOverlay.swift:255 — PreviewOverlay.share has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (15 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.
D2 · Cognitive Complexity · MediaGalleryCard.body (cognitive 21) · ×1
  • MediaGalleryCard.body (cognitive 21) Sources/Settings/MediaGallery.swift:391 — MediaGalleryCard.body has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 10 (13 pts), if/else 7 (8 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AnnoShapeDrawing.drawShape (cognitive 20) · ×1
  • AnnoShapeDrawing.drawShape (cognitive 20) Sources/BetterShot/AnnoShapeDrawing.swift:63 — AnnoShapeDrawing.drawShape has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 1 (4 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PointerActivityRecorder.recordFrameGeometry (cognitive 20) · ×1
  • PointerActivityRecorder.recordFrameGeometry (cognitive 20) Sources/BetterShot/RecordingPointerCapture.swift:184 — PointerActivityRecorder.recordFrameGeometry has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 7 (8 pts), ternaries 1 (2 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · RecordingStudioExporter.run (cognitive 20) · ×1
  • RecordingStudioExporter.run (cognitive 20) Sources/BetterShot/RecordingStudioExporter.swift:156 — RecordingStudioExporter.run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 2, error handling 1, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · RecordingStudioContent.performShortcut (cognitive 20) · ×1
  • RecordingStudioContent.performShortcut (cognitive 20) Sources/BetterShot/RecordingStudioWindow.swift:155 — RecordingStudioContent.performShortcut has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ViewportTimeline.build (cognitive 20) · ×1
  • ViewportTimeline.build (cognitive 20) Sources/BetterShot/RecordingViewportTimeline.swift:271 — ViewportTimeline.build has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScrollFrameAnalyzer.frame (cognitive 20) · ×1
  • ScrollFrameAnalyzer.frame (cognitive 20) Sources/Capture/ScrollFrameAnalyzer.swift:53 — ScrollFrameAnalyzer.frame has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, if/else 4, ternaries 3, match/switch 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · AnnotationEditorWindow.performShortcut (cognitive 19) · ×1
  • AnnotationEditorWindow.performShortcut (cognitive 19) Sources/BetterShot/AnnotationEditorWindow.swift:145 — AnnotationEditorWindow.performShortcut has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6, ternaries 1 (2 pts), match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReframeTrack.build (cognitive 19) · ×1
  • ReframeTrack.build (cognitive 19) Sources/BetterShot/RecordingExportReframe.swift:150 — ReframeTrack.build has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PointerArtworkCapture.styledArtwork (cognitive 19) · ×1
  • PointerArtworkCapture.styledArtwork (cognitive 19) Sources/BetterShot/RecordingPointerArtworkCapture.swift:16 — PointerArtworkCapture.styledArtwork has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (11 pts), ternaries 4, boolean chains 2, loops 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · CropRectEditor.resizeFromCenter (cognitive 18) · ×1
  • CropRectEditor.resizeFromCenter (cognitive 18) Sources/BetterShot/AnnotationCropModels.swift:226 — CropRectEditor.resizeFromCenter has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RecordingKeystrokeRecorder.handle (cognitive 18) · ×1
  • RecordingKeystrokeRecorder.handle (cognitive 18) Sources/BetterShot/RecordingKeystrokeCapture.swift:196 — RecordingKeystrokeRecorder.handle has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, match/switch 1, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RegionSelectionOverlay.showOverlays (cognitive 18) · ×1
  • RegionSelectionOverlay.showOverlays (cognitive 18) Sources/Capture/RegionSelectionOverlay.swift:68 — RegionSelectionOverlay.showOverlays has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SilenceDetector.windowLevels (cognitive 18) · ×1
  • SilenceDetector.windowLevels (cognitive 18) Sources/Services/SilenceDetector.swift:55 — SilenceDetector.windowLevels has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SvgInk.finishPartition (cognitive 17) · ×1
  • SvgInk.finishPartition (cognitive 17) Sources/BetterShot/InkPath.swift:222 — SvgInk.finishPartition has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7 (8 pts), if/else 4 (6 pts), loops 2, boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PointerStreamSanitizer.buildStream (cognitive 17) · ×1
  • PointerStreamSanitizer.buildStream (cognitive 17) Sources/BetterShot/RecordingPointerStream.swift:125 — PointerStreamSanitizer.buildStream has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 4, ternaries 2 (4 pts), loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StudioFrameCompositor.renderBackdrop (cognitive 17) · ×1
  • StudioFrameCompositor.renderBackdrop (cognitive 17) Sources/BetterShot/RecordingStudioExporter.swift:1373 — StudioFrameCompositor.renderBackdrop has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, ternaries 1 (2 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TextMeasure.buildGlyphPath (cognitive 17) · ×1
  • TextMeasure.buildGlyphPath (cognitive 17) Sources/BetterShot/TextMeasure.swift:221 — TextMeasure.buildGlyphPath has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppUpdater.checkForUpdatesQuietly (cognitive 17) · ×1
  • AppUpdater.checkForUpdatesQuietly (cognitive 17) Sources/Services/AppUpdater.swift:39 — AppUpdater.checkForUpdatesQuietly has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 6, 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.
D2 · Cognitive Complexity · ShortcutService.action (cognitive 17) · ×1
  • ShortcutService.action (cognitive 17) REDACTED:302 — ShortcutService.action has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (8 pts), loops 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · image-viewer.ImageViewer (cognitive 17) · ×1
  • image-viewer.ImageViewer (cognitive 17) bettershot-landing/components/share/image-viewer.tsx:25 — image-viewer.ImageViewer has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (8 pts), if/else 7, boolean chains 2 (nesting depth added 2). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 105, 32, 47, …). 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.
D2 · Cognitive Complexity · share-view.ShareView (cognitive 17) · ×1
  • share-view.ShareView (cognitive 17) bettershot-landing/components/share/share-view.tsx:18 — share-view.ShareView has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 8 (9 pts), boolean chains 8 (nesting depth added 1). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · AnnoCanvasNSView.drawOverlays (cognitive 16) · ×1
  • AnnoCanvasNSView.drawOverlays (cognitive 16) Sources/BetterShot/AnnoCanvasLayerView.swift:167 — AnnoCanvasNSView.drawOverlays has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AnnoEditor.handle (cognitive 16) · ×1
  • AnnoEditor.handle (cognitive 16) Sources/BetterShot/AnnoEditor.swift:327 — AnnoEditor.handle has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (4 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.
D2 · Cognitive Complexity · CameraMovieWriter.writeVideoSample (cognitive 16) · ×1
  • CameraMovieWriter.writeVideoSample (cognitive 16) Sources/BetterShot/CameraRecordingManager.swift:470 — CameraMovieWriter.writeVideoSample has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · PathBuilder.arc (cognitive 16) · ×1
  • PathBuilder.arc (cognitive 16) Sources/BetterShot/PathBuilder.swift:73 — PathBuilder.arc has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, boolean chains 4, ternaries 3 (4 pts), loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Recording3DTimeline.init (cognitive 16) · ×1
  • Recording3DTimeline.init (cognitive 16) Sources/BetterShot/Recording3DShot.swift:438 — Recording3DTimeline.init has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (6 pts), if/else 3 (5 pts), boolean chains 4, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RecordingStudioModel.makeExportConfiguration (cognitive 16) · ×1
  • RecordingStudioModel.makeExportConfiguration (cognitive 16) Sources/BetterShot/RecordingStudioModel.swift:1856 — RecordingStudioModel.makeExportConfiguration has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 9, boolean chains 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.
D2 · Cognitive Complexity · RecordingStudioModel.export (cognitive 16) · ×1
  • RecordingStudioModel.export (cognitive 16) Sources/BetterShot/RecordingStudioModel.swift:2371 — RecordingStudioModel.export has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 4 (5 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScrollFrameAnalyzer.scrollbarWidth (cognitive 16) · ×1
  • ScrollFrameAnalyzer.scrollbarWidth (cognitive 16) Sources/Capture/ScrollFrameAnalyzer.swift:95 — ScrollFrameAnalyzer.scrollbarWidth has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ImageAlignment.cornerMultipliers (cognitive 16) · ×1
  • ImageAlignment.cornerMultipliers (cognitive 16) Sources/Models/BackgroundStyle.swift:254 — ImageAlignment.cornerMultipliers has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 12, ternaries 4. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · PreviewOverlay.scheduleDismiss (cognitive 16) · ×1
  • PreviewOverlay.scheduleDismiss (cognitive 16) Sources/Preview/PreviewOverlay.swift:465 — PreviewOverlay.scheduleDismiss has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (7 pts), loops 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D35 · Change Coupling · Change-coupling hub · ×1
  • Change-coupling hub: PreferencesView.swift → BetterShotApp.swift, BetterShotDelegate.swift, ScreenshotHistoryStore.swift, CaptureOrchestrator.swift, ScreenCapture.swift Sources/Settings/PreferencesView.swift — `Sources/Settings/PreferencesView.swift` changes together with 5 other files — `Sources/App/BetterShotApp.swift`, `Sources/App/BetterShotDelegate.swift`, `Sources/BetterShot/ScreenshotHistoryStore.swift`, `Sources/Capture/CaptureOrchestrator.swift`, `Sources/Capture/ScreenCapture.swift` — none of which declares a dependency on it: one file is the hub of 5 separate couplings, not 5 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 5.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Edited copy of a member (44 corresponding lines) · ×1
  • Edited copy of a member (44 corresponding lines) Sources/BetterShot/InkPath.swift:63 — Sources/BetterShot/InkPath.swift:63-135 | Sources/BetterShot/PathBuilder.swift:73-154 — 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 · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (4 members, 50+ identical tokens) Sources/BetterShot/AnnotationBackgroundPresetBar.swift:434 — Sources/BetterShot/AnnotationBackgroundPresetBar.swift:434-449 | Sources/BetterShot/AnnotationInspectorStyle.swift:269-283 | Sources/BetterShot/RecordingStudioStylePresetBar.swift:414-429 | Sources/BetterShot/RecordingStudioWindow.swift:1119-1133 — 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 (37 corresponding lines) · ×1
  • Edited copy of a member (37 corresponding lines) Sources/Services/AppUpdater.swift:39 — Sources/Services/AppUpdater.swift:39-75 | Sources/Services/AppUpdater.swift:77-135 — 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 (67 corresponding lines) · ×1
  • Edited copy of a member (67 corresponding lines) Sources/BetterShot/AnnotationBackgroundPresetBar.swift:155 — Sources/BetterShot/AnnotationBackgroundPresetBar.swift:155-221 | Sources/BetterShot/RecordingStudioStylePresetBar.swift:142-208 — 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 copy of a member (54 corresponding lines) · ×1
  • Edited copy of a member (54 corresponding lines) Sources/BetterShot/AnnotationBackgroundPresetBar.swift:46 — Sources/BetterShot/AnnotationBackgroundPresetBar.swift:46-104 | Sources/BetterShot/RecordingStudioStylePresetBar.swift:41-94 — These two members are one piece of code written twice and then edited apart: 54 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (28 corresponding lines) · ×1
  • Edited copy of a member (28 corresponding lines) Sources/BetterShot/RecordingStudioWindow.swift:2167 — Sources/BetterShot/RecordingStudioWindow.swift:2167-2197 | Sources/BetterShot/TeleprompterOverlayPresenter.swift:45-72 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (38 corresponding lines) · ×1
  • Edited copy of a member (38 corresponding lines) Sources/Sharing/R2Uploader.swift:182 — Sources/Sharing/R2Uploader.swift:182-219 | Sources/Sharing/R2Uploader.swift:375-422 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (34 corresponding lines) · ×1
  • Edited copy of a member (34 corresponding lines) Sources/BetterShot/AnnotationEditorWindow.swift:407 — Sources/BetterShot/AnnotationEditorWindow.swift:407-440 | Sources/BetterShot/RecordingStudioWindow.swift:182-218 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (31 corresponding lines) · ×1
  • Edited copy of a member (31 corresponding lines) Sources/BetterShot/ScreenshotHistoryStore.swift:169 — Sources/BetterShot/ScreenshotHistoryStore.swift:169-199 | Sources/BetterShot/ScreenshotHistoryStore.swift:201-233 — 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 (21 corresponding lines) · ×1
  • Edited copy of a member (21 corresponding lines) Sources/BetterShot/AnnotationBackgroundPresetStore.swift:258 — Sources/BetterShot/AnnotationBackgroundPresetStore.swift:258-282 | Sources/BetterShot/RecordingStudioStylePresetStore.swift:174-194 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×1
  • Edited copy of a member (23 corresponding lines) Sources/Views/TransferStatusCard.swift:228 — Sources/Views/TransferStatusCard.swift:228-252 | Sources/Views/TransferStatusCard.swift:254-276 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 10+ corresponding lines) Sources/BetterShot/Intersect.swift:61 — Sources/BetterShot/Intersect.swift:61-70 | Sources/BetterShot/Intersect.swift:86-95 | Sources/BetterShot/Intersect.swift:97-106 — 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 copy of a member (5 corresponding lines) · ×1
  • Edited copy of a member (5 corresponding lines) Sources/BetterShot/Arrowheads.swift:66 — Sources/BetterShot/Arrowheads.swift:66-70 | Sources/BetterShot/Arrowheads.swift:72-76 — 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) · ×1
  • Edited copy of a member (14 corresponding lines) Sources/BetterShot/AnnotationBackgroundPresetStore.swift:149 — Sources/BetterShot/AnnotationBackgroundPresetStore.swift:149-165 | Sources/BetterShot/RecordingStudioStylePresetStore.swift:101-114 — 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 copies of one member (3 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 8+ corresponding lines) Sources/BetterShot/RecordingSession.swift:432 — Sources/BetterShot/RecordingSession.swift:432-440 | Sources/BetterShot/RecordingSession.swift:464-471 | Sources/BetterShot/Shape.swift:342-350 — 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 · Duplicated block (64 lines × 2) · ×1
  • Duplicated block (64 lines × 2) Sources/BetterShot/AnnotationBackgroundPresetBar.swift:294 — Sources/BetterShot/AnnotationBackgroundPresetBar.swift:294-357 | Sources/BetterShot/RecordingStudioStylePresetBar.swift:274-337 — before extracting anything, compare `Sources/BetterShot/AnnotationBackgroundPresetBar.swift` and `Sources/BetterShot/RecordingStudioStylePresetBar.swift` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 221 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (40 lines × 2) · ×1
  • Duplicated block (40 lines × 2) Sources/BetterShot/AnnotationBackgroundPresetBar.swift:182 — Sources/BetterShot/AnnotationBackgroundPresetBar.swift:182-221 | Sources/BetterShot/RecordingStudioStylePresetBar.swift:169-208 — before extracting anything, compare `Sources/BetterShot/AnnotationBackgroundPresetBar.swift` and `Sources/BetterShot/RecordingStudioStylePresetBar.swift` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 221 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 `Sources/BetterShot/AnnotationBackgroundPresetBar.swift:182` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×1
  • Duplicated block (23 lines × 2) Sources/BetterShot/AnnotationBackgroundPresetBar.swift:360 — Sources/BetterShot/AnnotationBackgroundPresetBar.swift:360-382 | Sources/BetterShot/RecordingStudioStylePresetBar.swift:340-362 — before extracting anything, compare `Sources/BetterShot/AnnotationBackgroundPresetBar.swift` and `Sources/BetterShot/RecordingStudioStylePresetBar.swift` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 221 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `presets` to `[AnnotationBackgroundPreset]` in one and `[RecordingStudioStylePreset]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×1
  • Duplicated block (20 lines × 2) Sources/BetterShot/AnnotationCanvas.swift:436 — Sources/BetterShot/AnnotationCanvas.swift:436-455 | Sources/BetterShot/AnnotationCanvas.swift:527-546 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/BetterShot/AnnotationCanvas.swift:436` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (42 lines × 2) · ×1
  • Duplicated block (42 lines × 2) Sources/BetterShot/InkPath.swift:70 — Sources/BetterShot/InkPath.swift:70-111 | Sources/BetterShot/PathBuilder.swift:80-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 both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (17–20 lines × 2) · ×1
  • Duplicated block (17–20 lines × 2) Sources/BetterShot/RecordingCompositionBuilder.swift:22 — Sources/BetterShot/RecordingCompositionBuilder.swift:22-41 | Sources/BetterShot/RecordingCompositionBuilder.swift:64-80 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (16–18 lines × 2) · ×1
  • Duplicated block (16–18 lines × 2) Sources/BetterShot/AnnotationBackgroundPreviewViews.swift:18 — Sources/BetterShot/AnnotationBackgroundPreviewViews.swift:18-35 | Sources/BetterShot/RecordingStudioWindow.swift:1267-1282 — the copies sit in sibling files of 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 `Sources/BetterShot/AnnotationBackgroundPreviewViews.swift:18` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×1
  • Duplicated block (17 lines × 2) Sources/BetterShot/AnnotationBackgroundPresetBar.swift:74 — Sources/BetterShot/AnnotationBackgroundPresetBar.swift:74-90 | Sources/BetterShot/RecordingStudioStylePresetBar.swift:65-81 — before extracting anything, compare `Sources/BetterShot/AnnotationBackgroundPresetBar.swift` and `Sources/BetterShot/RecordingStudioStylePresetBar.swift` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 221 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 `Sources/BetterShot/AnnotationBackgroundPresetBar.swift:74` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×1
  • Duplicated block (16–17 lines × 2) Sources/BetterShot/CameraRecordingManager.swift:589 — Sources/BetterShot/CameraRecordingManager.swift:589-604 | Sources/BetterShot/ScreenRecordingManager.swift:1326-1342 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (8–16 lines × 2) · ×1
  • Duplicated block (8–16 lines × 2) Sources/BetterShot/AnnotationImageCropper.swift:53 — Sources/BetterShot/AnnotationImageCropper.swift:53-68 | Sources/BetterShot/AnnotationImageTransform.swift:93-100 — the copies sit in sibling files of 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.
D4 · Code Duplication · Duplicated block (12–14 lines × 2) · ×1
  • Duplicated block (12–14 lines × 2) Sources/BetterShot/RecordingTranscription.swift:126 — Sources/BetterShot/RecordingTranscription.swift:126-139 | Sources/BetterShot/RecordingTranscription.swift:227-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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) Sources/BetterShot/CameraRecordingManager.swift:196 — Sources/BetterShot/CameraRecordingManager.swift:196-207 | Sources/BetterShot/TeleprompterComposerPresenter.swift:45-57 — the copies sit in sibling files of 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 `Sources/BetterShot/CameraRecordingManager.swift:196` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×1
  • Duplicated block (9 lines × 4) Sources/BetterShot/AnnotationBackgroundPresetBar.swift:438 — Sources/BetterShot/AnnotationBackgroundPresetBar.swift:438-446 | Sources/BetterShot/AnnotationInspectorStyle.swift:273-281 | Sources/BetterShot/RecordingStudioStylePresetBar.swift:418-426 | Sources/BetterShot/RecordingStudioWindow.swift:1123-1131 — before extracting anything, compare `Sources/BetterShot/AnnotationBackgroundPresetBar.swift` and `Sources/BetterShot/RecordingStudioStylePresetBar.swift` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 221 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 `Sources/BetterShot/AnnotationBackgroundPresetBar.swift:438` it begins part-way through the construct above it, so those 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, `Sources/BetterShot/AnnotationBackgroundPresetBar.swift:447` calls `accessibilityLabel` and `Sources/BetterShot/AnnotationInspectorStyle.swift:282` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (3–6 lines × 3) · ×1
  • Duplicated block (3–6 lines × 3) Sources/Sharing/R2Uploader.swift:190 — Sources/Sharing/R2Uploader.swift:190-195 | Sources/Sharing/R2Uploader.swift:284-289 | Sources/Sharing/R2Uploader.swift:383-385 — 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 `Sources/Sharing/R2Uploader.swift:190` it does not close everything it opens, so those 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, `Sources/Sharing/R2Uploader.swift:385` calls `URL`, `R2UploadError` and `Sources/Sharing/R2Uploader.swift:195` 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.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×1
  • Sync-over-async blocking Sources/Services/AppUpdater.swift:181 — `installUpdate` is async and calls .waitUntilExit() — a blocking call inside async code stalls the cooperative pool's thread — one per core — and every task scheduled on it for as long as it runs.
R10 · Code Duplication · Duplication concentrated across 4 sibling directories (12 clone groups) · ×1
  • Duplication concentrated across 4 sibling directories (12 clone groups) bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:445 — 12 duplicated blocks under bettershot-landing/app/blog/ have copies in at least two of the sibling directories bettershot-0-5-2, cleanshot-x-alternative, cleanshot-x-capcut-loom-alternative, loom-alternative — 10 of them are reported below, and 2 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 12 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 12 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 12 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 (116 lines × 2 locations) · ×1
  • Duplicated block (116 lines × 2 locations) bettershot-landing/components/ui/context-menu.tsx:110 — bettershot-landing/components/ui/context-menu.tsx:110 · bettershot-landing/components/ui/menubar.tsx:87 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (108 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (108 matched lines × 2 locations) bettershot-landing/components/ui/item.tsx:8 — bettershot-landing/components/ui/item.tsx:8 · bettershot-landing/components/ui/sidebar.tsx:346 — the two spans are one implementation copied and then locally edited — 394 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 · Wholesale file copy (103 identical lines × 2 files) · ×1
  • Wholesale file copy (103 identical lines × 2 files) bettershot-landing/components/ui/use-toast.ts:4 — bettershot-landing/components/ui/use-toast.ts:4 · bettershot-landing/hooks/use-toast.ts:4 — these 2 files are line-for-line copies of one another — 103 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block (96 lines × 2 locations) · ×1
  • Duplicated block (96 lines × 2 locations) bettershot-landing/components/ui/dropdown-menu.tsx:131 — bettershot-landing/components/ui/dropdown-menu.tsx:131 · bettershot-landing/components/ui/menubar.tsx:149 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (84 lines × 3 locations) · ×1
  • Duplicated block (84 lines × 3 locations) bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:445 — bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:445 · bettershot-landing/app/blog/cleanshot-x-capcut-loom-alternative/page.tsx:433 · bettershot-landing/app/blog/loom-alternative/page.tsx:426 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (46 lines × 4 locations) · ×1
  • Duplicated block (46 lines × 4 locations) bettershot-landing/app/blog/bettershot-0-5-2/page.tsx:9 — bettershot-landing/app/blog/bettershot-0-5-2/page.tsx:9 · bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:9 · bettershot-landing/app/blog/cleanshot-x-capcut-loom-alternative/page.tsx:9 · bettershot-landing/app/blog/loom-alternative/page.tsx:9 — the 4 copies are spread across 4 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
R10 · Code Duplication · Duplicated block (45 lines × 2 locations) · ×1
  • Duplicated block (45 lines × 2 locations) bettershot-landing/components/ui/alert-dialog.tsx:61 — bettershot-landing/components/ui/alert-dialog.tsx:61 · bettershot-landing/components/ui/dialog.tsx:78 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (42 lines × 2 locations) · ×1
  • Duplicated block (42 lines × 2 locations) bettershot-landing/components/ui/avatar.tsx:8 — bettershot-landing/components/ui/avatar.tsx:8 · bettershot-landing/components/ui/tabs.tsx:8 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block (37 lines × 2 locations) · ×1
  • Duplicated block (37 lines × 2 locations) bettershot-landing/components/ui/dialog.tsx:9 — bettershot-landing/components/ui/dialog.tsx:9 · bettershot-landing/components/ui/sheet.tsx:9 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block with local edits (36 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (36 matched lines × 2 locations) bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:193 — bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:193 · bettershot-landing/app/blog/loom-alternative/page.tsx:293 — the two spans are one implementation copied and then locally edited — 304 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 (36 lines × 2 locations) · ×1
  • Duplicated block (36 lines × 2 locations) bettershot-landing/app/privacy/page.tsx:90 — bettershot-landing/app/privacy/page.tsx:90 · bettershot-landing/app/terms/page.tsx:98 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (33 lines × 2 locations) · ×1
  • Duplicated block (33 lines × 2 locations) bettershot-landing/components/ui/drawer.tsx:88 — bettershot-landing/components/ui/drawer.tsx:88 · bettershot-landing/components/ui/sheet.tsx:94 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block (32 lines × 3 locations) · ×1
  • Duplicated block (32 lines × 3 locations) bettershot-landing/components/ui/context-menu.tsx:54 — bettershot-landing/components/ui/context-menu.tsx:54 · bettershot-landing/components/ui/dropdown-menu.tsx:199 · bettershot-landing/components/ui/menubar.tsx:217 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (29 lines × 2 locations) · ×1
  • Duplicated block (29 lines × 2 locations) bettershot-landing/components/ui/carousel.tsx:174 — bettershot-landing/components/ui/carousel.tsx:174 · bettershot-landing/components/ui/carousel.tsx:204 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (27 lines × 2 locations) · ×1
  • Duplicated block (27 lines × 2 locations) bettershot-landing/components/ui/empty.tsx:37 — bettershot-landing/components/ui/empty.tsx:37 · bettershot-landing/components/ui/item.tsx:82 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (24 lines × 2 locations) · ×1
  • Duplicated block (24 lines × 2 locations) bettershot-landing/components/share/image-viewer.tsx:181 — bettershot-landing/components/share/image-viewer.tsx:181 · bettershot-landing/components/share/video-player.tsx:319 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block (23 lines × 5 locations) · ×1
  • Duplicated block (23 lines × 5 locations) bettershot-landing/components/ui/command.tsx:153 — bettershot-landing/components/ui/command.tsx:153 · bettershot-landing/components/ui/context-menu.tsx:215 · bettershot-landing/components/ui/empty.tsx:79 · bettershot-landing/components/ui/input-group.tsx:141 · +1 more site(s) not listed — the 5 copies are spread across 5 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (21 lines × 3 locations) · ×1
  • Duplicated block (21 lines × 3 locations) bettershot-landing/components/ui/alert-dialog.tsx:73 — bettershot-landing/components/ui/alert-dialog.tsx:73 · bettershot-landing/components/ui/dialog.tsx:87 · bettershot-landing/components/ui/field.tsx:91 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (19 lines × 9 locations) · ×1
  • Duplicated block (19 lines × 9 locations) bettershot-landing/components/ui/alert-dialog.tsx:96 — bettershot-landing/components/ui/alert-dialog.tsx:96 · bettershot-landing/components/ui/avatar.tsx:25 · bettershot-landing/components/ui/command.tsx:130 · bettershot-landing/components/ui/dialog.tsx:107 · +5 more site(s) not listed — the 9 copies are spread across 9 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (18 lines × 7 locations) · ×1
  • Duplicated block (18 lines × 7 locations) bettershot-landing/components/ui/alert-dialog.tsx:86 — bettershot-landing/components/ui/alert-dialog.tsx:86 · bettershot-landing/components/ui/avatar.tsx:15 · bettershot-landing/components/ui/context-menu.tsx:198 · bettershot-landing/components/ui/dialog.tsx:97 · +3 more site(s) not listed — the 7 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 7 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
R10 · Code Duplication · Duplicated block (17 lines × 14 locations) · ×1
  • Duplicated block (17 lines × 14 locations) bettershot-landing/components/ui/alert-dialog.tsx:74 — bettershot-landing/components/ui/alert-dialog.tsx:74 · bettershot-landing/components/ui/alert.tsx:32 · bettershot-landing/components/ui/card.tsx:46 · bettershot-landing/components/ui/dialog.tsx:88 · +10 more site(s) not listed — the 14 copies are spread across 11 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (17 lines × 11 locations) · ×1
  • Duplicated block (17 lines × 11 locations) bettershot-landing/components/ui/alert.tsx:37 — bettershot-landing/components/ui/alert.tsx:37 · bettershot-landing/components/ui/breadcrumb.tsx:11 · bettershot-landing/components/ui/card.tsx:5 · bettershot-landing/components/ui/card.tsx:51 · +7 more site(s) not listed — the 11 copies are spread across 8 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (17 lines × 2 locations) · ×1
  • Duplicated block (17 lines × 2 locations) bettershot-landing/components/ui/select.tsx:138 — bettershot-landing/components/ui/select.tsx:138 · bettershot-landing/components/ui/select.tsx:156 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (15 lines × 2 locations) · ×1
  • Duplicated block (15 lines × 2 locations) bettershot-landing/components/ui/use-mobile.tsx:5 — bettershot-landing/components/ui/use-mobile.tsx:5 · bettershot-landing/hooks/use-mobile.ts:5 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (14 lines × 10 locations) · ×1
  • Duplicated block (14 lines × 10 locations) bettershot-landing/components/ui/breadcrumb.tsx:19 — bettershot-landing/components/ui/breadcrumb.tsx:19 · bettershot-landing/components/ui/card.tsx:26 · bettershot-landing/components/ui/card.tsx:59 · bettershot-landing/components/ui/drawer.tsx:83 · +6 more site(s) not listed — the 10 copies are spread across 9 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (14 lines × 2 locations) · ×1
  • Duplicated block (14 lines × 2 locations) bettershot-landing/components/ui/button-group.tsx:26 — bettershot-landing/components/ui/button-group.tsx:26 · bettershot-landing/components/ui/field.tsx:83 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (10 lines × 2 locations) · ×1
  • Duplicated block (10 lines × 2 locations) bettershot-landing/components/copy-command.tsx:8 — bettershot-landing/components/copy-command.tsx:8 · bettershot-landing/components/share/share-view.tsx:157 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (9 lines × 4 locations) · ×1
  • Duplicated block (9 lines × 4 locations) bettershot-landing/components/ui/accordion.tsx:1 — bettershot-landing/components/ui/accordion.tsx:1 · bettershot-landing/components/ui/alert-dialog.tsx:1 · bettershot-landing/components/ui/dialog.tsx:1 · bettershot-landing/components/ui/sheet.tsx:1 — the 4 copies are spread across 4 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block (8 lines × 9 locations) · ×1
  • Duplicated block (8 lines × 9 locations) bettershot-landing/components/ui/alert-dialog.tsx:6 — bettershot-landing/components/ui/alert-dialog.tsx:6 · bettershot-landing/components/ui/context-menu.tsx:5 · bettershot-landing/components/ui/dialog.tsx:5 · bettershot-landing/components/ui/drawer.tsx:4 · +5 more site(s) not listed — the 9 copies are spread across 9 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block (7 lines × 10 locations) · ×1
  • Duplicated block (7 lines × 10 locations) bettershot-landing/components/ui/alert-dialog.tsx:7 — bettershot-landing/components/ui/alert-dialog.tsx:7 · bettershot-landing/components/ui/collapsible.tsx:3 · bettershot-landing/components/ui/context-menu.tsx:7 · bettershot-landing/components/ui/dialog.tsx:7 · +6 more site(s) not listed — the 10 copies are spread across 10 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R2 · Cyclomatic Complexity · Complex function isBlockedHost (cyclomatic 21, cognitive 22) · ×1
  • Complex function isBlockedHost (cyclomatic 21, cognitive 22) bettershot-landing/lib/share.ts:50 — isBlockedHost has cyclomatic complexity 21 and cognitive complexity 22; 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.
R2 · Cyclomatic Complexity · Complex function VideoPlayer (cyclomatic 21, cognitive 17) · ×1
  • Complex function VideoPlayer (cyclomatic 21, cognitive 17) bettershot-landing/components/share/video-player.tsx:30 — VideoPlayer has cyclomatic complexity 21 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.
R2 · Cyclomatic Complexity · Complex function getChangelog (cyclomatic 17, cognitive 25) · ×1
  • Complex function getChangelog (cyclomatic 17, cognitive 25) bettershot-landing/lib/changelog.ts:16 — getChangelog has cyclomatic complexity 17 and cognitive complexity 25; 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.
R2 · Cyclomatic Complexity · Complex function generateMetadata (cyclomatic 17, cognitive 16) · ×1
  • Complex function generateMetadata (cyclomatic 17, cognitive 16) bettershot-landing/app/s/[id]/page.tsx:15 — generateMetadata has cyclomatic complexity 17 and cognitive complexity 16; 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.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 17, cognitive 12) · ×1
  • Complex function (anonymous) (cyclomatic 17, cognitive 12) REDACTED:182 — (anonymous) has cyclomatic complexity 17 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 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.
R2 · Cyclomatic Complexity · Complex function ShareView (cyclomatic 16, cognitive 15) · ×1
  • Complex function ShareView (cyclomatic 16, cognitive 15) bettershot-landing/components/share/share-view.tsx:18 — ShareView has cyclomatic complexity 16 and cognitive complexity 15; 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.
R2 · Cyclomatic Complexity · Complex function getPayloadConfigFromPayload (cyclomatic 12, cognitive 11) · ×1
  • Complex function getPayloadConfigFromPayload (cyclomatic 12, cognitive 11) REDACTED:308 — getPayloadConfigFromPayload has cyclomatic complexity 12 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.
R2 · Cyclomatic Complexity · Complex function resolveShare (cyclomatic 12, cognitive 11) · ×1
  • Complex function resolveShare (cyclomatic 12, cognitive 11) bettershot-landing/lib/share.ts:117 — resolveShare has cyclomatic complexity 12 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.
R2 · Cyclomatic Complexity · Complex function Scrubber (cyclomatic 12, cognitive 10) · ×1
  • Complex function Scrubber (cyclomatic 12, cognitive 10) bettershot-landing/components/share/scrubber.tsx:17 — Scrubber has cyclomatic complexity 12 and cognitive complexity 10; 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.
R3 · Large Files · bettershot-landing/components/ui/sidebar.tsx · ×1
  • bettershot-landing/components/ui/sidebar.tsx: 672 lines of code bettershot-landing/components/ui/sidebar.tsx:1 — bettershot-landing/components/ui/sidebar.tsx has 672 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx · ×1
  • bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx: 505 lines of code bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx:1 — bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx has 505 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · bettershot-landing/app/blog/cleanshot-x-capcut-loom-alternative/page.tsx · ×1
  • bettershot-landing/app/blog/cleanshot-x-capcut-loom-alternative/page.tsx: 493 lines of code bettershot-landing/app/blog/cleanshot-x-capcut-loom-alternative/page.tsx:1 — bettershot-landing/app/blog/cleanshot-x-capcut-loom-alternative/page.tsx has 493 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · bettershot-landing/app/blog/loom-alternative/page.tsx · ×1
  • bettershot-landing/app/blog/loom-alternative/page.tsx: 484 lines of code bettershot-landing/app/blog/loom-alternative/page.tsx:1 — bettershot-landing/app/blog/loom-alternative/page.tsx has 484 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · bettershot-landing/app/blog/bettershot-0-5-2/page.tsx · ×1
  • bettershot-landing/app/blog/bettershot-0-5-2/page.tsx: 481 lines of code bettershot-landing/app/blog/bettershot-0-5-2/page.tsx:1 — bettershot-landing/app/blog/bettershot-0-5-2/page.tsx has 481 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R4 · Test Coverage · Test Coverage · ×1
  • Test Coverage — 0% of 129 production file(s) reachable from 0 test file(s) via the import graph — 'production' here is the RESIDUE: every source file left once tests, tooling, generated output, config, declarations and declaration-only modules, fixture corpora, type fixtures, behaviour-free data modules, re-export barrels, registration/constant data modules and service workers are set aside, so the percentage is taken over a smaller denominator than the workspace's file count
R6 · Tooling · No test or typecheck script · ×1
  • No test or typecheck script — test ✗ · lint ✓ · typecheck ✗ — read from this repository's REDACTED scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
R7 · Dead Code · Dead file (~726 LoC) · ×1
  • Dead file (~726 LoC) bettershot-landing/components/ui/sidebar.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~353 LoC) · ×1
  • Dead file (~353 LoC) REDACTED — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~276 LoC) · ×1
  • Dead file (~276 LoC) bettershot-landing/components/ui/menubar.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~252 LoC) · ×1
  • Dead file (~252 LoC) bettershot-landing/components/ui/context-menu.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~244 LoC) · ×1
  • Dead file (~244 LoC) bettershot-landing/components/ui/field.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~213 LoC) · ×1
  • Dead file (~213 LoC) bettershot-landing/components/ui/calendar.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~193 LoC) · ×1
  • Dead file (~193 LoC) bettershot-landing/components/ui/item.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~185 LoC) · ×1
  • Dead file (~185 LoC) bettershot-landing/components/ui/select.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~184 LoC) · ×1
  • Dead file (~184 LoC) bettershot-landing/components/ui/command.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~169 LoC) · ×1
  • Dead file (~169 LoC) bettershot-landing/components/ui/input-group.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~167 LoC) · ×1
  • Dead file (~167 LoC) bettershot-landing/components/ui/form.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~163 LoC) · ×1
  • Dead file (~163 LoC) bettershot-landing/components/ui/hero-video-dialog.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~143 LoC) · ×1
  • Dead file (~143 LoC) bettershot-landing/components/ui/dialog.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (bettershot-landing/components/ui/command.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~139 LoC) · ×1
  • Dead file (~139 LoC) bettershot-landing/components/ui/sheet.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (bettershot-landing/components/ui/sidebar.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~135 LoC) · ×1
  • Dead file (~135 LoC) bettershot-landing/components/ui/drawer.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~129 LoC) · ×1
  • Dead file (~129 LoC) bettershot-landing/components/ui/toast.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), but 3 in-repo import(s) from 3 other file(s) do name it (bettershot-landing/components/ui/toaster.tsx, bettershot-landing/components/ui/use-toast.ts, bettershot-landing/hooks/use-toast.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~127 LoC) · ×1
  • Dead file (~127 LoC) bettershot-landing/components/ui/pagination.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~116 LoC) · ×1
  • Dead file (~116 LoC) bettershot-landing/components/ui/table.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~109 LoC) · ×1
  • Dead file (~109 LoC) bettershot-landing/components/ui/breadcrumb.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~104 LoC) · ×1
  • Dead file (~104 LoC) bettershot-landing/components/ui/empty.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~92 LoC) · ×1
  • Dead file (~92 LoC) bettershot-landing/components/ui/card.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~89 LoC) · ×1
  • Dead file (~89 LoC) bettershot-landing/components/ui/globe.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~83 LoC) · ×1
  • Dead file (~83 LoC) bettershot-landing/components/ui/button-group.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~80 LoC) · ×1
  • Dead file (~80 LoC) bettershot-landing/components/ui/pixelcards.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~77 LoC) · ×1
  • Dead file (~77 LoC) bettershot-landing/components/ui/input-otp.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~73 LoC) · ×1
  • Dead file (~73 LoC) bettershot-landing/components/ui/toggle-group.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~72 LoC) · ×1
  • Dead file (~72 LoC) bettershot-landing/scripts/check-product-pages.mjs — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~69 LoC) · ×1
  • Dead file (~69 LoC) bettershot-landing/components/count-up.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~63 LoC) · ×1
  • Dead file (~63 LoC) bettershot-landing/components/ui/slider.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~61 LoC) · ×1
  • Dead file (~61 LoC) bettershot-landing/components/ui/tooltip.tsx — no import path from any entry point (26 application, 2 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (bettershot-landing/components/ui/sidebar.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R8 · Dependency Hygiene · Unused dependency '@hookform/resolvers' · ×1
  • Unused dependency '@hookform/resolvers' — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency '@vercel/analytics' · ×1
  • Unused dependency '@vercel/analytics' — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'date-fns' · ×1
  • Unused dependency 'date-fns' — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'tailwindcss-animate' · ×1
  • Unused dependency 'tailwindcss-animate' — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
S1 · Web-Security Posture · Third-party script without Subresource Integrity · ×1
  • Third-party script without Subresource Integrity bettershot-landing/app/layout.tsx:124 — `https://cloud.umami.is/script.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. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository. 2 such include(s) across the repository's markup.
Minor — 22 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×8
  • Duplicated predicate bettershot-landing/components/ui/use-toast.ts:106 — `t.id === toastId || toastId === undefined` appears character-identically in 2 files — bettershot-landing/components/ui/use-toast.ts, bettershot-landing/hooks/use-toast.ts. 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 Sources/BetterShot/Recording3DInspector.swift:94 — `!model.isLoaded || model.isCroppingVideo || model.isEditingMasks` appears character-identically in 2 files — Sources/BetterShot/Recording3DInspector.swift, Sources/BetterShot/RecordingStudioWindow.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 Sources/BetterShot/AnnotationBackgroundPresetStore.swift:110 — `$0.id == activePresetID && !$0.hasMissingWallpaper` appears character-identically in 2 files — Sources/BetterShot/AnnotationBackgroundPresetStore.swift, Sources/BetterShot/RecordingStudioStylePresetStore.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 Sources/BetterShot/AnnotationBackgroundPresetBar.swift:301 — `availablePresets.isEmpty && missingPresets.isEmpty` appears character-identically in 2 files — Sources/BetterShot/AnnotationBackgroundPresetBar.swift, Sources/BetterShot/RecordingStudioStylePresetBar.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 Sources/BetterShot/AnnotationEditorModel.swift:686 — `flags.contains(.option) || (flags.contains(.command) && flags.contains(.shift))` appears character-identically in 2 files — Sources/BetterShot/AnnotationEditorModel.swift, Sources/BetterShot/RecordingStudioModel.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 Sources/BetterShot/Geometry2d.swift:82 — `isClosed && (isFilled || hitInside) && pointInPolygon(point, vertices)` appears character-identically in 2 files — Sources/BetterShot/Geometry2d.swift, Sources/BetterShot/Shapes2d.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 Sources/BetterShot/RecordingBarPresenter.swift:94 — `manager.state == .recording || manager.state == .paused` appears character-identically in 2 files — Sources/BetterShot/RecordingBarPresenter.swift, Sources/Services/ShortcutActions.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 Sources/BetterShot/RecordingKeystrokeCapture.swift:159 — `type == .tapDisabledByTimeout || type == .tapDisabledByUserInput` appears character-identically in 3 files — Sources/BetterShot/RecordingKeystrokeCapture.swift, Sources/BetterShot/RecordingPointerCapture.swift, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
X7 · Silent fallback defaults · Silent fallback default in catch · ×4
  • Silent fallback default in catch Sources/BetterShot/AnnotationWallpaperPreviewCache.swift:56 — `fileSignature` turns every thrown error into `"unknown"` — 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 Sources/BetterShot/SmartRedactionRecognizer.swift:42 — `recognizeSensitiveRegions` 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 bettershot-landing/components/social-proof.tsx:21 — `getContributors` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch bettershot-landing/lib/downloads.ts:35 — `getDownloadCount` swallows every exception into `return 0` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 on the handler or in the docstring, and the row stops firing.
D12 · Dependency Hygiene · Outdated (npm) · ×1
  • Outdated (npm): @hookform/resolvers REDACTED:13 — @hookform/resolvers is pinned at 3.10.0; registry.npmjs.org publishes 7.0.6 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found BetterShot.xcodeproj/project.pbxproj:1 — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `BetterShot.xcodeproj/project.pbxproj` makes this repository a deployable product (line 1).
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 2 of 3 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (54229 LoC, 636 module-visible types across 11 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 1/2 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `bettershot-landing`.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST REDACTED:6 — No static application security testing detected. For this repository's stack, add CodeQL's Swift pack (Swift/Xcode) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 1 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P3 · Security & performance tooling · No dependency-update automation · ×1
  • No dependency-update automation bettershot-landing/media/remotion/package.json:5 — `bettershot-landing/media/remotion/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`.
X5 · Nullable reference types · Null assertions (`!`) override strict null checking · ×1
  • Null assertions (`!`) override strict null checking — ~0.4 `!` null assertions per 1k TypeScript source lines — 6 assertion(s) across the 14107 source line(s) of the 126 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: bettershot-landing/app/blog/bettershot-0-5-2/page.tsx (1), bettershot-landing/app/blog/cleanshot-x-alternative/page.tsx (1), bettershot-landing/app/blog/cleanshot-x-capcut-loom-alternative/page.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.
Minor — 51 finding(s)
D12 · Dependency Hygiene · Outdated (npm) · ×51
  • Outdated (npm): @radix-ui/react-accordion — @radix-ui/react-accordion is pinned at 1.2.2; registry.npmjs.org publishes 1.3.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-alert-dialog — @radix-ui/react-alert-dialog is pinned at 1.1.4; registry.npmjs.org publishes 1.2.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-aspect-ratio — @radix-ui/react-aspect-ratio is pinned at 1.1.1; registry.npmjs.org publishes 1.2.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-avatar — @radix-ui/react-avatar is pinned at 1.1.2; registry.npmjs.org publishes 1.3.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-checkbox — @radix-ui/react-checkbox is pinned at 1.1.3; registry.npmjs.org publishes 1.4.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-collapsible — @radix-ui/react-collapsible is pinned at 1.1.2; registry.npmjs.org publishes 1.2.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-context-menu — @radix-ui/react-context-menu is pinned at 2.2.4; registry.npmjs.org publishes 2.4.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-dialog — @radix-ui/react-dialog is pinned at 1.1.4; registry.npmjs.org publishes 1.3.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-dropdown-menu — @radix-ui/react-dropdown-menu is pinned at 2.1.4; registry.npmjs.org publishes 2.2.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-hover-card — @radix-ui/react-hover-card is pinned at 1.1.4; registry.npmjs.org publishes 1.2.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-label — @radix-ui/react-label is pinned at 2.1.1; registry.npmjs.org publishes 2.1.17 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-menubar — @radix-ui/react-menubar is pinned at 1.1.4; registry.npmjs.org publishes 1.2.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-navigation-menu — @radix-ui/react-navigation-menu is pinned at 1.2.3; registry.npmjs.org publishes 1.4.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-popover — @radix-ui/react-popover is pinned at 1.1.4; registry.npmjs.org publishes 1.3.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-progress — @radix-ui/react-progress is pinned at 1.1.1; registry.npmjs.org publishes 1.2.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-radio-group — @radix-ui/react-radio-group is pinned at 1.2.2; registry.npmjs.org publishes 1.5.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-scroll-area — @radix-ui/react-scroll-area is pinned at 1.2.2; registry.npmjs.org publishes 1.4.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-select — @radix-ui/react-select is pinned at 2.1.4; registry.npmjs.org publishes 2.4.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-separator — @radix-ui/react-separator is pinned at 1.1.1; registry.npmjs.org publishes 1.2.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-slider — @radix-ui/react-slider is pinned at 1.2.2; registry.npmjs.org publishes 1.6.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-slot — @radix-ui/react-slot is pinned at 1.1.1; registry.npmjs.org publishes 1.5.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-switch — @radix-ui/react-switch is pinned at 1.1.2; registry.npmjs.org publishes 1.4.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-tabs — @radix-ui/react-tabs is pinned at 1.1.2; registry.npmjs.org publishes 1.2.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-toast — @radix-ui/react-toast is pinned at 1.2.4; registry.npmjs.org publishes 1.3.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-toggle — @radix-ui/react-toggle is pinned at 1.1.1; registry.npmjs.org publishes 1.2.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • + 26 more in this group — see findings.md.

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-3e8f3431097947d282f5724e43c97ea5/history.json --exit-code 0 --source .135artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-3e8f3431097947d282f5724e43c97ea5/tree.json --exit-code 0 --source .1artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .2artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .17artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—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 28 file(s) — `Sources/BetterShot/AnnoShapeDrawing.swift`, `Sources/BetterShot/AnnotationBackground.swift`, `Sources/BetterShot/AnnotationBackgroundRenderer.swift`, `Sources/BetterShot/AnnotationCameraGeometry.swift`, `Sources/BetterShot/AnnotationEditorWindow.swift`, … (+23 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1dcc2-e758-744e-8a98-069c19b15830 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

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

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