Public report of diamondfsd/luna-ai-cut, published 17 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 17 November 2026, 05:10 UTC · Survey ID cd_6b3e1b9506244d72a86684417f03b512
diamondfsd/luna-ai-cut
Measured 17 November 2026, 05:07 UTC, at code version a0ff0ea
Code coverage is not measured: JavaScript/TypeScript suite (CouldNotMeasureRanButNoData).
CAI scoreAt risk
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 145,404 lines of product code in 3 projects, tests not counted · Estimated rebuild effort: about 1.0 person-years · Weakest lens: Accessibility, 46.6
Findings by how serious they are
146 critical1383 serious139 minor
7 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
17 November 2026, 05:07 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 ▸
79of 79 dimensions measured by tools.
1648of 1668 findings point to an exact file and line, so you can open each one in the code. The other 20 concern the repository as a whole, such as missing documentation.
79dimensions across 7 lenses, read from 145,404 lines of product code in 3 projects.
diamondfsd/luna-ai-cut is rated At risk because critical security findings are open, most of them in the packages it uses. Its score is held back because it has controls that only work with a mouse. It scores 50.1 out of 100, which the At risk rating leaves unchanged.
Accessibility, at 46.6, is the weakest lens and counts most in the score. The best first step is making the controls keyboard-usable, worth about 3.0 points. Fixing the 11 tests that are switched off comes next, worth about 2.7 points. Raising Accessibility to 70 would lift the score to about 53.3.
Thirty-seven known security holes in the packages the code depends on can be used by attackers. Twenty-nine pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with, and nineteen controls can't be used without a mouse. Making the controls work with a keyboard, updating the vulnerable packages and pinning each tool to an exact version would close these risks. The two passwords or keys in the code's history need replacing, with the old ones switched off. The two pipeline steps that run downloads without checking them need each download checked against a known checksum first. The 26 sets of files in separate parts that keep changing together need that dependency made explicit.
The product code is 145,404 lines, about €150,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Accessibility rose from 46.6 to 70, the lowest score rated Strong, the score would rise from 50.1 to about 53.3.
Code composition: what the lines of code are
Product code 98%Tests 2%
Rebuild cost: about €150,000 · Estimate
Cost to rebuild
€51,000 to €250,000, for 842 to 2,673 hours of work, about 1.0 person-years for 1 to 2 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.7 at a score of 50. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Large: 145,404 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Raises the score by about 3.0 points · Medium effort · Keyboard semantics
2
Resolve the 11 Skipped test finding(s) in Test Quality — start with beauty.e2e.spec.ts (3), workspace-webgpu-color.e2e.spec.ts (2), workspace-webgpu-playback.e2e.spec.ts (2).
Raises the score by about 2.7 points · Medium effort · Test Quality
3
Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing.
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €150,000 to build again, about 1.0 person-years of work. Its weakest lens is Accessibility, at 46.6 (Weak). Accessibility is about whether the interface is built so that everyone can use it, including people who can't see the screen or can't use a mouse. Because the weakest lens counts most in the score, work on Accessibility also moves the score most.
Based on: the rebuild estimate · the Accessibility grade · how much each lens counts
What to do: Start with the Accessibility actions in Top priorities.
If you do one thing first · First action
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href. Of all the actions in this report, it raises the score most for the work it takes: about 3.0 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.9 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 5% to 12% on every change. The history of the code shows how much it changes: about 178,788 lines over the last 90 days, which is about 725,085 lines a year. At that pace, the extra work comes to an estimated 95.4 to 572.3 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture: 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.
622 modules, with 751 dependencies between them. Every module uses only modules listed above it, so there are no loops.
The table shows the 40 modules with the most connections; 582 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.
electron.media.live-stream uses src.shared.types.liveStream, so a change to src.shared.types.liveStream can break electron.media.live-stream, while a change to electron.media.live-stream can't break src.shared.types.liveStream.
Position
Below the diagonal: electron.media.live-stream uses a module listed above it, which is the healthy direction.
src.components uses src.shared.types.directorLab, so a change to src.shared.types.directorLab can break src.components, while a change to src.components can't break src.shared.types.directorLab.
Position
Below the diagonal: src.components uses a module listed above it, which is the healthy direction.
src.components uses src.shared.types.liveStream, so a change to src.shared.types.liveStream can break src.components, while a change to src.components can't break src.shared.types.liveStream.
Position
Below the diagonal: src.components uses a module listed above it, which is the healthy direction.
src.components uses src.shared.types.render, so a change to src.shared.types.render can break src.components, while a change to src.components can't break src.shared.types.render.
Position
Below the diagonal: src.components uses a module listed above it, which is the healthy direction.
src.components uses src.shared.types.video, so a change to src.shared.types.video can break src.components, while a change to src.components can't break src.shared.types.video.
Position
Below the diagonal: src.components uses a module listed above it, which is the healthy direction.
src.components uses src.shared.types.watermark, so a change to src.shared.types.watermark can break src.components, while a change to src.components can't break src.shared.types.watermark.
Position
Below the diagonal: src.components uses a module listed above it, which is the healthy direction.
src.shared uses src.shared.types.liveStream, so a change to src.shared.types.liveStream can break src.shared, while a change to src.shared can't break src.shared.types.liveStream.
Position
Below the diagonal: src.shared uses a module listed above it, which is the healthy direction.
src.shared uses src.shared.types.render, so a change to src.shared.types.render can break src.shared, while a change to src.shared can't break src.shared.types.render.
Position
Below the diagonal: src.shared uses a module listed above it, which is the healthy direction.
src.shared uses src.shared.types.subtitles, so a change to src.shared.types.subtitles can break src.shared, while a change to src.shared can't break src.shared.types.subtitles.
Position
Below the diagonal: src.shared uses a module listed above it, which is the healthy direction.
src.shared uses src.shared.types.watermark, so a change to src.shared.types.watermark can break src.shared, while a change to src.shared can't break src.shared.types.watermark.
Position
Below the diagonal: src.shared uses a module listed above it, which is the healthy direction.
src.shared.types.cameraMediaSource uses src.shared.types.media, so a change to src.shared.types.media can break src.shared.types.cameraMediaSource, while a change to src.shared.types.cameraMediaSource can't break src.shared.types.media.
Position
Below the diagonal: src.shared.types.cameraMediaSource uses a module listed above it, which is the healthy direction.
src.shared.types.workspace uses src.shared.types.render, so a change to src.shared.types.render can break src.shared.types.workspace, while a change to src.shared.types.workspace can't break src.shared.types.render.
Position
Below the diagonal: src.shared.types.workspace uses a module listed above it, which is the healthy direction.
src.shared.types.workspace uses src.shared.types.subtitles, so a change to src.shared.types.subtitles can break src.shared.types.workspace, while a change to src.shared.types.workspace can't break src.shared.types.subtitles.
Position
Below the diagonal: src.shared.types.workspace uses a module listed above it, which is the healthy direction.
src.workspace.creative.pixel-flow uses src.shared.types.render, so a change to src.shared.types.render can break src.workspace.creative.pixel-flow, while a change to src.workspace.creative.pixel-flow can't break src.shared.types.render.
Position
Below the diagonal: src.workspace.creative.pixel-flow uses a module listed above it, which is the healthy direction.
src.workspace.creative.pixel-flow uses src.shared.types.video, so a change to src.shared.types.video can break src.workspace.creative.pixel-flow, while a change to src.workspace.creative.pixel-flow can't break src.shared.types.video.
Position
Below the diagonal: src.workspace.creative.pixel-flow uses a module listed above it, which is the healthy direction.
src.workspace.shared.editPipeline uses src.shared.types.watermark, so a change to src.shared.types.watermark can break src.workspace.shared.editPipeline, while a change to src.workspace.shared.editPipeline can't break src.shared.types.watermark.
Position
Below the diagonal: src.workspace.shared.editPipeline uses a module listed above it, which is the healthy direction.
electron.devices.dji.djiCameraSession uses src.shared.types.media, so a change to src.shared.types.media can break electron.devices.dji.djiCameraSession, while a change to electron.devices.dji.djiCameraSession can't break src.shared.types.media.
Position
Below the diagonal: electron.devices.dji.djiCameraSession uses a module listed above it, which is the healthy direction.
electron.devices.dji.djiCameraSession uses src.shared.types.cameraMediaSource, so a change to src.shared.types.cameraMediaSource can break electron.devices.dji.djiCameraSession, while a change to electron.devices.dji.djiCameraSession can't break src.shared.types.cameraMediaSource.
Position
Below the diagonal: electron.devices.dji.djiCameraSession uses a module listed above it, which is the healthy direction.
electron.devices.insta360 uses src.shared.types.media, so a change to src.shared.types.media can break electron.devices.insta360, while a change to electron.devices.insta360 can't break src.shared.types.media.
Position
Below the diagonal: electron.devices.insta360 uses a module listed above it, which is the healthy direction.
electron.devices.insta360 uses src.shared.types.cameraMediaSource, so a change to src.shared.types.cameraMediaSource can break electron.devices.insta360, while a change to electron.devices.insta360 can't break src.shared.types.cameraMediaSource.
Position
Below the diagonal: electron.devices.insta360 uses a module listed above it, which is the healthy direction.
electron.features.ai-selection uses src.shared.types.workspace, so a change to src.shared.types.workspace can break electron.features.ai-selection, while a change to electron.features.ai-selection can't break src.shared.types.workspace.
Position
Below the diagonal: electron.features.ai-selection uses a module listed above it, which is the healthy direction.
src.shared.types.device uses src.shared.types.cameraMediaSource, so a change to src.shared.types.cameraMediaSource can break src.shared.types.device, while a change to src.shared.types.device can't break src.shared.types.cameraMediaSource.
Position
Below the diagonal: src.shared.types.device uses a module listed above it, which is the healthy direction.
src.shared.types.settings uses src.shared.types.watermark, so a change to src.shared.types.watermark can break src.shared.types.settings, while a change to src.shared.types.settings can't break src.shared.types.watermark.
Position
Below the diagonal: src.shared.types.settings uses a module listed above it, which is the healthy direction.
src.shared.types.settings uses src.shared.types.cameraMediaSource, so a change to src.shared.types.cameraMediaSource can break src.shared.types.settings, while a change to src.shared.types.settings can't break src.shared.types.cameraMediaSource.
Position
Below the diagonal: src.shared.types.settings uses a module listed above it, which is the healthy direction.
src.workspace.color uses src.workspace.shared.editPipeline, so a change to src.workspace.shared.editPipeline can break src.workspace.color, while a change to src.workspace.color can't break src.workspace.shared.editPipeline.
Position
Below the diagonal: src.workspace.color uses a module listed above it, which is the healthy direction.
src.workspace.components uses src.shared.types.media, so a change to src.shared.types.media can break src.workspace.components, while a change to src.workspace.components can't break src.shared.types.media.
Position
Below the diagonal: src.workspace.components uses a module listed above it, which is the healthy direction.
src.workspace.components uses src.shared.types.workspace, so a change to src.shared.types.workspace can break src.workspace.components, while a change to src.workspace.components can't break src.shared.types.workspace.
Position
Below the diagonal: src.workspace.components uses a module listed above it, which is the healthy direction.
src.workspace.components uses src.workspace.shared.editPipeline, so a change to src.workspace.shared.editPipeline can break src.workspace.components, while a change to src.workspace.components can't break src.workspace.shared.editPipeline.
Position
Below the diagonal: src.workspace.components uses a module listed above it, which is the healthy direction.
src.workspace.creative.only-your-color uses src.shared.types.workspace, so a change to src.shared.types.workspace can break src.workspace.creative.only-your-color, while a change to src.workspace.creative.only-your-color can't break src.shared.types.workspace.
Position
Below the diagonal: src.workspace.creative.only-your-color uses a module listed above it, which is the healthy direction.
src.workspace.creative.pixel-stretch uses src.shared.types.workspace, so a change to src.shared.types.workspace can break src.workspace.creative.pixel-stretch, while a change to src.workspace.creative.pixel-stretch can't break src.shared.types.workspace.
Position
Below the diagonal: src.workspace.creative.pixel-stretch uses a module listed above it, which is the healthy direction.
electron.devices.common uses src.shared.types.media, so a change to src.shared.types.media can break electron.devices.common, while a change to electron.devices.common can't break src.shared.types.media.
Position
Below the diagonal: electron.devices.common uses a module listed above it, which is the healthy direction.
electron.devices.common uses src.shared.types.cameraMediaSource, so a change to src.shared.types.cameraMediaSource can break electron.devices.common, while a change to electron.devices.common can't break src.shared.types.cameraMediaSource.
Position
Below the diagonal: electron.devices.common uses a module listed above it, which is the healthy direction.
electron.devices.common uses src.shared.types.device, so a change to src.shared.types.device can break electron.devices.common, while a change to electron.devices.common can't break src.shared.types.device.
Position
Below the diagonal: electron.devices.common uses a module listed above it, which is the healthy direction.
electron.devices.dji uses src.shared.types.media, so a change to src.shared.types.media can break electron.devices.dji, while a change to electron.devices.dji can't break src.shared.types.media.
Position
Below the diagonal: electron.devices.dji uses a module listed above it, which is the healthy direction.
electron.devices.dji uses electron.devices.dji.djiCameraSession, so a change to electron.devices.dji.djiCameraSession can break electron.devices.dji, while a change to electron.devices.dji can't break electron.devices.dji.djiCameraSession.
Position
Below the diagonal: electron.devices.dji uses a module listed above it, which is the healthy direction.
electron.ipc uses src.shared.types.directorLab, so a change to src.shared.types.directorLab can break electron.ipc, while a change to electron.ipc can't break src.shared.types.directorLab.
Position
Below the diagonal: electron.ipc uses a module listed above it, which is the healthy direction.
electron.ipc uses src.shared.types.media, so a change to src.shared.types.media can break electron.ipc, while a change to electron.ipc can't break src.shared.types.media.
Position
Below the diagonal: electron.ipc uses a module listed above it, which is the healthy direction.
electron.ipc uses src.shared.types.settings, so a change to src.shared.types.settings can break electron.ipc, while a change to electron.ipc can't break src.shared.types.settings.
Position
Below the diagonal: electron.ipc uses a module listed above it, which is the healthy direction.
electron.media uses src.shared.types.media, so a change to src.shared.types.media can break electron.media, while a change to electron.media can't break src.shared.types.media.
Position
Below the diagonal: electron.media uses a module listed above it, which is the healthy direction.
electron.media uses src.shared.types.settings, so a change to src.shared.types.settings can break electron.media, while a change to electron.media can't break src.shared.types.settings.
Position
Below the diagonal: electron.media uses a module listed above it, which is the healthy direction.
src.context uses src.shared.types.cameraMediaSource, so a change to src.shared.types.cameraMediaSource can break src.context, while a change to src.context can't break src.shared.types.cameraMediaSource.
Position
Below the diagonal: src.context uses a module listed above it, which is the healthy direction.
src.context uses src.shared.types.device, so a change to src.shared.types.device can break src.context, while a change to src.context can't break src.shared.types.device.
Position
Below the diagonal: src.context uses a module listed above it, which is the healthy direction.
src.context uses src.shared.types.settings, so a change to src.shared.types.settings can break src.context, while a change to src.context can't break src.shared.types.settings.
Position
Below the diagonal: src.context uses a module listed above it, which is the healthy direction.
src.lib uses src.shared.types.directorLab, so a change to src.shared.types.directorLab can break src.lib, while a change to src.lib can't break src.shared.types.directorLab.
Position
Below the diagonal: src.lib uses a module listed above it, which is the healthy direction.
src.lib uses src.shared.types.render, so a change to src.shared.types.render can break src.lib, while a change to src.lib can't break src.shared.types.render.
Position
Below the diagonal: src.lib uses a module listed above it, which is the healthy direction.
src.lib uses src.shared.types.settings, so a change to src.shared.types.settings can break src.lib, while a change to src.lib can't break src.shared.types.settings.
Position
Below the diagonal: src.lib uses a module listed above it, which is the healthy direction.
src.pages uses src.shared.types.media, so a change to src.shared.types.media can break src.pages, while a change to src.pages can't break src.shared.types.media.
Position
Below the diagonal: src.pages uses a module listed above it, which is the healthy direction.
src.pages uses src.workspace.shared.editPipeline, so a change to src.workspace.shared.editPipeline can break src.pages, while a change to src.pages can't break src.workspace.shared.editPipeline.
Position
Below the diagonal: src.pages uses a module listed above it, which is the healthy direction.
src.pages uses src.shared.types.device, so a change to src.shared.types.device can break src.pages, while a change to src.pages can't break src.shared.types.device.
Position
Below the diagonal: src.pages uses a module listed above it, which is the healthy direction.
src.pages uses src.shared.types.settings, so a change to src.shared.types.settings can break src.pages, while a change to src.pages can't break src.shared.types.settings.
Position
Below the diagonal: src.pages uses a module listed above it, which is the healthy direction.
src.shared.types.api uses src.shared.types.directorLab, so a change to src.shared.types.directorLab can break src.shared.types.api, while a change to src.shared.types.api can't break src.shared.types.directorLab.
Position
Below the diagonal: src.shared.types.api uses a module listed above it, which is the healthy direction.
src.shared.types.api uses src.shared.types.liveStream, so a change to src.shared.types.liveStream can break src.shared.types.api, while a change to src.shared.types.api can't break src.shared.types.liveStream.
Position
Below the diagonal: src.shared.types.api uses a module listed above it, which is the healthy direction.
src.shared.types.api uses src.shared.types.media, so a change to src.shared.types.media can break src.shared.types.api, while a change to src.shared.types.api can't break src.shared.types.media.
Position
Below the diagonal: src.shared.types.api uses a module listed above it, which is the healthy direction.
src.shared.types.api uses src.shared.types.video, so a change to src.shared.types.video can break src.shared.types.api, while a change to src.shared.types.api can't break src.shared.types.video.
Position
Below the diagonal: src.shared.types.api uses a module listed above it, which is the healthy direction.
src.shared.types.api uses src.shared.types.watermark, so a change to src.shared.types.watermark can break src.shared.types.api, while a change to src.shared.types.api can't break src.shared.types.watermark.
Position
Below the diagonal: src.shared.types.api uses a module listed above it, which is the healthy direction.
src.shared.types.api uses src.shared.types.cameraMediaSource, so a change to src.shared.types.cameraMediaSource can break src.shared.types.api, while a change to src.shared.types.api can't break src.shared.types.cameraMediaSource.
Position
Below the diagonal: src.shared.types.api uses a module listed above it, which is the healthy direction.
src.shared.types.api uses src.shared.types.device, so a change to src.shared.types.device can break src.shared.types.api, while a change to src.shared.types.api can't break src.shared.types.device.
Position
Below the diagonal: src.shared.types.api uses a module listed above it, which is the healthy direction.
src.shared.types.api uses src.shared.types.settings, so a change to src.shared.types.settings can break src.shared.types.api, while a change to src.shared.types.api can't break src.shared.types.settings.
Position
Below the diagonal: src.shared.types.api uses a module listed above it, which is the healthy direction.
src.workspace.shared uses src.shared.types.render, so a change to src.shared.types.render can break src.workspace.shared, while a change to src.workspace.shared can't break src.shared.types.render.
Position
Below the diagonal: src.workspace.shared uses a module listed above it, which is the healthy direction.
src.workspace.shared uses src.shared.types.subtitles, so a change to src.shared.types.subtitles can break src.workspace.shared, while a change to src.workspace.shared can't break src.shared.types.subtitles.
Position
Below the diagonal: src.workspace.shared uses a module listed above it, which is the healthy direction.
src.workspace.shared uses src.shared.types.video, so a change to src.shared.types.video can break src.workspace.shared, while a change to src.workspace.shared can't break src.shared.types.video.
Position
Below the diagonal: src.workspace.shared uses a module listed above it, which is the healthy direction.
src.workspace.shared uses src.shared.types.workspace, so a change to src.shared.types.workspace can break src.workspace.shared, while a change to src.workspace.shared can't break src.shared.types.workspace.
Position
Below the diagonal: src.workspace.shared uses a module listed above it, which is the healthy direction.
src.workspace.shared uses src.workspace.shared.editPipeline, so a change to src.workspace.shared.editPipeline can break src.workspace.shared, while a change to src.workspace.shared can't break src.workspace.shared.editPipeline.
Position
Below the diagonal: src.workspace.shared uses a module listed above it, which is the healthy direction.
src.workspace.shared uses src.shared.types.settings, so a change to src.shared.types.settings can break src.workspace.shared, while a change to src.workspace.shared can't break src.shared.types.settings.
Position
Below the diagonal: src.workspace.shared uses a module listed above it, which is the healthy direction.
electron.features.segmentation uses src.shared.types.api, so a change to src.shared.types.api can break electron.features.segmentation, while a change to electron.features.segmentation can't break src.shared.types.api.
Position
Below the diagonal: electron.features.segmentation uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 59.1 · Adequate · gated by D1, D2 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
69
High / Critical
A03:2025 — Software Supply Chain Failures
53
High / Critical
A07:2025 — Authentication Failures
3
High / Critical
Roadmap
Top priorities: Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href; Resolve the 11 Skipped test finding(s) in Test Quality — start with beauty.e2e.spec.ts (3), workspace-webgpu-color.e2e.spec.ts (2), workspace-webgpu-playback.e2e.spec.ts (2); Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Resolve the 11 Skipped test finding(s) in Test Quality — start with beauty.e2e.spec.ts (3), workspace-webgpu-color.e2e.spec.ts (2), workspace-webgpu-playback.e2e.spec.ts (2).
Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing.
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
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.
Make sure a person approves each release. The release job names an environment, but its approval rules live in the code host's settings, where we can't see them. Check that a reviewer must approve each release, or publish releases as drafts first, so a bad build can be stopped before anyone downloads it.
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 — 146
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 — 1383
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 — 139
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 7
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 79 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 79 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 1648 of 1668 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 40 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 5 test source file(s) (.rs) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT MEASURED: the JavaScript/TypeScript suite could not be re-run in the analyzer sandbox — the node:test run in dji_mock_server/opc/ produced no per-test report (> @openpocketcine/mock-camera@0.1.0 test). This is OUR limitation, not a defect in the repo — it is excluded from the score.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the node:test suite in dji_mock_server/opc/ was NOT MEASURED: the node:test run in dji_mock_server/opc/ produced no per-test report (> @openpocketcine/mock-camera@0.1.0 test). This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D14 License Compliance — 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 repository declares package.json, but the licence verdict published here was taken over its crate dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
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 (2 contributor(s) across 1468 commit(s) sampled, automation and bot accounts excluded). One of them holds 99% of the history; the other 1 hold 1% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated per language (docs/plans/deterministic-engine.md, P5; C# and each NeutralApiArms arm pass): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D24 compares a comment's words with the identifiers, literals and constructs of the code it annotates, using English function-word and rationale lexicons. Comments in another script or language were left unread rather than counted as clean.
D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
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 490 sampled here came from .js/.mjs/.ts files. This repository's .tsx, .rs 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. `electron/appMain.ts`, `electron/electron-env.d.ts`, `electron/features/beauty/beautyAnalysisService.ts`, `electron/infrastructure/runtimeResourceDefinitions.ts`, `electron/ipc/ipcConnectivityService.ts`, … (+6 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.
AC2 Forms & labels — 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. 9 further occurrence(s) are not listed individually; the score already reflects all 49.
AC6 Visual & motion safety — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 24 further occurrence(s) are not listed individually; the score already reflects all 64.
AXB2 Runtime readiness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The package `7zip-bin` is declared in package.json but was not installed in our sandbox, so the dependency install did not complete here. This is a limit of our sandbox, not of your repository. (rule: dependency-not-installed). The renderer reported: the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): the package `7zip-bin` is declared in package.json but was not installed in our sandbox, so the dependency install did not complete here. This is a limit of our sandbox, not of your repository. Last output: "at wrapModuleLoad (node:internal/modules/cjs/loader:217:24) / at Module.require (node:internal/modules/cjs/loader:1335:12) / at require (node:internal/modules/helpers:136:16) / at file://<repo>/scripts/copy-ffmpeg.mjs:25:21 / at ModuleJob.run (node:internal/modules/esm/module_job:271:25) / at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:547:26) / at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:116:5) { / code: 'MODULE_NOT_FOUND', / requireStack: [ / '<repo>/scripts/copy-ffmpeg.mjs' / ] / } / Node.js v22.13.0" No runtime evidence was gathered.
AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (dev). the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): the package `7zip-bin` is declared in package.json but was not installed in our sandbox, so the dependency install did not complete here. This is a limit of our sandbox, not of your repository. Last output: "at wrapModuleLoad (node:internal/modules/cjs/loader:217:24) / at Module.require (node:internal/modules/cjs/loader:1335:12) / at require (node:internal/modules/helpers:136:16) / at file://<repo>/scripts/copy-ffmpeg.mjs:25:21 / at ModuleJob.run (node:internal/modules/esm/module_job:271:25) / at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:547:26) / at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:116:5) { / code: 'MODULE_NOT_FOUND', / requireStack: [ / '<repo>/scripts/copy-ffmpeg.mjs' / ] / } / Node.js v22.13.0" No runtime evidence was gathered.
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.
P2 Observability — 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. 6 further occurrence(s) are not listed individually; the score already reflects all 46.
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.
R10 Code Duplication — 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. 339 further occurrence(s) are not listed individually; the score already reflects all 379.
R2 Cyclomatic Complexity — 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. 407 further occurrence(s) are not listed individually; the score already reflects all 447.
R3 Large Files — 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. 31 further occurrence(s) are not listed individually; the score already reflects all 71.
R4 Test Coverage — 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. 158 further occurrence(s) are not listed individually; the score already reflects all 198.
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. 53 further occurrence(s) are not listed individually; the score already reflects all 93.
X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 66 further occurrence(s) are not listed individually; the score already reflects all 106.
X26 Unsynchronised callback handoff — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 142 further occurrence(s) are not listed individually; the score already reflects all 182.
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, Rust, Go, Swift, Erlang, F# and Visual Basic source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP log through no library that carries a message's values as fields (pino, winston, bunyan, tslog, LogTape, roarr; Python's logging, structlog; PHP's PSR-3 loggers), so its log calls cannot be judged, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
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.
D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
271 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was MockCameraState.validate at 241. A further 10 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 WorkspaceEditSidebar.isColorModified at 26 — they are counted neither in the figure above nor in this dimension's score. 4 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: electron/export/dolbyVisionHvcc.ts (dolbyVisionHvcc.repairHvccFromSps at 23), src/workspace/color/ColorPanel.tsx (ColorPanel.ColorPanel at 21), src/lib/directorTakeMarkers.ts (directorTakeMarkers.validateDirectorTakeMarkers at 20), src/shared/watermarkGeometry.ts (watermarkGeometry.djiVerticalOffset at 16). 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.
+ 241 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 7 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with MockCameraState.validate (cyclomatic 241), ipcWorkspaceService.register (cyclomatic 188), PreviewStage.PreviewStage (cyclomatic 159). — 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 7 together lifts Cyclomatic Complexity from 2.0 to about 2.8/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 285 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 40 bodies over 60 down to 60 or less in Cognitive Complexity — start with validate (cognitive 224), ipcWorkspaceService.register (cognitive 174), useDirectorPlanSync.useDirectorPlanSync.synchronize (cognitive 165). — 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 40 together lifts Cognitive Complexity from 2.0 to about 3.8/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.
Do you agree with this assessment?
D3 · God Classes5.3 / 10Adequate✓ 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.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 112 FunctionTooLong finding(s) in God Classes — start with useDirectorPlanSync.ts (2), REDACTED (2), TrimPanel.tsx (2). — One of this dimension's main actionable groups (112 warning-level).
Resolve the 28 FileTooLong finding(s) in God Classes — start with REDACTED, WorkspacePage.tsx, REDACTED. — One of this dimension's main actionable groups (28 warning-level).
Resolve the 18 ClassTooLong finding(s) in God Classes — start with REDACTED, TripleStitchCreative.tsx, REDACTED. — One of this dimension's main actionable groups (18 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
36 duplicated block group(s) detected. 1.0 % of the production lines (1,521 of 145,404) are in a reported copy. A further 20 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: .ts, .tsx (83% 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 (18 corresponding lines) · ×3luna-render-core/src/windows/encoder.rs:849
Edited copy of a member (8 corresponding lines) · ×2luna-render-core/src/media/image.rs:183
+ 33 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 5 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with init.rs, preview.rs, faces.rs. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 5 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with parsing_features.rs (2), probe.rs, device.rs. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 4 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with bluetoothCoreScanner.swift, mod.rs, segmentation.rs. — One of this dimension's main actionable groups (4 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
3 production modules (Cargo+npm), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 0 module(s) off the main sequence, with abstractness counted on 2 of the 3 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
11 skipped, 0 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 40 tests. Measured on the JavaScript/TypeScript suite only — at least 5 test source file(s) (.rs) went unread, so its test quality is unmeasured and is not in these counts.
Resolve the 11 Skipped test finding(s) in Test Quality — start with beauty.e2e.spec.ts (3), workspace-webgpu-color.e2e.spec.ts (2), workspace-webgpu-playback.e2e.spec.ts (2). — One of this dimension's main actionable groups (11 warning-level).
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
9 outdated, 0 yanked direct Cargo dependencies. Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit — which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded — crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from REDACTED there.
Outdated: bytemuck · ×9
✓ On the Gold path — maintain.
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
REDACTED scan ran and found no leaked secrets. 1 detection(s) were excluded as holding no minted credential in material that runs: a name, reference or comparison rather than a value, a readable phrase or pattern, a value that declares itself fake, or development, test, example, mock or demo material.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 277 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. ★ COVERAGE OF THIS VERDICT: it grades this repository's crate dependencies and nothing else. The repository also declares package.json, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Top hotspots: src/pages/WorkspacePage.tsx (24×302=7248); src/components/PreviewStage.tsx (18×159=2862); src/pages/DeviceConnectPage.tsx (20×139=2780) Repeated repair below the complexity floor: scripts/test-workspace-geometry.mjs (5 of 9 changes were fixes); luna-render-core/src/windows/encoder.rs (4 of 7 changes were fixes); luna-render-core/src/windows/mod.rs (4 of 7 changes were fixes)
Resolve the 112 Hotspot finding(s) in Churn × Complexity Hotspots — start with WorkspacePage.tsx, PreviewStage.tsx, DeviceConnectPage.tsx. — One of this dimension's main actionable groups (112 warning-level).
Resolve the 3 Repeated repair finding(s) in Churn × Complexity Hotspots — start with test-workspace-geometry.mjs, encoder.rs, mod.rs. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
0 deducted task-comment markers across 122540 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.
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.
1 of 1 documentation facets pass in full. 18 document(s) read across 2 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Cargo.toml. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.
1 naming inconsistencies among 24 declarations measured against a convention their peers follow.
`fetchLatestHotUpdateViaAPI` spells `API` where 23 names in the project spell it `Api`REDACTED:106
What to do
Resolve the 1 `fetchLatestHotUpdateViaAPI` spells `API` where 23 names in the project… finding(s) in Naming Consistency — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.
2 of 3 build units (Cargo, npm) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion · ×2package.json:1
What to do
Resolve the 2 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with package.json, Cargo.toml. — One of this dimension's main actionable groups (2 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
29 % of calls cross a namespace and 0 % go through an interface, but 52 % of collaborators are co-located — so following a call takes several hops. Baseline: small — navigation cost is tolerated. Measured over the .js/.mjs/.ts source only — this repository's .tsx, .rs was not sampled for call sites, so this score covers part of the tree, not all of it.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
2 finding(s): 0 critical, 2 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
What to do
Resolve the 2 REDACTED finding(s) in Secrets (history) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
69 finding(s): 0 critical, 33 high, 36 medium, 0 low. 29 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 15 file(s) — `electron/appMain.ts` (lines 86–87), `electron/electron-env.d.ts` (line 27), `electron/features/beauty/beautyAnalysisService.ts` (line 20), `electron/infrastructure/runtimeResourceDefinitions.ts` (line 50), `electron/ipc/ipcConnectivityService.ts` (line 42, line 43), … (+10 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 2 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 6 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
No action in Static Analysis (SAST) — all 29 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 (29 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 35 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (18), REDACTED (17). — One of this dimension's main actionable groups (35 issue-level).
Resolve the 2 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 7 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (4), REDACTED (2), REDACTED. — One of this dimension's main actionable groups (7 warning-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
Every significant source file has living knowledge — recently and meaningfully worked. Counted over 472 of the 766 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 26 Boundary-crossing change coupling finding(s) in Change Coupling — start with preload.ts (5), ipcWorkspaceService.ts (3), usbAoaReceiver.ts (3). — One of this dimension's main actionable groups (26 issue-level).
Resolve the 16 Change coupling finding(s) in Change Coupling — start with timeline.rs (2), changelog-data.js, specializedSegmentationService.ts. — One of this dimension's main actionable groups (16 warning-level).
Resolve the 2 Change-coupling hub finding(s) in Change Coupling — start with specialized_segmentation_worker.rs, preload.ts. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 0 platform declaration(s) and 14 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
✓ On the Gold path — maintain.
Detailed fixes: d44_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives5.3 / 10Adequate✓ Tool-verified
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
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). (×3) — public/local-share/app.js:242, src/components/HtmlPreview.tsx:162, src/components/HtmlPreview.tsx:171
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. (×6) — src/components/LrcRender.tsx:481, src/components/MultipleLayerVideoPreviewLrcRender.tsx:507, src/components/webgpu/webgpuGpu.ts:61, …
What to do
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Do you agree with this assessment?
AC2 · Forms & labels4.9 / 10Weak✓ 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 <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. (×12) — landing/script.js:244, landing/script.js:245, landing/script.js:246, …
This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×6) — src/ai-selection/AiSelectionPeopleActions.tsx:87, src/components/ExportSettingsPanel.tsx:147, src/components/ExportSettingsPanel.tsx:157, …
This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×7) — src/components/AndroidUsbConnectionMode.tsx:98, src/components/DirectorTakeMarkerPanel.tsx:91, src/components/LiveConnectionDebugDialog.tsx:96, …
A fieldset groups related controls but has no <legend> to name the group. Add a <legend> as its first child — or, if the group already has a visible caption beside it (or the fieldset is there only to disable its subtree and carries no group box), point aria-labelledby at that caption's id instead, which names the group without rendering a second one. (×3) — src/components/DirectorShotEditorDialog.tsx:39, src/workspace/creative/pixel-stretch/PixelStretchCreative.tsx:510, src/workspace/creative/pixel-stretch/PixelStretchEffectControls.tsx:24
This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. (×9) — src/components/ExportSettingsPanel.tsx:106, src/components/ExportSettingsPanel.tsx:117, src/components/ExportSettingsPanel.tsx:138, …
A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one). (×2) — src/components/ExportTaskTable.tsx:394, src/components/ExportTaskTable.tsx:398
This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label. — src/workspace/color/ColorPresetPanel.tsx:118
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.
Do you agree with this assessment?
AC3 · Page structure7.3 / 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.
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. — landing/index.html:2
A document must expose only one main landmark. Multiple visible <main> (or role="main") elements confuse the landmark map and the "skip to content" target. Keep one; remove or hide the rest. — public/local-share/index.html:2
user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta. — public/local-share/index.html:5
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".
The repo's own CSS styles .download-badge with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. (×3) — landing/index.html:106, landing/index.html:127, landing/index.html:150
This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. — public/local-share/index.html:61
This <div> binds wheel, 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. — src/components/HtmlPreview.tsx:191
This <div> announces itself as a role="slider" and is operated by pointerdown, but nothing can put focus on it: no tabIndex={0}, no key handler, and nothing in its scripts moves focus. A keyboard cannot produce a pointer drag, so the control cannot be operated at all (WCAG 2.1.1). Give it tabIndex={0}="0" and move it with the arrow keys in a key handler (with aria-valuenow for the position it holds). — src/components/HtmlPreview.tsx:235
This <div> carries tabIndex={0}, so it is in the tab order and a keyboard user will land on it — but its only behaviour is bound to pointerdown, pointerup and pointermove, pointer gestures a keyboard cannot produce, and there is no key handler. The tab stop leads nowhere. Bind the same behaviour to a key handler, or provide an equivalent control elsewhere. — src/components/LiveCameraControlPanel.tsx:140
This <canvas> binds wheel, 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. (×3) — src/components/LrcRender.tsx:481, src/components/MultipleLayerVideoPreviewLrcRender.tsx:507, src/components/WebGpuVideoPreview.tsx:223
A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. (×9) — src/pages/SettingsPage.tsx:483, src/ui/ModalLayer.tsx:59, src/ui/ToastProvider.tsx:50, …
This <strong> binds double-click and nothing else. 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. — src/workspace/color/ColorMaskPanel.tsx:318
This <circle> binds pointerdown 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. — src/workspace/color/colorPanelShared.tsx:183
This <div> binds pointerdown 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. — src/workspace/transform/CropOverlay.tsx:180
What to do
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.
Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
<svg> moves — its inline style sets `transition: transform 150ms ease` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — src/ui/Table.tsx:75
`.ai-selection-task-cover` sets color: #06c on background-color: #e5e7ea — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — src/styles/ai-selection.css:11
`.lab-update-badge` sets color: #b35c00 on background-color: #fff4e5 — 4.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — src/styles/lab.css:349
`.preview-trigger` sets color: #6e6e73 on background-color: #e8e8ed — 4.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — public/local-share/app.css:155
`.workspace-trim-play-btn` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — src/workspace/trim/TrimStrip.css:31
`.ui-context-menu-item` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — src/ui/context-menu.css:21
`.ui-dialog-content` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — src/ui/dialog.css:52
`.ui-dropdown-menu-item` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — src/ui/dropdown-menu.css:25
`.ui-select-item[data-highlighted]` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — src/ui/select.css:124
`.live-gimbal-pad[data-moving]` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — src/styles/live-camera-controls.css:54
`.preview-modal` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — src/styles/modal.css:26
`.workspace-color-preset-search input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — src/styles/workspace-color-preset.css:117
`.filter-search-header input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — src/styles/workspace-sidebar.css:66
`.workspace-subtitle-list textarea` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — src/styles/workspace-subtitles.css:16
`.workspace-trim-play-btn` moves (`transition: background 120ms ease, transform 120ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — src/workspace/trim/TrimStrip.css:32
`.workspace-trim-handle` moves (`transition: width 120ms ease, background 120ms ease, box-shadow 120ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — src/workspace/trim/TrimStrip.css:239
`.workspace-mask-target-progress > span` moves (`transition: width 160ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — src/workspace/mask/MaskPanel.css:130
`.workspace-mask-target-progress > .is-indeterminate` moves (`animation: workspace-mask-progress 1.1s ease-in-out infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — src/workspace/mask/MaskPanel.css:135
`.filter-card` moves (`transition: transform 0.18s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — src/workspace/lut/FilterPanel.css:344
`.lut-import-status-icon.importing` moves (`animation: lut-spin 1s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — src/workspace/lut/LutImportDialog.css:342
`.beauty-analysis-progress > span` moves (`transition: width 160ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — src/workspace/beauty/BeautyPanel.css:88
`.ui-accordion-chevron` moves (`transition: transform 180ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — src/ui/accordion.css:52
`.ui-btn` moves (`transition: transform 140ms ease,
background 140ms ease,
border-color 140ms ease,
opacity 140ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — src/ui/button.css:22
`.ui-dialog-content` moves (`animation: ui-scale-in 200ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — src/ui/dialog.css:58
`.ui-icon-btn` moves (`transition: transform 140ms ease,
background 140ms ease,
border-color 140ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — src/ui/icon-button.css:14
`.ui-select-chevron` moves (`transition: transform 180ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — src/ui/select.css:87
`.toggle-thumb` moves (`transition: transform 140ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — src/ui/switch.css:29
`.toast-item` moves (`animation: toast-in 0.25s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — src/ui/toast.css:31
`.ai-selection-progress span` moves (`transition: width 180ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — src/styles/ai-selection.css:44
`.ai-selection-people-progress-track > span` moves (`transition: width 180ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — src/styles/ai-selection.css:171
`.dd-log-spinner` moves (`animation: dd-spin 0.8s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — src/styles/device-debug.css:404
`.dl-overall-fill` moves (`transition: width 0.3s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — src/styles/download-progress.css:120
`.dl-task-fill` moves (`transition: width 0.3s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — src/styles/download-progress.css:180
`.dl-file-progress-fill` moves (`transition: width 0.3s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — src/styles/download-progress.css:260
`.global-download-progress-fill` moves (`transition: width 0.25s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — src/styles/download-progress.css:371
`.et-progress-fill` moves (`transition: width 0.3s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — src/styles/export-tasks.css:156
`.lab-feature-card` moves (`transition: background 120ms ease,
border-color 120ms ease,
transform 120ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — src/styles/lab.css:75
`.lab-feature-action` moves (`transition: color 120ms ease, transform 120ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — src/styles/lab.css:123
`.lab-director-progress-track i` moves (`transition: width 160ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — src/styles/lab.css:297
`.lab-download-progress i` moves (`transition: width 160ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — src/styles/lab.css:400
What to do
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.
Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
`DirectorLabApi` declares 20 required operations: `download`, `downloadPlan`, `discover`, `listLocalPlans`, `reconcilePlanDeletions`, `addLocalShot`, `importShots`, `importPlan`, `importPlanText`, `saveLocalPlan`, `importMaterials`, `deleteLocalMaterial`, `syncMaterials`, `onMaterialSyncProgress`, `acknowledgeLocalPlan`, `prepareThumbnail`, `reconcileLocalPlan`, `onDownloadProgress`, `preparePreview`, `probeMedia`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — src/shared/types/directorLab.ts:93
`LunaApi` declares 106 required operations: `startupReady`, `trackPageOpened`, `trackLiveUsage`, `setFullScreen`, `setLiveWindowMode`, `onLiveWindowModeEnd`, `updateLivePreviewWindowSettings`, `getLivePreviewWindowSettings`, `onLivePreviewWindowSettings`, `resizeLivePreviewWindow`, `onFullScreenChange`, `log`, `logExport`, `getLogDir`, `exportDiagnosticsBundle`, `clearLogs`, `getPathForFile`, `copyText`, `getSettings`, `saveSettings`, `listDevices`, `chooseBaseDir`, `chooseLocalResourcesDir`, `chooseExportDir`, `chooseDirectorPlanDir`, `chooseTransferDirectory`, `chooseLutDir`, `chooseMockMediaDir`, `chooseCustomWatermarks`, `listCustomWatermarks`, `deleteCustomWatermark`, `startMockServer`, `stopMockServer`, `getMockServerStatus`, `getMockServerStatuses`, `getCacheStats`, `clearCache`, `organizeDownloadedFiles`, `migrateLocalStorage`, `listCustomLuts`, and 66 more. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — src/shared/types/api.ts:149
`WorkspaceMaskValue` declares 31 required operations: `setVideoFrameTime`, `setEditing`, `setSelectionOperation`, `setManualTool`, `setBrushSize`, `setBrushFeather`, `setShowOverlay`, `setReconstructing`, `setSemanticPicking`, `setAiMaskExpansion`, `clearSegmentationError`, `cancelSegmentation`, `prepareVideoMasksForExport`, `setActiveLayerId`, `setActiveComponentId`, `createMask`, `updateLayer`, `updateActiveLayer`, `duplicateLayer`, `removeLayer`, `moveLayer`, `moveActiveLayer`, `commitMask`, `removeActiveComponent`, `duplicateActiveComponent`, `updateActiveComponent`, `updateMaskSettings`, `updateGroupedMaskSettings`, `removeMask`, `generateSemanticMask`, `generateInstanceStrokeMask`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — src/workspace/context/WorkspaceMaskContextTypes.ts:22
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
Other · Architecture — Whether feature slices stay independent (no direct cross-slice references) — the discipline that makes vertical-slice architecture pay off.
Method: Roslyn scan (vertical-slice gated): feature slices resolved from namespaces (.Features.*, .Slices.*) or project names; cross-slice type references detected. Deterministic, traceable.
`analyzeImageEmbedding` (slice 'ai-selection') depends on `extractImageEmbeddingInWorker` from slice 'segmentation'. — electron/features/ai-selection/aiSelectionEmbedding.ts:50
`analyzePeopleOnDemand` (slice 'ai-selection') depends on `shutdownSpecializedSegmentationWorker` from slice 'segmentation'. — electron/features/ai-selection/aiSelectionOnDemandAnalysis.ts:78
`analyzePhotoEvidenceItem` (slice 'ai-selection') depends on `analyzeCompositionSubject` from slice 'composition'. — electron/features/ai-selection/aiSelectionOnDemandAnalysis.ts:160
`buildFaceDescriptors` (slice 'ai-selection') depends on `extractFaceEmbeddingInWorker` from slice 'segmentation'. — electron/features/ai-selection/aiSelectionPerson.ts:119
`analyzeFaces` (slice 'ai-selection') depends on `extractFaceBoxesInWorker` from slice 'segmentation'. — electron/features/ai-selection/aiSelectionPerson.ts:132
`analyzeFaces` (slice 'ai-selection') depends on `segmentSpecializedInWorker` from slice 'segmentation'. — electron/features/ai-selection/aiSelectionPerson.ts:151
`analyzeContentTags` (slice 'ai-selection') depends on `segmentSpecializedInWorker` from slice 'segmentation'. — electron/features/ai-selection/aiSelectionSemantic.ts:92
`createProjectFromAiSelection` (slice 'ai-selection') depends on `createWorkspaceProject` from slice 'workspace'. — electron/features/ai-selection/aiSelectionService.ts:482
`analyzeBeauty` (slice 'beauty') depends on `extractFaceBoxesInWorker` from slice 'segmentation'. — electron/features/beauty/beautyAnalysisService.ts:251
`analyzeBeauty` (slice 'beauty') depends on `segmentSpecializedInSecondaryWorker` from slice 'segmentation'. — electron/features/beauty/beautyAnalysisService.ts:252
`analyzeBeauty` (slice 'beauty') depends on `segmentSpecializedInWorker` from slice 'segmentation'. — electron/features/beauty/beautyAnalysisService.ts:272
`analyzeCompositionSubject` (slice 'composition') depends on `scoreCompositionInWorker` from slice 'segmentation'. — electron/features/composition/compositionAnalysisService.ts:102
`analyzeCompositionSubject` (slice 'composition') depends on `segmentSpecializedInWorker` from slice 'segmentation'. — electron/features/composition/compositionAnalysisService.ts:104
What to do
Keep slices independent: share cross-slice needs via an explicit contract/shared-kernel, not direct references between slices.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
Other · Code Health — Unreviewed-generation residue in this repository's JavaScript/TypeScript: functions whose whole body still throws a "not implemented" error, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings and JSX of non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.
Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.
Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's JavaScript/TypeScript: functions that only throw a "not implemented" error, functions that take inputs and return a constant or do nothing, async functions that never await, dead `if (false)` branches, and skeleton classes most of whose methods are holes.
Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.
`updateTaskItemProgress` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — electron/export/exportStubs.ts:25
`addTaskItem` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — electron/export/exportStubs.ts:34
`clearExportTasks` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — electron/export/exportStubs.ts:41
`addItems` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — electron/export/exportTaskService.ts:136
`updateItem` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — electron/export/exportTaskService.ts:152
`cancelTask` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — electron/export/exportTaskService.ts:188
`clearTasks` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — electron/export/exportTaskService.ts:223
`pruneTasks` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — electron/export/exportTaskService.ts:231
The guard above `return null;` also returns `null`, so no input can make it matter. Implement the distinction that was intended, or delete the guard. — electron/export/watermarkAssets.ts:28
`applyPersonEvidence` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — electron/features/ai-selection/aiSelectionOnDemandAnalysis.ts:20
`disconnect` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — electron/network/lunaka_websocket_channel.ts:82
Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition. (×2) — REDACTED:333, src/components/MediaInspector.tsx:241
A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something. (×11) — e2e/beauty.e2e.spec.ts:61, e2e/beauty.e2e.spec.ts:231, e2e/beauty.e2e.spec.ts:291, …
`onPhoneDisconnected` has an empty body — confirm it's an intentional no-op and not an unfinished method. — electron/media/live-stream/liveStreamService.ts:69
What to do
Clear the softer debt: re-enable or delete skipped tests, decide whether each empty function is a deliberate no-op (and say so in a comment), and replace blanket `eslint-disable` / `@ts-nocheck` with targeted, justified suppressions.
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
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
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.
Do you agree with this assessment?
P1 · CI/CD gates8.5 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
What to do
Run the test suite in CI via an explicit runner step (`pnpm test` for the toolchain this pipeline already uses) and gate merges on it.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Do you agree with this assessment?
P2 · Observability7.0 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 2/3 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `dji_mock_server/opc`.
`src/workspace/shared/workspaceMixedExport.ts` reports through `console.*` at line 430 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/workspace/shared/workspaceMixedExport.ts:430
`src/workspace/lut/LutManager.ts` reports through `console.*` at line 25 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/workspace/lut/LutManager.ts:25
`src/workspace/lut/LutManager.ts` reports through `console.*` at line 41 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/workspace/lut/LutManager.ts:41
`src/workspace/creative/WorkspaceCreativeFactory.tsx` reports through `console.*` at line 83 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/workspace/creative/WorkspaceCreativeFactory.tsx:83
`src/workspace/border/borderPresets.ts` reports through `console.*` at line 18 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/workspace/border/borderPresets.ts:18
`src/ui/ErrorBoundary.tsx` reports through `console.*` at line 24 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/ui/ErrorBoundary.tsx:24
`src/pages/useMediaLibraryTransferActions.ts` reports through `console.*` at line 170 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/pages/useMediaLibraryTransferActions.ts:170
`src/pages/useMediaLibraryTransferActions.ts` reports through `console.*` at line 185 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/pages/useMediaLibraryTransferActions.ts:185
`src/pages/useMediaLibraryTransferActions.ts` reports through `console.*` at line 264 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/pages/useMediaLibraryTransferActions.ts:264
`src/components/multipleLayerVideoFrameRenderer.ts` reports through `console.*` at line 102 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/components/multipleLayerVideoFrameRenderer.ts:102
`src/components/multipleLayerVideoFrameRenderer.ts` reports through `console.*` at line 320 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/components/multipleLayerVideoFrameRenderer.ts:320
`src/components/multipleLayerVideoFrameRenderer.ts` reports through `console.*` at line 335 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/components/multipleLayerVideoFrameRenderer.ts:335
`src/components/previewStageExport.ts` reports through `console.*` at line 394 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/components/previewStageExport.ts:394
`src/components/previewStageExport.ts` reports through `console.*` at line 604 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/components/previewStageExport.ts:604
`src/components/previewStageExport.ts` reports through `console.*` at line 605 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/components/previewStageExport.ts:605
`src/components/previewStageExport.ts` reports through `console.*` at line 628 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/components/previewStageExport.ts:628
`src/components/AnnexBVideoCanvas.tsx` reports through `console.*` at line 160 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/components/AnnexBVideoCanvas.tsx:160
`src/components/AnnexBVideoCanvas.tsx` reports through `console.*` at line 203 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/components/AnnexBVideoCanvas.tsx:203
`src/components/DownloadProgressModal.tsx` reports through `console.*` at line 211 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/components/DownloadProgressModal.tsx:211
`src/components/DownloadProgressModal.tsx` reports through `console.*` at line 311 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/components/DownloadProgressModal.tsx:311
`src/components/GlobalDownloadProgress.tsx` reports through `console.*` at line 42 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/components/GlobalDownloadProgress.tsx:42
`src/components/PreviewStage.tsx` reports through `console.*` at line 388 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/components/PreviewStage.tsx:388
`src/components/PreviewStage.tsx` reports through `console.*` at line 400 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/components/PreviewStage.tsx:400
`src/components/PreviewStage.tsx` reports through `console.*` at line 424 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/components/PreviewStage.tsx:424
`src/components/PreviewStage.tsx` reports through `console.*` at line 461 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/components/PreviewStage.tsx:461
`landing/generate-changelog.cjs` reports through `console.*` at line 123 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — landing/generate-changelog.cjs:123
`electron/mainDebug.ts` reports through `console.*` at line 14 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — electron/mainDebug.ts:14
`electron/ipc/ipcLunaRenderCore.ts` reports through `console.*` at line 871 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — electron/ipc/ipcLunaRenderCore.ts:871
`electron/infrastructure/loggerService.ts` reports through `console.*` at line 104 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — electron/infrastructure/loggerService.ts:104
`electron/infrastructure/startupWindowService.ts` reports through `console.*` at line 18 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — electron/infrastructure/startupWindowService.ts:18
`electron/infrastructure/startupWindowService.ts` reports through `console.*` at line 92 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — electron/infrastructure/startupWindowService.ts:92
`electron/infrastructure/usageAnalyticsRegistration.ts` reports through `console.*` at line 23 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — electron/infrastructure/usageAnalyticsRegistration.ts:23
`REDACTED` reports through `console.*` at line 128 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:128
`REDACTED` reports through `console.*` at line 134 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:134
`REDACTED` reports through `console.*` at line 145 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:145
`REDACTED` reports through `console.*` at line 215 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:215
`REDACTED` reports through `console.*` at line 244 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:244
`REDACTED` reports through `console.*` at line 246 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:246
`electron/features/director-lab/directorLabPlanStorage.ts` reports through `console.*` at line 402 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — electron/features/director-lab/directorLabPlanStorage.ts:402
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Route service-code `console.*` output through the module's structured logger (with named fields), so delivery outcomes and failures reach the log pipeline with a level.
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 javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 4 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.
`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`. — package.json:116
What to do
Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are 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
Make sure a person approves each release. The release job names an environment, but its approval rules live in the code host's settings, where we can't see them. Check that a reviewer must approve each release, or publish releases as drafts first, so a bad build can be stopped before anyone downloads it.
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.
`processMOV` is async and calls .wait(), Thread.sleep — a blocking call inside async code stalls the cooperative pool's thread — one per core — and every task scheduled on it for as long as it runs. — electron/platform/macos/livetool.swift:105
`existsSync` in `downloadLegacyArchive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — electron/infrastructure/hotUpdateArchiveService.ts:118
`rmSync` in `downloadLegacyArchive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×4) — electron/infrastructure/hotUpdateArchiveService.ts:123, electron/infrastructure/hotUpdateArchiveService.ts:130, electron/infrastructure/hotUpdateArchiveService.ts:146, …
`renameSync` in `downloadLegacyArchive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — electron/infrastructure/hotUpdateArchiveService.ts:142
`mkdirSync` in `downloadArchive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — electron/infrastructure/hotUpdateArchiveService.ts:156
`rmSync` in `downloadArchive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — electron/infrastructure/hotUpdateArchiveService.ts:171
`statSync` in `callback to filter` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — electron/ipc/ipcLunaRenderCore.ts:858
`statSync` in `callback to localBuiltinDirs.some` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — electron/ipc/ipcLunaRenderCore.ts:863
`mkdirSync` in `startLiveStreamCapture` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — electron/media/live-stream/liveStreamService.ts:171
`existsSync` in `scanBluetoothDevices` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — electron/platform/network/bluetoothDebugService.ts:39
`existsSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×3) — scripts/after-pack-adhoc.mjs:35, scripts/after-pack-adhoc.mjs:41, scripts/after-pack-adhoc.mjs:61
`execFileSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×5) — scripts/after-pack-adhoc.mjs:42, scripts/after-pack-adhoc.mjs:55, scripts/after-pack-adhoc.mjs:61, …
`readdirSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/after-pack-adhoc.mjs:54
`writeFileSync` in `test("real TCP video reaches the local HTTP preview and control requests return to the phone")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/test-ios-tcp-receiver.mjs:338
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.
TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
Do you agree with this assessment?
R1 · Type Safety8.2 / 10Strong✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.
Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.
resources/ios-usb/darwin-arm64/ and resources/ios-usb/darwin-x64/ are near-verbatim copies of each other: 7 files are byte-identical under the same relative paths (~2042 lines; the trees hold 11 and 11 files). That is one structural fact, not 7 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place. — resources/ios-usb/darwin-arm64/licenses/libimobiledevice/COPYING.LESSER:1
67 duplicated blocks under src/ have copies in at least two of the sibling directories ai-selection, components, hooks, lib, pages, routes (+3 more sibling(s) not listed) — 33 of them are reported below, and 34 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 67 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 67 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 67 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. — src/components/DirectorLabView.tsx:34
44 duplicated blocks under the repository root have copies in at least two of the sibling directories electron, landing, luna_mock_server, public, resources, scripts (+1 more sibling(s) not listed) — 30 of them are reported below, and 14 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 44 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 44 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 44 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. — resources/ios-usb/darwin-arm64/licenses/build-macos-ios-usb.mjs:2
32 duplicated blocks under electron/ have copies in at least two of the sibling directories devices, devtools, export, features, infrastructure, ipc (+3 more sibling(s) not listed) — 18 of them are reported below, and 14 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 32 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 32 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 32 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. — REDACTED:62
19 duplicated blocks under src/workspace/creative/ have copies in at least two of the sibling directories color-reveal, only-your-color, pixel-flow, pixel-stretch, triple-stitch — 13 of them are reported below, and 6 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 19 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 19 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 19 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. — src/workspace/creative/only-your-color/OnlyYourColorCreative.tsx:76
18 duplicated blocks under src/workspace/ have copies in at least two of the sibling directories beauty, border, color, components, context, creative (+6 more sibling(s) not listed) — 14 of them are reported below, and 4 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 18 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 18 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 18 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. — src/workspace/border/BorderItem.tsx:89
16 duplicated blocks under electron/devices/ have copies in at least two of the sibling directories common, dji, go-ultra, insta360 — 15 of them are reported below, and 1 is 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 16 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 16 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 16 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. — electron/devices/dji/djiWebBluetoothTransport.ts:57
7 of the duplicated blocks reported below have copies in at least two of the sibling directories ai-selection, beauty, color, composition, segmentation, subtitles (+1 more sibling(s) not listed) under electron/features/. That concentration is one structural fact, not 7 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 7 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. — electron/features/beauty/beautyBlemishDetection.ts:71
src/workspace/creative/only-your-color/OnlyYourColorCreative.tsx:76 · src/workspace/creative/pixel-stretch/PixelStretchCreative.tsx:90 — the two spans are one implementation copied and then locally edited — 1872 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. — src/workspace/creative/only-your-color/OnlyYourColorCreative.tsx:76
electron/devices/dji/djiWebBluetoothTransport.ts:57 · electron/devices/insta360/lunaBleWebBluetoothTransport.ts:90 — the two spans are one implementation copied and then locally edited — 1076 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. — electron/devices/dji/djiWebBluetoothTransport.ts:57
resources/ios-usb/darwin-arm64/licenses/build-macos-ios-usb.mjs:2 · resources/ios-usb/darwin-x64/licenses/build-macos-ios-usb.mjs:2 · scripts/build-macos-ios-usb.mjs:2 — these 3 files are line-for-line copies of one another — 108 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. — resources/ios-usb/darwin-arm64/licenses/build-macos-ios-usb.mjs:2
electron/devices/go-ultra/debugAdapter.ts:15 · REDACTED:17 — the two spans are one implementation copied and then locally edited — 447 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. — electron/devices/go-ultra/debugAdapter.ts:15
electron/devices/dji/djiVideoStreamAdapter.ts:38 · electron/devices/insta360/lunaVideoStreamAdapter.ts:27 — the two spans are one implementation copied and then locally edited — 573 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. — electron/devices/dji/djiVideoStreamAdapter.ts:38
src/pages/CameraMediaPage.tsx:72 · src/pages/LocalMediaPage.tsx:53 — the two spans are one implementation copied and then locally edited — 446 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. — src/pages/CameraMediaPage.tsx:72
src/components/HelpDialog.tsx:170 · src/components/HotUpdateBanner.tsx:51 — the two spans are one implementation copied and then locally edited — 421 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. — src/components/HelpDialog.tsx:170
REDACTED:323 · REDACTED:388 — the two spans are one implementation copied and then locally edited — 382 tokens are still identical, in the same order in both spans, 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. — REDACTED:323
src/components/DirectorLabView.tsx:34 · src/hooks/useDirectorLab.ts:506 — the 2 copies are spread across 2 files, and what repeats is a LIST OF ENTRIES rather than behaviour — the same entries written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator's options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents. — src/components/DirectorLabView.tsx:34
electron/media/live-stream/liveConnectionDebugService.ts:349 · electron/media/live-stream/liveConnectionDebugService.ts:437 — all 2 copies are in the same file, 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. — electron/media/live-stream/liveConnectionDebugService.ts:349
scripts/test-jpeg-hdr-metadata.mjs:14 · scripts/test-rendered-jpeg-color-metadata.mjs:20 — the 2 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. — scripts/test-jpeg-hdr-metadata.mjs:14
electron/ipc/ipcDolbyVisionExport.ts:18 · electron/ipc/ipcOriginalFileExport.ts:23 — the two spans are one implementation copied and then locally edited — 255 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. — electron/ipc/ipcDolbyVisionExport.ts:18
electron/features/beauty/beautyBlemishDetection.ts:111 · electron/features/beauty/beautyBlemishDetection.ts:167 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — electron/features/beauty/beautyBlemishDetection.ts:111
electron/media/fileDownloadService.ts:197 · electron/media/fileDownloadService.ts:249 — the two spans are one implementation copied and then locally edited — 167 tokens are still identical, in the same order in both spans, 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. — electron/media/fileDownloadService.ts:197
electron/platform/render/lunaRenderCoreNormalize.ts:5 · src/shared/types/render.ts:36 — the 2 copies are spread across 2 files, and what repeats is a LIST OF ENTRIES rather than behaviour — the same entries written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator's options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents. — electron/platform/render/lunaRenderCoreNormalize.ts:5
electron/features/ai-selection/aiSelectionPerson.ts:48 · src/shared/compositionAnalysis.ts:35 — 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. — electron/features/ai-selection/aiSelectionPerson.ts:48
electron/media/live-stream/liveConnectionDebugService.ts:323 · electron/media/live-stream/liveConnectionDebugService.ts:411 — all 2 copies are in the same file, 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. — electron/media/live-stream/liveConnectionDebugService.ts:323
scripts/webgpu-comparison-page.ts:129 · src/components/webgpuVideoExport.ts:150 — 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. — scripts/webgpu-comparison-page.ts:129
src/workspace/trim/TrimPanel.tsx:604 · src/workspace/trim/TrimPanel.tsx:629 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — src/workspace/trim/TrimPanel.tsx:604
electron/devices/dji/djiBleSession.ts:279 · electron/devices/dji/djiBleSession.ts:382 — all 2 copies are in the same file, 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. — electron/devices/dji/djiBleSession.ts:279
electron/devices/dji/djiWebBluetoothTransport.ts:21 · electron/devices/insta360/lunaBleWebBluetoothTransport.ts:58 — 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. — electron/devices/dji/djiWebBluetoothTransport.ts:21
scripts/copy-ffmpeg.mjs:45 · scripts/prepare-macos-x64-runtime.mjs:29 — the 2 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. — scripts/copy-ffmpeg.mjs:45
scripts/test-pixel-stretch-render.mjs:154 · scripts/test-pixel-stretch-render.mjs:176 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — scripts/test-pixel-stretch-render.mjs:154
src/components/MediaGallery.tsx:318 · src/workspace/components/WorkspaceMediaStrip.tsx:138 — 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. — src/components/MediaGallery.tsx:318
src/workspace/color/DetailPanel.tsx:8 · src/workspace/color/TonePanel.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. — src/workspace/color/DetailPanel.tsx:8
src/workspace/creative/only-your-color/exportOnlyYourColorImage.ts:23 · src/workspace/creative/pixel-stretch/exportPixelStretchImage.ts:18 — 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. — src/workspace/creative/only-your-color/exportOnlyYourColorImage.ts:23
electron/storage/settingsService.ts:357 · electron/storage/settingsService.ts: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. — electron/storage/settingsService.ts:357
src/components/WorkspaceProjectDialogs.tsx:26 · src/components/WorkspaceProjectDialogs.tsx:61 — all 2 copies are in the same file, 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. — src/components/WorkspaceProjectDialogs.tsx:26
src/workspace/creative/triple-stitch/TripleStitchCreative.tsx:742 · src/workspace/creative/triple-stitch/TripleStitchCreative.tsx:763 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — src/workspace/creative/triple-stitch/TripleStitchCreative.tsx:742
REDACTED:62 · electron/platform/network/networkDiagnostics.ts:132 — 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. — REDACTED:62
electron/features/composition/compositionAnalysisService.ts:44 · electron/features/composition/compositionAnalysisService.ts:64 — all 2 copies are in the same file, 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. — electron/features/composition/compositionAnalysisService.ts:44
src/ui/Button.tsx:30 · src/ui/IconButton.tsx:28 — 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. — src/ui/Button.tsx:30
What to do
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
React / JS · 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.
dji_mock_server/server.mjs:4 reaches into another package with a relative path (./opc/server.js) — import the package by name instead. — dji_mock_server/server.mjs:4
dji_mock_server/server.mjs:8 reaches into another package with a relative path (./opc/server.js) — import the package by name instead. — dji_mock_server/server.mjs:8
scripts/helpers/djiMockSession.mjs:6 reaches into another package with a relative path (../../dji_mock_server/opc/protocol.js) — import the package by name instead. — scripts/helpers/djiMockSession.mjs:6
What to do
Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
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.
validate has cyclomatic complexity 240 and cognitive complexity 223; 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. — dji_mock_server/opc/state.js:220
DeviceConnectPage has cyclomatic complexity 97 and cognitive complexity 82; 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. — src/pages/DeviceConnectPage.tsx:56
(anonymous) has cyclomatic complexity 92 and cognitive complexity 132; 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. — REDACTED:131
main has cyclomatic complexity 87 and cognitive complexity 134; 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. — scripts/test-gpu-export.mjs:292
AiSelectionPage has cyclomatic complexity 87 and cognitive complexity 72; 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. — src/pages/AiSelectionPage.tsx:94
(anonymous) has cyclomatic complexity 79 and cognitive complexity 156; 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. — src/hooks/useDirectorPlanSync.ts:92
(anonymous) has cyclomatic complexity 75 and cognitive complexity 85; 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. — src/workspace/border/buildBorderLayer.ts:236
(anonymous) has cyclomatic complexity 65 and cognitive complexity 66; 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. — electron/ipc/ipcWorkspaceService.ts:587
apply has cyclomatic complexity 61 and cognitive complexity 57; 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. — dji_mock_server/opc/state.js:490
PreviewModal has cyclomatic complexity 60 and cognitive complexity 57; 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. — src/components/PreviewModal.tsx:79
PreviewStage has cyclomatic complexity 56 and cognitive complexity 49; 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. — src/components/PreviewStage.tsx:57
(anonymous) has cyclomatic complexity 55 and cognitive complexity 44; 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. — electron/ipc/ipcDirectorLabService.ts:289
renderMultipleLayerVideoFrame has cyclomatic complexity 53 and cognitive complexity 71; 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. — src/components/multipleLayerVideoFrameRenderer.ts:263
createLayerParams has cyclomatic complexity 51 and cognitive complexity 51; 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. — src/components/webgpu/webgpuLayerMath.ts:214
handleKeyDown has cyclomatic complexity 51 and cognitive complexity 47; 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. — src/pages/WorkspacePage.tsx:1076
LiveControlPanel has cyclomatic complexity 50 and cognitive complexity 24; 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. — src/components/LiveControlPanel.tsx:46
PixelStretchCreative has cyclomatic complexity 48 and cognitive complexity 39; 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. — src/workspace/creative/pixel-stretch/PixelStretchCreative.tsx:56
MaskPanel has cyclomatic complexity 47 and cognitive complexity 44; 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. — src/workspace/mask/MaskPanel.tsx:48
reconcileLocalDirectorPlanUnlocked has cyclomatic complexity 46 and cognitive complexity 50; 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. — electron/features/director-lab/directorLabPlanStorage.ts:234
diagnoseLiveConnection has cyclomatic complexity 45 and cognitive complexity 83; 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. — electron/media/live-stream/liveConnectionDebugService.ts:180
prepare has cyclomatic complexity 44 and cognitive complexity 68; 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. — REDACTED:218
buildVideoMetadata has cyclomatic complexity 44 and cognitive complexity 53; 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. — electron/media/videoMetadata.ts:156
MediaCardImpl has cyclomatic complexity 44 and cognitive complexity 35; 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. — src/components/MediaCard.tsx:41
generatePairedReferenceMatchLut has cyclomatic complexity 43 and cognitive complexity 103; 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. — src/workspace/color/referenceMatch.ts:584
(anonymous) has cyclomatic complexity 43 and cognitive complexity 99; 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. — src/workspace/shared/workspaceMixedExport.ts:186
validateLifecycle has cyclomatic complexity 43 and cognitive complexity 49; 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. — REDACTED:513
handleCommand has cyclomatic complexity 42 and cognitive complexity 49; 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. — REDACTED:615
WorkspaceEditSidebar has cyclomatic complexity 42 and cognitive complexity 41; 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. — src/workspace/components/WorkspaceEditSidebar.tsx:139
OnlyYourColorCreative has cyclomatic complexity 42 and cognitive complexity 38; 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. — src/workspace/creative/only-your-color/OnlyYourColorCreative.tsx:54
WorkspacePageInner has cyclomatic complexity 42 and cognitive complexity 37; 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. — src/pages/WorkspacePage.tsx:145
verifyMacosIosUsbResources has cyclomatic complexity 41 and cognitive complexity 61; 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. — scripts/macos-ios-usb-resources.mjs:12
autoJoinDeviceWifi has cyclomatic complexity 40 and cognitive complexity 62; 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. — electron/platform/network/wifiAutoJoinService.ts:199
WatermarkSettings has cyclomatic complexity 40 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — src/components/WatermarkSettings.tsx:175
(anonymous) has cyclomatic complexity 39 and cognitive complexity 94; 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. — src/components/previewStageExport.ts:519
render has cyclomatic complexity 39 and cognitive complexity 51; 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. — src/components/webgpuVideoRenderer.ts:709
applyControlPatch has cyclomatic complexity 39 and cognitive complexity 43; 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. — REDACTED:1075
consume has cyclomatic complexity 38 and cognitive complexity 110; 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. — src/components/AnnexBVideoCanvas.tsx:234
downloadToFile has cyclomatic complexity 38 and cognitive complexity 49; 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. — electron/media/fileDownloadService.ts:177
(anonymous) has cyclomatic complexity 37 and cognitive complexity 47; 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. — electron/features/director-lab/directorLabLocalImport.ts:167
exportVideoWithWebGpu has cyclomatic complexity 37 and cognitive complexity 42; 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. — src/components/webgpuVideoExport.ts:182
Do you agree with this assessment?
R3 · Large Files6.6 / 10Adequate✓ 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.
REDACTED has 1524 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
src/pages/WorkspacePage.tsx has 1345 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/pages/WorkspacePage.tsx:1
REDACTED has 1119 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
src/workspace/creative/triple-stitch/TripleStitchCreative.tsx has 1009 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/workspace/creative/triple-stitch/TripleStitchCreative.tsx:1
electron/ipc/ipcWorkspaceService.ts has 920 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — electron/ipc/ipcWorkspaceService.ts:1
electron/ipc/ipcLunaRenderCore.ts has 917 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — electron/ipc/ipcLunaRenderCore.ts:1
src/components/webgpuVideoRenderer.ts has 869 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/components/webgpuVideoRenderer.ts:1
REDACTED has 857 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
src/components/previewStageExport.ts has 798 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/components/previewStageExport.ts:1
electron/devices/dji/djiUdpTransport.ts has 797 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — electron/devices/dji/djiUdpTransport.ts:1
dji_mock_server/opc/state.js has 786 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — dji_mock_server/opc/state.js:1
REDACTED has 769 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
src/pages/DeviceConnectPage.tsx has 726 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/pages/DeviceConnectPage.tsx:1
electron/ipc/ipcDirectorLabService.ts has 722 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — electron/ipc/ipcDirectorLabService.ts:1
src/components/PreviewStage.tsx has 689 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/components/PreviewStage.tsx:1
src/workspace/trim/TrimPanel.tsx has 685 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/workspace/trim/TrimPanel.tsx:1
src/workspace/color/referenceMatch.ts has 666 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/workspace/color/referenceMatch.ts:1
REDACTED has 654 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
src/workspace/mask/MaskOverlay.tsx has 628 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/workspace/mask/MaskOverlay.tsx:1
electron/storage/fileService.ts has 625 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — electron/storage/fileService.ts:1
electron/preload.ts has 599 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — electron/preload.ts:1
src/workspace/shared/editPipeline.ts has 592 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/workspace/shared/editPipeline.ts:1
src/pages/useMediaLibraryController.ts has 590 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/pages/useMediaLibraryController.ts:1
scripts/webgpu-comparison-page.ts has 570 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — scripts/webgpu-comparison-page.ts:1
electron/appMain.ts has 564 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — electron/appMain.ts:1
src/pages/SettingsPage.tsx has 561 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/pages/SettingsPage.tsx:1
REDACTED has 560 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
public/local-share/app.js has 560 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — public/local-share/app.js:1
src/components/webgpu/webgpuResources.ts has 551 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/components/webgpu/webgpuResources.ts:1
src/components/PreviewModal.tsx has 547 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/components/PreviewModal.tsx:1
src/context/DeviceConnectionContext.tsx has 532 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/context/DeviceConnectionContext.tsx:1
src/hooks/useDirectorLab.ts has 525 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/hooks/useDirectorLab.ts:1
REDACTED has 523 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
REDACTED has 503 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
src/components/webgpuVideoExport.ts has 497 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/components/webgpuVideoExport.ts:1
src/pages/AiSelectionPage.tsx has 497 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/pages/AiSelectionPage.tsx:1
src/workspace/context/WorkspaceMaskContext.tsx has 497 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/workspace/context/WorkspaceMaskContext.tsx:1
src/workspace/creative/pixel-stretch/PixelStretchCreative.tsx has 492 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/workspace/creative/pixel-stretch/PixelStretchCreative.tsx:1
src/components/MultipleLayerVideoPreviewLrcRender.tsx has 490 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/components/MultipleLayerVideoPreviewLrcRender.tsx:1
REDACTED has 485 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Do you agree with this assessment?
R4 · Test Coverage7.0 / 10Strong✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×40) — REDACTED:1, electron/ipc/ipcLunaRenderCore.ts:1, electron/ipc/ipcWorkspaceService.ts:1, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).
Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.
Do you agree with this assessment?
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
The root package declares the lint script `lint` (`eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run lint` in `.` (or the workspace's task runner). — package.json:108
Do you agree with this assessment?
R7 · Dead Code6.8 / 10Adequate✓ 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 250 application, 34 tooling and 37 test entry point(s) detected in this repo. Gate removals on `pnpm run build` — an undetected custom entry would make these reachable.
no import path from any entry point (250 application, 34 tooling, 37 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 (×39) — src/components/webgpuVideoExport.ts, src/components/NativeGpuVideoPreview.tsx, electron/devices/go-ultra/debugAdapter.ts, …
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
src/ui/DropdownPanel.tsx → src/ui/index.ts → src/ui/DropdownPanel.tsx (one verified cycle inside a mutually-dependent group of 3 files) — src/ui/DropdownPanel.tsx:3
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X13 · Undrained process stream6.4 / 10Adequate✓ Tool-verified
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.
`spawn` pipes `stdout` here — it is given no `stdio` option, or `'pipe'` — but nothing in this scope ever reads `child.stdout`, while `child.stderr` is read and the child's end is awaited. Node holds an unread pipe's output only up to its buffer: once the child writes more than that to stdout (measured on Linux: about 128 KB — the 64 KB pipe plus Node's 64 KB read-ahead — and less elsewhere), the child blocks on the write, never exits, and the `close`/`exit` this code waits for never fires. Nothing fails loudly: the promise never settles, the request never returns, and the stuck child holds its resources until something kills it. Consume both streams (`child.stdout.on('data', …)`, or `child.stdout.resume()` to discard it), or stop piping the one you do not want — `stdio: ['pipe', 'pipe', 'inherit']` or `'ignore'` in that slot. — electron/ipc/ipcDirectorLabService.ts:607
What to do
Each finding names the span that makes the branch dead and the span it is dead because of. Confirm from the two, then delete the dead arm or fix the predicate that was meant to be reachable.
Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.
Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X17 · Uncapped recursion over a caller-supplied document3.5 / 10Weak✓ Tool-verified
Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
`serializeDiagnosticValue` is exported and takes `value: unknown` from its caller, and it calls itself at line 22 (`serializeDiagnosticValue`) with a piece of `value` (and at line 30, line 32) — and nowhere in `serializeDiagnosticValue` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `serializeDiagnosticValue` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/shared/crashDiagnosticUtils.ts:22
What to do
Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.
Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).
Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.
Only 53/73 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
`load` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — public/local-share/app.js:313
`loadSharedFiles` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — public/local-share/app.js:358
`uploadFiles` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — public/local-share/app.js:450
`execute` holds an AbortSignal but calls `spawn(…)` without it, so its caller's cancellation never reaches that call and it runs to its end after whatever wanted it has given up. Hand the signal on: `spawn(…, { signal })`. — electron/platform/ffmpeg/pipeline.ts:110
`readRemotePrefix` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — electron/media/mediaCaptureDate.ts:39
`fetchLatestHotUpdateViaAPI` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:106
`fetchHotUpdateIntegrity` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:163
`checkForHotUpdatesOnce` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:206
`loadSamModelOnce` holds an AbortSignal but calls `writeFile(…)` without it, so its caller's cancellation never reaches that call and it runs to its end after whatever wanted it has given up. Hand the signal on: `writeFile(…, { signal })`. — electron/infrastructure/modelLoader.ts:113
`installArchive` holds an AbortSignal but calls `writeFile(…)` without it, so its caller's cancellation never reaches that call and it runs to its end after whatever wanted it has given up. Hand the signal on: `writeFile(…, { signal })`. — electron/infrastructure/runtimeResourceService.ts:106
`installSevenZipArchive` holds an AbortSignal but calls `writeFile(…)` without it, so its caller's cancellation never reaches that call and it runs to its end after whatever wanted it has given up. Hand the signal on: `writeFile(…, { signal })`. — electron/infrastructure/runtimeResourceService.ts:172
`releaseNotesForTag` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — electron/infrastructure/updateService.ts:63
`checkGitCode` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — electron/infrastructure/updateService.ts:85
`checkGitHub` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — electron/infrastructure/updateService.ts:127
`restoreSubtitlePunctuation` holds an AbortSignal but calls `spawn(…)` without it, so its caller's cancellation never reaches that call and it runs to its end after whatever wanted it has given up. Hand the signal on: `spawn(…, { signal })`. — electron/features/subtitles/subtitlePunctuationService.ts:46
`transcribeVideo` holds an AbortSignal but calls `spawn(…)` without it, so its caller's cancellation never reaches that call and it runs to its end after whatever wanted it has given up. Hand the signal on: `spawn(…, { signal })`. — electron/features/subtitles/subtitleTranscriptionService.ts:53
`removeObject` holds an AbortSignal but calls `writeFile(…)` without it, so its caller's cancellation never reaches that call and it runs to its end after whatever wanted it has given up. Hand the signal on: `writeFile(…, { signal })`. — electron/features/segmentation/inpaintService.ts:81
`analyzeVideoStory` holds an AbortSignal but calls `fs.writeFile(…)` without it, so its caller's cancellation never reaches that call and it runs to its end after whatever wanted it has given up. Hand the signal on: `fs.writeFile(…, { signal })`. — electron/features/ai-selection/aiSelectionVideo.ts:70
`listFiles` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:834
`call` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — electron/devices/dji/djiBleSession.ts:428
What to do
Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped5.3 / 10Adequate✓ Tool-verified
Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.
Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.
`latest.bodyHtml` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — landing/latest-changelog.js:11
`PAGE_RENDERERS[pageId]()` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — landing/script.js:357
`WS_SUB_RENDERERS[toolId]()` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — landing/script.js:394
What to do
Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
`.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. (×27) — src/workspace/shared/workspaceLivePhotoExport.ts:94, src/workspace/shared/workspaceLivePhotoExport.ts:201, src/workspace/shared/workspaceMixedExport.ts:168, …
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. (×13) — src/workspace/lut/FilterPanel.tsx:56, src/workspace/lut/LutImportDialog.tsx:81, src/workspace/hooks/useProjectManager.ts:99, …
What to do
Swallowed exception (empty catch)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
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.
~1.7 `!` null assertions per 1k TypeScript source lines — 184 assertion(s) across the 110804 source line(s) of the 695 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: src/workspace/mask/MaskOverlay.tsx (20), src/lib/annexB.ts (19), src/ai-selection/useAiSelection.ts (18). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
What to do
The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 2 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 22 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 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.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 48 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; Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one; 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. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. 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).
AX4 Dependency direction — not applicable to a vertical-slice architecture (the inward-dependency rule is for layered/clean styles)
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): the package `7zip-bin` is declared in package.json but was not installed in our sandbox, so the dependency install did not complete here. This is a limit of our sandbox, not of your repository. Last output: "at wrapModuleLoad (node:internal/modules/cjs/loader:217:24) / at Module.require (node:internal/modules/cjs/loader:1335:12) / at require (node:internal/modules/helpers:136:16) / at file://<repo>/scripts/copy-ffmpeg.mjs:25:21 / at ModuleJob.run (node:internal/modules/esm/module_job:271:25) / at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:547:26) / at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:116:5) { / code: 'MODULE_NOT_FOUND', / requireStack: [ / '<repo>/scripts/copy-ffmpeg.mjs' / ] / } / Node.js v22.13.0" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no data at rest for these controls to protect.
C2 Access Controls — No access-control surface detected in the analyzed source — this repository starts no server another machine can reach (no actix-web HttpServer, axum::serve, Rocket launch, warp::serve, poem or salvo Server, tonic Server::builder, hyper or tiny_http server outside examples and tests, none bound beyond loopback). Access control is therefore N/A here — a crate is authorized by the application that serves it, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source 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 field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D11 Test Reliability — Test reliability not measured — JavaScript/TypeScript suite did not run
D16 Bus Factor — single-maintainer repository — bus factor is not applicable
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D22 Internal API Consistency — API consistency is measured on C#, TypeScript, Go only; the exposed JavaScript, Rust surface was not measured.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D25 ADR Conformance — 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) — 11 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.
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: the JavaScript/TypeScript half could not be measured — the node:test suite in dji_mock_server/opc/ ran but wrote no lcov report. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan.
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (13 value object(s))
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
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner 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
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P7 Outbound HTTP resilience — no outbound HTTP usage detected — no HTTP client call or construction in the JavaScript/TypeScript, Rust, Swift source (service entry point: REDACTED:183 (http.createServer())
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for tinybench, mitata, benchmark.js, benny or vitest `bench(...)` calls in files that import them (or `*.bench.*` files), or one of those in a package.json, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
S1 Web-Security Posture — No web surface: 70 Rust file(s) were read for weak hashes and ciphers, key material fixed in the source, disabled TLS certificate validation and obsolete TLS versions, and none was found. This repository serves no HTTP of its own — no HTTP-server crate (actix-web, axum, Rocket, warp, poem, tide, salvo, tonic, a hyper server, …) among its Cargo manifests' run-time dependencies, and no server started in its production source — so HTTPS enforcement, HSTS, cookie flags and input validation are N/A here, as they are for a C# library or worker. If this codebase starts serving HTTP, the dimension reactivates automatically.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
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.
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
X26 Unsynchronised callback handoff — X26 reached only 1% of this repository's production lines — typescript (102,479 lines), javascript (22,864 lines), rust (19,133 lines), objectivec (489 lines), cpp (357 lines), c (35 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X27 Collection changed while being enumerated — not 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.
Boundary-crossing change coupling: ipcDirectorLabService.ts ↔ DirectorLabView.tsx electron/ipc/ipcDirectorLabService.ts:1— `electron/ipc/ipcDirectorLabService.ts` (context electron) and `src/components/DirectorLabView.tsx` (context components) sit in DIFFERENT parts of the tree yet change together 80% of the time (8 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `51d420c8` feat: change agents add rule for file split; `071ba258` feat: fixed director media logic; `a599b72c` feat: change luna ai cut live play logic — run `git show` on any of them.
Boundary-crossing change coupling: ipcDirectorLabService.ts ↔ DirectorMediaPreviewDialog.tsx electron/ipc/ipcDirectorLabService.ts:1— `electron/ipc/ipcDirectorLabService.ts` (context electron) and `src/components/DirectorMediaPreviewDialog.tsx` (context components) sit in DIFFERENT parts of the tree yet change together 80% of the time (8 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `be235c20` feat: add more director play logic; `51d420c8` feat: change agents add rule for file split; `071ba258` feat: fixed director media logic — run `git show` on any of them.
Boundary-crossing change coupling: WorkspacePage.tsx ↔ workspaceExportLayers.ts src/pages/WorkspacePage.tsx:1— `src/pages/WorkspacePage.tsx` (context pages) and `src/workspace/shared/workspaceExportLayers.ts` (context workspace) sit in DIFFERENT parts of the tree yet change together 79% of the time (15 of the 19 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are `dd82bd2b` feat: fixed logic with ai color grading; `fc0bddeb` feat: change ai color grading; `c66c659a` feat: add more device media support — run `git show` on any of them.
Boundary-crossing change coupling: aiSelectionService.ts ↔ AiSelectionPage.tsx electron/features/ai-selection/aiSelectionService.ts:1— `electron/features/ai-selection/aiSelectionService.ts` (context electron) and `src/pages/AiSelectionPage.tsx` (context pages) sit in DIFFERENT parts of the tree yet change together 69% of the time (9 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `8a3b81a8` feat: fixed select item cache logic (at that commit the file was still `electron/aiSelectionService.ts`); `3300c2ab` feat: change ai select logic (at that commit the file was still `electron/aiSelectionService.ts`); `b44afa1f` feat: remove some notice (at that commit the file was still `electron/aiSelectionService.ts`) — run `git show` on any of them.
Boundary-crossing change coupling: DeviceConnectionContext.tsx ↔ DeviceConnectPage.tsx src/context/DeviceConnectionContext.tsx:1— `src/context/DeviceConnectionContext.tsx` (context context) and `src/pages/DeviceConnectPage.tsx` (context pages) sit in DIFFERENT parts of the tree yet change together 68% of the time (13 of the 19 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `fd61177b` feat: fixed adjust luna connect logic; `f14b6acd` feat: change logic with connect; `ecf0d926` feat: fixed media source logic — run `git show` on any of them.
Boundary-crossing change coupling: preload.ts ↔ useMediaLibraryTransferActions.ts electron/preload.ts:1— `electron/preload.ts` (context electron) and `src/pages/useMediaLibraryTransferActions.ts` (context pages) sit in DIFFERENT parts of the tree yet change together 67% of the time (10 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `ad47c169` fix: warn before downloading outside local resources; `b17e96bd` feat: remove unsed method; `aa8d9a21` feat: remove some not use files — run `git show` on any of them.
Boundary-crossing change coupling: REDACTED ↔ DeviceConnectPage.tsx REDACTED:1— `REDACTED` (context electron) and `src/pages/DeviceConnectPage.tsx` (context pages) sit in DIFFERENT parts of the tree yet change together 65% of the time (11 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `fd61177b` feat: fixed adjust luna connect logic; `f14b6acd` feat: change logic with connect; `64e1aed4` fix: improve Luna Wi-Fi reconnect detection — run `git show` on any of them.
Boundary-crossing change coupling: REDACTED ↔ DeviceConnectPage.tsx REDACTED:1— `REDACTED` (context electron) and `src/pages/DeviceConnectPage.tsx` (context pages) sit in DIFFERENT parts of the tree yet change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `fd61177b` feat: fixed adjust luna connect logic; `f14b6acd` feat: change logic with connect; `64e1aed4` fix: improve Luna Wi-Fi reconnect detection — run `git show` on any of them.
Boundary-crossing change coupling: deviceProtocols.ts ↔ DeviceConnectionContext.tsx electron/devices/common/deviceProtocols.ts:1— `electron/devices/common/deviceProtocols.ts` (context electron) and `src/context/DeviceConnectionContext.tsx` (context context) sit in DIFFERENT parts of the tree yet change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `f14b6acd` feat: change logic with connect; `fb11b726` feat: change tcp connect; `68469277` feat: 添加网络诊断信息及连接超时诊断收集 (at that commit the file was still `electron/deviceProtocols.ts`) — run `git show` on any of them.
Boundary-crossing change coupling: ipcWorkspaceService.ts ↔ RemovalPanel.tsx electron/ipc/ipcWorkspaceService.ts:1— `electron/ipc/ipcWorkspaceService.ts` (context electron) and `src/workspace/removal/RemovalPanel.tsx` (context workspace) sit in DIFFERENT parts of the tree yet change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `3a24a7b0` feat: add inmask (at that commit the file was still `electron/ipcWorkspaceService.ts`); `29bc6bb6` feat: change fixed object removal logic (at that commit the file was still `electron/ipcWorkspaceService.ts`); `7044d04f` feat: harden object removal workflow (at that commit the file was still `electron/ipcWorkspaceService.ts`) — run `git show` on any of them.
Boundary-crossing change coupling: wifiAutoJoinService.ts ↔ DeviceConnectPage.tsx electron/platform/network/wifiAutoJoinService.ts:1— `electron/platform/network/wifiAutoJoinService.ts` (context electron) and `src/pages/DeviceConnectPage.tsx` (context pages) sit in DIFFERENT parts of the tree yet change together 60% of the time (9 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `fd61177b` feat: fixed adjust luna connect logic; `f14b6acd` feat: change logic with connect; `64e1aed4` fix: improve Luna Wi-Fi reconnect detection — run `git show` on any of them.
Boundary-crossing change coupling: ipcWorkspaceService.ts ↔ WorkspaceMaskContext.tsx electron/ipc/ipcWorkspaceService.ts:1— `electron/ipc/ipcWorkspaceService.ts` (context electron) and `src/workspace/context/WorkspaceMaskContext.tsx` (context workspace) sit in DIFFERENT parts of the tree yet change together 58% of the time (14 of the 24 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `8cb4be8f` feat: add yoo seg logic (at that commit the file was still `electron/ipcWorkspaceService.ts`); `33cc4374` feat: add AI object removal workflow (at that commit the file was still `electron/ipcWorkspaceService.ts`); `20e93528` feat: change mask effect logis (at that commit the file was still `electron/ipcWorkspaceService.ts`) — run `git show` on any of them.
Boundary-crossing change coupling: preload.ts ↔ RemovalPanel.tsx electron/preload.ts:1— `electron/preload.ts` (context electron) and `src/workspace/removal/RemovalPanel.tsx` (context workspace) sit in DIFFERENT parts of the tree yet change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `29bc6bb6` feat: change fixed object removal logic; `7044d04f` feat: harden object removal workflow; `6029275f` revert: remove generative object reconstruction — run `git show` on any of them.
Boundary-crossing change coupling: ipcWorkspaceService.ts ↔ MaskPanel.tsx electron/ipc/ipcWorkspaceService.ts:1— `electron/ipc/ipcWorkspaceService.ts` (context electron) and `src/workspace/mask/MaskPanel.tsx` (context workspace) sit in DIFFERENT parts of the tree yet change together 54% of the time (13 of the 24 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `ff298d0d` feat: change fixed logic (at that commit the file was still `electron/ipcWorkspaceService.ts`); `826d5d80` feat: chnage mask computed (at that commit the file was still `electron/ipcWorkspaceService.ts`); `e0cfdc25` feat: add more model (at that commit the file was still `electron/ipcWorkspaceService.ts`) — run `git show` on any of them.
Boundary-crossing change coupling: liveStreamService.ts ↔ LiveControlPanel.tsx electron/media/live-stream/liveStreamService.ts:1— `electron/media/live-stream/liveStreamService.ts` (context electron) and `src/components/LiveControlPanel.tsx` (context components) sit in DIFFERENT parts of the tree yet change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `6dea53a5` fix: keep live session alive while the phone reconnects; `828f651e` feat: android adb mode support; `84918168` fix: clarify live USB connection guides and preview window title — run `git show` on any of them.
Boundary-crossing change coupling: preload.ts ↔ AppRoutes.tsx electron/preload.ts:1— `electron/preload.ts` (context electron) and `src/routes/AppRoutes.tsx` (context routes) sit in DIFFERENT parts of the tree yet change together 54% of the time (22 of the 41 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 22 shared commits counted here, the most recent 3 are `80b816e9` feat: add director lab view; `fe95020d` feat: change logic with discovery logic; `4d7e7a56` feat: change live control panel — run `git show` on any of them.
Boundary-crossing change coupling: REDACTED ↔ DeviceConnectionContext.tsx REDACTED:1— `REDACTED` (context electron) and `src/context/DeviceConnectionContext.tsx` (context context) sit in DIFFERENT parts of the tree yet change together 53% of the time (9 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `fd61177b` feat: fixed adjust luna connect logic; `f14b6acd` feat: change logic with connect; `ecf0d926` feat: fixed media source logic — run `git show` on any of them.
Boundary-crossing change coupling: settingsService.ts ↔ SettingsPage.tsx electron/storage/settingsService.ts:1— `electron/storage/settingsService.ts` (context electron) and `src/pages/SettingsPage.tsx` (context pages) sit in DIFFERENT parts of the tree yet change together 52% of the time (16 of the 31 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 16 shared commits counted here, the most recent 3 are `fe95020d` feat: change logic with discovery logic; `289fc5fc` feat: add new smb2 support; `34d86138` feat: add nas support — run `git show` on any of them.
Boundary-crossing change coupling: specializedSegmentationService.ts ↔ segmentationModels.ts electron/features/segmentation/specializedSegmentationService.ts:1— `electron/features/segmentation/specializedSegmentationService.ts` (context electron) and `src/shared/segmentationModels.ts` (context shared) sit in DIFFERENT parts of the tree yet change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `e15a4056` feat: add local image beauty controls (at that commit the file was still `electron/specializedSegmentationService.ts`); `9d38e08c` feat: change logic styles (at that commit the file was still `electron/specializedSegmentationService.ts`); `cff416a7` feat: change panel logic and mask new (at that commit the file was still `electron/specializedSegmentationService.ts`) — run `git show` on any of them.
Boundary-crossing change coupling: ExportSettingsPanel.tsx ↔ WorkspacePage.tsx src/components/ExportSettingsPanel.tsx:1— `src/components/ExportSettingsPanel.tsx` (context components) and `src/pages/WorkspacePage.tsx` (context pages) sit in DIFFERENT parts of the tree yet change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `c35442f7` Add Live Photo image extraction and video export controls; `b4822f08` fix: adapt media UI to camera device; `c085a897` feat: change live image creator — run `git show` on any of them.
Boundary-crossing change coupling: preload.ts ↔ ExportSettingsPanel.tsx electron/preload.ts:1— `electron/preload.ts` (context electron) and `src/components/ExportSettingsPanel.tsx` (context components) sit in DIFFERENT parts of the tree yet change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `c35442f7` Add Live Photo image extraction and video export controls; `6ca87570` feat: change ai select; `d8f20dfb` feat: change logic status — run `git show` on any of them.
Boundary-crossing change coupling: usbAoaReceiver.ts ↔ LiveControlPanel.tsx electron/media/live-stream/usbAoaReceiver.ts:1— `electron/media/live-stream/usbAoaReceiver.ts` (context electron) and `src/components/LiveControlPanel.tsx` (context components) sit in DIFFERENT parts of the tree yet 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `5d4cdeab` feat: fixed adb reciever and; `828f651e` feat: android adb mode support; `862191d4` feat: change page styles when use layout logic — run `git show` on any of them.
Boundary-crossing change coupling: usbAoaReceiver.ts ↔ LiveConsolePage.tsx electron/media/live-stream/usbAoaReceiver.ts:1— `electron/media/live-stream/usbAoaReceiver.ts` (context electron) and `src/pages/LiveConsolePage.tsx` (context pages) sit in DIFFERENT parts of the tree yet 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `5d4cdeab` feat: fixed adb reciever and; `828f651e` feat: android adb mode support; `862191d4` feat: change page styles when use layout logic — run `git show` on any of them.
Boundary-crossing change coupling: usbAoaReceiver.ts ↔ liveStream.ts electron/media/live-stream/usbAoaReceiver.ts:1— `electron/media/live-stream/usbAoaReceiver.ts` (context electron) and `src/shared/types/liveStream.ts` (context shared) sit in DIFFERENT parts of the tree yet 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `828f651e` feat: android adb mode support; `862191d4` feat: change page styles when use layout logic; `72a071b9` feat: remove audio input with phone — run `git show` on any of them.
Boundary-crossing change coupling: preload.ts ↔ DirectorMediaPreviewDialog.tsx electron/preload.ts:1— `electron/preload.ts` (context electron) and `src/components/DirectorMediaPreviewDialog.tsx` (context components) sit in DIFFERENT parts of the tree yet 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `51d420c8` feat: change agents add rule for file split; `071ba258` feat: fixed director media logic; `e2e3609e` feat: remove some old desing and add director labs — run `git show` on any of them.
+ 1 more in this group — see findings.md.
AC2 · Forms & labels· <label> that labels no control · ×21
<label> that labels no control landing/script.js:244— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control landing/script.js:245— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control landing/script.js:246— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control landing/script.js:247— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control landing/script.js:249— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control landing/script.js:289— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control landing/script.js:290— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control landing/script.js:291— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control landing/script.js:292— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control landing/script.js:323— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control landing/script.js:331— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control landing/script.js:337— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control src/components/ExportSettingsPanel.tsx:106— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control src/components/ExportSettingsPanel.tsx:117— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control src/components/ExportSettingsPanel.tsx:138— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control src/components/ExportSettingsPanel.tsx:146— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control src/components/ExportSettingsPanel.tsx:156— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control src/components/ExportSettingsPanel.tsx:166— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control src/components/ExportSettingsPanel.tsx:177— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control src/components/PanoramaStitchingLabView.tsx:320— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control src/components/PanoramaStitchingLabView.tsx:374— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
AC4 · Keyboard semantics· Click handler on a non-interactive <div> · ×5
Click handler on a non-interactive <div> src/ui/ModalLayer.tsx:59— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> src/ui/ToastProvider.tsx:50— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> src/workspace/components/WorkspaceProjectPicker.tsx:81— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> src/workspace/creative/only-your-color/OnlyYourColorCreative.tsx:483— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> src/workspace/creative/pixel-stretch/PixelStretchCreative.tsx:504— 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· Clickable element isn't keyboard-operable · ×3
Clickable element isn't keyboard-operable landing/index.html:106— The repo's own CSS styles .download-badge with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
Clickable element isn't keyboard-operable landing/index.html:127— The repo's own CSS styles .download-badge with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
Clickable element isn't keyboard-operable landing/index.html:150— The repo's own CSS styles .download-badge with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
AC4 · Keyboard semantics· Double-click handler on a non-interactive <canvas> · ×3
Double-click handler on a non-interactive <canvas> src/components/LrcRender.tsx:481— This <canvas> binds wheel, 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.
Double-click handler on a non-interactive <canvas> src/components/MultipleLayerVideoPreviewLrcRender.tsx:507— This <canvas> binds wheel, 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.
Double-click handler on a non-interactive <canvas> src/components/WebGpuVideoPreview.tsx:223— This <canvas> binds wheel, 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 <article> · ×3
Click handler on a non-interactive <article> src/workspace/border/BorderItem.tsx:177— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <article> src/workspace/lut/FilterItem.tsx:157— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <article> src/workspace/subtitles/SubtitlePanel.tsx:221— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
AC2 · Forms & labels· <button> with no accessible text · ×2
<button> with no accessible text src/components/ExportTaskTable.tsx:394— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text src/components/ExportTaskTable.tsx:398— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
AC4 · Keyboard semantics· Double-click handler on a non-interactive <div> · ×2
Double-click handler on a non-interactive <div> src/components/HtmlPreview.tsx:191— This <div> binds wheel, 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.
Double-click handler on a non-interactive <div> src/workspace/transform/CropOverlay.tsx:180— This <div> binds pointerdown 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.
AC2 · Forms & labels· <input> without a programmatic label · ×1
<input> without a programmatic label src/workspace/color/ColorPresetPanel.tsx:118— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
Viewport restricts zoom public/local-share/index.html:5— user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
AC4 · Keyboard semantics· Clickable role="slider" that no keyboard user can reach · ×1
Clickable role="slider" that no keyboard user can reach src/components/HtmlPreview.tsx:235— This <div> announces itself as a role="slider" and is operated by pointerdown, but nothing can put focus on it: no tabIndex={0}, no key handler, and nothing in its scripts moves focus. A keyboard cannot produce a pointer drag, so the control cannot be operated at all (WCAG 2.1.1). Give it tabIndex={0}="0" and move it with the arrow keys in a key handler (with aria-valuenow for the position it holds).
Focusable <div> isn't keyboard-operable src/components/LiveCameraControlPanel.tsx:140— This <div> carries tabIndex={0}, so it is in the tab order and a keyboard user will land on it — but its only behaviour is bound to pointerdown, pointerup and pointermove, pointer gestures a keyboard cannot produce, and there is no key handler. The tab stop leads nowhere. Bind the same behaviour to a key handler, or provide an equivalent control elsewhere.
AC4 · Keyboard semantics· Click handler on a non-interactive <span> · ×1
Click handler on a non-interactive <span> src/pages/SettingsPage.tsx:483— 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· Double-click handler on a non-interactive <strong> · ×1
Double-click handler on a non-interactive <strong> src/workspace/color/ColorMaskPanel.tsx:318— This <strong> binds double-click and nothing else. 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· Double-click handler on a non-interactive <circle> · ×1
Double-click handler on a non-interactive <circle> src/workspace/color/colorPanelShared.tsx:183— This <circle> binds pointerdown 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.
Hotspot: src/pages/WorkspacePage.tsx src/pages/WorkspacePage.tsx:145— src/pages/WorkspacePage.tsx changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 302 in WorkspacePage.WorkspacePageInner at line 145. 4 of those changes were fix/bug commits, and the other 20 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:02:47 +08:00' --until='2026-11-16 14:02:47 +08:00' --full-history --no-merges -- src/pages/WorkspacePage.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: src/components/PreviewStage.tsx src/components/PreviewStage.tsx:57— src/components/PreviewStage.tsx changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 159 in PreviewStage.PreviewStage at line 57. 2 of those changes were fix/bug commits, and the other 16 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:02:47 +08:00' --until='2026-11-16 14:02:47 +08:00' --full-history --no-merges -- src/components/PreviewStage.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: src/pages/DeviceConnectPage.tsx src/pages/DeviceConnectPage.tsx:56— src/pages/DeviceConnectPage.tsx changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 139 in DeviceConnectPage.DeviceConnectPage at line 56. 3 of those changes were fix/bug commits, and the other 17 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:02:47 +08:00' --until='2026-11-16 14:02:47 +08:00' --full-history --no-merges -- src/pages/DeviceConnectPage.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: src/components/LiveControlPanel.tsx src/components/LiveControlPanel.tsx:46— src/components/LiveControlPanel.tsx changed 28 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 78 in LiveControlPanel.LiveControlPanel at line 46. 3 of those changes were fix/bug commits, and the other 25 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:02:47 +08:00' --until='2026-11-16 14:02:47 +08:00' --full-history --no-merges -- src/components/LiveControlPanel.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: electron/ipc/ipcWorkspaceService.ts electron/ipc/ipcWorkspaceService.ts:230— electron/ipc/ipcWorkspaceService.ts changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 188 in ipcWorkspaceService.register at line 230. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:02:47 +08:00' --until='2026-11-16 14:02:47 +08:00' --full-history --no-merges -- electron/ipc/ipcWorkspaceService.ts`: 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: src/pages/SettingsPage.tsx src/pages/SettingsPage.tsx:74— src/pages/SettingsPage.tsx changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 77 in SettingsPage.SettingsPage at line 74. 2 of those changes were fix/bug commits, and the other 20 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:02:47 +08:00' --until='2026-11-16 14:02:47 +08:00' --full-history --no-merges -- src/pages/SettingsPage.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: src/components/PreviewModal.tsx src/components/PreviewModal.tsx:79— src/components/PreviewModal.tsx changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 111 in PreviewModal.PreviewModal at line 79. 1 of those changes was a fix/bug commit, and the other 13 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:02:47 +08:00' --until='2026-11-16 14:02:47 +08:00' --full-history --no-merges -- src/components/PreviewModal.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: src/context/DeviceConnectionContext.tsx src/context/DeviceConnectionContext.tsx:131— src/context/DeviceConnectionContext.tsx changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 65 in DeviceConnectionContext.DeviceConnectionProvider at line 131. 1 of those changes was a fix/bug commit, and the other 16 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:02:47 +08:00' --until='2026-11-16 14:02:47 +08:00' --full-history --no-merges -- src/context/DeviceConnectionContext.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: electron/ipc/ipcLunaRenderCore.ts electron/ipc/ipcLunaRenderCore.ts:307— electron/ipc/ipcLunaRenderCore.ts changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 96 in ipcLunaRenderCore.register at line 307. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:02:47 +08:00' --until='2026-11-16 14:02:47 +08:00' --full-history --no-merges -- electron/ipc/ipcLunaRenderCore.ts`: 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: electron/ipc/ipcDirectorLabService.ts electron/ipc/ipcDirectorLabService.ts:276— electron/ipc/ipcDirectorLabService.ts changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 92 in ipcDirectorLabService.localPlanFromManifest at line 276. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:02:47 +08:00' --until='2026-11-16 14:02:47 +08:00' --full-history --no-merges -- electron/ipc/ipcDirectorLabService.ts`: 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: src/workspace/components/WorkspaceEditSidebar.tsx src/workspace/components/WorkspaceEditSidebar.tsx:139— src/workspace/components/WorkspaceEditSidebar.tsx changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 64 in WorkspaceEditSidebar.WorkspaceEditSidebar at line 139. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:02:47 +08:00' --until='2026-11-16 14:02:47 +08:00' --full-history --no-merges -- src/workspace/components/WorkspaceEditSidebar.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: src/components/webgpuVideoRenderer.ts src/components/webgpuVideoRenderer.ts:709— src/components/webgpuVideoRenderer.ts changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in WebGpuVideoRenderer.render at line 709. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:02:47 +08:00' --until='2026-11-16 14:02:47 +08:00' --full-history --no-merges -- src/components/webgpuVideoRenderer.ts`: 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: electron/appMain.ts electron/appMain.ts:347— electron/appMain.ts changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in appMain.registerIpc at line 347. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:02:47 +08:00' --until='2026-11-16 14:02:47 +08:00' --full-history --no-merges -- electron/appMain.ts`: 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: src/pages/LiveConsolePage.tsx src/pages/LiveConsolePage.tsx:29— src/pages/LiveConsolePage.tsx changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in LiveConsolePage.LiveConsolePage 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-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:02:47 +08:00' --until='2026-11-16 14:02:47 +08:00' --full-history --no-merges -- src/pages/LiveConsolePage.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: electron/storage/settingsService.ts electron/storage/settingsService.ts:164— electron/storage/settingsService.ts changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in settingsService.mergeSettings at line 164. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:02:47 +08:00' --until='2026-11-16 14:02:47 +08:00' --full-history --no-merges -- electron/storage/settingsService.ts`: 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: src/workspace/creative/pixel-stretch/PixelStretchCreative.tsx src/workspace/creative/pixel-stretch/PixelStretchCreative.tsx:56— src/workspace/creative/pixel-stretch/PixelStretchCreative.tsx changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 138 in PixelStretchCreative.PixelStretchCreative at line 56. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:02:47 +08:00' --until='2026-11-16 14:02:47 +08:00' --full-history --no-merges -- src/workspace/creative/pixel-stretch/PixelStretchCreative.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: src/workspace/creative/only-your-color/OnlyYourColorCreative.tsx src/workspace/creative/only-your-color/OnlyYourColorCreative.tsx:54— src/workspace/creative/only-your-color/OnlyYourColorCreative.tsx changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 137 in OnlyYourColorCreative.OnlyYourColorCreative at line 54. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:02:47 +08:00' --until='2026-11-16 14:02:47 +08:00' --full-history --no-merges -- src/workspace/creative/only-your-color/OnlyYourColorCreative.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: src/components/MediaLibraryToolbar.tsx src/components/MediaLibraryToolbar.tsx:31— src/components/MediaLibraryToolbar.tsx changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 66 in MediaLibraryToolbar.MediaLibraryToolbar at line 31. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:02:47 +08:00' --until='2026-11-16 14:02:47 +08:00' --full-history --no-merges -- src/components/MediaLibraryToolbar.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: src/components/DirectorLabView.tsx src/components/DirectorLabView.tsx:33— src/components/DirectorLabView.tsx changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in DirectorLabView.DirectorLabView at line 33. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:02:47 +08:00' --until='2026-11-16 14:02:47 +08:00' --full-history --no-merges -- src/components/DirectorLabView.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: electron/features/director-lab/directorLabLocalImport.ts electron/features/director-lab/directorLabLocalImport.ts:22— electron/features/director-lab/directorLabLocalImport.ts changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 101 in directorLabLocalImport.registerDirectorLocalImport at line 22. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:02:47 +08:00' --until='2026-11-16 14:02:47 +08:00' --full-history --no-merges -- electron/features/director-lab/directorLabLocalImport.ts`: 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: src/workspace/creative/triple-stitch/TripleStitchCreative.tsx src/workspace/creative/triple-stitch/TripleStitchCreative.tsx:193— src/workspace/creative/triple-stitch/TripleStitchCreative.tsx changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 101 in TripleStitchCreative.TripleStitchCreative at line 193. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:02:47 +08:00' --until='2026-11-16 14:02:47 +08:00' --full-history --no-merges -- src/workspace/creative/triple-stitch/TripleStitchCreative.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: electron/ipc/ipcLunaMediaService.ts electron/ipc/ipcLunaMediaService.ts:163— electron/ipc/ipcLunaMediaService.ts changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in ipcLunaMediaService.register at line 163. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:02:47 +08:00' --until='2026-11-16 14:02:47 +08:00' --full-history --no-merges -- electron/ipc/ipcLunaMediaService.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:153— REDACTED changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in WirelessCameraMediaSource.connect at line 153. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:02:47 +08:00' --until='2026-11-16 14:02:47 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/components/DirectorLabShotList.tsx src/components/DirectorLabShotList.tsx:40— src/components/DirectorLabShotList.tsx changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 54 in DirectorLabShotList.DirectorLabShotList at line 40. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:02:47 +08:00' --until='2026-11-16 14:02:47 +08:00' --full-history --no-merges -- src/components/DirectorLabShotList.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: electron/features/director-lab/directorLabPlanStorage.ts electron/features/director-lab/directorLabPlanStorage.ts:234— electron/features/director-lab/directorLabPlanStorage.ts changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in directorLabPlanStorage.reconcileLocalDirectorPlanUnlocked at line 234. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:02:47 +08:00' --until='2026-11-16 14:02:47 +08:00' --full-history --no-merges -- electron/features/director-lab/directorLabPlanStorage.ts`: 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.
FunctionTooLong: WorkspacePage.WorkspacePageInner src/pages/WorkspacePage.tsx:145— FunctionTooLong — WorkspacePageInner runs 1020 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 920 over it, 10.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.
FunctionTooLong: TripleStitchCreative.TripleStitchCreative src/workspace/creative/triple-stitch/TripleStitchCreative.tsx:193— FunctionTooLong — TripleStitchCreative runs 725 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 625 over it, 7.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: DeviceConnectPage.DeviceConnectPage src/pages/DeviceConnectPage.tsx:56— FunctionTooLong — DeviceConnectPage runs 615 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 515 over it, 6.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.
FunctionTooLong: ipcWorkspaceService.register electron/ipc/ipcWorkspaceService.ts:230— FunctionTooLong — register runs 611 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 511 over it, 6.11× 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: MaskOverlay.MaskOverlay src/workspace/mask/MaskOverlay.tsx:48— FunctionTooLong — MaskOverlay runs 510 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 410 over it, 5.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: ipcLunaRenderCore.register electron/ipc/ipcLunaRenderCore.ts:307— FunctionTooLong — register runs 507 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 407 over it, 5.07× 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: SettingsPage.SettingsPage src/pages/SettingsPage.tsx:74— FunctionTooLong — SettingsPage runs 453 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 353 over it, 4.53× 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: useDirectorLab.useDirectorLab src/hooks/useDirectorLab.ts:12— FunctionTooLong — useDirectorLab runs 442 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 342 over it, 4.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.
FunctionTooLong: WorkspaceMaskContext.WorkspaceMaskProvider src/workspace/context/WorkspaceMaskContext.tsx:34— FunctionTooLong — WorkspaceMaskProvider runs 437 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 337 over it, 4.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: useMediaLibraryController.useMediaLibraryController src/pages/useMediaLibraryController.ts:41— FunctionTooLong — useMediaLibraryController runs 421 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 321 over it, 4.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: PreviewModal.PreviewModal src/components/PreviewModal.tsx:79— FunctionTooLong — PreviewModal runs 418 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 318 over it, 4.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: PixelFlowCreative.PixelFlowCreative src/workspace/creative/pixel-flow/PixelFlowCreative.tsx:40— FunctionTooLong — PixelFlowCreative runs 404 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 304 over it, 4.04× 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: PixelStretchCreative.PixelStretchCreative src/workspace/creative/pixel-stretch/PixelStretchCreative.tsx:56— FunctionTooLong — PixelStretchCreative runs 394 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 294 over it, 3.94× 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: AiSelectionPage.AiSelectionPage src/pages/AiSelectionPage.tsx:94— FunctionTooLong — AiSelectionPage runs 376 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 276 over it, 3.76× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: OnlyYourColorCreative.OnlyYourColorCreative src/workspace/creative/only-your-color/OnlyYourColorCreative.tsx:54— FunctionTooLong — OnlyYourColorCreative runs 373 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 273 over it, 3.73× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: MediaLibraryToolbar.MediaLibraryToolbar src/components/MediaLibraryToolbar.tsx:31— FunctionTooLong — MediaLibraryToolbar runs 367 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 267 over it, 3.67× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: TrimStrip.TrimStrip src/workspace/trim/TrimStrip.tsx:68— FunctionTooLong — TrimStrip runs 361 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 261 over it, 3.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.
FunctionTooLong: DeviceConnectionContext.DeviceConnectionProvider src/context/DeviceConnectionContext.tsx:131— FunctionTooLong — DeviceConnectionProvider runs 360 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 260 over it, 3.60× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: DeviceDebugPage.DeviceDebugPage src/pages/DeviceDebugPage.tsx:41— FunctionTooLong — DeviceDebugPage runs 342 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 242 over it, 3.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.
FunctionTooLong: ColorRevealCreative.ColorRevealCreative src/workspace/creative/color-reveal/ColorRevealCreative.tsx:40— FunctionTooLong — ColorRevealCreative runs 335 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 235 over it, 3.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: LiveControlPanel.LiveControlPanel src/components/LiveControlPanel.tsx:46— FunctionTooLong — LiveControlPanel runs 329 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 229 over it, 3.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.
FunctionTooLong: WorkspaceEditSidebar.WorkspaceEditSidebar src/workspace/components/WorkspaceEditSidebar.tsx:139— FunctionTooLong — WorkspaceEditSidebar runs 322 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 222 over it, 3.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.
FunctionTooLong: DirectorLabView.DirectorLabView src/components/DirectorLabView.tsx:33— FunctionTooLong — DirectorLabView runs 321 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 221 over it, 3.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: useDirectorPlanSync.useDirectorPlanSync src/hooks/useDirectorPlanSync.ts:41— FunctionTooLong — useDirectorPlanSync runs 321 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 221 over it, 3.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: NativeGpuVideoPreview.NativeGpuVideoPreview src/components/NativeGpuVideoPreview.tsx:103— FunctionTooLong — NativeGpuVideoPreview runs 316 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 216 over it, 3.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
+ 87 more in this group — see findings.md.
R4 · Test Coverage· No test reaches this file · ×40
No test reaches this file REDACTED:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file electron/ipc/ipcLunaRenderCore.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file electron/ipc/ipcWorkspaceService.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file REDACTED:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file electron/ipc/ipcDirectorLabService.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file REDACTED:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file electron/preload.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file electron/appMain.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file REDACTED:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/components/webgpuVideoExport.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file REDACTED:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file electron/features/ai-selection/aiSelectionService.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file electron/features/ai-selection/aiSelectionAlgorithms.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/components/NativeGpuVideoPreview.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file electron/media/live-stream/liveConnectionDebugService.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file electron/ipc/ipcLunaMediaService.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file electron/platform/network/wifiAutoJoinService.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file electron/platform/network/networkDiagnostics.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file REDACTED:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file electron/platform/render/lunaRenderCore.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file electron/media/local-share/localMediaShareService.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file electron/features/director-lab/directorLabPlanStorage.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file electron/network/lunaka_http_client.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file electron/devices/common/mountedCameraMediaSource.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file electron/features/ai-selection/aiSelectionMedia.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
Swallowed exception (empty catch) src/workspace/shared/workspaceLivePhotoExport.ts:94— `.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) src/workspace/shared/workspaceLivePhotoExport.ts:201— `.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) src/workspace/shared/workspaceMixedExport.ts:168— `.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) src/workspace/shared/workspaceMixedExport.ts:234— `.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) src/workspace/shared/workspaceMixedExport.ts:299— `.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) src/workspace/shared/workspaceMixedExport.ts:338— `.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) src/workspace/shared/workspaceMixedExport.ts:379— `.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) src/workspace/shared/workspaceMixedExport.ts:400— `.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) src/workspace/shared/workspaceSourceLivePhotoExport.ts:122— `.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) src/workspace/lut/FilterPanel.tsx:56— 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) src/workspace/lut/LutImportDialog.tsx:81— 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) src/workspace/hooks/useProjectManager.ts:99— 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) src/workspace/hooks/useProjectManager.ts:101— `.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) src/workspace/creative/triple-stitch/tripleStitchState.ts:96— 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) src/workspace/creative/triple-stitch/TripleStitchCreative.tsx:335— `.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) src/workspace/creative/triple-stitch/TripleStitchCreative.tsx:343— `.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) src/workspace/creative/triple-stitch/TripleStitchCreative.tsx:630— `.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) src/workspace/creative/triple-stitch/TripleStitchCreative.tsx:690— `.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) src/workspace/creative/triple-stitch/TripleStitchCreative.tsx:729— `.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) src/workspace/creative/triple-stitch/TripleStitchCreative.tsx:744— `.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) src/workspace/creative/triple-stitch/TripleStitchCreative.tsx:746— `.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) src/workspace/creative/triple-stitch/TripleStitchCreative.tsx:752— `.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) src/workspace/creative/triple-stitch/TripleStitchCreative.tsx:758— `.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) src/workspace/creative/triple-stitch/TripleStitchCreative.tsx:765— `.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) src/workspace/creative/triple-stitch/TripleStitchCreative.tsx:767— `.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.
FileTooLong: REDACTED REDACTED— FileTooLong — 1248 significant lines (blank, comment-only and punctuation-only lines excluded), about 83% of them inside a single declaration: DjiCameraSession (228-1575). The bar is 500 significant lines; this is 748 over it, 2.50× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: pages/WorkspacePage.tsx src/pages/WorkspacePage.tsx— FileTooLong — 1140 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: WorkspacePageInner (145-1441). The bar is 500 significant lines; this is 640 over it, 2.28× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: REDACTED REDACTED— FileTooLong — 976 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 70% of them inside a single declaration: MockCameraServer (177-1019). The bar is 500 significant lines; this is 476 over it, 1.95× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: windows/encoder.rs luna-render-core/src/windows/encoder.rs— FileTooLong — 951 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 68% of them inside a single declaration: D3d12VideoEncoder (3 blocks, 67-892). The bar is 500 significant lines; this is 451 over it, 1.90× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: triple-stitch/TripleStitchCreative.tsx src/workspace/creative/triple-stitch/TripleStitchCreative.tsx— FileTooLong — 871 significant lines (blank, comment-only and punctuation-only lines excluded), about 83% of them inside a single declaration: TripleStitchCreative (193-1082). The bar is 500 significant lines; this is 371 over it, 1.74× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: ipc/ipcWorkspaceService.ts electron/ipc/ipcWorkspaceService.ts— FileTooLong — 785 significant lines (blank, comment-only and punctuation-only lines excluded), about 78% of them inside a single declaration: register (230-979). The bar is 500 significant lines; this is 285 over it, 1.57× 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: ipc/ipcLunaRenderCore.ts electron/ipc/ipcLunaRenderCore.ts— FileTooLong — 739 significant lines (blank, comment-only and punctuation-only lines excluded), about 69% of them inside a single declaration: register (307-976). The bar is 500 significant lines; this is 239 over it, 1.48× 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: compositor/render.rs luna-render-core/src/compositor/render.rs— FileTooLong — 738 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 100% of them inside a single declaration: Compositor (4-921). The bar is 500 significant lines; this is 238 over it, 1.48× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: components/webgpuVideoRenderer.ts src/components/webgpuVideoRenderer.ts— FileTooLong — 721 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: WebGpuVideoRenderer (40-912). The bar is 500 significant lines; this is 221 over it, 1.44× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: opc/state.js dji_mock_server/opc/state.js— FileTooLong — 711 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 71% of them inside a single declaration: MockCameraState (157-721). The bar is 500 significant lines; this is 211 over it, 1.42× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: REDACTED REDACTED— FileTooLong — 662 significant lines (blank, comment-only and punctuation-only lines excluded), about 74% of them inside a single declaration: NasSyncService (227-821). The bar is 500 significant lines; this is 162 over it, 1.32× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: windows/export.rs luna-render-core/src/windows/export.rs— FileTooLong — 661 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 161 over it, 1.32× 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: pages/DeviceConnectPage.tsx src/pages/DeviceConnectPage.tsx— FileTooLong — 659 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: DeviceConnectPage (56-759). The bar is 500 significant lines; this is 159 over it, 1.32× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: windows/nvenc.rs luna-render-core/src/windows/nvenc.rs— FileTooLong — 644 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 144 over it, 1.29× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: components/previewStageExport.ts src/components/previewStageExport.ts— FileTooLong — 635 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 135 over it, 1.27× 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: ipc/ipcDirectorLabService.ts electron/ipc/ipcDirectorLabService.ts— FileTooLong — 632 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 132 over it, 1.26× 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: trim/TrimPanel.tsx src/workspace/trim/TrimPanel.tsx— FileTooLong — 630 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 130 over it, 1.26× 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: dji/djiUdpTransport.ts electron/devices/dji/djiUdpTransport.ts— FileTooLong — 623 significant lines (blank, comment-only and punctuation-only lines excluded), about 81% of them inside a single declaration: DjiUdpTransport (180-847). The bar is 500 significant lines; this is 123 over it, 1.25× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: windows/converter.rs luna-render-core/src/windows/converter.rs— FileTooLong — 610 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 81% of them inside a single declaration: VideoConverter (2 blocks, 103-761). The bar is 500 significant lines; this is 110 over it, 1.22× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: components/PreviewStage.tsx src/components/PreviewStage.tsx— FileTooLong — 593 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: PreviewStage (56-727). The bar is 500 significant lines; this is 93 over it, 1.19× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: REDACTED REDACTED— FileTooLong — 584 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 84 over it, 1.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: REDACTED REDACTED— FileTooLong — 552 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 52 over it, 1.10× 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: electron/preload.ts electron/preload.ts— FileTooLong — 550 significant lines (blank, comment-only and punctuation-only lines excluded), about 65% of them inside a single declaration: lunaApi (76-474). The bar is 500 significant lines; this is 50 over it, 1.10× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: mask/MaskOverlay.tsx src/workspace/mask/MaskOverlay.tsx— FileTooLong — 546 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: MaskOverlay (48-637). The bar is 500 significant lines; this is 46 over it, 1.09× 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: color/referenceMatch.ts src/workspace/color/referenceMatch.ts— FileTooLong — 531 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 31 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.
+ 3 more in this group — see findings.md.
AC6 · Visual & motion safety· Animation without a prefers-reduced-motion guard · ×27
Animation without a prefers-reduced-motion guard src/ui/Table.tsx:75— <svg> moves — its inline style sets `transition: transform 150ms ease` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard src/workspace/trim/TrimStrip.css:32— `.workspace-trim-play-btn` moves (`transition: background 120ms ease, transform 120ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard src/workspace/trim/TrimStrip.css:239— `.workspace-trim-handle` moves (`transition: width 120ms ease, background 120ms ease, box-shadow 120ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard src/workspace/mask/MaskPanel.css:130— `.workspace-mask-target-progress > span` moves (`transition: width 160ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard src/workspace/mask/MaskPanel.css:135— `.workspace-mask-target-progress > .is-indeterminate` moves (`animation: workspace-mask-progress 1.1s ease-in-out infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard src/workspace/lut/FilterPanel.css:344— `.filter-card` moves (`transition: transform 0.18s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard src/workspace/lut/LutImportDialog.css:342— `.lut-import-status-icon.importing` moves (`animation: lut-spin 1s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard src/workspace/beauty/BeautyPanel.css:88— `.beauty-analysis-progress > span` moves (`transition: width 160ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard src/ui/accordion.css:52— `.ui-accordion-chevron` moves (`transition: transform 180ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard src/ui/button.css:22— `.ui-btn` moves (`transition: transform 140ms ease,
background 140ms ease,
border-color 140ms ease,
opacity 140ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard src/ui/dialog.css:58— `.ui-dialog-content` moves (`animation: ui-scale-in 200ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard src/ui/icon-button.css:14— `.ui-icon-btn` moves (`transition: transform 140ms ease,
background 140ms ease,
border-color 140ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard src/ui/select.css:87— `.ui-select-chevron` moves (`transition: transform 180ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard src/ui/switch.css:29— `.toggle-thumb` moves (`transition: transform 140ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard src/ui/toast.css:31— `.toast-item` moves (`animation: toast-in 0.25s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard src/styles/ai-selection.css:44— `.ai-selection-progress span` moves (`transition: width 180ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard src/styles/ai-selection.css:171— `.ai-selection-people-progress-track > span` moves (`transition: width 180ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard src/styles/device-debug.css:404— `.dd-log-spinner` moves (`animation: dd-spin 0.8s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard src/styles/download-progress.css:120— `.dl-overall-fill` moves (`transition: width 0.3s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard src/styles/download-progress.css:180— `.dl-task-fill` moves (`transition: width 0.3s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard src/styles/download-progress.css:260— `.dl-file-progress-fill` moves (`transition: width 0.3s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard src/styles/download-progress.css:371— `.global-download-progress-fill` moves (`transition: width 0.25s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard src/styles/export-tasks.css:156— `.et-progress-fill` moves (`transition: width 0.3s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard src/styles/lab.css:75— `.lab-feature-card` moves (`transition: background 120ms ease,
border-color 120ms ease,
transform 120ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard src/styles/lab.css:123— `.lab-feature-action` moves (`transition: color 120ms ease, transform 120ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Sync-over-async blocking electron/platform/macos/livetool.swift:105— `processMOV` is async and calls .wait(), Thread.sleep — a blocking call inside async code stalls the cooperative pool's thread — one per core — and every task scheduled on it for as long as it runs.
Sync-over-async blocking electron/infrastructure/hotUpdateArchiveService.ts:118— `existsSync` in `downloadLegacyArchive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/infrastructure/hotUpdateArchiveService.ts:123— `rmSync` in `downloadLegacyArchive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/infrastructure/hotUpdateArchiveService.ts:130— `rmSync` in `downloadLegacyArchive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/infrastructure/hotUpdateArchiveService.ts:142— `renameSync` in `downloadLegacyArchive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/infrastructure/hotUpdateArchiveService.ts:146— `rmSync` in `downloadLegacyArchive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/infrastructure/hotUpdateArchiveService.ts:147— `rmSync` in `downloadLegacyArchive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/infrastructure/hotUpdateArchiveService.ts:156— `mkdirSync` in `downloadArchive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/infrastructure/hotUpdateArchiveService.ts:171— `rmSync` in `downloadArchive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/ipc/ipcLunaRenderCore.ts:858— `statSync` in `callback to filter` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/ipc/ipcLunaRenderCore.ts:863— `statSync` in `callback to localBuiltinDirs.some` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/media/live-stream/liveStreamService.ts:171— `mkdirSync` in `startLiveStreamCapture` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking electron/platform/network/bluetoothDebugService.ts:39— `existsSync` in `scanBluetoothDevices` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/after-pack-adhoc.mjs:35— `existsSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/after-pack-adhoc.mjs:41— `existsSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/after-pack-adhoc.mjs:42— `execFileSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/after-pack-adhoc.mjs:54— `readdirSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/after-pack-adhoc.mjs:55— `execFileSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/after-pack-adhoc.mjs:61— `existsSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/after-pack-adhoc.mjs:61— `execFileSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/after-pack-adhoc.mjs:64— `execFileSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/after-pack-adhoc.mjs:75— `execFileSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/test-ios-tcp-receiver.mjs:338— `writeFileSync` in `test("real TCP video reaches the local HTTP preview and control requests return to the phone")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
X2 · Cancellation propagation· Async function without AbortSignal · ×20
Async function without AbortSignal: load public/local-share/app.js:313— `load` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: loadSharedFiles public/local-share/app.js:358— `loadSharedFiles` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: uploadFiles public/local-share/app.js:450— `uploadFiles` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: execute electron/platform/ffmpeg/pipeline.ts:110— `execute` holds an AbortSignal but calls `spawn(…)` without it, so its caller's cancellation never reaches that call and it runs to its end after whatever wanted it has given up. Hand the signal on: `spawn(…, { signal })`.
Async function without AbortSignal: readRemotePrefix electron/media/mediaCaptureDate.ts:39— `readRemotePrefix` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: fetchLatestHotUpdateViaAPI REDACTED:106— `fetchLatestHotUpdateViaAPI` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: fetchHotUpdateIntegrity REDACTED:163— `fetchHotUpdateIntegrity` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: checkForHotUpdatesOnce REDACTED:206— `checkForHotUpdatesOnce` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: loadSamModelOnce electron/infrastructure/modelLoader.ts:113— `loadSamModelOnce` holds an AbortSignal but calls `writeFile(…)` without it, so its caller's cancellation never reaches that call and it runs to its end after whatever wanted it has given up. Hand the signal on: `writeFile(…, { signal })`.
Async function without AbortSignal: installArchive electron/infrastructure/runtimeResourceService.ts:106— `installArchive` holds an AbortSignal but calls `writeFile(…)` without it, so its caller's cancellation never reaches that call and it runs to its end after whatever wanted it has given up. Hand the signal on: `writeFile(…, { signal })`.
Async function without AbortSignal: installSevenZipArchive electron/infrastructure/runtimeResourceService.ts:172— `installSevenZipArchive` holds an AbortSignal but calls `writeFile(…)` without it, so its caller's cancellation never reaches that call and it runs to its end after whatever wanted it has given up. Hand the signal on: `writeFile(…, { signal })`.
Async function without AbortSignal: releaseNotesForTag electron/infrastructure/updateService.ts:63— `releaseNotesForTag` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: checkGitCode electron/infrastructure/updateService.ts:85— `checkGitCode` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: checkGitHub electron/infrastructure/updateService.ts:127— `checkGitHub` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: restoreSubtitlePunctuation electron/features/subtitles/subtitlePunctuationService.ts:46— `restoreSubtitlePunctuation` holds an AbortSignal but calls `spawn(…)` without it, so its caller's cancellation never reaches that call and it runs to its end after whatever wanted it has given up. Hand the signal on: `spawn(…, { signal })`.
Async function without AbortSignal: transcribeVideo electron/features/subtitles/subtitleTranscriptionService.ts:53— `transcribeVideo` holds an AbortSignal but calls `spawn(…)` without it, so its caller's cancellation never reaches that call and it runs to its end after whatever wanted it has given up. Hand the signal on: `spawn(…, { signal })`.
Async function without AbortSignal: removeObject electron/features/segmentation/inpaintService.ts:81— `removeObject` holds an AbortSignal but calls `writeFile(…)` without it, so its caller's cancellation never reaches that call and it runs to its end after whatever wanted it has given up. Hand the signal on: `writeFile(…, { signal })`.
Async function without AbortSignal: analyzeVideoStory electron/features/ai-selection/aiSelectionVideo.ts:70— `analyzeVideoStory` holds an AbortSignal but calls `fs.writeFile(…)` without it, so its caller's cancellation never reaches that call and it runs to its end after whatever wanted it has given up. Hand the signal on: `fs.writeFile(…, { signal })`.
Async function without AbortSignal: listFiles REDACTED:834— `listFiles` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: call electron/devices/dji/djiBleSession.ts:428— `call` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
ClassTooLong: DjiCameraSession REDACTED:228— ClassTooLong — 1036 significant lines (blank, comment-only and punctuation-only lines excluded), 42 methods. The bar is 400 significant lines; this is 636 over it, 2.59× 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: TripleStitchCreative src/workspace/creative/triple-stitch/TripleStitchCreative.tsx:1— ClassTooLong — 725 significant lines (blank, comment-only and punctuation-only lines excluded), 8 methods. The bar is 400 significant lines; this is 325 over it, 1.81× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: MockCameraServer REDACTED:177— ClassTooLong — 685 significant lines (blank, comment-only and punctuation-only lines excluded), 44 methods. The bar is 400 significant lines; this is 285 over it, 1.71× 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: WebGpuVideoRenderer src/components/webgpuVideoRenderer.ts:40— ClassTooLong — 684 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 284 over it, 1.71× 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: D3d12VideoEncoder luna-render-core/src/windows/encoder.rs:67— ClassTooLong — 642 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 15 methods, 3 blocks, lines 67-892. The bar is 400 significant lines; this is 242 over it, 1.61× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: DeviceConnectPage src/pages/DeviceConnectPage.tsx:1— ClassTooLong — 615 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 215 over it, 1.54× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PreviewStage src/components/PreviewStage.tsx:1— ClassTooLong — 546 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 146 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: MaskOverlay src/workspace/mask/MaskOverlay.tsx:1— ClassTooLong — 510 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 110 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: DjiUdpTransport electron/devices/dji/djiUdpTransport.ts:180— ClassTooLong — 504 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 104 over it, 1.26× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: MockCameraState dji_mock_server/opc/state.js:157— ClassTooLong — 502 significant lines (blank, comment-only and punctuation-only lines excluded), 18 methods. The bar is 400 significant lines; this is 102 over it, 1.26× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: VideoConverter luna-render-core/src/windows/converter.rs:103— ClassTooLong — 493 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 18 methods, 2 blocks, lines 103-761. The bar is 400 significant lines; this is 93 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: NasSyncService REDACTED:227— ClassTooLong — 489 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 89 over it, 1.22× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: SettingsPage src/pages/SettingsPage.tsx:1— ClassTooLong — 453 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 53 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: useDirectorLab src/hooks/useDirectorLab.ts:1— ClassTooLong — 442 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 42 over it, 1.11× 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: useMediaLibraryController src/pages/useMediaLibraryController.ts:1— ClassTooLong — 421 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 21 over it, 1.05× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: WebGpuResourceManager src/components/webgpu/webgpuResources.ts:53— ClassTooLong — 420 significant lines (blank, comment-only and punctuation-only lines excluded), 18 methods. The bar is 400 significant lines; this is 20 over it, 1.05× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PreviewModal src/components/PreviewModal.tsx:1— ClassTooLong — 418 significant lines (blank, comment-only and punctuation-only lines excluded), 5 methods. The bar is 400 significant lines; this is 18 over it, 1.05× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PixelFlowCreative src/workspace/creative/pixel-flow/PixelFlowCreative.tsx:1— ClassTooLong — 404 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 4 over it, 1.01× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
MethodTooLong: Compositor.render_flat_impl luna-render-core/src/compositor/render.rs:168— MethodTooLong — render_flat_impl runs 597 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 497 over it, 5.97× 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: ExportCompositionVideoTask.compute luna-render-core/src/composition/video_export.rs:184— MethodTooLong — compute runs 290 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 190 over it, 2.90× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: D3d12VideoEncoder.new luna-render-core/src/windows/encoder.rs:94— MethodTooLong — new runs 287 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 187 over it, 2.87× 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: Compositor.load_texture_from_path luna-render-core/src/compositor/texture.rs:110— MethodTooLong — load_texture_from_path runs 233 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 133 over it, 2.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: MockCameraState.validate dji_mock_server/opc/state.js:220— MethodTooLong — validate runs 196 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 96 over it, 1.96× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: D3d12VideoEncoder.append luna-render-core/src/windows/encoder.rs:449— MethodTooLong — append runs 192 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 92 over it, 1.92× 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: WebGpuVideoRenderer.render src/components/webgpuVideoRenderer.ts:709— MethodTooLong — render runs 162 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 62 over it, 1.62× 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: Compositor.render_preview luna-render-core/src/compositor/playback.rs:397— MethodTooLong — render_preview runs 161 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) 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: DefaultDjiWirelessPreparation.prepare REDACTED:218— MethodTooLong — prepare runs 156 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 56 over it, 1.56× 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: Compositor.text_texture luna-render-core/src/compositor/text.rs:6— MethodTooLong — text_texture runs 154 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 54 over it, 1.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Compositor.read_video_frame luna-render-core/src/compositor/playback.rs:109— MethodTooLong — read_video_frame runs 150 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 50 over it, 1.50× 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: NativePreviewRuntime.render luna-render-core/src/macos/preview.rs:314— MethodTooLong — render runs 150 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 50 over it, 1.50× 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: NativePreviewRuntime.render luna-render-core/src/windows/preview.rs:256— MethodTooLong — render runs 144 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) 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: VideoConverter.submit_video_process luna-render-core/src/windows/converter.rs:580— MethodTooLong — submit_video_process runs 112 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 12 over it, 1.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: DjiCameraSession.deleteFiles REDACTED:1051— MethodTooLong — deleteFiles 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.
MethodTooLong: Compositor.new luna-render-core/src/compositor.rs:321— MethodTooLong — new runs 101 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 1 over it, 1.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Change coupling: changelog-data.js ↔ script.js landing/changelog-data.js:1— `landing/changelog-data.js` and `landing/script.js` change together 95% of the time (20 of the 21 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 20 shared commits counted here, the most recent 3 are `85b9ff03` chore: update landing release for v1.9.3; `dd502e86` chore: update landing release for v1.9.1; `b4057cf1` chore: update landing release for v1.9.0 — run `git show` on any of them.
Change coupling: specializedSegmentationService.ts ↔ specialized_segmentation.rs electron/features/segmentation/specializedSegmentationService.ts:1— `electron/features/segmentation/specializedSegmentationService.ts` and `luna-render-core/src/specialized_segmentation.rs` change together 85% of the time (11 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `e15a4056` feat: add local image beauty controls (at that commit the file was still `electron/specializedSegmentationService.ts`); `8cb4be8f` feat: add yoo seg logic (at that commit the file was still `electron/specializedSegmentationService.ts`); `bd9a10e8` feat: 接入视觉模型优化 AI 选片 (at that commit the file was still `electron/specializedSegmentationService.ts`) — run `git show` on any of them.
Change coupling: PreviewModal.tsx ↔ previewModalService.ts src/components/PreviewModal.tsx:1— `src/components/PreviewModal.tsx` and `src/components/previewModalService.ts` change together 80% of the time (8 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 8 shared commits counted here, the most recent 3 are `d8f20dfb` feat: change logic status; `deb349f3` feat: change add ai select photo model; `b2968999` feat(media): improve lightweight preview experience — run `git show` on any of them.
Change coupling: BorderPanel.tsx ↔ buildBorderLayer.ts src/workspace/border/BorderPanel.tsx:1— `src/workspace/border/BorderPanel.tsx` and `src/workspace/border/buildBorderLayer.ts` change together 71% of the time (10 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 10 shared commits counted here, the most recent 3 are `c5c75d32` feat: change border item logic; `d701105b` feat: change border item logic; `dd45ecb9` feat: fixed blurred photo — run `git show` on any of them.
Change coupling: api_types.rs ↔ workspace.ts luna-render-core/src/api_types.rs:1— `luna-render-core/src/api_types.rs` and `src/shared/types/workspace.ts` change together 62% of the time (10 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `352fdde8` feat: change loading styles; `3eea4d41` feat: add render logic; `411c7869` feat: change pixel logic — run `git show` on any of them.
Change coupling: specialized_segmentation.rs ↔ segmentationModels.ts luna-render-core/src/specialized_segmentation.rs:1— `luna-render-core/src/specialized_segmentation.rs` and `src/shared/segmentationModels.ts` change together 62% of the time (8 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `46de7912` feat: change add color beatu; `e15a4056` feat: add local image beauty controls; `9d38e08c` feat: change logic styles — run `git show` on any of them.
Change coupling: ipcSettingsService.ts ↔ settingsService.ts electron/ipc/ipcSettingsService.ts:1— `electron/ipc/ipcSettingsService.ts` and `electron/storage/settingsService.ts` change together 60% of the time (9 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `fe95020d` feat: change logic with discovery logic; `551a1751` feat: add nas support; `34d86138` feat: add nas support — run `git show` on any of them.
Change coupling: OnlyYourColorCreative.tsx ↔ PixelStretchCreative.tsx src/workspace/creative/only-your-color/OnlyYourColorCreative.tsx:1— `src/workspace/creative/only-your-color/OnlyYourColorCreative.tsx` and `src/workspace/creative/pixel-stretch/PixelStretchCreative.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 — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `dc5cc15c` feat: fixed webgpu fixed bug; `9495ad9b` feat: fixed only your color creative; `3f3635ca` feat: add webgpu video preview — run `git show` on any of them.
Change coupling: timeline.rs ↔ renderComposition.ts luna-render-core/src/composition/timeline.rs:1— `luna-render-core/src/composition/timeline.rs` and `src/components/renderComposition.ts` change together 58% of the time (7 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `610890b3` feat: change add pixel flow style; `49b25a15` feat: fixed render logic; `72b751d8` feat: fixed ilog recovery — run `git show` on any of them.
Change coupling: ipcLunaRenderCore.ts ↔ export.rs electron/ipc/ipcLunaRenderCore.ts:1— `electron/ipc/ipcLunaRenderCore.ts` and `luna-render-core/src/export.rs` change together 55% of the time (12 of the 22 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) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `ae810486` feat: change export to new api (at that commit the file was still `electron/ipcLunaRenderCore.ts`); `6592b570` feat: fixed export build (at that commit the file was still `electron/ipcLunaRenderCore.ts`); `fc1f21ae` feat: fixed render logic (at that commit the file was still `electron/ipcLunaRenderCore.ts`) — run `git show` on any of them.
Change coupling: REDACTED ↔ REDACTED REDACTED:1— `REDACTED` and `REDACTED` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `fd61177b` feat: fixed adjust luna connect logic; `f14b6acd` feat: change logic with connect; `64e1aed4` fix: improve Luna Wi-Fi reconnect detection — run `git show` on any of them.
Change coupling: lunaRenderCore.ts ↔ export.rs electron/platform/render/lunaRenderCore.ts:1— `electron/platform/render/lunaRenderCore.ts` and `luna-render-core/src/export.rs` change together 50% of the time (11 of the 22 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) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `ae810486` feat: change export to new api (at that commit the file was still `electron/lunaRenderCore.ts`); `fc1f21ae` feat: fixed render logic (at that commit the file was still `electron/lunaRenderCore.ts`); `3f1c812a` feat: change export to backend (at that commit the file was still `electron/lunaRenderCore.ts`) — run `git show` on any of them.
Change coupling: ExportSettingsPanel.tsx ↔ previewStageExport.ts src/components/ExportSettingsPanel.tsx:1— `src/components/ExportSettingsPanel.tsx` and `src/components/previewStageExport.ts` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 `6ca87570` feat: change ai select; `3044f41e` feat: add dolby vision export; `bdb6a530` feat: fixed export preview logic — run `git show` on any of them.
Change coupling: timeline.rs ↔ render.rs luna-render-core/src/composition/timeline.rs:1— `luna-render-core/src/composition/timeline.rs` and `luna-render-core/src/compositor/render.rs` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `610890b3` feat: change add pixel flow style; `49b25a15` feat: fixed render logic; `72b751d8` feat: fixed ilog recovery — run `git show` on any of them.
Change coupling: PreviewModalHeader.tsx ↔ previewModalService.ts src/components/PreviewModalHeader.tsx:1— `src/components/PreviewModalHeader.tsx` and `src/components/previewModalService.ts` 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) 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 5 shared commits counted here, the most recent 3 are `deb349f3` feat: change add ai select photo model; `3375a605` feat: try use when large image failed; `22af2bac` feat: change modal header logic — run `git show` on any of them.
Change coupling: NativeGpuVideoPreview.tsx ↔ PreviewStage.tsx src/components/NativeGpuVideoPreview.tsx:1— `src/components/NativeGpuVideoPreview.tsx` and `src/components/PreviewStage.tsx` 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) 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 5 shared commits counted here, the most recent 3 are `931ac123` feat: change preview stage logic; `5e9dc96b` fix: stabilize Windows GPU preview playback; `33557f44` feat: change gpu render logic — run `git show` on any of them.
Cross-slice coupling: ai-selection → segmentation electron/features/ai-selection/aiSelectionEmbedding.ts:50— `analyzeImageEmbedding` (slice 'ai-selection') depends on `extractImageEmbeddingInWorker` from slice 'segmentation'.
Cross-slice coupling: ai-selection → segmentation electron/features/ai-selection/aiSelectionOnDemandAnalysis.ts:78— `analyzePeopleOnDemand` (slice 'ai-selection') depends on `shutdownSpecializedSegmentationWorker` from slice 'segmentation'.
Cross-slice coupling: ai-selection → composition electron/features/ai-selection/aiSelectionOnDemandAnalysis.ts:160— `analyzePhotoEvidenceItem` (slice 'ai-selection') depends on `analyzeCompositionSubject` from slice 'composition'.
Cross-slice coupling: ai-selection → segmentation electron/features/ai-selection/aiSelectionPerson.ts:119— `buildFaceDescriptors` (slice 'ai-selection') depends on `extractFaceEmbeddingInWorker` from slice 'segmentation'.
Cross-slice coupling: ai-selection → segmentation electron/features/ai-selection/aiSelectionPerson.ts:132— `analyzeFaces` (slice 'ai-selection') depends on `extractFaceBoxesInWorker` from slice 'segmentation'.
Cross-slice coupling: ai-selection → segmentation electron/features/ai-selection/aiSelectionPerson.ts:151— `analyzeFaces` (slice 'ai-selection') depends on `segmentSpecializedInWorker` from slice 'segmentation'.
Cross-slice coupling: ai-selection → segmentation electron/features/ai-selection/aiSelectionSemantic.ts:92— `analyzeContentTags` (slice 'ai-selection') depends on `segmentSpecializedInWorker` from slice 'segmentation'.
Cross-slice coupling: ai-selection → workspace electron/features/ai-selection/aiSelectionService.ts:482— `createProjectFromAiSelection` (slice 'ai-selection') depends on `createWorkspaceProject` from slice 'workspace'.
Cross-slice coupling: beauty → segmentation electron/features/beauty/beautyAnalysisService.ts:251— `analyzeBeauty` (slice 'beauty') depends on `extractFaceBoxesInWorker` from slice 'segmentation'.
Cross-slice coupling: beauty → segmentation electron/features/beauty/beautyAnalysisService.ts:252— `analyzeBeauty` (slice 'beauty') depends on `segmentSpecializedInSecondaryWorker` from slice 'segmentation'.
Cross-slice coupling: beauty → segmentation electron/features/beauty/beautyAnalysisService.ts:272— `analyzeBeauty` (slice 'beauty') depends on `segmentSpecializedInWorker` from slice 'segmentation'.
Cross-slice coupling: composition → segmentation electron/features/composition/compositionAnalysisService.ts:102— `analyzeCompositionSubject` (slice 'composition') depends on `scoreCompositionInWorker` from slice 'segmentation'.
Cross-slice coupling: composition → segmentation electron/features/composition/compositionAnalysisService.ts:104— `analyzeCompositionSubject` (slice 'composition') depends on `segmentSpecializedInWorker` from slice 'segmentation'.
AC2 · Forms & labels· <Select> field component without a label · ×12
<Select> field component without a label src/components/AndroidUsbConnectionMode.tsx:98— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Select> field component without a label src/components/DirectorTakeMarkerPanel.tsx:91— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Select> field component without a label src/components/ExportSettingsPanel.tsx:147— This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Select> field component without a label src/components/ExportSettingsPanel.tsx:157— This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Select> field component without a label src/components/ExportSettingsPanel.tsx:167— This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Select> field component without a label src/components/LiveConnectionDebugDialog.tsx:96— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Select> field component without a label src/components/PanoramaStitchingLabView.tsx:321— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Select> field component without a label src/components/PanoramaStitchingLabView.tsx:375— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Select> field component without a label src/components/WorkspaceProjectDialogs.tsx:87— This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Select> field component without a label src/pages/SettingsPage.tsx:473— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Select> field component without a label src/workspace/color/WhiteBalancePanel.tsx:58— This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Select> field component without a label src/workspace/components/WorkspacePreviewToolbar.tsx:122— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
luna_render_core::windows::export::encode_frames (cognitive 98) luna-render-core/src/windows/export.rs:471— luna_render_core::windows::export::encode_frames has cognitive complexity 98 (threshold 15). Drivers by points: if/else 25 (74 pts), match/switch 3 (13 pts), loops 5 (8 pts), boolean chains 3 (nesting depth added 62). 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.
luna_render_core::color_source::probe_color_info (cognitive 51) luna-render-core/src/color_source.rs:34— luna_render_core::color_source::probe_color_info has cognitive complexity 51 (threshold 15). Drivers by points: if/else 9 (35 pts), loops 3 (10 pts), boolean chains 6 (nesting depth added 33). 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.
luna_render_core::native_preview::run_native_preview_session (cognitive 50) luna-render-core/src/native_preview.rs:141— luna_render_core::native_preview::run_native_preview_session has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (37 pts), match/switch 3 (6 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
luna_render_core::macos::export_video (cognitive 48) luna-render-core/src/macos/mod.rs:265— luna_render_core::macos::export_video has cognitive complexity 48 (threshold 15). Drivers by points: if/else 17 (36 pts), loops 4 (6 pts), match/switch 1 (4 pts), boolean chains 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
luna_render_core::compositor::mask::distance_to_selection (cognitive 36) luna-render-core/src/compositor/mask.rs:6— luna_render_core::compositor::mask::distance_to_selection has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (30 pts), loops 4 (6 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
luna_render_core::panorama::stitch_panorama (cognitive 33) luna-render-core/src/panorama.rs:67— luna_render_core::panorama::stitch_panorama has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 8, loops 4 (6 pts), match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
luna_render_core::asr_features::detokenize (cognitive 22) luna-render-core/src/asr_features.rs:120— luna_render_core::asr_features::detokenize has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 4, 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.
luna_render_core::segmentation::segment_with_guide (cognitive 22) luna-render-core/src/segmentation.rs:228— luna_render_core::segmentation::segment_with_guide has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
luna_render_core::specialized_segmentation::yolo_masks::yolo_person_mask (cognitive 22) luna-render-core/src/specialized_segmentation/yolo_masks.rs:3— luna_render_core::specialized_segmentation::yolo_masks::yolo_person_mask has cognitive complexity 22 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 3 (9 pts), boolean chains 3 (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
luna_render_core::specialized_segmentation::yolo_masks::yolo_instance_map (cognitive 21) luna-render-core/src/specialized_segmentation/yolo_masks.rs:68— luna_render_core::specialized_segmentation::yolo_masks::yolo_instance_map has cognitive complexity 21 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 3 (9 pts), boolean chains 2 (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
luna_render_core::specialized_segmentation::parsing_features::segment_human_parsing_with_session (cognitive 20) luna-render-core/src/specialized_segmentation/parsing_features.rs:86— luna_render_core::specialized_segmentation::parsing_features::segment_human_parsing_with_session has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 5 (9 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
luna_render_core::segmentation_refinement::dilate_selection (cognitive 19) luna-render-core/src/segmentation_refinement.rs:7— luna_render_core::segmentation_refinement::dilate_selection has cognitive complexity 19 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 2 (8 pts), boolean chains 1 (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
Skipped test: (unnamed test) e2e/beauty.e2e.spec.ts:61— Skipped — switched off by test.skip
Skipped test: (unnamed test) e2e/beauty.e2e.spec.ts:231— Skipped — switched off by test.skip
Skipped test: (unnamed test) e2e/beauty.e2e.spec.ts:291— Skipped — switched off by test.skip
Skipped test: (unnamed test) e2e/object-removal.e2e.spec.ts:22— Skipped — switched off by test.skip
Skipped test: (unnamed test) e2e/webgpu-preview.e2e.spec.ts:62— Skipped — switched off by test.skip
Skipped test: (unnamed test) e2e/workspace-export-gpu.e2e.spec.ts:13— Skipped — switched off by test.skip
Skipped test: (unnamed test) e2e/workspace-watermark-export.e2e.spec.ts:15— Skipped — switched off by test.skip
Skipped test: (unnamed test) e2e/workspace-webgpu-color.e2e.spec.ts:9— Skipped — switched off by test.skip
Skipped test: (unnamed test) e2e/workspace-webgpu-color.e2e.spec.ts:10— Skipped — switched off by test.skip
Skipped test: (unnamed test) e2e/workspace-webgpu-playback.e2e.spec.ts:9— Skipped — switched off by test.skip
Skipped test: (unnamed test) e2e/workspace-webgpu-playback.e2e.spec.ts:10— Skipped — switched off by test.skip
AC6 · Visual & motion safety· Focus outline removed in CSS without a · ×10
Focus outline removed in CSS without a :focus replacement src/workspace/trim/TrimStrip.css:31— `.workspace-trim-play-btn` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement src/ui/context-menu.css:21— `.ui-context-menu-item` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement src/ui/dialog.css:52— `.ui-dialog-content` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement src/ui/dropdown-menu.css:25— `.ui-dropdown-menu-item` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement src/ui/select.css:124— `.ui-select-item[data-highlighted]` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement src/styles/live-camera-controls.css:54— `.live-gimbal-pad[data-moving]` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement src/styles/modal.css:26— `.preview-modal` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement src/styles/workspace-color-preset.css:117— `.workspace-color-preset-search input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement src/styles/workspace-sidebar.css:66— `.filter-search-header input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement src/styles/workspace-subtitles.css:16— `.workspace-subtitle-list textarea` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Fake-async — async method never awaits electron/export/exportStubs.ts:25— `updateTaskItemProgress` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits electron/export/exportStubs.ts:34— `addTaskItem` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits electron/export/exportStubs.ts:41— `clearExportTasks` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits electron/export/exportTaskService.ts:136— `addItems` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits electron/export/exportTaskService.ts:152— `updateItem` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits electron/export/exportTaskService.ts:188— `cancelTask` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits electron/export/exportTaskService.ts:223— `clearTasks` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits electron/export/exportTaskService.ts:231— `pruneTasks` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits electron/features/ai-selection/aiSelectionOnDemandAnalysis.ts:20— `applyPersonEvidence` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits electron/network/lunaka_websocket_channel.ts:82— `disconnect` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
AC1 · Text alternatives· <canvas> without a text alternative · ×6
<canvas> without a text alternative src/components/LrcRender.tsx:481— 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 src/components/MultipleLayerVideoPreviewLrcRender.tsx:507— 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 src/components/webgpu/webgpuGpu.ts:61— 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 src/workspace/beauty/BeautyMaskOverlay.tsx:121— 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 src/workspace/mask/MaskOverlay.tsx:482— 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 src/workspace/trim/TrimStrip.tsx:400— 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.
Compositor::render_flat_impl (cognitive 101) luna-render-core/src/compositor/render.rs:168— Compositor::render_flat_impl has cognitive complexity 101 (threshold 15). Drivers by points: if/else 45 (71 pts), match/switch 9 (17 pts), loops 6 (11 pts), boolean chains 2 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Compositor::render_preview (cognitive 47) luna-render-core/src/compositor/playback.rs:397— Compositor::render_preview has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (29 pts), match/switch 5 (14 pts), boolean chains 2, loops 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Compositor::load_texture_from_path (cognitive 35) luna-render-core/src/compositor/texture.rs:110— Compositor::load_texture_from_path has cognitive complexity 35 (threshold 15). Drivers by points: if/else 21 (27 pts), boolean chains 7, match/switch 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.
Compositor::text_texture (cognitive 33) luna-render-core/src/compositor/text.rs:6— Compositor::text_texture has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 6 (13 pts), boolean chains 3, match/switch 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Compositor::read_video_frame (cognitive 27) luna-render-core/src/compositor/playback.rs:109— Compositor::read_video_frame has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17 (26 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Compositor::video_texture_for_layer (cognitive 16) luna-render-core/src/compositor/playback.rs:314— Compositor::video_texture_for_layer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TooManyFields: GpuLayerParams luna-render-core/src/compositor.rs:68— TooManyFields — 83 stored fields. The bar is 30 stored fields; this is 53 over it, 2.77× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: RenderLayer luna-render-core/src/api_types.rs:233— TooManyFields — 46 stored fields. The bar is 30 stored fields; this is 16 over it, 1.53× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: PreviewLayerInput luna-render-core/src/compositor/preview.rs:6— TooManyFields — 46 stored fields. The bar is 30 stored fields; this is 16 over it, 1.53× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: PreviewLayer luna-render-core/src/api_types.rs:285— TooManyFields — 43 stored fields. The bar is 30 stored fields; this is 13 over it, 1.43× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: CompositionLayer luna-render-core/src/composition.rs:135— TooManyFields — 41 stored fields. The bar is 30 stored fields; this is 11 over it, 1.37× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: RenderColorAdjustments luna-render-core/src/api_types.rs:40— TooManyFields — 33 stored fields. The bar is 30 stored fields; this is 3 over it, 1.10× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
luna_render_core::windows::export::encode_frames (cyclomatic 34) luna-render-core/src/windows/export.rs:471— luna_render_core::windows::export::encode_frames has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
luna_render_core::panorama::stitch_panorama (cyclomatic 29) luna-render-core/src/panorama.rs:67— luna_render_core::panorama::stitch_panorama has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
luna_render_core::macos::export_video (cyclomatic 22) luna-render-core/src/macos/mod.rs:265— luna_render_core::macos::export_video 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.
luna_render_core::native_preview::run_native_preview_session (cyclomatic 22) luna-render-core/src/native_preview.rs:141— luna_render_core::native_preview::run_native_preview_session 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.
luna_render_core::color_source::probe_color_info (cyclomatic 19) luna-render-core/src/color_source.rs:34— luna_render_core::color_source::probe_color_info 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.
Duplicated block (6 lines × 2) luna-render-core/src/compositor/init.rs:136— luna-render-core/src/compositor/init.rs:136-141 | luna-render-core/src/compositor/init.rs:171-176 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `luna-render-core/src/compositor/init.rs:136` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (6 lines × 2) luna-render-core/src/macos/preview.rs:324— luna-render-core/src/macos/preview.rs:324-329 | luna-render-core/src/windows/preview.rs:260-265 — `luna-render-core/src/macos/preview.rs` and `luna-render-core/src/windows/preview.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 87 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (6 lines × 2) luna-render-core/src/specialized_segmentation/faces.rs:125— luna-render-core/src/specialized_segmentation/faces.rs:125-130 | luna-render-core/src/specialized_segmentation/yolo.rs:125-130 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 `luna-render-core/src/specialized_segmentation/faces.rs:125` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) luna-render-core/src/specialized_segmentation/yolo_masks.rs:87— luna-render-core/src/specialized_segmentation/yolo_masks.rs:87-92 | luna-render-core/src/specialized_segmentation/yolo_masks.rs:165-170 — both copies are in the same file, so extract the 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) luna-render-core/src/bin/luna_asr_worker.rs:387— luna-render-core/src/bin/luna_asr_worker.rs:387-392 | luna-render-core/src/bin/luna_punctuation_worker.rs:153-158 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) luna-render-core/src/media/probe.rs:70— luna-render-core/src/media/probe.rs:70-74 | luna-render-core/src/media/probe.rs:100-104 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) luna-render-core/src/specialized_segmentation/parsing_features.rs:40— luna-render-core/src/specialized_segmentation/parsing_features.rs:40-44 | luna-render-core/src/specialized_segmentation/parsing_features.rs:96-100 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `luna-render-core/src/specialized_segmentation/parsing_features.rs:40` it does not close everything it opens, so those exact lines 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) luna-render-core/src/specialized_segmentation/parsing_features.rs:45— luna-render-core/src/specialized_segmentation/parsing_features.rs:45-49 | luna-render-core/src/specialized_segmentation/parsing_features.rs:102-106 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `luna-render-core/src/specialized_segmentation/parsing_features.rs:45` it begins part-way through the construct above it, so those exact lines 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) luna-render-core/src/windows/device.rs:92— luna-render-core/src/windows/device.rs:92-97 | luna-render-core/src/windows/nvenc.rs:713-717 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 `luna-render-core/src/windows/device.rs:92` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) luna-render-core/src/media/image.rs:185— luna-render-core/src/media/image.rs:185-189 | luna-render-core/src/media/probe.rs:196-200 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `luna-render-core/src/media/image.rs:185` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21 lines × 2 locations) scripts/copy-ffmpeg.mjs:45— scripts/copy-ffmpeg.mjs:45 · scripts/prepare-macos-x64-runtime.mjs:29 — the 2 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.
Duplicated block (21 lines × 2 locations) scripts/test-pixel-stretch-render.mjs:154— scripts/test-pixel-stretch-render.mjs:154 · scripts/test-pixel-stretch-render.mjs:176 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (21 lines × 2 locations) src/components/MediaGallery.tsx:318— src/components/MediaGallery.tsx:318 · src/workspace/components/WorkspaceMediaStrip.tsx:138 — 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 (21 lines × 2 locations) src/workspace/color/DetailPanel.tsx:8— src/workspace/color/DetailPanel.tsx:8 · src/workspace/color/TonePanel.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.
Duplicated block (21 lines × 2 locations) src/workspace/creative/only-your-color/exportOnlyYourColorImage.ts:23— src/workspace/creative/only-your-color/exportOnlyYourColorImage.ts:23 · src/workspace/creative/pixel-stretch/exportPixelStretchImage.ts:18 — 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.
Compositor::render_flat_impl (cyclomatic 64) luna-render-core/src/compositor/render.rs:168— Compositor::render_flat_impl has cyclomatic complexity 64 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Compositor::load_texture_from_path (cyclomatic 22) luna-render-core/src/compositor/texture.rs:110— Compositor::load_texture_from_path has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Compositor::render_preview (cyclomatic 21) luna-render-core/src/compositor/playback.rs:397— Compositor::render_preview 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.
Compositor::text_texture (cyclomatic 20) luna-render-core/src/compositor/text.rs:6— Compositor::text_texture has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
Duplicated block (8 lines × 2) electron/platform/macos/bluetoothCoreScanner.swift:4— electron/platform/macos/bluetoothCoreScanner.swift:4-11 | electron/platform/macos/wifiCoreWlan.swift:4-11 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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) luna-render-core/src/macos/mod.rs:317— luna-render-core/src/macos/mod.rs:317-324 | luna-render-core/src/windows/export.rs:507-514 — before extracting anything, compare `luna-render-core/src/macos/mod.rs` and `luna-render-core/src/windows/export.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `luna-render-core/src/macos/mod.rs:317` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) luna-render-core/src/segmentation.rs:313— luna-render-core/src/segmentation.rs:313-320 | luna-render-core/src/segmentation.rs:344-351 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `luna-render-core/src/segmentation.rs:313` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) luna-render-core/src/compositor/preview.rs:98— luna-render-core/src/compositor/preview.rs:98-105 | luna-render-core/src/compositor/preview.rs:174-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.
AC1 · Text alternatives· <video> without a captions track · ×3
<video> without a captions track public/local-share/app.js:242— 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).
<video> without a captions track src/components/HtmlPreview.tsx:162— 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).
<video> without a captions track src/components/HtmlPreview.tsx:171— 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).
AC2 · Forms & labels· <fieldset> without a <legend> · ×3
<fieldset> without a <legend> src/components/DirectorShotEditorDialog.tsx:39— A fieldset groups related controls but has no <legend> to name the group. Add a <legend> as its first child — or, if the group already has a visible caption beside it (or the fieldset is there only to disable its subtree and carries no group box), point aria-labelledby at that caption's id instead, which names the group without rendering a second one.
<fieldset> without a <legend> src/workspace/creative/pixel-stretch/PixelStretchCreative.tsx:510— A fieldset groups related controls but has no <legend> to name the group. Add a <legend> as its first child — or, if the group already has a visible caption beside it (or the fieldset is there only to disable its subtree and carries no group box), point aria-labelledby at that caption's id instead, which names the group without rendering a second one.
<fieldset> without a <legend> src/workspace/creative/pixel-stretch/PixelStretchEffectControls.tsx:24— A fieldset groups related controls but has no <legend> to name the group. Add a <legend> as its first child — or, if the group already has a visible caption beside it (or the fieldset is there only to disable its subtree and carries no group box), point aria-labelledby at that caption's id instead, which names the group without rendering a second one.
Repeated repair: scripts/test-workspace-geometry.mjs scripts/test-workspace-geometry.mjs:44— scripts/test-workspace-geometry.mjs changed 9 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 1 (its worst body is test-workspace-geometry.close at line 44), 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: explain invalid export markers”; “fix: allow live frame editing before export”; “fix: stabilize workspace playback and Windows GPU export”; “fix: scale DJI watermark width correctly”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:02:47 +08:00' --until='2026-11-16 14:02:47 +08:00' --full-history --no-merges -- scripts/test-workspace-geometry.mjs`: 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: luna-render-core/src/windows/encoder.rs luna-render-core/src/windows/encoder.rs:94— luna-render-core/src/windows/encoder.rs changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is D3d12VideoEncoder::new at line 94), 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: restore Windows GPU export fallback”; “feat: fixed window gpu export slow bug”; “fix: stabilize native Windows GPU export”; “fix: stabilize workspace playback and Windows GPU export”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:02:47 +08:00' --until='2026-11-16 14:02:47 +08:00' --full-history --no-merges -- luna-render-core/src/windows/encoder.rs`: 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: luna-render-core/src/windows/mod.rs luna-render-core/src/windows/mod.rs:58— luna-render-core/src/windows/mod.rs changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is luna_render_core::windows::export_video 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: restore Windows GPU export fallback”; “feat: fixed window gpu export slow bug”; “fix: stabilize native Windows GPU export”; “fix: stabilize workspace playback and Windows GPU export”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 14:02:47 +08:00' --until='2026-11-16 14:02:47 +08:00' --full-history --no-merges -- luna-render-core/src/windows/mod.rs`: 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.
TooManyMethods: MockCameraServer REDACTED:177— TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DjiCameraSession REDACTED:228— TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Compositor luna-render-core/src/compositor.rs:244— TooManyMethods — 38 methods, declared across 10 files: compositor/external.rs (11), compositor/playback.rs (10), compositor/render.rs (4), compositor/texture.rs (4), +6 more file(s). The bar is 30 methods; this is 8 over it, 1.27× 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.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×3
REDACTED
REDACTED
REDACTED
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×3
Edited copy of a member (18 corresponding lines) luna-render-core/src/windows/encoder.rs:849— luna-render-core/src/windows/encoder.rs:849-866 | luna-render-core/src/windows/encoder.rs:868-885 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) luna-render-core/src/macos/mod.rs:110— luna-render-core/src/macos/mod.rs:110-127 | luna-render-core/src/macos/mod.rs:179-203 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) luna-render-core/src/composition/frame.rs:30— luna-render-core/src/composition/frame.rs:30-47 | luna-render-core/src/composition/frame.rs:58-75 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (25 lines × 2 locations) electron/media/live-stream/liveConnectionDebugService.ts:323— electron/media/live-stream/liveConnectionDebugService.ts:323 · electron/media/live-stream/liveConnectionDebugService.ts:411 — all 2 copies are in the same file, 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 (25 lines × 2 locations) scripts/webgpu-comparison-page.ts:129— scripts/webgpu-comparison-page.ts:129 · src/components/webgpuVideoExport.ts:150 — 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 (25 lines × 2 locations) src/workspace/trim/TrimPanel.tsx:604— src/workspace/trim/TrimPanel.tsx:604 · src/workspace/trim/TrimPanel.tsx:629 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (20 lines × 2 locations) electron/storage/settingsService.ts:357— electron/storage/settingsService.ts:357 · electron/storage/settingsService.ts: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.
Duplicated block (20 lines × 2 locations) src/components/WorkspaceProjectDialogs.tsx:26— src/components/WorkspaceProjectDialogs.tsx:26 · src/components/WorkspaceProjectDialogs.tsx:61 — all 2 copies are in the same file, 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.
Duplicated block (20 lines × 2 locations) src/workspace/creative/triple-stitch/TripleStitchCreative.tsx:742— src/workspace/creative/triple-stitch/TripleStitchCreative.tsx:742 · src/workspace/creative/triple-stitch/TripleStitchCreative.tsx:763 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (19 lines × 2 locations) REDACTED:62— REDACTED:62 · electron/platform/network/networkDiagnostics.ts:132 — 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 (19 lines × 2 locations) electron/features/composition/compositionAnalysisService.ts:44— electron/features/composition/compositionAnalysisService.ts:44 · electron/features/composition/compositionAnalysisService.ts:64 — all 2 copies are in the same file, 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.
Duplicated block (19 lines × 2 locations) src/ui/Button.tsx:30— src/ui/Button.tsx:30 · src/ui/IconButton.tsx:28 — 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.
Boundary violation [package:relative-cross-package] dji_mock_server/server.mjs:4— dji_mock_server/server.mjs:4 reaches into another package with a relative path (./opc/server.js) — import the package by name instead.
Boundary violation [package:relative-cross-package] dji_mock_server/server.mjs:8— dji_mock_server/server.mjs:8 reaches into another package with a relative path (./opc/server.js) — import the package by name instead.
Boundary violation [package:relative-cross-package] scripts/helpers/djiMockSession.mjs:6— scripts/helpers/djiMockSession.mjs:6 reaches into another package with a relative path (../../dji_mock_server/opc/protocol.js) — import the package by name instead.
X24 · Document value interpolated into markup unescaped· Untrusted text written into markup unescaped · ×3
Untrusted text written into markup unescaped landing/latest-changelog.js:11— `latest.bodyHtml` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped landing/script.js:357— `PAGE_RENDERERS[pageId]()` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped landing/script.js:394— `WS_SUB_RENDERERS[toolId]()` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
WorkspacePage.WorkspacePageInner::handlePastePipeline (cyclomatic 32) src/pages/WorkspacePage.tsx:752— WorkspacePage.WorkspacePageInner::handlePastePipeline has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (WorkspacePage.WorkspacePageInner, WorkspacePage.WorkspacePageInner::handleWorkspaceExport) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
WorkspacePage.WorkspacePageInner::handleWorkspaceExport (cyclomatic 19) src/pages/WorkspacePage.tsx:953— WorkspacePage.WorkspacePageInner::handleWorkspaceExport has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 2 other methods here (WorkspacePage.WorkspacePageInner, WorkspacePage.WorkspacePageInner::handlePastePipeline) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
MaskOverlay.MaskOverlay::render (cyclomatic 24) src/workspace/mask/MaskOverlay.tsx:190— MaskOverlay.MaskOverlay::render 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. This shape REPEATS in the file: 2 other methods here (MaskOverlay.MaskOverlay, MaskOverlay.MaskOverlay::updateVectorDraft) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
MaskOverlay.MaskOverlay::updateVectorDraft (cyclomatic 23) src/workspace/mask/MaskOverlay.tsx:378— MaskOverlay.MaskOverlay::updateVectorDraft has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 2 other methods here (MaskOverlay.MaskOverlay, MaskOverlay.MaskOverlay::render) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
NativePreviewRuntime::render (cyclomatic 21) luna-render-core/src/macos/preview.rs:314— NativePreviewRuntime::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.
NativePreviewRuntime::render (cyclomatic 18) luna-render-core/src/windows/preview.rs:256— NativePreviewRuntime::render 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.
NativePreviewRuntime::render (cognitive 47) luna-render-core/src/macos/preview.rs:314— NativePreviewRuntime::render has cognitive complexity 47 (threshold 15). Drivers by points: if/else 16 (34 pts), loops 4 (10 pts), boolean chains 3 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NativePreviewRuntime::render (cognitive 36) luna-render-core/src/windows/preview.rs:256— NativePreviewRuntime::render has cognitive complexity 36 (threshold 15). Drivers by points: if/else 17 (32 pts), boolean chains 2, loops 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WorkspacePage.WorkspacePageInner::handlePastePipeline (cognitive 45) src/pages/WorkspacePage.tsx:752— WorkspacePage.WorkspacePageInner::handlePastePipeline has cognitive complexity 45 (threshold 15). Drivers by points: if/else 16 (23 pts), ternaries 8 (13 pts), boolean chains 4, loops 2 (4 pts), error handling 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (WorkspacePage.WorkspacePageInner, WorkspacePage.WorkspacePageInner::handleWorkspaceExport) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
WorkspacePage.WorkspacePageInner::handleWorkspaceExport (cognitive 17) src/pages/WorkspacePage.tsx:953— WorkspacePage.WorkspacePageInner::handleWorkspaceExport has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (7 pts), if/else 5 (6 pts), boolean chains 3, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This shape REPEATS in the file: 2 other methods here (WorkspacePage.WorkspacePageInner, WorkspacePage.WorkspacePageInner::handlePastePipeline) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
MaskOverlay.MaskOverlay::render (cognitive 33) src/workspace/mask/MaskOverlay.tsx:190— MaskOverlay.MaskOverlay::render has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 6 (15 pts), if/else 8 (11 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (MaskOverlay.MaskOverlay, MaskOverlay.MaskOverlay::updateVectorDraft) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
MaskOverlay.MaskOverlay::updateVectorDraft (cognitive 23) src/workspace/mask/MaskOverlay.tsx:378— MaskOverlay.MaskOverlay::updateVectorDraft has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 10 (11 pts), if/else 6 (7 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. This shape REPEATS in the file: 2 other methods here (MaskOverlay.MaskOverlay, MaskOverlay.MaskOverlay::render) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Change-coupling hub: specialized_segmentation_worker.rs → specializedSegmentationService.ts, ipcWorkspaceService.ts, segmentationModels.ts luna-render-core/src/bin/specialized_segmentation_worker.rs— `luna-render-core/src/bin/specialized_segmentation_worker.rs` changes together with 3 other files — `electron/features/segmentation/specializedSegmentationService.ts`, `electron/ipc/ipcWorkspaceService.ts`, `src/shared/segmentationModels.ts` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
Change-coupling hub: preload.ts → windowService.ts, ipcDirectorLabService.ts, ipcSettingsService.ts, ipcWorkspaceService.ts, mediaMetadataService.ts, main.tsx electron/preload.ts— `electron/preload.ts` changes together with 6 other files — `electron/application/windowService.ts`, `electron/ipc/ipcDirectorLabService.ts`, `electron/ipc/ipcSettingsService.ts`, `electron/ipc/ipcWorkspaceService.ts`, `electron/media/mediaMetadataService.ts`, `src/main.tsx` — none of which declares a dependency on it: one file is the hub of 6 separate couplings, not 6 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 6.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×2
Edited copy of a member (8 corresponding lines) luna-render-core/src/media/image.rs:183— luna-render-core/src/media/image.rs:183-190 | luna-render-core/src/media/probe.rs:192-202 — 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) luna-render-core/src/windows/converter.rs:376— luna-render-core/src/windows/converter.rs:376-383 | luna-render-core/src/windows/device.rs:149-156 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 8+ corresponding lines) · ×2
Edited copies of one member (3 members, 8+ corresponding lines) luna-render-core/src/bin/luna_asr_worker.rs:91— luna-render-core/src/bin/luna_asr_worker.rs:91-100 | luna-render-core/src/bin/luna_inpaint_worker.rs:108-116 | luna-render-core/src/bin/specialized_segmentation_worker.rs:71-78 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 8+ corresponding lines) luna-render-core/src/composition/timeline.rs:193— luna-render-core/src/composition/timeline.rs:193-200 | luna-render-core/src/macos/mod.rs:256-263 | luna-render-core/src/windows/export.rs:26-33 — 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.
Duplicated block (12 lines × 2) luna-render-core/src/windows/export.rs:623— luna-render-core/src/windows/export.rs:623-634 | luna-render-core/src/windows/export.rs:652-663 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `luna-render-core/src/windows/export.rs:623` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) luna-render-core/src/segmentation_refinement.rs:30— luna-render-core/src/segmentation_refinement.rs:30-41 | luna-render-core/src/specialized_segmentation/preprocess.rs:123-134 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7–8 lines × 2) luna-render-core/src/color_source.rs:47— luna-render-core/src/color_source.rs:47-54 | luna-render-core/src/media/probe.rs:97-103 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `luna-render-core/src/color_source.rs:47` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (7–8 lines × 2) luna-render-core/src/color_source.rs:56— luna-render-core/src/color_source.rs:56-62 | luna-render-core/src/media/probe.rs:104-111 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 3) luna-render-core/src/bin/luna_punctuation_worker.rs:52— luna-render-core/src/bin/luna_punctuation_worker.rs:52-56 | luna-render-core/src/bin/neural_preset_worker.rs:19-23 | luna-render-core/src/inpaint.rs:21-25 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (5 lines × 3) luna-render-core/src/specialized_segmentation/yolo.rs:34— luna-render-core/src/specialized_segmentation/yolo.rs:34-38 | luna-render-core/src/specialized_segmentation/yolo.rs:84-88 | luna-render-core/src/specialized_segmentation/yolo.rs:119-123 — 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.
IC1 · Incompleteness & stubs· Both branches are identical · ×2
Both branches are identical — the condition decides nothing REDACTED:333— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing src/components/MediaInspector.tsx:241— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Dead file (~155 LoC) src/shared/watermark/layoutConfig/go-ultra/index.ts— no import path from any entry point (250 application, 34 tooling, 37 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 (~155 LoC) src/shared/watermark/layoutConfig/luna-ultra/index.ts— no import path from any entry point (250 application, 34 tooling, 37 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 (~122 LoC) scripts/test-live-usage-analytics.mjs— no import path from any entry point (250 application, 34 tooling, 37 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 (~122 LoC) src/components/HotUpdateBanner.tsx— no import path from any entry point (250 application, 34 tooling, 37 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 (~105 LoC) scripts/after-pack-adhoc.mjs— no import path from any entry point (250 application, 34 tooling, 37 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 (~105 LoC) scripts/test-director-material-delete.mjs— no import path from any entry point (250 application, 34 tooling, 37 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 (~96 LoC) electron/features/ai-selection/aiSelectionVideoFaceFrames.ts— no import path from any entry point (250 application, 34 tooling, 37 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 (~96 LoC) src/workspace/creative/pixel-stretch/PixelStretchPathEditor.tsx— no import path from any entry point (250 application, 34 tooling, 37 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 (~0 LoC) src/shared/watermark/index.ts— no import path from any entry point (250 application, 34 tooling, 37 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 (~0 LoC) src/shared/watermark/layoutConfig/index.ts— no import path from any entry point (250 application, 34 tooling, 37 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
AC2 · Forms & labels· <Slider> field component without a label · ×1
<Slider> field component without a label src/ai-selection/AiSelectionPeopleActions.tsx:87— This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC3 · Page structure· Page without a main landmark · ×1
Page without a main landmark landing/index.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
AC3 · Page structure· More than one main landmark · ×1
More than one main landmark public/local-share/index.html:2— A document must expose only one main landmark. Multiple visible <main> (or role="main") elements confuse the landmark map and the "skip to content" target. Keep one; remove or hide the rest.
AC4 · Keyboard semantics· Modal dialog does not manage focus · ×1
Modal dialog does not manage focus public/local-share/index.html:61— This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
Low contrast colour pair in CSS (4.4:1) src/styles/ai-selection.css:11— `.ai-selection-task-cover` sets color: #06c on background-color: #e5e7ea — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (4.3:1) src/styles/lab.css:349— `.lab-update-badge` sets color: #b35c00 on background-color: #fff4e5 — 4.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (4.2:1) public/local-share/app.css:155— `.preview-trigger` sets color: #6e6e73 on background-color: #e8e8ed — 4.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
MockCameraState.validate (cyclomatic 241) dji_mock_server/opc/state.js:220— MockCameraState.validate has cyclomatic complexity 241 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ipcWorkspaceService.register (cyclomatic 188) electron/ipc/ipcWorkspaceService.ts:230— ipcWorkspaceService.register has cyclomatic complexity 188 (threshold 15). Most of this is not in the body itself: 1 of the 188 points is its own statement and the rest belongs to 28 function items inside it that branch (a function literal at line 587, a function literal at line 882, a function literal at line 473, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
PreviewStage.PreviewStage (cyclomatic 159) src/components/PreviewStage.tsx:57— PreviewStage.PreviewStage has cyclomatic complexity 159 (threshold 15). Of this number, 47 points are the body's own statements and 112 belong to 45 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AiSelectionPage.AiSelectionPage (cyclomatic 156) src/pages/AiSelectionPage.tsx:94— AiSelectionPage.AiSelectionPage has cyclomatic complexity 156 (threshold 15). Of this number, 74 points are the body's own statements and 82 belong to 34 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DeviceConnectPage.DeviceConnectPage (cyclomatic 139) src/pages/DeviceConnectPage.tsx:56— DeviceConnectPage.DeviceConnectPage has cyclomatic complexity 139 (threshold 15). Of this number, 90 points are the body's own statements and 49 belong to 16 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.
PixelStretchCreative.PixelStretchCreative (cyclomatic 138) src/workspace/creative/pixel-stretch/PixelStretchCreative.tsx:56— PixelStretchCreative.PixelStretchCreative has cyclomatic complexity 138 (threshold 15). Of this number, 41 points are the body's own statements and 97 belong to 26 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.
OnlyYourColorCreative.OnlyYourColorCreative (cyclomatic 137) src/workspace/creative/only-your-color/OnlyYourColorCreative.tsx:54— OnlyYourColorCreative.OnlyYourColorCreative has cyclomatic complexity 137 (threshold 15). Of this number, 38 points are the body's own statements and 99 belong to 31 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PreviewModal.PreviewModal (cyclomatic 111) src/components/PreviewModal.tsx:79— PreviewModal.PreviewModal has cyclomatic complexity 111 (threshold 15). Of this number, 49 points are the body's own statements and 62 belong to 32 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
directorLabLocalImport.registerDirectorLocalImport (cyclomatic 101) electron/features/director-lab/directorLabLocalImport.ts:22— directorLabLocalImport.registerDirectorLocalImport has cyclomatic complexity 101 (threshold 15). Most of this is not in the body itself: 1 of the 101 points is its own statement and the rest belongs to 19 function items inside it that branch (a function literal at line 167, a function literal at line 107, a function literal at line 125, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
TripleStitchCreative.TripleStitchCreative (cyclomatic 101) src/workspace/creative/triple-stitch/TripleStitchCreative.tsx:193— TripleStitchCreative.TripleStitchCreative has cyclomatic complexity 101 (threshold 15). Most of this is not in the body itself: 11 of the 101 points are its own statements and the rest belongs to 35 function items inside it that branch (handleExportConfirm, a function literal at line 679, handleExport, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
ipcLunaRenderCore.register (cyclomatic 96) electron/ipc/ipcLunaRenderCore.ts:307— ipcLunaRenderCore.register has cyclomatic complexity 96 (threshold 15). Most of this is not in the body itself: 1 of the 96 points is its own statement and the rest belongs to 17 function literals inside it that branch (lines 644, 875, 321, …). 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.
ipcDirectorLabService.localPlanFromManifest (cyclomatic 92) electron/ipc/ipcDirectorLabService.ts:276— ipcDirectorLabService.localPlanFromManifest has cyclomatic complexity 92 (threshold 15). Of this number, 22 points are the body's own statements and 70 belong to 8 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
WorkspaceMaskContext.WorkspaceMaskProvider (cyclomatic 91) src/workspace/context/WorkspaceMaskContext.tsx:34— WorkspaceMaskContext.WorkspaceMaskProvider has cyclomatic complexity 91 (threshold 15). Most of this is not in the body itself: 7 of the 91 points are its own statements and the rest belongs to 28 function literals inside it that branch (lines 345, 183, 232, …). 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.
NativeGpuVideoPreview.NativeGpuVideoPreview (cyclomatic 91) src/components/NativeGpuVideoPreview.tsx:103— NativeGpuVideoPreview.NativeGpuVideoPreview has cyclomatic complexity 91 (threshold 15). Most of this is not in the body itself: 2 of the 91 points are its own statements and the rest belongs to 28 function literals inside it that branch (lines 150, 344, 439, …). 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.
useDirectorPlanSync.useDirectorPlanSync.synchronize (cyclomatic 90) src/hooks/useDirectorPlanSync.ts:82— useDirectorPlanSync.useDirectorPlanSync.synchronize has cyclomatic complexity 90 (threshold 15). Most of this is not in the body itself: 7 of the 90 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 92, writePhonePlan, isRevisionConflict, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
localMediaShareServer.startLocalMediaShareServer.server (cyclomatic 89) REDACTED:131— localMediaShareServer.startLocalMediaShareServer.server has cyclomatic complexity 89 (threshold 15). Of this number, 84 points are the body's own statements and 5 belong to 5 function literals 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.
PixelFlowCreative.PixelFlowCreative (cyclomatic 85) src/workspace/creative/pixel-flow/PixelFlowCreative.tsx:40— PixelFlowCreative.PixelFlowCreative has cyclomatic complexity 85 (threshold 15). Of this number, 24 points are the body's own statements and 61 belong to 24 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.
DirectorVideoRangeEditor.DirectorVideoRangeEditor (cyclomatic 80) src/components/DirectorVideoRangeEditor.tsx:31— DirectorVideoRangeEditor.DirectorVideoRangeEditor has cyclomatic complexity 80 (threshold 15). Of this number, 23 points are the body's own statements and 57 belong to 23 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TrimStrip.TrimStrip (cyclomatic 78) src/workspace/trim/TrimStrip.tsx:68— TrimStrip.TrimStrip has cyclomatic complexity 78 (threshold 15). Of this number, 21 points are the body's own statements and 57 belong to 15 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
LiveControlPanel.LiveControlPanel (cyclomatic 78) src/components/LiveControlPanel.tsx:46— LiveControlPanel.LiveControlPanel has cyclomatic complexity 78 (threshold 15). Of this number, 49 points are the body's own statements and 29 belong to 13 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
PanoramaStitchingLabView.PanoramaStitchingLabView (cyclomatic 78) src/components/PanoramaStitchingLabView.tsx:93— PanoramaStitchingLabView.PanoramaStitchingLabView has cyclomatic complexity 78 (threshold 15). Of this number, 29 points are the body's own statements and 49 belong to 12 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.
SettingsPage.SettingsPage (cyclomatic 77) src/pages/SettingsPage.tsx:74— SettingsPage.SettingsPage has cyclomatic complexity 77 (threshold 15). Of this number, 20 points are the body's own statements and 57 belong to 33 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
WatermarkSettings.WatermarkSettings (cyclomatic 75) src/components/WatermarkSettings.tsx:175— WatermarkSettings.WatermarkSettings has cyclomatic complexity 75 (threshold 15). Of this number, 35 points are the body's own statements and 40 belong to 16 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
NasSyncSettings.NasSyncSettings (cyclomatic 74) src/components/NasSyncSettings.tsx:48— NasSyncSettings.NasSyncSettings has cyclomatic complexity 74 (threshold 15). Of this number, 38 points are the body's own statements and 36 belong to 14 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.
LutImportDialog.LutImportDialog (cyclomatic 71) src/workspace/lut/LutImportDialog.tsx:42— LutImportDialog.LutImportDialog has cyclomatic complexity 71 (threshold 15). Of this number, 16 points are the body's own statements and 55 belong to 21 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DownloadProgressModal.DownloadProgressModal (cyclomatic 68) src/components/DownloadProgressModal.tsx:62— DownloadProgressModal.DownloadProgressModal has cyclomatic complexity 68 (threshold 15). Most of this is not in the body itself: 14 of the 68 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 370, a function literal at line 110, downloadFile, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
buildBorderLayer.buildBorderLayer (cyclomatic 67) src/workspace/border/buildBorderLayer.ts:203— buildBorderLayer.buildBorderLayer has cyclomatic complexity 67 (threshold 15). Most of this is not in the body itself: 9 of the 67 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 236, 217). 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.
AnnexBVideoCanvas.AnnexBVideoCanvas (cyclomatic 66) src/components/AnnexBVideoCanvas.tsx:57— AnnexBVideoCanvas.AnnexBVideoCanvas has cyclomatic complexity 66 (threshold 15). Most of this is not in the body itself: 3 of the 66 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 234, 184, 164, …). 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.
MediaLibraryToolbar.MediaLibraryToolbar (cyclomatic 66) src/components/MediaLibraryToolbar.tsx:31— MediaLibraryToolbar.MediaLibraryToolbar has cyclomatic complexity 66 (threshold 15). Of this number, 31 points are the body's own statements and 35 belong to 12 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.
WorkspaceEditSidebar.WorkspaceEditSidebar (cyclomatic 64) src/workspace/components/WorkspaceEditSidebar.tsx:139— WorkspaceEditSidebar.WorkspaceEditSidebar has cyclomatic complexity 64 (threshold 15). Of this number, 35 points are the body's own statements and 29 belong to 10 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.
DeviceDebugPage.DeviceDebugPage (cyclomatic 63) src/pages/DeviceDebugPage.tsx:41— DeviceDebugPage.DeviceDebugPage has cyclomatic complexity 63 (threshold 15). Of this number, 35 points are the body's own statements and 28 belong to 14 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
WorkspaceMediaStrip.WorkspaceMediaStrip (cyclomatic 63) src/workspace/components/WorkspaceMediaStrip.tsx:46— WorkspaceMediaStrip.WorkspaceMediaStrip has cyclomatic complexity 63 (threshold 15). Most of this is not in the body itself: 4 of the 63 points are its own statements and the rest belongs to 21 function items inside it that branch (a function literal at line 267, a function literal at line 165, handlePointerUp, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
MediaGallery.MediaGallery (cyclomatic 62) src/components/MediaGallery.tsx:151— MediaGallery.MediaGallery has cyclomatic complexity 62 (threshold 15). Most of this is not in the body itself: 13 of the 62 points are its own statements and the rest belongs to 17 function items inside it that branch (handlePointerMove, handlePointerUp, a function literal at line 202, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
MockCameraState.apply (cyclomatic 61) dji_mock_server/opc/state.js:490— MockCameraState.apply has cyclomatic complexity 61 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ipcPanoramaStitching.register (cyclomatic 60) electron/ipc/ipcPanoramaStitching.ts:51— ipcPanoramaStitching.register has cyclomatic complexity 60 (threshold 15). Most of this is not in the body itself: 1 of the 60 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 116, 52, 80, …). 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.
HtmlPreview.HtmlPreview (cyclomatic 60) src/components/HtmlPreview.tsx:27— HtmlPreview.HtmlPreview has cyclomatic complexity 60 (threshold 15). Of this number, 28 points are the body's own statements and 32 belong to 14 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
liveConnectionDebugService.diagnoseLiveConnection (cyclomatic 59) electron/media/live-stream/liveConnectionDebugService.ts:180— liveConnectionDebugService.diagnoseLiveConnection has cyclomatic complexity 59 (threshold 15). Of this number, 44 points are the body's own statements and 15 belong to 8 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.
directorLabPlanStorage.reconcileLocalDirectorPlanUnlocked (cyclomatic 58) electron/features/director-lab/directorLabPlanStorage.ts:234— directorLabPlanStorage.reconcileLocalDirectorPlanUnlocked has cyclomatic complexity 58 (threshold 15). Of this number, 40 points are the body's own statements and 18 belong to one function literal 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.
FilterPanel.FilterPanel (cyclomatic 58) src/workspace/lut/FilterPanel.tsx:30— FilterPanel.FilterPanel has cyclomatic complexity 58 (threshold 15). Of this number, 16 points are the body's own statements and 42 belong to 16 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.
ColorRevealCreative.ColorRevealCreative (cyclomatic 53) src/workspace/creative/color-reveal/ColorRevealCreative.tsx:40— ColorRevealCreative.ColorRevealCreative has cyclomatic complexity 53 (threshold 15). Most of this is not in the body itself: 14 of the 53 points are its own statements and the rest belongs to 17 function items inside it that branch (handleExport, a function literal at line 86, a function literal at line 127, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
DirectorTakeMarkerPanel.DirectorTakeMarkerPanel (cyclomatic 53) src/components/DirectorTakeMarkerPanel.tsx:29— DirectorTakeMarkerPanel.DirectorTakeMarkerPanel has cyclomatic complexity 53 (threshold 15). Most of this is not in the body itself: 15 of the 53 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 69, a function literal at line 85, save, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
WebGpuVideoRenderer.render (cyclomatic 50) src/components/webgpuVideoRenderer.ts:709— WebGpuVideoRenderer.render has cyclomatic complexity 50 (threshold 15). Of this number, 39 points are the body's own statements and 11 belong to 2 function literals 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.
SubtitlePanel.SubtitlePanel (cyclomatic 50) src/workspace/subtitles/SubtitlePanel.tsx:29— SubtitlePanel.SubtitlePanel has cyclomatic complexity 50 (threshold 15). Most of this is not in the body itself: 10 of the 50 points are its own statements and the rest belongs to 16 function items inside it that branch (beginGeneration, splitSelected, mergeSelected, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
MediaCard.MediaCardImpl (cyclomatic 48) src/components/MediaCard.tsx:41— MediaCard.MediaCardImpl has cyclomatic complexity 48 (threshold 15). Of this number, 33 points are the body's own statements and 15 belong to 5 function literals 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.
workspaceMixedExport.queueWorkspaceMixedExport (cyclomatic 48) src/workspace/shared/workspaceMixedExport.ts:129— workspaceMixedExport.queueWorkspaceMixedExport has cyclomatic complexity 48 (threshold 15). Most of this is not in the body itself: 5 of the 48 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 186, 145, 231, …). 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.
webgpuVideoExport.exportVideoWithWebGpu (cyclomatic 47) src/components/webgpuVideoExport.ts:182— webgpuVideoExport.exportVideoWithWebGpu has cyclomatic complexity 47 (threshold 15). Of this number, 25 points are the body's own statements and 22 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ipcLunaMediaService.register (cyclomatic 46) electron/ipc/ipcLunaMediaService.ts:163— ipcLunaMediaService.register has cyclomatic complexity 46 (threshold 15). Most of this is not in the body itself: 1 of the 46 points is its own statement and the rest belongs to 15 function literals inside it that branch (lines 201, 252, 164, …). 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.
BeautyRetouchOverlay.BeautyRetouchOverlay (cyclomatic 46) src/workspace/beauty/BeautyRetouchOverlay.tsx:18— BeautyRetouchOverlay.BeautyRetouchOverlay has cyclomatic complexity 46 (threshold 15). Most of this is not in the body itself: 7 of the 46 points are its own statements and the rest belongs to 16 function items inside it that branch (displayToSource, paint, saveStroke, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
ExportTaskTable.ExportTaskTable (cyclomatic 45) src/components/ExportTaskTable.tsx:131— ExportTaskTable.ExportTaskTable has cyclomatic complexity 45 (threshold 15). Most of this is not in the body itself: 11 of the 45 points are its own statements and the rest belongs to 20 function items inside it that branch (statusIcon, handlePreviewItem, a function literal at line 195, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
SendToPhoneDialog.SendToPhoneDialog (cyclomatic 44) src/components/SendToPhoneDialog.tsx:23— SendToPhoneDialog.SendToPhoneDialog has cyclomatic complexity 44 (threshold 15). Most of this is not in the body itself: 11 of the 44 points are its own statements and the rest belongs to 14 function items inside it that branch (a function literal at line 48, stopSharing, chooseShareFiles, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
ThumbImage.ThumbImage (cyclomatic 44) src/components/ThumbImage.tsx:46— ThumbImage.ThumbImage has cyclomatic complexity 44 (threshold 15). Most of this is not in the body itself: 11 of the 44 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 114, 68, 100, …). 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.
MaskPanel.MaskPanel (cyclomatic 44) src/workspace/mask/MaskPanel.tsx:48— MaskPanel.MaskPanel has cyclomatic complexity 44 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (MaskPanel.MaskPanel::renderTargetButton) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
MockCameraServer.validateLifecycle (cyclomatic 43) REDACTED:513— MockCameraServer.validateLifecycle has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MockCameraServer.handleCommand (cyclomatic 42) REDACTED:615— MockCameraServer.handleCommand has cyclomatic complexity 42 (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.
referenceMatch.generatePairedReferenceMatchLut (cyclomatic 42) src/workspace/color/referenceMatch.ts:584— referenceMatch.generatePairedReferenceMatchLut has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BeautyPanel.BeautyPanel (cyclomatic 42) src/workspace/beauty/BeautyPanel.tsx:22— BeautyPanel.BeautyPanel has cyclomatic complexity 42 (threshold 15). Of this number, 16 points are the body's own statements and 26 belong to 7 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
useDirectorLab.useDirectorLab (cyclomatic 42) src/hooks/useDirectorLab.ts:12— useDirectorLab.useDirectorLab has cyclomatic complexity 42 (threshold 15). Most of this is not in the body itself: 5 of the 42 points are its own statements and the rest belongs to 15 function literals inside it that branch (lines 247, 342, 184, …). 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.
CameraLivePreviewDialog.CameraLivePreviewDialog (cyclomatic 41) src/components/CameraLivePreviewDialog.tsx:18— CameraLivePreviewDialog.CameraLivePreviewDialog has cyclomatic complexity 41 (threshold 15). Of this number, 23 points are the body's own statements and 18 belong to 10 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
wifiAutoJoinService.autoJoinDeviceWifi (cyclomatic 40) electron/platform/network/wifiAutoJoinService.ts:199— wifiAutoJoinService.autoJoinDeviceWifi has cyclomatic complexity 40 (threshold 15). Of this number, 31 points are the body's own statements and 9 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
webgpuLayerMath.createLayerParams (cyclomatic 40) src/components/webgpu/webgpuLayerMath.ts:214— webgpuLayerMath.createLayerParams has cyclomatic complexity 40 (threshold 15). Of this number, 38 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.
server.applyControlPatch (cyclomatic 39) REDACTED:1075— server.applyControlPatch has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
useTrimThumbnails.useTrimThumbnails (cyclomatic 39) src/workspace/trim/useTrimThumbnails.ts:85— useTrimThumbnails.useTrimThumbnails has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 1 of the 39 points is its own statement and the rest belongs to 12 function literals inside it that branch (lines 120, 183, 248, …). 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.
ExportPreviewPane.ExportPreviewPane (cyclomatic 39) src/components/ExportPreviewPane.tsx:46— ExportPreviewPane.ExportPreviewPane has cyclomatic complexity 39 (threshold 15). Of this number, 19 points are the body's own statements and 20 belong to 12 function literals 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.
TrimPanel.TrimPanel (cyclomatic 39) src/workspace/trim/TrimPanel.tsx:370— TrimPanel.TrimPanel has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 3 of the 39 points are its own statements and the rest belongs to 25 function items inside it that branch (setLiveRangeFrame, a function literal at line 421, addVideo, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
DefaultDjiWirelessPreparation.prepare (cyclomatic 38) REDACTED:218— DefaultDjiWirelessPreparation.prepare has cyclomatic complexity 38 (threshold 15). Of this number, 37 points are the body's own statements and 1 belongs to one function literal 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.
videoMetadata.buildVideoMetadata (cyclomatic 36) electron/media/videoMetadata.ts:156— videoMetadata.buildVideoMetadata 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.
multipleLayerVideoFrameRenderer.renderMultipleLayerVideoFrame (cyclomatic 36) src/components/multipleLayerVideoFrameRenderer.ts:263— multipleLayerVideoFrameRenderer.renderMultipleLayerVideoFrame 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.
MediaInspector.MediaInspector (cyclomatic 36) src/components/MediaInspector.tsx:286— MediaInspector.MediaInspector has cyclomatic complexity 36 (threshold 15). Of this number, 22 points are the body's own statements and 14 belong to 9 function literals 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.
ColorMaskPanel.ColorMaskPanel (cyclomatic 36) src/workspace/color/ColorMaskPanel.tsx:118— ColorMaskPanel.ColorMaskPanel has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 7 of the 36 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 261, a function literal at line 268, confirmRename, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
DirectorLabView.DirectorLabView (cyclomatic 36) src/components/DirectorLabView.tsx:33— DirectorLabView.DirectorLabView has cyclomatic complexity 36 (threshold 15). Of this number, 33 points are the body's own statements and 3 belong to 2 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.
fileDownloadService.downloadToFile (cyclomatic 35) electron/media/fileDownloadService.ts:177— fileDownloadService.downloadToFile has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
cropGeometry.resizeCandidate (cyclomatic 35) src/workspace/transform/cropGeometry.ts:340— cropGeometry.resizeCandidate has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TrimPanel.MarkerRow (cyclomatic 35) src/workspace/trim/TrimPanel.tsx:128— TrimPanel.MarkerRow has cyclomatic complexity 35 (threshold 15). Of this number, 24 points are the body's own statements and 11 belong to 9 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AndroidUsbConnectionMode.AndroidUsbConnectionMode (cyclomatic 35) src/components/AndroidUsbConnectionMode.tsx:6— AndroidUsbConnectionMode.AndroidUsbConnectionMode has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 8 of the 35 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 15, retryAdb, changeMode, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
aiSelectionAlgorithms.applySelectionPlan (cyclomatic 34) electron/features/ai-selection/aiSelectionAlgorithms.ts:419— aiSelectionAlgorithms.applySelectionPlan has cyclomatic complexity 34 (threshold 15). Of this number, 25 points are the body's own statements and 9 belong to one function literal 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.
videoOutputMarkers.normalizeVideoOutputMarkers (cyclomatic 33) src/workspace/trim/videoOutputMarkers.ts:259— videoOutputMarkers.normalizeVideoOutputMarkers has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 4 of the 33 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 271, 317). 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.
ParamSlider.ParamSlider (cyclomatic 33) src/workspace/components/ParamSlider.tsx:27— ParamSlider.ParamSlider has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 10 of the 33 points are its own statements and the rest belongs to 10 function items inside it that branch (flushSliderChange, a function literal at line 186, a function literal at line 68, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
ExportCompositionVideoTask::compute (cyclomatic 33) luna-render-core/src/composition/video_export.rs:184— ExportCompositionVideoTask::compute 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.
resumableDownloadService.downloadVerifiedFileFromSource (cyclomatic 32) electron/media/resumableDownloadService.ts:97— resumableDownloadService.downloadVerifiedFileFromSource 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.
directorPlanImport.parseDirectorPlanImport (cyclomatic 32) src/lib/directorPlanImport.ts:4— directorPlanImport.parseDirectorPlanImport has cyclomatic complexity 32 (threshold 15). Of this number, 31 points are the body's own statements and 1 belongs to one function literal 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.
LiveConsolePage.LiveConsolePage (cyclomatic 32) src/pages/LiveConsolePage.tsx:29— LiveConsolePage.LiveConsolePage has cyclomatic complexity 32 (threshold 15). Of this number, 19 points are the body's own statements and 13 belong to 6 function literals 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.
HelpDialog.HelpDialog (cyclomatic 31) src/components/HelpDialog.tsx:16— HelpDialog.HelpDialog has cyclomatic complexity 31 (threshold 15). Of this number, 18 points are the body's own statements and 13 belong to 7 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
LiveCameraControlPanel.LiveCameraControlPanel (cyclomatic 31) src/components/LiveCameraControlPanel.tsx:34— LiveCameraControlPanel.LiveCameraControlPanel has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 6 of the 31 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 48, 191, 103, …). 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.
fileService.downloadFiles (cyclomatic 30) electron/storage/fileService.ts:508— fileService.downloadFiles has cyclomatic complexity 30 (threshold 15). Of this number, 20 points are the body's own statements and 10 belong to 3 function literals 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.
aiSelectionPeopleStore.loadPeopleStore (cyclomatic 30) electron/features/ai-selection/aiSelectionPeopleStore.ts:78— aiSelectionPeopleStore.loadPeopleStore has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 13 of the 30 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 82, 106, 82). 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.
AiPersonAvatarDialog.AiPersonAvatarDialog (cyclomatic 30) src/ai-selection/AiPersonAvatarDialog.tsx:22— AiPersonAvatarDialog.AiPersonAvatarDialog has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 5 of the 30 points are its own statements and the rest belongs to 7 function items inside it that branch (moveCrop, a function literal at line 24, a function literal at line 38, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
MockCameraState.validateParam (cyclomatic 29) dji_mock_server/opc/state.js:431— MockCameraState.validateParam has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
settingsService.mergeSettings (cyclomatic 29) electron/storage/settingsService.ts:164— settingsService.mergeSettings has cyclomatic complexity 29 (threshold 15). Of this number, 27 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
mediaMetadataService.getMediaMetadata (cyclomatic 29) electron/media/mediaMetadataService.ts:233— mediaMetadataService.getMediaMetadata has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
subtitleTranscriptionService.transcribeVideo (cyclomatic 29) electron/features/subtitles/subtitleTranscriptionService.ts:53— subtitleTranscriptionService.transcribeVideo has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 14 of the 29 points are its own statements and the rest belongs to 6 function items inside it that branch (processLine, a function literal at line 113, a function literal at line 116, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
Dialog.Dialog (cyclomatic 29) src/ui/Dialog.tsx:80— Dialog.Dialog has cyclomatic complexity 29 (threshold 15). Of this number, 19 points are the body's own statements and 10 belong to 5 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.
DeveloperTab.DeveloperTab (cyclomatic 29) src/pages/DeveloperTab.tsx:74— DeveloperTab.DeveloperTab has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 4 of the 29 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 256, toggleNasDebugMode, a function literal at line 187, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
MaskOverlay.MaskOverlay (cyclomatic 29) src/workspace/mask/MaskOverlay.tsx:48— MaskOverlay.MaskOverlay has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 2 other methods here (MaskOverlay.MaskOverlay::render, MaskOverlay.MaskOverlay::updateVectorDraft) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
WorkspacePage.WorkspacePageInner (cyclomatic 29) src/pages/WorkspacePage.tsx:145— WorkspacePage.WorkspacePageInner has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (WorkspacePage.WorkspacePageInner::handlePastePipeline, WorkspacePage.WorkspacePageInner::handleWorkspaceExport) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
livetool.swift.processMOV (cyclomatic 29) electron/platform/macos/livetool.swift:105— livetool.swift.processMOV has cyclomatic complexity 29 (threshold 15). Of this number, 28 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
liveStreamService.startLiveStream (cyclomatic 28) electron/media/live-stream/liveStreamService.ts:253— liveStreamService.startLiveStream has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 2 of the 28 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 263, 282, 255, …). 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.
service.runDeviceTest (cyclomatic 28) electron/devtools/device-debug/service.ts:134— service.runDeviceTest has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
previewStageExport.runBatchExportQueue::exportOne (cyclomatic 28) src/components/previewStageExport.ts:519— previewStageExport.runBatchExportQueue::exportOne has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WorkspaceImportDialog.WorkspaceImportDialog (cyclomatic 28) src/workspace/components/WorkspaceImportDialog.tsx:36— WorkspaceImportDialog.WorkspaceImportDialog 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 5 function items inside it that branch (a function literal at line 60, handleImport, handleChooseLocalFiles, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
MockCameraServer.handleUdp (cyclomatic 27) REDACTED:318— MockCameraServer.handleUdp has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
appMain.registerIpc (cyclomatic 27) electron/appMain.ts:347— appMain.registerIpc has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 3 of the 27 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 394, 490, 424, …). 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.
directorLabPlanDeletion.reconcileDirectorPlanDeletions (cyclomatic 27) electron/features/director-lab/directorLabPlanDeletion.ts:6— directorLabPlanDeletion.reconcileDirectorPlanDeletions has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 7 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 21). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
NasSyncPopover.NasSyncPopover (cyclomatic 27) src/components/NasSyncPopover.tsx:66— NasSyncPopover.NasSyncPopover has cyclomatic complexity 27 (threshold 15). Of this number, 19 points are the body's own statements and 8 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
useMediaLibraryController.useMediaLibraryController (cyclomatic 27) src/pages/useMediaLibraryController.ts:41— useMediaLibraryController.useMediaLibraryController has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 3 of the 27 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 259, 198, 171, …). 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.
useDirectorMaterialSync.useDirectorMaterialSync (cyclomatic 27) src/hooks/useDirectorMaterialSync.ts:5— useDirectorMaterialSync.useDirectorMaterialSync has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 31, 22, 15, …). 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.
MockCameraServer.validateSessionCommand (cyclomatic 26) REDACTED:469— MockCameraServer.validateSessionCommand 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.
WirelessCameraMediaSource.connect (cyclomatic 26) REDACTED:153— WirelessCameraMediaSource.connect has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
colorMaskComponentNormalization.normalizeColorMaskComponent (cyclomatic 26) src/workspace/shared/colorMaskComponentNormalization.ts:43— colorMaskComponentNormalization.normalizeColorMaskComponent has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
WebGpuVideoPreview.WebGpuVideoPreview (cyclomatic 26) src/components/WebGpuVideoPreview.tsx:31— WebGpuVideoPreview.WebGpuVideoPreview has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 5 of the 26 points are its own statements and the rest belongs to 9 function items inside it that branch (syncLatestLayers, a function literal at line 96, a function literal at line 122, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
DjiCameraSession.deleteFiles (cyclomatic 25) REDACTED:1051— DjiCameraSession.deleteFiles has cyclomatic complexity 25 (threshold 15). Of this number, 21 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
dolbyVisionExportService.exportDolbyVisionWatermark (cyclomatic 25) electron/export/dolbyVisionExportService.ts:198— dolbyVisionExportService.exportDolbyVisionWatermark has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to one function literal 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.
aiSelectionService.runSession (cyclomatic 25) electron/features/ai-selection/aiSelectionService.ts:114— aiSelectionService.runSession has cyclomatic complexity 25 (threshold 15). Of this number, 13 points are the body's own statements and 12 belong to 3 function literals 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.
CropOverlay.CropOverlay (cyclomatic 25) src/workspace/transform/CropOverlay.tsx:17— CropOverlay.CropOverlay has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 3 of the 25 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 64, a function literal at line 37, a function literal at line 132, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
wifiDebugService.connectWifiNetwork (cyclomatic 24) REDACTED:514— wifiDebugService.connectWifiNetwork 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.
DjiVideoStreamAdapter.tickPreviewWatchdog (cyclomatic 24) electron/devices/dji/djiVideoStreamAdapter.ts:262— DjiVideoStreamAdapter.tickPreviewWatchdog has cyclomatic complexity 24 (threshold 15). Of this number, 14 points are the body's own statements and 10 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
jpegHdrMetadata.firstJpegEnd (cyclomatic 24) electron/media/jpegHdrMetadata.ts:56— jpegHdrMetadata.firstJpegEnd 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.
workspaceProjectService.normalizeRemovalOperation (cyclomatic 24) electron/features/workspace/workspaceProjectService.ts:65— workspaceProjectService.normalizeRemovalOperation 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.
WebGpuVideoRenderer.renderFrameAt (cyclomatic 24) src/components/webgpuVideoRenderer.ts:338— WebGpuVideoRenderer.renderFrameAt 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.
DeviceConnectionContext.DeviceConnectionProvider::connectDevice (cyclomatic 24) src/context/DeviceConnectionContext.tsx:235— DeviceConnectionContext.DeviceConnectionProvider::connectDevice has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FilterItem.FilterItem (cyclomatic 24) src/workspace/lut/FilterItem.tsx:83— FilterItem.FilterItem has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 11 of the 24 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 131, 112, 144, …). 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.
Insta360TcpSession.onData (cyclomatic 23) REDACTED:399— Insta360TcpSession.onData has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
liveUsageAnalytics.createLiveUsageAnalytics.message (cyclomatic 23) electron/infrastructure/liveUsageAnalytics.ts:112— liveUsageAnalytics.createLiveUsageAnalytics.message has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
customWatermarkService.importCustomWatermark (cyclomatic 23) electron/export/watermark/customWatermarkService.ts:34— customWatermarkService.importCustomWatermark 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.
aiSelectionTags.deriveBasicSemanticTags (cyclomatic 23) electron/features/ai-selection/aiSelectionTags.ts:5— aiSelectionTags.deriveBasicSemanticTags has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
aiSelectionOperations.applyAiSelectionUserOperation (cyclomatic 23) electron/features/ai-selection/aiSelectionOperations.ts:44— aiSelectionOperations.applyAiSelectionUserOperation has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
nasSyncService.normalizeItem (cyclomatic 23) REDACTED:200— nasSyncService.normalizeItem 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.
AiSelectionCreateDialog.AiSelectionCreateDialog (cyclomatic 23) src/ai-selection/AiSelectionCreateDialog.tsx:36— AiSelectionCreateDialog.AiSelectionCreateDialog has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 6 of the 23 points are its own statements and the rest belongs to 7 function items inside it that branch (create, a function literal at line 67, a function literal at line 82, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
useTripleStitchSources.useTripleStitchSources (cyclomatic 23) src/workspace/creative/triple-stitch/useTripleStitchSources.ts:36— useTripleStitchSources.useTripleStitchSources has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to 12 function literals inside it that branch (lines 74, 90, 112, …). 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.
AppRoutes.AppRoutes (cyclomatic 23) src/routes/AppRoutes.tsx:28— AppRoutes.AppRoutes has cyclomatic complexity 23 (threshold 15). Of this number, 12 points are the body's own statements and 11 belong to 8 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PixelStretchPathEditor.PixelStretchPathEditor (cyclomatic 23) src/workspace/creative/pixel-stretch/PixelStretchPathEditor.tsx:31— PixelStretchPathEditor.PixelStretchPathEditor has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 8 of the 23 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 84, moveDrag, endDrag, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
server.parseArgs (cyclomatic 22) REDACTED:44— server.parseArgs has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
downloadedLibraryService.listDownloadedFiles (cyclomatic 22) electron/media/downloadedLibraryService.ts:35— downloadedLibraryService.listDownloadedFiles has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 6 of the 22 points are its own statements and the rest belongs to 3 function items inside it that branch (isCacheDirectory, appendFile, walk). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
djiManifest.parseCompositeManifest (cyclomatic 22) electron/devices/dji/djiManifest.ts:69— djiManifest.parseCompositeManifest has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 3 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 80). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
UsbAoaReceiver.runScan (cyclomatic 22) electron/media/live-stream/usbAoaReceiver.ts:193— UsbAoaReceiver.runScan 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.
ForwardTcpReceiver.connect (cyclomatic 22) electron/media/live-stream/forwardTcpReceiver.ts:152— ForwardTcpReceiver.connect has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 9 function items inside it that branch (a function literal at line 186, a function literal at line 182, isCurrent, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
aiSelectionAlgorithms.analyzeRgb (cyclomatic 22) electron/features/ai-selection/aiSelectionAlgorithms.ts:77— aiSelectionAlgorithms.analyzeRgb 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.
beautyBlemishDetection.softenWrinkles (cyclomatic 22) electron/features/beauty/beautyBlemishDetection.ts:94— beautyBlemishDetection.softenWrinkles has cyclomatic complexity 22 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
beautyBlemishDetection.softenComponents (cyclomatic 22) electron/features/beauty/beautyBlemishDetection.ts:148— beautyBlemishDetection.softenComponents has cyclomatic complexity 22 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
NasSyncService.syncItem (cyclomatic 22) REDACTED:768— NasSyncService.syncItem has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to one function literal 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.
ExportTaskTable.TaskItemRow (cyclomatic 22) src/components/ExportTaskTable.tsx:46— ExportTaskTable.TaskItemRow has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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.
AppNav.AppNav (cyclomatic 22) src/components/AppNav.tsx:22— AppNav.AppNav has cyclomatic complexity 22 (threshold 15). Of this number, 14 points are the body's own statements and 8 belong to 8 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
WirelessConnectionPanel.WirelessConnectionPanel (cyclomatic 22) src/components/WirelessConnectionPanel.tsx:19— WirelessConnectionPanel.WirelessConnectionPanel 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.
ExportSettingsDialog.ExportSettingsDialog (cyclomatic 22) src/components/ExportSettingsDialog.tsx:48— ExportSettingsDialog.ExportSettingsDialog has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 belong to 3 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.
ReferenceMatchPanel.ReferenceMatchPanel::generate (cyclomatic 22) src/workspace/color/ReferenceMatchPanel.tsx:152— ReferenceMatchPanel.ReferenceMatchPanel::generate has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (ReferenceMatchPanel.ReferenceMatchPanel) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
useDirectorPlanSync.useDirectorPlanSync.resolveConflict (cyclomatic 22) src/hooks/useDirectorPlanSync.ts:373— useDirectorPlanSync.useDirectorPlanSync.resolveConflict has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ipcDirectorLabService.validateRequest (cyclomatic 21) electron/ipc/ipcDirectorLabService.ts:43— ipcDirectorLabService.validateRequest 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.
NasSyncService.enqueueFiles (cyclomatic 21) REDACTED:361— NasSyncService.enqueueFiles has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal 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.
editPipeline.normalizeReferenceMatch (cyclomatic 21) src/workspace/shared/editPipeline.ts:511— editPipeline.normalizeReferenceMatch 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.
WebGpuResourceManager.videoResource (cyclomatic 21) src/components/webgpu/webgpuResources.ts:338— WebGpuResourceManager.videoResource 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.
previewStageExport.exportPreviewVideo (cyclomatic 21) src/components/previewStageExport.ts:206— previewStageExport.exportPreviewVideo has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to 4 function items inside it that branch (startNativeProgressWatcher, reportVideoProgress, a function literal at line 259, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
BorderPanel.BorderPanel (cyclomatic 21) src/workspace/border/BorderPanel.tsx:29— BorderPanel.BorderPanel has cyclomatic complexity 21 (threshold 15). Of this number, 16 points are the body's own statements and 5 belong to 5 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
HotUpdateBanner.HotUpdateBanner (cyclomatic 21) src/components/HotUpdateBanner.tsx:12— HotUpdateBanner.HotUpdateBanner has cyclomatic complexity 21 (threshold 15). Of this number, 15 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
DjiCameraSession.requestManifest (cyclomatic 20) REDACTED:970— DjiCameraSession.requestManifest 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.
DjiVideoStreamAdapter.startInternal (cyclomatic 20) electron/devices/dji/djiVideoStreamAdapter.ts:102— DjiVideoStreamAdapter.startInternal has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
IosTcpReceiver.applyDeviceDiscovery (cyclomatic 20) electron/media/live-stream/iosTcpReceiver.ts:261— IosTcpReceiver.applyDeviceDiscovery 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.
nasSyncService.userFacingNasError (cyclomatic 20) REDACTED:47— nasSyncService.userFacingNasError 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.
livePhotoService.isGoogleMotionPhoto (cyclomatic 20) electron/media/livePhotoService.ts:206— livePhotoService.isGoogleMotionPhoto 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.
PreviewThumbnailStrip.PreviewThumbnailStrip (cyclomatic 20) src/components/PreviewThumbnailStrip.tsx:89— PreviewThumbnailStrip.PreviewThumbnailStrip has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 10 function items inside it that branch (a function literal at line 147, a function literal at line 113, handleWheel, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
WifiTab.WifiTab (cyclomatic 20) src/pages/WifiTab.tsx:15— WifiTab.WifiTab has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 6 of the 20 points are its own statements and the rest belongs to 9 function items inside it that branch (connectWifi, recordWifiResult, refreshWifiStatus, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
useMaskShortcuts.useMaskShortcuts (cyclomatic 20) src/workspace/context/useMaskShortcuts.ts:17— useMaskShortcuts.useMaskShortcuts has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 24, 22). 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.
ReferenceMatchPanel.ReferenceMatchPanel (cyclomatic 20) src/workspace/color/ReferenceMatchPanel.tsx:27— ReferenceMatchPanel.ReferenceMatchPanel 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. This shape REPEATS in the file: one other method here (ReferenceMatchPanel.ReferenceMatchPanel::generate) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
WorkspaceEditContext.WorkspaceEditProvider (cyclomatic 20) src/workspace/context/WorkspaceEditContext.tsx:121— WorkspaceEditContext.WorkspaceEditProvider has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 187, 152, 176, …). 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.
BeautyMaskOverlay.BeautyMaskOverlay (cyclomatic 20) src/workspace/beauty/BeautyMaskOverlay.tsx:18— BeautyMaskOverlay.BeautyMaskOverlay has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 66, 28, 55, …). 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.
DirectorLabShotList.DirectorLabShotList::saveShotEdit (cyclomatic 20) src/components/DirectorLabShotList.tsx:156— DirectorLabShotList.DirectorLabShotList::saveShotEdit 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.
fileOperationDiagnostics.friendlyFileOperationError (cyclomatic 19) electron/storage/fileOperationDiagnostics.ts:87— fileOperationDiagnostics.friendlyFileOperationError 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.
DjiCameraSession.toLunaFile (cyclomatic 19) REDACTED:1496— DjiCameraSession.toLunaFile has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ipcWindowService.register (cyclomatic 19) electron/ipc/ipcWindowService.ts:113— ipcWindowService.register has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 124, 150, 118, …). 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.
insta360TcpDiagnostics.runTcp (cyclomatic 19) REDACTED:112— insta360TcpDiagnostics.runTcp 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.
app.loadSharedFiles (cyclomatic 19) public/local-share/app.js:358— app.loadSharedFiles 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.
WebGpuResourceManager.syncVideoElements (cyclomatic 19) src/components/webgpu/webgpuResources.ts:121— WebGpuResourceManager.syncVideoElements has cyclomatic complexity 19 (threshold 15). Of this number, 12 points are the body's own statements and 7 belong to 2 function literals 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.
maskComponentRasterization.composeMaskComponents (cyclomatic 19) src/workspace/mask/maskComponentRasterization.ts:124— maskComponentRasterization.composeMaskComponents has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to one function literal 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.
ColorPresetPanel.ColorPresetPanel (cyclomatic 19) src/workspace/color/ColorPresetPanel.tsx:20— ColorPresetPanel.ColorPresetPanel has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to 9 function items inside it that branch (handleOverwrite, handleNew, a function literal at line 32, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
WorkspacePreviewToolbar.WorkspacePreviewToolbar (cyclomatic 19) src/workspace/components/WorkspacePreviewToolbar.tsx:33— WorkspacePreviewToolbar.WorkspacePreviewToolbar has cyclomatic complexity 19 (threshold 15). Of this number, 11 points are the body's own statements and 8 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DirectorPlanImportDialog.DirectorPlanImportDialog (cyclomatic 19) src/components/DirectorPlanImportDialog.tsx:14— DirectorPlanImportDialog.DirectorPlanImportDialog has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to 2 function items inside it that branch (importPlan, a function literal at line 42). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
workspaceLivePhotoExport.queueWorkspaceFormatsExport (cyclomatic 19) src/workspace/shared/workspaceLivePhotoExport.ts:48— workspaceLivePhotoExport.queueWorkspaceFormatsExport has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 112, report, a function literal at line 68, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
MockCameraServer.replyPayload (cyclomatic 18) REDACTED:665— MockCameraServer.replyPayload 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.
LocalVideoStreamServer.start (cyclomatic 18) electron/devices/common/localVideoStreamServer.ts:52— LocalVideoStreamServer.start has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 belong to 2 function literals 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.
DjiPreviewReassembler.feed (cyclomatic 18) electron/devices/dji/djiPreview.ts:242— DjiPreviewReassembler.feed 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.
ForwardTcpReceiver.scanDevices (cyclomatic 18) electron/media/live-stream/forwardTcpReceiver.ts:113— ForwardTcpReceiver.scanDevices 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.
lunaRenderCore.getNative (cyclomatic 18) electron/platform/render/lunaRenderCore.ts:180— lunaRenderCore.getNative 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.
LunaBleSession.consumeFrames (cyclomatic 18) electron/devices/insta360/lunaBleSession.ts:267— LunaBleSession.consumeFrames 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.
jpegHdrMetadata.jpegHeaderSegments (cyclomatic 18) electron/media/jpegHdrMetadata.ts:19— jpegHdrMetadata.jpegHeaderSegments 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.
subtitleTrack.normalizeSubtitleStyle (cyclomatic 18) src/shared/subtitleTrack.ts:45— subtitleTrack.normalizeSubtitleStyle has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
beautyBlemishDetection.detectFaceBlemishes (cyclomatic 18) electron/features/beauty/beautyBlemishDetection.ts:205— beautyBlemishDetection.detectFaceBlemishes 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.
colorMaskService.parsePgm (cyclomatic 18) electron/features/segmentation/colorMaskService.ts:49— colorMaskService.parsePgm has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to one function item inside it that branches (nextToken). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
subtitleWorkerProtocol.parseSubtitleWorkerEvent (cyclomatic 18) electron/features/subtitles/subtitleWorkerProtocol.ts:11— subtitleWorkerProtocol.parseSubtitleWorkerEvent 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.
ipcPanoramaStitching.readRecordPoses (cyclomatic 18) electron/ipc/ipcPanoramaStitching.ts:22— ipcPanoramaStitching.readRecordPoses has cyclomatic complexity 18 (threshold 15). Of this number, 9 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
maskComponentRasterization.applyVectorComponent (cyclomatic 18) src/workspace/mask/maskComponentRasterization.ts:29— maskComponentRasterization.applyVectorComponent 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.
HotUpdateStartupDialog.HotUpdateStartupDialog (cyclomatic 18) src/components/HotUpdateStartupDialog.tsx:11— HotUpdateStartupDialog.HotUpdateStartupDialog has cyclomatic complexity 18 (threshold 15). Of this number, 12 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
wifiCoreWlan.swift.top-level code (cyclomatic 18) electron/platform/macos/wifiCoreWlan.swift:179— wifiCoreWlan.swift.top-level code 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.
MockCameraServer.updateSessionLifecycle (cyclomatic 17) REDACTED:564— MockCameraServer.updateSessionLifecycle 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.
MockCameraServer.handleHttp (cyclomatic 17) REDACTED:912— MockCameraServer.handleHttp 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.
Insta360TcpSession.listFilePaths (cyclomatic 17) REDACTED:314— Insta360TcpSession.listFilePaths 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.
LunaUltraProtocol.connect (cyclomatic 17) electron/devices/common/deviceProtocols.ts:55— LunaUltraProtocol.connect has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal 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.
MockDjiBleTransport.exchangeFrame (cyclomatic 17) electron/devices/dji/djiBleSession.ts:308— MockDjiBleTransport.exchangeFrame 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.
djiWebBluetoothTransport.validRendererEvent (cyclomatic 17) electron/devices/dji/djiWebBluetoothTransport.ts:41— djiWebBluetoothTransport.validRendererEvent 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.
IosTcpReceiver.startProxy (cyclomatic 17) electron/media/live-stream/iosTcpReceiver.ts:114— IosTcpReceiver.startProxy has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 4 function items inside it that branch (output, a function literal at line 129, a function literal at line 143, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
IosTcpReceiver.connect (cyclomatic 17) electron/media/live-stream/iosTcpReceiver.ts:183— IosTcpReceiver.connect has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 8 function items inside it that branch (isCurrent, a function literal at line 215, a function literal at line 220, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
lunaBleWebBluetoothTransport.validRendererEvent (cyclomatic 17) electron/devices/insta360/lunaBleWebBluetoothTransport.ts:78— lunaBleWebBluetoothTransport.validRendererEvent 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.
DefaultLunaWirelessPreparation.prepare (cyclomatic 17) REDACTED:89— DefaultLunaWirelessPreparation.prepare 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.
dolbyVisionExportService.parseDolbyVisionProbe (cyclomatic 17) electron/export/dolbyVisionExportService.ts:106— dolbyVisionExportService.parseDolbyVisionProbe 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.
jpegHdrMetadata.buildJpegHdrMetadata (cyclomatic 17) electron/media/jpegHdrMetadata.ts:161— jpegHdrMetadata.buildJpegHdrMetadata has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 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.
aiSelectionAlgorithms.nearDuplicateEvidence (cyclomatic 17) electron/features/ai-selection/aiSelectionAlgorithms.ts:222— aiSelectionAlgorithms.nearDuplicateEvidence 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.
directorLabMaterialDelete.deleteDirectorLocalMaterial (cyclomatic 17) electron/features/director-lab/directorLabMaterialDelete.ts:7— directorLabMaterialDelete.deleteDirectorLocalMaterial has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 4 function literals 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.
NasSyncService.getDebugLocalRoot (cyclomatic 17) REDACTED:267— NasSyncService.getDebugLocalRoot 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.
ipcLunaRenderCore.resolveRuntimePaths (cyclomatic 17) electron/ipc/ipcLunaRenderCore.ts:68— ipcLunaRenderCore.resolveRuntimePaths 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.
ipcSettingsService.register (cyclomatic 17) electron/ipc/ipcSettingsService.ts:121— ipcSettingsService.register has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 136, 165, 123, …). 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.
videoOutputMarkers.markerValidationReason (cyclomatic 17) src/workspace/trim/videoOutputMarkers.ts:103— videoOutputMarkers.markerValidationReason 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.
liveGimbalKeyboard.bindLiveGimbalKeyboard::keyDown (cyclomatic 17) src/lib/liveGimbalKeyboard.ts:56— liveGimbalKeyboard.bindLiveGimbalKeyboard::keyDown 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.
CameraMediaPage.CameraMediaPage (cyclomatic 17) src/pages/CameraMediaPage.tsx:54— CameraMediaPage.CameraMediaPage has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 81, 68, 75, …). 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.
maskPreviewSampling.featherMaskPreview (cyclomatic 17) src/workspace/mask/maskPreviewSampling.ts:37— maskPreviewSampling.featherMaskPreview 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.
RemovalPanel.RemovalPanel::startRemoval (cyclomatic 17) src/workspace/removal/RemovalPanel.tsx:111— RemovalPanel.RemovalPanel::startRemoval 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.
pixelFlowExport.queuePixelFlowExports (cyclomatic 17) src/workspace/creative/pixel-flow/pixelFlowExport.ts:258— pixelFlowExport.queuePixelFlowExports has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to 2 function literals 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.
DirectorPlanConflictDialog.DirectorPlanConflictDialog (cyclomatic 17) src/components/DirectorPlanConflictDialog.tsx:15— DirectorPlanConflictDialog.DirectorPlanConflictDialog has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 51, confirm, a function literal at line 64, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
DirectorPlanMainContent.DirectorPlanMainContent (cyclomatic 17) src/components/DirectorPlanMainContent.tsx:14— DirectorPlanMainContent.DirectorPlanMainContent has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 2 function items inside it that branch (save, changeOpen). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
MockCameraState.validateZoom (cyclomatic 16) dji_mock_server/opc/state.js:463— MockCameraState.validateZoom 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. This is NOT this file's highest cyclomatic complexity: MockCameraState.subscribedValue (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
MockCameraServer.writeRange (cyclomatic 16) REDACTED:940— MockCameraServer.writeRange 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.
settingsService.restoreLegacyNasSyncConfig (cyclomatic 16) electron/storage/settingsService.ts:253— settingsService.restoreLegacyNasSyncConfig 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.
lunaBleCodec.parseEncryptedMessagePacket (cyclomatic 16) REDACTED:303— lunaBleCodec.parseEncryptedMessagePacket 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.
FfmpegPipeline.execute (cyclomatic 16) electron/platform/ffmpeg/pipeline.ts:110— FfmpegPipeline.execute has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to 3 function literals 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.
DjiUdpTransport.collectPackets (cyclomatic 16) electron/devices/dji/djiUdpTransport.ts:613— DjiUdpTransport.collectPackets has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 640, 623, 627, …). 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.
IosDeviceDiscovery.scan (cyclomatic 16) electron/media/live-stream/iosDeviceDiscovery.ts:45— IosDeviceDiscovery.scan has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 3 function items inside it that branch (finish, a function literal at line 85, a function literal at line 80). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
liveStreamService.setAndroidConnectionMode (cyclomatic 16) electron/media/live-stream/liveStreamService.ts:73— liveStreamService.setAndroidConnectionMode has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
localMediaShareFiles.listSharedFileItems (cyclomatic 16) electron/media/local-share/localMediaShareFiles.ts:76— localMediaShareFiles.listSharedFileItems 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.
lunaBleWebBluetoothTransport.errorMessage (cyclomatic 16) electron/devices/insta360/lunaBleWebBluetoothTransport.ts:22— lunaBleWebBluetoothTransport.errorMessage 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.
aiSelectionAlgorithms.buildSimilarityGroups (cyclomatic 16) electron/features/ai-selection/aiSelectionAlgorithms.ts:248— aiSelectionAlgorithms.buildSimilarityGroups has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
aiSelectionPersonAvatar.createAiSelectionPersonAvatar (cyclomatic 16) electron/features/ai-selection/aiSelectionPersonAvatar.ts:7— aiSelectionPersonAvatar.createAiSelectionPersonAvatar has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
referenceMatchService.referenceMatchRoot (cyclomatic 16) electron/features/color/referenceMatchService.ts:27— referenceMatchService.referenceMatchRoot has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
directorLabMediaCleanup.cleanupDirectorMedia (cyclomatic 16) electron/features/director-lab/directorLabMediaCleanup.ts:15— directorLabMediaCleanup.cleanupDirectorMedia has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to 2 function literals 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.
inpaintMask.connectedMaskComponents (cyclomatic 16) electron/features/segmentation/inpaintMask.ts:48— inpaintMask.connectedMaskComponents 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.
ipcDirectorLabService.probeMediaOne (cyclomatic 16) electron/ipc/ipcDirectorLabService.ts:502— ipcDirectorLabService.probeMediaOne has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 522, 581). 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.
NasSyncService.runWorker (cyclomatic 16) REDACTED:669— NasSyncService.runWorker 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.
maskTimeline.normalizeMaskTimeline (cyclomatic 16) src/workspace/mask/maskTimeline.ts:20— maskTimeline.normalizeMaskTimeline has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 25). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
WebGpuVideoRenderer.setPlayback (cyclomatic 16) src/components/webgpuVideoRenderer.ts:307— WebGpuVideoRenderer.setPlayback 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.
MarkdownViewer.parseLines (cyclomatic 16) src/ui/MarkdownViewer.tsx:55— MarkdownViewer.parseLines 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.
BluetoothTab.BluetoothTab::scanBluetooth (cyclomatic 16) src/pages/BluetoothTab.tsx:58— BluetoothTab.BluetoothTab::scanBluetooth 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.
LutManagementDialog.LutManagementDialog (cyclomatic 16) src/components/LutManagementDialog.tsx:13— LutManagementDialog.LutManagementDialog 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 5 function items inside it that branch (confirmDelete, a function literal at line 20, a function literal at line 91, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
MaskPanel.MaskPanel::renderTargetButton (cyclomatic 16) src/workspace/mask/MaskPanel.tsx:145— MaskPanel.MaskPanel::renderTargetButton 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. This shape REPEATS in the file: one other method here (MaskPanel.MaskPanel) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
BorderItem.BorderItem (cyclomatic 16) src/workspace/border/BorderItem.tsx:129— BorderItem.BorderItem has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 142, 159, 164, …). 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.
CreativeCompareButton.CreativeCompareButton (cyclomatic 16) src/workspace/creative/shared/CreativeCompareButton.tsx:19— CreativeCompareButton.CreativeCompareButton has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 41, 49, 29, …). 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.
maskSelectionBoundary.createMaskSelectionBoundary (cyclomatic 16) src/workspace/mask/maskSelectionBoundary.ts:13— maskSelectionBoundary.createMaskSelectionBoundary has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
validate (cognitive 224) dji_mock_server/opc/state.js:220— validate has cognitive complexity 224 (threshold 15). Drivers by points: if/else 75 (149 pts), boolean chains 67, ternaries 2 (6 pts), error handling 1, match/switch 1 (nesting depth added 78). Of this number, 223 points are the body's own statements and 1 belongs to 6 function literals 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.
ipcWorkspaceService.register (cognitive 174) electron/ipc/ipcWorkspaceService.ts:230— ipcWorkspaceService.register has cognitive complexity 174 (threshold 15). Drivers by points: ternaries 46 (64 pts), if/else 51 (52 pts), boolean chains 50, error handling 7, loops 1 (nesting depth added 19). None of this is in the body itself: all 174 points belong to 28 function items inside it that branch (a function literal at line 587, a function literal at line 882, a function literal at line 473, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
useDirectorPlanSync.useDirectorPlanSync.synchronize (cognitive 165) src/hooks/useDirectorPlanSync.ts:82— useDirectorPlanSync.useDirectorPlanSync.synchronize has cognitive complexity 165 (threshold 15). Drivers by points: if/else 51 (111 pts), boolean chains 18, error handling 7 (16 pts), loops 8 (11 pts), ternaries 4 (9 pts) (nesting depth added 77). Most of this is not in the body itself: 6 of the 165 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 92, writePhonePlan, isRevisionConflict, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
PixelStretchCreative.PixelStretchCreative (cognitive 147) src/workspace/creative/pixel-stretch/PixelStretchCreative.tsx:56— PixelStretchCreative.PixelStretchCreative has cognitive complexity 147 (threshold 15). Drivers by points: ternaries 35 (62 pts), if/else 45 (46 pts), boolean chains 37, error handling 2 (nesting depth added 28). Of this number, 39 points are the body's own statements and 108 belong to 26 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.
OnlyYourColorCreative.OnlyYourColorCreative (cognitive 146) src/workspace/creative/only-your-color/OnlyYourColorCreative.tsx:54— OnlyYourColorCreative.OnlyYourColorCreative has cognitive complexity 146 (threshold 15). Drivers by points: ternaries 35 (57 pts), if/else 45 (47 pts), boolean chains 40, error handling 2 (nesting depth added 24). Of this number, 42 points are the body's own statements and 104 belong to 31 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
AnnexBVideoCanvas.AnnexBVideoCanvas (cognitive 143) src/components/AnnexBVideoCanvas.tsx:57— AnnexBVideoCanvas.AnnexBVideoCanvas has cognitive complexity 143 (threshold 15). Drivers by points: if/else 36 (87 pts), ternaries 10 (27 pts), error handling 6 (13 pts), loops 4 (9 pts), boolean chains 7 (nesting depth added 80). Most of this is not in the body itself: 2 of the 143 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 234, 184, 144, …). 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.
localMediaShareServer.startLocalMediaShareServer.server (cognitive 141) REDACTED:131— localMediaShareServer.startLocalMediaShareServer.server has cognitive complexity 141 (threshold 15). Drivers by points: if/else 40 (61 pts), ternaries 26 (54 pts), boolean chains 14, error handling 6 (12 pts) (nesting depth added 55). Of this number, 132 points are the body's own statements and 9 belong to 5 function literals 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.
PreviewStage.PreviewStage (cognitive 141) src/components/PreviewStage.tsx:57— PreviewStage.PreviewStage has cognitive complexity 141 (threshold 15). Drivers by points: if/else 59 (70 pts), boolean chains 51, ternaries 18 (20 pts) (nesting depth added 13). Of this number, 27 points are the body's own statements and 114 belong to 45 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
AiSelectionPage.AiSelectionPage (cognitive 137) src/pages/AiSelectionPage.tsx:94— AiSelectionPage.AiSelectionPage has cognitive complexity 137 (threshold 15). Drivers by points: boolean chains 54, ternaries 30 (41 pts), if/else 37 (39 pts), error handling 2, loops 1 (nesting depth added 13). Of this number, 61 points are the body's own statements and 76 belong to 34 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
WorkspaceEditSidebar.WorkspaceEditSidebar (cognitive 137) src/workspace/components/WorkspaceEditSidebar.tsx:139— WorkspaceEditSidebar.WorkspaceEditSidebar has cognitive complexity 137 (threshold 15). Drivers by points: ternaries 27 (87 pts), if/else 8 (26 pts), boolean chains 24 (nesting depth added 78). Of this number, 89 points are the body's own statements and 48 belong to 10 function items inside it that branch. 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.
PreviewModal.PreviewModal (cognitive 121) src/components/PreviewModal.tsx:79— PreviewModal.PreviewModal has cognitive complexity 121 (threshold 15). Drivers by points: ternaries 40 (54 pts), if/else 32 (37 pts), boolean chains 27, loops 1 (2 pts), error handling 1 (nesting depth added 20). Of this number, 45 points are the body's own statements and 76 belong to 32 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
TripleStitchCreative.TripleStitchCreative (cognitive 120) src/workspace/creative/triple-stitch/TripleStitchCreative.tsx:193— TripleStitchCreative.TripleStitchCreative has cognitive complexity 120 (threshold 15). Drivers by points: if/else 40 (51 pts), ternaries 28 (37 pts), boolean chains 23, error handling 5 (7 pts), loops 1 (2 pts) (nesting depth added 23). Most of this is not in the body itself: 8 of the 120 points are its own statements and the rest belongs to 35 function items inside it that branch (a function literal at line 679, handleExportConfirm, a function literal at line 698, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
ipcLunaRenderCore.register (cognitive 117) electron/ipc/ipcLunaRenderCore.ts:307— ipcLunaRenderCore.register has cognitive complexity 117 (threshold 15). Drivers by points: if/else 37 (52 pts), boolean chains 22, error handling 14 (20 pts), ternaries 13 (20 pts), loops 3 (nesting depth added 28). None of this is in the body itself: all 117 points belong to 17 function literals inside it that branch (lines 875, 644, 321, …). 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.
directorLabLocalImport.registerDirectorLocalImport (cognitive 115) electron/features/director-lab/directorLabLocalImport.ts:22— directorLabLocalImport.registerDirectorLocalImport has cognitive complexity 115 (threshold 15). Drivers by points: if/else 32 (52 pts), ternaries 11 (24 pts), boolean chains 23, loops 10 (14 pts), error handling 2 (nesting depth added 37). None of this is in the body itself: all 115 points belong to 19 function items inside it that branch (a function literal at line 167, a function literal at line 125, selectImportText, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
workspaceMixedExport.queueWorkspaceMixedExport (cognitive 111) src/workspace/shared/workspaceMixedExport.ts:129— workspaceMixedExport.queueWorkspaceMixedExport has cognitive complexity 111 (threshold 15). Drivers by points: if/else 18 (45 pts), ternaries 13 (40 pts), error handling 4 (12 pts), boolean chains 10, loops 2 (4 pts) (nesting depth added 64). Most of this is not in the body itself: 4 of the 111 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 186, 145, 231, …). 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.
referenceMatch.generatePairedReferenceMatchLut (cognitive 102) src/workspace/color/referenceMatch.ts:584— referenceMatch.generatePairedReferenceMatchLut has cognitive complexity 102 (threshold 15). Drivers by points: if/else 10 (43 pts), loops 14 (40 pts), ternaries 4 (13 pts), boolean chains 6 (nesting depth added 68). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
liveConnectionDebugService.diagnoseLiveConnection (cognitive 102) electron/media/live-stream/liveConnectionDebugService.ts:180— liveConnectionDebugService.diagnoseLiveConnection has cognitive complexity 102 (threshold 15). Drivers by points: if/else 34 (53 pts), ternaries 13 (33 pts), error handling 5 (10 pts), boolean chains 6 (nesting depth added 44). Of this number, 82 points are the body's own statements and 20 belong to 8 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.
WorkspaceMaskContext.WorkspaceMaskProvider (cognitive 94) src/workspace/context/WorkspaceMaskContext.tsx:34— WorkspaceMaskContext.WorkspaceMaskProvider has cognitive complexity 94 (threshold 15). Drivers by points: if/else 41 (46 pts), boolean chains 27, ternaries 13 (17 pts), error handling 3 (4 pts) (nesting depth added 10). Most of this is not in the body itself: 5 of the 94 points are its own statements and the rest belongs to 28 function literals inside it that branch (lines 345, 183, 232, …). 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.
PixelFlowCreative.PixelFlowCreative (cognitive 93) src/workspace/creative/pixel-flow/PixelFlowCreative.tsx:40— PixelFlowCreative.PixelFlowCreative has cognitive complexity 93 (threshold 15). Drivers by points: if/else 37 (43 pts), ternaries 16 (29 pts), boolean chains 17, error handling 2, loops 2 (nesting depth added 19). Of this number, 29 points are the body's own statements and 64 belong to 24 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.
MediaLibraryToolbar.MediaLibraryToolbar (cognitive 91) src/components/MediaLibraryToolbar.tsx:31— MediaLibraryToolbar.MediaLibraryToolbar has cognitive complexity 91 (threshold 15). Drivers by points: ternaries 22 (45 pts), if/else 19 (22 pts), boolean chains 18, error handling 6 (nesting depth added 26). Of this number, 43 points are the body's own statements and 48 belong to 12 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.
PanoramaStitchingLabView.PanoramaStitchingLabView (cognitive 91) src/components/PanoramaStitchingLabView.tsx:93— PanoramaStitchingLabView.PanoramaStitchingLabView has cognitive complexity 91 (threshold 15). Drivers by points: ternaries 21 (42 pts), boolean chains 24, if/else 15 (17 pts), error handling 6 (7 pts), loops 1 (nesting depth added 24). Of this number, 38 points are the body's own statements and 53 belong to 12 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.
TrimStrip.TrimStrip (cognitive 88) src/workspace/trim/TrimStrip.tsx:68— TrimStrip.TrimStrip has cognitive complexity 88 (threshold 15). Drivers by points: if/else 36 (43 pts), ternaries 21 (24 pts), boolean chains 19, loops 2 (nesting depth added 10). Of this number, 21 points are the body's own statements and 67 belong to 15 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
DeviceConnectPage.DeviceConnectPage (cognitive 84) src/pages/DeviceConnectPage.tsx:56— DeviceConnectPage.DeviceConnectPage has cognitive complexity 84 (threshold 15). Drivers by points: ternaries 44 (71 pts), boolean chains 47, if/else 22 (25 pts), error handling 4 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (DeviceConnectPage.DeviceConnectPage::handleConnect) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
NativeGpuVideoPreview.NativeGpuVideoPreview (cognitive 84) src/components/NativeGpuVideoPreview.tsx:103— NativeGpuVideoPreview.NativeGpuVideoPreview has cognitive complexity 84 (threshold 15). Drivers by points: if/else 37 (40 pts), ternaries 16 (25 pts), boolean chains 17, error handling 2 (nesting depth added 12). Most of this is not in the body itself: 1 of the 84 points is its own statement and the rest belongs to 28 function literals inside it that branch (lines 344, 439, 289, …). 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.
ipcDirectorLabService.localPlanFromManifest (cognitive 81) electron/ipc/ipcDirectorLabService.ts:276— ipcDirectorLabService.localPlanFromManifest has cognitive complexity 81 (threshold 15). Drivers by points: ternaries 47 (54 pts), boolean chains 23, if/else 3, error handling 1 (nesting depth added 7). Of this number, 20 points are the body's own statements and 61 belong to 8 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
NasSyncSettings.NasSyncSettings (cognitive 81) src/components/NasSyncSettings.tsx:48— NasSyncSettings.NasSyncSettings has cognitive complexity 81 (threshold 15). Drivers by points: ternaries 21 (36 pts), boolean chains 21, if/else 18 (19 pts), error handling 5 (nesting depth added 16). Of this number, 37 points are the body's own statements and 44 belong to 14 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.
SettingsPage.SettingsPage (cognitive 80) src/pages/SettingsPage.tsx:74— SettingsPage.SettingsPage has cognitive complexity 80 (threshold 15). Drivers by points: ternaries 28 (38 pts), if/else 24 (25 pts), boolean chains 11, error handling 5, loops 1 (nesting depth added 11). Most of this is not in the body itself: 15 of the 80 points are its own statements and the rest belongs to 33 function items inside it that branch (organizeOldDownloads, a function literal at line 159, saveWindowCloseBehavior, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
WorkspaceMediaStrip.WorkspaceMediaStrip (cognitive 78) src/workspace/components/WorkspaceMediaStrip.tsx:46— WorkspaceMediaStrip.WorkspaceMediaStrip has cognitive complexity 78 (threshold 15). Drivers by points: if/else 25 (33 pts), ternaries 12 (20 pts), boolean chains 17, loops 4 (5 pts), error handling 3 (nesting depth added 17). Most of this is not in the body itself: 3 of the 78 points are its own statements and the rest belongs to 21 function items inside it that branch (a function literal at line 267, handlePointerUp, copyAssetPaths, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
LutImportDialog.LutImportDialog (cognitive 77) src/workspace/lut/LutImportDialog.tsx:42— LutImportDialog.LutImportDialog has cognitive complexity 77 (threshold 15). Drivers by points: if/else 25 (30 pts), ternaries 14 (21 pts), boolean chains 19, error handling 3 (4 pts), loops 3 (nesting depth added 13). Most of this is not in the body itself: 14 of the 77 points are its own statements and the rest belongs to 21 function items inside it that branch (a function literal at line 238, a function literal at line 122, a function literal at line 159, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
DownloadProgressModal.DownloadProgressModal (cognitive 73) src/components/DownloadProgressModal.tsx:62— DownloadProgressModal.DownloadProgressModal has cognitive complexity 73 (threshold 15). Drivers by points: boolean chains 27, if/else 16 (23 pts), ternaries 10 (14 pts), loops 6 (7 pts), error handling 2 (nesting depth added 12). Most of this is not in the body itself: 15 of the 73 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 370, a function literal at line 110, downloadFile, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
buildBorderLayer.buildBorderLayer (cognitive 73) src/workspace/border/buildBorderLayer.ts:203— buildBorderLayer.buildBorderLayer has cognitive complexity 73 (threshold 15). Drivers by points: ternaries 25 (34 pts), if/else 19 (23 pts), boolean chains 16 (nesting depth added 13). Most of this is not in the body itself: 8 of the 73 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 236, 217). 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.
DirectorVideoRangeEditor.DirectorVideoRangeEditor (cognitive 73) src/components/DirectorVideoRangeEditor.tsx:31— DirectorVideoRangeEditor.DirectorVideoRangeEditor has cognitive complexity 73 (threshold 15). Drivers by points: if/else 31 (33 pts), boolean chains 23, ternaries 9 (16 pts), error handling 1 (nesting depth added 9). Of this number, 24 points are the body's own statements and 49 belong to 23 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
previewStageExport.runBatchExportQueue::exportOne (cognitive 69) src/components/previewStageExport.ts:519— previewStageExport.runBatchExportQueue::exportOne has cognitive complexity 69 (threshold 15). Drivers by points: if/else 15 (35 pts), ternaries 7 (23 pts), error handling 3 (9 pts), boolean chains 2 (nesting depth added 42). 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.
FilterPanel.FilterPanel (cognitive 68) src/workspace/lut/FilterPanel.tsx:30— FilterPanel.FilterPanel has cognitive complexity 68 (threshold 15). Drivers by points: ternaries 19 (34 pts), if/else 13 (16 pts), boolean chains 14, error handling 3, loops 1 (nesting depth added 18). Most of this is not in the body itself: 10 of the 68 points are its own statements and the rest belongs to 16 function items inside it that branch (a function literal at line 293, a function literal at line 61, a function literal at line 142, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
DeviceDebugPage.DeviceDebugPage (cognitive 65) src/pages/DeviceDebugPage.tsx:41— DeviceDebugPage.DeviceDebugPage has cognitive complexity 65 (threshold 15). Drivers by points: ternaries 29 (38 pts), boolean chains 17, error handling 9, if/else 1 (nesting depth added 9). Of this number, 35 points are the body's own statements and 30 belong to 14 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
SendToPhoneDialog.SendToPhoneDialog (cognitive 64) src/components/SendToPhoneDialog.tsx:23— SendToPhoneDialog.SendToPhoneDialog has cognitive complexity 64 (threshold 15). Drivers by points: ternaries 19 (39 pts), if/else 13 (15 pts), error handling 7, boolean chains 3 (nesting depth added 22). Most of this is not in the body itself: 15 of the 64 points are its own statements and the rest belongs to 14 function items inside it that branch (a function literal at line 48, stopSharing, chooseShareFiles, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
MaskPanel.MaskPanel (cognitive 62) src/workspace/mask/MaskPanel.tsx:48— MaskPanel.MaskPanel has cognitive complexity 62 (threshold 15). Drivers by points: boolean chains 44, if/else 11, ternaries 7. Of this number, 28 points are the body's own statements and 34 belong to 12 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
WatermarkSettings.WatermarkSettings (cognitive 61) src/components/WatermarkSettings.tsx:175— WatermarkSettings.WatermarkSettings has cognitive complexity 61 (threshold 15). Drivers by points: if/else 23 (24 pts), boolean chains 23, ternaries 11 (13 pts), error handling 1 (nesting depth added 3). Of this number, 24 points are the body's own statements and 37 belong to 16 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
WebGpuVideoRenderer.render (cognitive 58) src/components/webgpuVideoRenderer.ts:709— WebGpuVideoRenderer.render has cognitive complexity 58 (threshold 15). Drivers by points: if/else 26 (35 pts), boolean chains 14, ternaries 2 (6 pts), loops 2, error handling 1 (nesting depth added 13). Of this number, 49 points are the body's own statements and 9 belong to 2 function literals 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.
ipcPanoramaStitching.register (cognitive 57) electron/ipc/ipcPanoramaStitching.ts:51— ipcPanoramaStitching.register has cognitive complexity 57 (threshold 15). Drivers by points: boolean chains 22, if/else 18 (21 pts), ternaries 8 (10 pts), loops 3, error handling 1 (nesting depth added 5). None of this is in the body itself: all 57 points belong to 5 function literals inside it that branch (lines 116, 52, 80, …). 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.
apply (cognitive 57) dji_mock_server/opc/state.js:490— apply has cognitive complexity 57 (threshold 15). Drivers by points: if/else 18 (34 pts), ternaries 5 (14 pts), boolean chains 8, match/switch 1 (nesting depth added 25). 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.
wifiAutoJoinService.autoJoinDeviceWifi (cognitive 56) electron/platform/network/wifiAutoJoinService.ts:199— wifiAutoJoinService.autoJoinDeviceWifi has cognitive complexity 56 (threshold 15). Drivers by points: if/else 20 (35 pts), ternaries 7 (11 pts), boolean chains 9, loops 1 (nesting depth added 19). Of this number, 49 points are the body's own statements and 7 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaGallery.MediaGallery (cognitive 56) src/components/MediaGallery.tsx:151— MediaGallery.MediaGallery has cognitive complexity 56 (threshold 15). Drivers by points: if/else 22 (25 pts), boolean chains 14, ternaries 12, loops 4 (5 pts) (nesting depth added 4). Most of this is not in the body itself: 9 of the 56 points are its own statements and the rest belongs to 17 function items inside it that branch (handlePointerUp, a function literal at line 202, a function literal at line 244, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
ColorRevealCreative.ColorRevealCreative (cognitive 56) src/workspace/creative/color-reveal/ColorRevealCreative.tsx:40— ColorRevealCreative.ColorRevealCreative has cognitive complexity 56 (threshold 15). Drivers by points: ternaries 19 (24 pts), if/else 20, boolean chains 11, error handling 1 (nesting depth added 5). Of this number, 16 points are the body's own statements and 40 belong to 17 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
directorLabPlanStorage.reconcileLocalDirectorPlanUnlocked (cognitive 54) electron/features/director-lab/directorLabPlanStorage.ts:234— directorLabPlanStorage.reconcileLocalDirectorPlanUnlocked has cognitive complexity 54 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 15, error handling 3 (6 pts), ternaries 5 (6 pts), loops 3 (4 pts) (nesting depth added 13). Of this number, 33 points are the body's own statements and 21 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DefaultDjiWirelessPreparation.prepare (cognitive 53) REDACTED:218— DefaultDjiWirelessPreparation.prepare has cognitive complexity 53 (threshold 15). Drivers by points: if/else 17 (33 pts), boolean chains 10, ternaries 4 (7 pts), error handling 1 (2 pts), loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
multipleLayerVideoFrameRenderer.renderMultipleLayerVideoFrame (cognitive 53) src/components/multipleLayerVideoFrameRenderer.ts:263— multipleLayerVideoFrameRenderer.renderMultipleLayerVideoFrame has cognitive complexity 53 (threshold 15). Drivers by points: if/else 16 (30 pts), ternaries 6 (8 pts), boolean chains 7, error handling 2 (6 pts), loops 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SubtitlePanel.SubtitlePanel (cognitive 52) src/workspace/subtitles/SubtitlePanel.tsx:29— SubtitlePanel.SubtitlePanel has cognitive complexity 52 (threshold 15). Drivers by points: if/else 24 (25 pts), boolean chains 15, ternaries 8 (11 pts), error handling 1 (nesting depth added 4). Most of this is not in the body itself: 8 of the 52 points are its own statements and the rest belongs to 16 function items inside it that branch (beginGeneration, splitSelected, mergeSelected, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
LiveControlPanel.LiveControlPanel (cognitive 52) src/components/LiveControlPanel.tsx:46— LiveControlPanel.LiveControlPanel has cognitive complexity 52 (threshold 15). Drivers by points: boolean chains 26, if/else 14 (15 pts), ternaries 8 (11 pts) (nesting depth added 4). Of this number, 24 points are the body's own statements and 28 belong to 13 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
DirectorTakeMarkerPanel.DirectorTakeMarkerPanel (cognitive 52) src/components/DirectorTakeMarkerPanel.tsx:29— DirectorTakeMarkerPanel.DirectorTakeMarkerPanel has cognitive complexity 52 (threshold 15). Drivers by points: boolean chains 20, ternaries 14 (19 pts), if/else 9 (10 pts), error handling 2 (3 pts) (nesting depth added 7). Most of this is not in the body itself: 13 of the 52 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 69, a function literal at line 85, save, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
ExportCompositionVideoTask::compute (cognitive 51) luna-render-core/src/composition/video_export.rs:184— ExportCompositionVideoTask::compute has cognitive complexity 51 (threshold 15). Drivers by points: if/else 24 (38 pts), loops 3 (8 pts), match/switch 3 (5 pts) (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.
insta360TcpDiagnostics.runTcp (cognitive 49) REDACTED:112— insta360TcpDiagnostics.runTcp has cognitive complexity 49 (threshold 15). Drivers by points: ternaries 4 (16 pts), error handling 4 (12 pts), loops 4 (11 pts), if/else 5 (9 pts), boolean chains 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ipcLunaMediaService.register (cognitive 49) electron/ipc/ipcLunaMediaService.ts:163— ipcLunaMediaService.register has cognitive complexity 49 (threshold 15). Drivers by points: if/else 18 (19 pts), ternaries 12 (17 pts), boolean chains 8, error handling 3 (4 pts), loops 1 (nesting depth added 7). None of this is in the body itself: all 49 points belong to 15 function literals inside it that branch (lines 201, 252, 164, …). 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.
useDirectorLab.useDirectorLab (cognitive 49) src/hooks/useDirectorLab.ts:12— useDirectorLab.useDirectorLab has cognitive complexity 49 (threshold 15). Drivers by points: if/else 21 (22 pts), boolean chains 12, ternaries 5 (12 pts), error handling 2, loops 1 (nesting depth added 8). Most of this is not in the body itself: 10 of the 49 points are its own statements and the rest belongs to 15 function literals inside it that branch (lines 247, 265, 342, …). 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.
validateLifecycle (cognitive 49) REDACTED:513— validateLifecycle has cognitive complexity 49 (threshold 15). Drivers by points: if/else 26 (35 pts), boolean chains 11, 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.
handleCommand (cognitive 49) REDACTED:615— handleCommand has cognitive complexity 49 (threshold 15). Drivers by points: if/else 17 (19 pts), boolean chains 15, ternaries 5 (12 pts), loops 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.
beautyBlemishDetection.softenWrinkles (cognitive 47) electron/features/beauty/beautyBlemishDetection.ts:94— beautyBlemishDetection.softenWrinkles has cognitive complexity 47 (threshold 15). Drivers by points: loops 10 (23 pts), if/else 6 (19 pts), boolean chains 5 (nesting depth added 26). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
useTrimThumbnails.useTrimThumbnails (cognitive 47) src/workspace/trim/useTrimThumbnails.ts:85— useTrimThumbnails.useTrimThumbnails has cognitive complexity 47 (threshold 15). Drivers by points: if/else 29 (34 pts), boolean chains 9, ternaries 2, error handling 1, loops 1 (nesting depth added 5). None of this is in the body itself: all 47 points belong to 12 function literals inside it that branch (lines 120, 183, 248, …). 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.
fileService.downloadFiles (cognitive 46) electron/storage/fileService.ts:508— fileService.downloadFiles has cognitive complexity 46 (threshold 15). Drivers by points: if/else 9 (21 pts), ternaries 6 (15 pts), boolean chains 6, error handling 2 (3 pts), loops 1 (nesting depth added 22). Of this number, 30 points are the body's own statements and 16 belong to 3 function literals 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.
beautyBlemishDetection.softenComponents (cognitive 46) electron/features/beauty/beautyBlemishDetection.ts:148— beautyBlemishDetection.softenComponents has cognitive complexity 46 (threshold 15). Drivers by points: loops 10 (23 pts), if/else 6 (19 pts), boolean chains 4 (nesting depth added 26). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
HtmlPreview.HtmlPreview (cognitive 46) src/components/HtmlPreview.tsx:27— HtmlPreview.HtmlPreview has cognitive complexity 46 (threshold 15). Drivers by points: if/else 16, ternaries 12 (16 pts), boolean chains 14 (nesting depth added 4). Of this number, 23 points are the body's own statements and 23 belong to 14 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ExportPreviewPane.ExportPreviewPane (cognitive 46) src/components/ExportPreviewPane.tsx:46— ExportPreviewPane.ExportPreviewPane has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 19 (30 pts), if/else 9, boolean chains 7 (nesting depth added 11). Of this number, 28 points are the body's own statements and 18 belong to 12 function literals 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.
fileDownloadService.downloadToFile (cognitive 45) electron/media/fileDownloadService.ts:177— fileDownloadService.downloadToFile has cognitive complexity 45 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 9, error handling 6 (8 pts), ternaries 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LunaBleSession.consumeFrames (cognitive 45) electron/devices/insta360/lunaBleSession.ts:267— LunaBleSession.consumeFrames has cognitive complexity 45 (threshold 15). Drivers by points: if/else 11 (31 pts), ternaries 2 (7 pts), boolean chains 3, error handling 1 (3 pts), loops 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
livetool.swift.processMOV (cognitive 45) electron/platform/macos/livetool.swift:105— livetool.swift.processMOV has cognitive complexity 45 (threshold 15). Drivers by points: if/else 22 (36 pts), loops 3 (4 pts), boolean chains 3, ternaries 2 (nesting depth added 15). Of this number, 44 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
videoMetadata.buildVideoMetadata (cognitive 44) electron/media/videoMetadata.ts:156— videoMetadata.buildVideoMetadata has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 8 (15 pts), if/else 13 (14 pts), boolean chains 8, error handling 2 (4 pts), loops 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
webgpuLayerMath.createLayerParams (cognitive 44) src/components/webgpu/webgpuLayerMath.ts:214— webgpuLayerMath.createLayerParams has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 27 (36 pts), boolean chains 4, loops 3, if/else 1 (nesting depth added 9). Of this number, 42 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
MediaCard.MediaCardImpl (cognitive 44) src/components/MediaCard.tsx:41— MediaCard.MediaCardImpl has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 12 (20 pts), boolean chains 18, if/else 6 (nesting depth added 8). Of this number, 30 points are the body's own statements and 14 belong to 5 function literals 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.
TrimPanel.TrimPanel (cognitive 44) src/workspace/trim/TrimPanel.tsx:370— TrimPanel.TrimPanel has cognitive complexity 44 (threshold 15). Drivers by points: if/else 22 (26 pts), ternaries 14 (15 pts), boolean chains 3 (nesting depth added 5). Most of this is not in the body itself: 2 of the 44 points are its own statements and the rest belongs to 25 function items inside it that branch (setLiveRangeFrame, a function literal at line 421, addVideo, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
cropGeometry.resizeCandidate (cognitive 43) src/workspace/transform/cropGeometry.ts:340— cropGeometry.resizeCandidate has cognitive complexity 43 (threshold 15). Drivers by points: if/else 25 (34 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ThumbImage.ThumbImage (cognitive 43) src/components/ThumbImage.tsx:46— ThumbImage.ThumbImage has cognitive complexity 43 (threshold 15). Drivers by points: if/else 18 (25 pts), boolean chains 12, ternaries 5, loops 1 (nesting depth added 7). Most of this is not in the body itself: 8 of the 43 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 114, 160, 100, …). 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.
TrimPanel.MarkerRow (cognitive 43) src/workspace/trim/TrimPanel.tsx:128— TrimPanel.MarkerRow has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 22 (27 pts), if/else 9 (12 pts), boolean chains 4 (nesting depth added 8). Of this number, 27 points are the body's own statements and 16 belong to 9 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
BeautyRetouchOverlay.BeautyRetouchOverlay (cognitive 43) src/workspace/beauty/BeautyRetouchOverlay.tsx:18— BeautyRetouchOverlay.BeautyRetouchOverlay has cognitive complexity 43 (threshold 15). Drivers by points: if/else 20 (21 pts), boolean chains 10, ternaries 7 (8 pts), loops 2 (3 pts), error handling 1 (nesting depth added 3). Most of this is not in the body itself: 4 of the 43 points are its own statements and the rest belongs to 16 function items inside it that branch (saveStroke, renderMask, a function literal at line 108, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
applyControlPatch (cognitive 43) REDACTED:1075— applyControlPatch has cognitive complexity 43 (threshold 15). Drivers by points: if/else 20 (28 pts), boolean chains 12, loops 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Insta360TcpSession.onData (cognitive 42) REDACTED:399— Insta360TcpSession.onData has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (31 pts), loops 2 (5 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wifiDebugService.connectWifiNetwork (cognitive 42) REDACTED:514— wifiDebugService.connectWifiNetwork has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (22 pts), ternaries 3 (8 pts), boolean chains 5, error handling 2 (4 pts), loops 1 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExportTaskTable.ExportTaskTable (cognitive 41) src/components/ExportTaskTable.tsx:131— ExportTaskTable.ExportTaskTable has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17, boolean chains 15, ternaries 6 (7 pts), error handling 2 (nesting depth added 1). Most of this is not in the body itself: 8 of the 41 points are its own statements and the rest belongs to 20 function items inside it that branch (handleClearTasks, statusIcon, handlePreviewItem, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
CameraLivePreviewDialog.CameraLivePreviewDialog (cognitive 41) src/components/CameraLivePreviewDialog.tsx:18— CameraLivePreviewDialog.CameraLivePreviewDialog has cognitive complexity 41 (threshold 15). Drivers by points: boolean chains 15, ternaries 13 (14 pts), if/else 11 (12 pts) (nesting depth added 2). Of this number, 20 points are the body's own statements and 21 belong to 10 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
jpegHdrMetadata.firstJpegEnd (cognitive 40) electron/media/jpegHdrMetadata.ts:56— jpegHdrMetadata.firstJpegEnd has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (28 pts), boolean chains 6, loops 3 (6 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.
mediaMetadataService.getMediaMetadata (cognitive 39) electron/media/mediaMetadataService.ts:233— mediaMetadataService.getMediaMetadata has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (22 pts), error handling 5 (11 pts), boolean chains 5, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
directorPlanImport.parseDirectorPlanImport (cognitive 39) src/lib/directorPlanImport.ts:4— directorPlanImport.parseDirectorPlanImport has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (28 pts), boolean chains 10, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
maskPreviewSampling.featherMaskPreview (cognitive 39) src/workspace/mask/maskPreviewSampling.ts:37— maskPreviewSampling.featherMaskPreview has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (32 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ColorMaskPanel.ColorMaskPanel (cognitive 39) src/workspace/color/ColorMaskPanel.tsx:118— ColorMaskPanel.ColorMaskPanel has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 23 (27 pts), if/else 8, boolean chains 4 (nesting depth added 4). Most of this is not in the body itself: 7 of the 39 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 261, a function literal at line 268, confirmRename, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
wifiCoreWlan.swift.top-level code (cognitive 39) electron/platform/macos/wifiCoreWlan.swift:179— wifiCoreWlan.swift.top-level code has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (24 pts), error handling 2 (5 pts), loops 1 (3 pts), ternaries 1 (3 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
aiSelectionService.runSession (cognitive 38) electron/features/ai-selection/aiSelectionService.ts:114— aiSelectionService.runSession has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 4 (7 pts), error handling 4 (6 pts), loops 4 (6 pts), boolean chains 3 (nesting depth added 15). Most of this is not in the body itself: 15 of the 38 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 149, 180, 136). 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.
MediaInspector.MediaInspector (cognitive 37) src/components/MediaInspector.tsx:286— MediaInspector.MediaInspector has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 8 (15 pts), boolean chains 14, if/else 5 (8 pts) (nesting depth added 10). Of this number, 22 points are the body's own statements and 15 belong to 9 function literals 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.
maskComponentRasterization.applyVectorComponent (cognitive 37) src/workspace/mask/maskComponentRasterization.ts:29— maskComponentRasterization.applyVectorComponent has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (21 pts), loops 4 (8 pts), ternaries 2 (7 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MockCameraState.validateParam (cognitive 36) dji_mock_server/opc/state.js:431— MockCameraState.validateParam has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 13 (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.
aiSelectionAlgorithms.applySelectionPlan (cognitive 36) electron/features/ai-selection/aiSelectionAlgorithms.ts:419— aiSelectionAlgorithms.applySelectionPlan has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (18 pts), loops 5 (7 pts), ternaries 4 (6 pts), boolean chains 5 (nesting depth added 10). Of this number, 30 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BeautyPanel.BeautyPanel (cognitive 36) src/workspace/beauty/BeautyPanel.tsx:22— BeautyPanel.BeautyPanel has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 15, if/else 10 (12 pts), ternaries 5 (7 pts), error handling 1, loops 1 (nesting depth added 4). Most of this is not in the body itself: 12 of the 36 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 98, 148, 44, …). 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.
WorkspacePage.WorkspacePageInner (cognitive 36) src/pages/WorkspacePage.tsx:145— WorkspacePage.WorkspacePageInner has cognitive complexity 36 (threshold 15). Drivers by points: if/else 126 (164 pts), ternaries 64 (106 pts), boolean chains 74, error handling 4, loops 2 (4 pts) (nesting depth added 82). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (WorkspacePage.WorkspacePageInner::handlePastePipeline, WorkspacePage.WorkspacePageInner::handleWorkspaceExport) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
videoOutputMarkers.normalizeVideoOutputMarkers (cognitive 35) src/workspace/trim/videoOutputMarkers.ts:259— videoOutputMarkers.normalizeVideoOutputMarkers has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 14, ternaries 3 (nesting depth added 5). Most of this is not in the body itself: 3 of the 35 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 271, 317). 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.
webgpuPreviewMath.distanceToSelection (cognitive 35) src/components/webgpuPreviewMath.ts:16— webgpuPreviewMath.distanceToSelection has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (28 pts), loops 5 (7 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebGpuVideoRenderer.renderFrameAt (cognitive 34) src/components/webgpuVideoRenderer.ts:338— WebGpuVideoRenderer.renderFrameAt has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 6, loops 2, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
service.runDeviceTest (cognitive 33) electron/devtools/device-debug/service.ts:134— service.runDeviceTest has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 9 (12 pts), if/else 10 (11 pts), boolean chains 7, error handling 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
beautySkinSegmentation.closeMask (cognitive 33) electron/features/beauty/beautySkinSegmentation.ts:51— beautySkinSegmentation.closeMask has cognitive complexity 33 (threshold 15). Drivers by points: if/else 3 (16 pts), loops 5 (15 pts), boolean chains 2 (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.
inpaintMask.connectedMaskComponents (cognitive 33) electron/features/segmentation/inpaintMask.ts:48— inpaintMask.connectedMaskComponents has cognitive complexity 33 (threshold 15). Drivers by points: if/else 5 (19 pts), loops 4 (10 pts), boolean chains 4 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NasSyncService.syncItem (cognitive 33) REDACTED:768— NasSyncService.syncItem has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 5, error handling 2 (3 pts), loops 1 (nesting depth added 13). Of this number, 29 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParamSlider.ParamSlider (cognitive 33) src/workspace/components/ParamSlider.tsx:27— ParamSlider.ParamSlider has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (16 pts), ternaries 11 (12 pts), boolean chains 5 (nesting depth added 2). Most of this is not in the body itself: 10 of the 33 points are its own statements and the rest belongs to 10 function items inside it that branch (flushSliderChange, commit, a function literal at line 186, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
resumableDownloadService.downloadVerifiedFileFromSource (cognitive 32) electron/media/resumableDownloadService.ts:97— resumableDownloadService.downloadVerifiedFileFromSource has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 10, ternaries 2, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
LunaUltraProtocol.connect (cognitive 32) electron/devices/common/deviceProtocols.ts:55— LunaUltraProtocol.connect has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (14 pts), ternaries 4 (13 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 18). Of this number, 29 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UsbAoaReceiver.runScan (cognitive 32) electron/media/live-stream/usbAoaReceiver.ts:193— UsbAoaReceiver.runScan has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 3, error handling 2 (3 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
workspaceProjectService.normalizeRemovalOperation (cognitive 32) electron/features/workspace/workspaceProjectService.ts:65— workspaceProjectService.normalizeRemovalOperation has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 10, ternaries 5 (6 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
beautyLayers.createBeautyMaskLayer (cognitive 32) src/workspace/beauty/beautyLayers.ts:283— beautyLayers.createBeautyMaskLayer has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 14 (32 pts) (nesting depth added 18). 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.
aiSelectionAlgorithms.analyzeRgb (cognitive 31) electron/features/ai-selection/aiSelectionAlgorithms.ts:77— aiSelectionAlgorithms.analyzeRgb has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 6 (8 pts), ternaries 3 (6 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
beautyBlemishDetection.connectedComponents (cognitive 31) electron/features/beauty/beautyBlemishDetection.ts:50— beautyBlemishDetection.connectedComponents has cognitive complexity 31 (threshold 15). Drivers by points: if/else 4 (17 pts), loops 4 (10 pts), boolean chains 4 (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.
WorkspaceImportDialog.WorkspaceImportDialog (cognitive 31) src/workspace/components/WorkspaceImportDialog.tsx:36— WorkspaceImportDialog.WorkspaceImportDialog has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 12 (18 pts), boolean chains 7, if/else 4, error handling 2 (nesting depth added 6). Most of this is not in the body itself: 13 of the 31 points are its own statements and the rest belongs to 5 function items inside it that branch (handleImport, handleChooseLocalFiles, a function literal at line 60, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
AndroidUsbConnectionMode.AndroidUsbConnectionMode (cognitive 31) src/components/AndroidUsbConnectionMode.tsx:6— AndroidUsbConnectionMode.AndroidUsbConnectionMode has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 10, ternaries 2 (3 pts), error handling 2 (nesting depth added 2). Most of this is not in the body itself: 4 of the 31 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 15, retryAdb, changeMode, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
lunaRenderCore.getNative (cognitive 30) electron/platform/render/lunaRenderCore.ts:180— lunaRenderCore.getNative has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 7 (17 pts), if/else 3 (6 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
aiSelectionPeopleStore.loadPeopleStore (cognitive 30) electron/features/ai-selection/aiSelectionPeopleStore.ts:78— aiSelectionPeopleStore.loadPeopleStore has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 8, loops 3 (4 pts), ternaries 4, error handling 1 (nesting depth added 7). Of this number, 18 points are the body's own statements and 12 belong to 3 function literals 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.
subtitleTranscriptionService.transcribeVideo (cognitive 30) electron/features/subtitles/subtitleTranscriptionService.ts:53— subtitleTranscriptionService.transcribeVideo has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17 (18 pts), boolean chains 6, ternaries 3 (4 pts), error handling 1, loops 1 (nesting depth added 2). Most of this is not in the body itself: 13 of the 30 points are its own statements and the rest belongs to 6 function items inside it that branch (processLine, a function literal at line 154, a function literal at line 113, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
LiveCameraControlPanel.LiveCameraControlPanel (cognitive 30) src/components/LiveCameraControlPanel.tsx:34— LiveCameraControlPanel.LiveCameraControlPanel has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 9, ternaries 5 (nesting depth added 3). Most of this is not in the body itself: 5 of the 30 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 48, 103, 123, …). 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.
LiveConsolePage.LiveConsolePage (cognitive 30) src/pages/LiveConsolePage.tsx:29— LiveConsolePage.LiveConsolePage has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 10 (14 pts), boolean chains 10, if/else 3 (4 pts), error handling 2 (nesting depth added 5). Of this number, 15 points are the body's own statements and 15 belong to 6 function literals 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.
appMain.registerIpc (cognitive 29) electron/appMain.ts:347— appMain.registerIpc has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 6 (7 pts), boolean chains 6, error handling 4, match/switch 3, loops 1 (nesting depth added 5). Most of this is not in the body itself: 3 of the 29 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 490, 394, 424, …). 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.
aiSelectionOperations.applyAiSelectionUserOperation (cognitive 29) electron/features/ai-selection/aiSelectionOperations.ts:44— aiSelectionOperations.applyAiSelectionUserOperation has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (22 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
beautyBlemishDetection.detectFaceBlemishes (cognitive 29) electron/features/beauty/beautyBlemishDetection.ts:205— beautyBlemishDetection.detectFaceBlemishes has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (20 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ipcLunaRenderCore.resolveRuntimePaths (cognitive 29) electron/ipc/ipcLunaRenderCore.ts:68— ipcLunaRenderCore.resolveRuntimePaths has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 2 (7 pts), boolean chains 6, 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.
liveGimbalKeyboard.bindLiveGimbalKeyboard (cognitive 29) src/lib/liveGimbalKeyboard.ts:26— liveGimbalKeyboard.bindLiveGimbalKeyboard has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14, boolean chains 11, ternaries 2 (3 pts), loops 1 (nesting depth added 1). None of this is in the body itself: all 29 points belong to 4 function items inside it that branch (keyDown, update, keyUp, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
HelpDialog.HelpDialog (cognitive 29) src/components/HelpDialog.tsx:16— HelpDialog.HelpDialog has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 12, ternaries 4 (8 pts), if/else 6, error handling 3 (nesting depth added 4). Of this number, 16 points are the body's own statements and 13 belong to 7 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
useMediaLibraryController.useMediaLibraryController (cognitive 29) src/pages/useMediaLibraryController.ts:41— useMediaLibraryController.useMediaLibraryController has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 9 (13 pts), if/else 10, boolean chains 6 (nesting depth added 4). Most of this is not in the body itself: 2 of the 29 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 259, 171, 198, …). 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.
DeveloperTab.DeveloperTab (cognitive 29) src/pages/DeveloperTab.tsx:74— DeveloperTab.DeveloperTab has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 10 (12 pts), boolean chains 8, if/else 8, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 4 of the 29 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 256, toggleNasDebugMode, a function literal at line 145, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
useDirectorMaterialSync.useDirectorMaterialSync (cognitive 29) src/hooks/useDirectorMaterialSync.ts:5— useDirectorMaterialSync.useDirectorMaterialSync has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 6, error handling 2 (4 pts), ternaries 3 (4 pts), loops 1 (2 pts) (nesting depth added 8). None of this is in the body itself: all 29 points belong to 7 function literals inside it that branch (lines 31, 22, 15, …). 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.
MockCameraServer.validateSessionCommand (cognitive 28) REDACTED:469— MockCameraServer.validateSessionCommand has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 8, ternaries 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
aiSelectionTags.deriveBasicSemanticTags (cognitive 28) electron/features/ai-selection/aiSelectionTags.ts:5— aiSelectionTags.deriveBasicSemanticTags has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 4 (8 pts), boolean chains 6 (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.
directorLabPlanDeletion.reconcileDirectorPlanDeletions (cognitive 28) electron/features/director-lab/directorLabPlanDeletion.ts:6— directorLabPlanDeletion.reconcileDirectorPlanDeletions has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 7, error handling 2 (3 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 9). Most of this is not in the body itself: 5 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 21). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
NasSyncService.runWorker (cognitive 28) REDACTED:669— NasSyncService.runWorker has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MarkdownViewer.parseLines (cognitive 28) src/ui/MarkdownViewer.tsx:55— MarkdownViewer.parseLines has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 4 (10 pts), boolean chains 4 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WirelessConnectionPanel.WirelessConnectionPanel (cognitive 28) src/components/WirelessConnectionPanel.tsx:19— WirelessConnectionPanel.WirelessConnectionPanel has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 13 (24 pts), boolean chains 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WorkspaceEditContext.WorkspaceEditProvider (cognitive 28) src/workspace/context/WorkspaceEditContext.tsx:121— WorkspaceEditContext.WorkspaceEditProvider has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 4, ternaries 2 (nesting depth added 7). None of this is in the body itself: all 28 points belong to 6 function literals inside it that branch (lines 187, 152, 176, …). 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.
NasSyncPopover.NasSyncPopover (cognitive 27) src/components/NasSyncPopover.tsx:66— NasSyncPopover.NasSyncPopover has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 7 (12 pts), boolean chains 10, error handling 3, if/else 2 (nesting depth added 5). Of this number, 16 points are the body's own statements and 11 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BluetoothTab.BluetoothTab::scanBluetooth (cognitive 27) src/pages/BluetoothTab.tsx:58— BluetoothTab.BluetoothTab::scanBluetooth has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 5 (9 pts), error handling 2 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AiPersonAvatarDialog.AiPersonAvatarDialog::moveCrop (cognitive 27) src/ai-selection/AiPersonAvatarDialog.tsx:77— AiPersonAvatarDialog.AiPersonAvatarDialog::moveCrop has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 8 (22 pts), boolean chains 3, if/else 2 (nesting depth added 14). 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.
maskComponentRasterization.composeMaskComponents (cognitive 27) src/workspace/mask/maskComponentRasterization.ts:124— maskComponentRasterization.composeMaskComponents has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 6, loops 3 (4 pts) (nesting depth added 10). Of this number, 25 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
webgpuVideoExport.exportVideoWithWebGpu (cognitive 27) src/components/webgpuVideoExport.ts:182— webgpuVideoExport.exportVideoWithWebGpu has cognitive complexity 27 (threshold 15). Drivers by points: if/else 21 (33 pts), ternaries 6 (11 pts), boolean chains 8, loops 5, error handling 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (webgpuVideoExport.exportVideoWithWebGpu::captureCanvasFrame) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
loadSharedFiles (cognitive 27) public/local-share/app.js:358— loadSharedFiles has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 6 (11 pts), boolean chains 3, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MockCameraServer.handleUdp (cognitive 26) REDACTED:318— MockCameraServer.handleUdp has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 7, error handling 1, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
MockCameraServer.handleControl (cognitive 26) REDACTED:977— MockCameraServer.handleControl has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 1 (4 pts), boolean chains 3, error handling 1 (nesting depth added 11). None of this is in the body itself: all 26 points belong to one function literal inside it that branches (line 980). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
DjiCameraSession.requestManifest (cognitive 26) REDACTED:970— DjiCameraSession.requestManifest has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 4 (7 pts), boolean chains 4, 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.
NasSyncService.enqueueFiles (cognitive 26) REDACTED:361— NasSyncService.enqueueFiles has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 6, error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 8). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MaskOverlay.MaskOverlay (cognitive 26) src/workspace/mask/MaskOverlay.tsx:48— MaskOverlay.MaskOverlay has cognitive complexity 26 (threshold 15). Drivers by points: if/else 68 (75 pts), ternaries 35 (55 pts), boolean chains 39, loops 3 (4 pts) (nesting depth added 28). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: 2 other methods here (MaskOverlay.MaskOverlay::render, MaskOverlay.MaskOverlay::updateVectorDraft) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
pixelFlowExport.queuePixelFlowExports (cognitive 26) src/workspace/creative/pixel-flow/pixelFlowExport.ts:258— pixelFlowExport.queuePixelFlowExports has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 2 (7 pts), error handling 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 11). Most of this is not in the body itself: 7 of the 26 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 272, 290). 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.
ReferenceMatchPanel.ReferenceMatchPanel::generate (cognitive 26) src/workspace/color/ReferenceMatchPanel.tsx:152— ReferenceMatchPanel.ReferenceMatchPanel::generate has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (15 pts), ternaries 4 (6 pts), error handling 2 (3 pts), boolean chains 1, loops 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. This shape REPEATS in the file: one other method here (ReferenceMatchPanel.ReferenceMatchPanel) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
CropOverlay.CropOverlay (cognitive 26) src/workspace/transform/CropOverlay.tsx:17— CropOverlay.CropOverlay has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 4, ternaries 4 (nesting depth added 2). Most of this is not in the body itself: 2 of the 26 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 64, a function literal at line 37, a function literal at line 132, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
DirectorLabShotList.DirectorLabShotList::saveShotEdit (cognitive 26) src/components/DirectorLabShotList.tsx:156— DirectorLabShotList.DirectorLabShotList::saveShotEdit has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 4, error handling 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
workspaceLivePhotoExport.queueWorkspaceFormatsExport (cognitive 26) src/workspace/shared/workspaceLivePhotoExport.ts:48— workspaceLivePhotoExport.queueWorkspaceFormatsExport has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 6, error handling 3 (5 pts), boolean chains 2, loops 1 (nesting depth added 8). Most of this is not in the body itself: 4 of the 26 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 112, report, a function literal at line 68, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
fileListRequest (cognitive 26) REDACTED:133— fileListRequest has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (21 pts), ternaries 1 (4 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MockCameraServer.handleTcp (cognitive 25) REDACTED:845— MockCameraServer.handleTcp has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 3 (6 pts), boolean chains 2, loops 1 (nesting depth added 10). None of this is in the body itself: all 25 points belong to one function literal inside it that branches (line 851). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
DjiCameraSession.enterStandardPlayback (cognitive 25) REDACTED:1424— DjiCameraSession.enterStandardPlayback has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (6 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.
ForwardTcpReceiver.scanDevices (cognitive 25) electron/media/live-stream/forwardTcpReceiver.ts:113— ForwardTcpReceiver.scanDevices has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 4 (11 pts), if/else 7 (9 pts), boolean chains 5 (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.
dolbyVisionExportService.exportDolbyVisionWatermark (cognitive 25) electron/export/dolbyVisionExportService.ts:198— dolbyVisionExportService.exportDolbyVisionWatermark has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 8, error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 5). Of this number, 22 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
jpegHdrMetadata.jpegHeaderSegments (cognitive 25) electron/media/jpegHdrMetadata.ts:19— jpegHdrMetadata.jpegHeaderSegments has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
customWatermarkService.importCustomWatermark (cognitive 25) electron/export/watermark/customWatermarkService.ts:34— customWatermarkService.importCustomWatermark has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, error handling 3 (4 pts), ternaries 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.
WebGpuResourceManager.syncVideoElements (cognitive 25) src/components/webgpu/webgpuResources.ts:121— WebGpuResourceManager.syncVideoElements has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, loops 4, ternaries 2 (3 pts) (nesting depth added 8). Of this number, 14 points are the body's own statements and 11 belong to 2 function literals 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.
DeviceConnectionContext.DeviceConnectionProvider::connectDevice (cognitive 25) src/context/DeviceConnectionContext.tsx:235— DeviceConnectionContext.DeviceConnectionProvider::connectDevice has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 7 (10 pts), if/else 7 (8 pts), boolean chains 6, error handling 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
maskSelectionBoundary.createMaskSelectionBoundary (cognitive 25) src/workspace/mask/maskSelectionBoundary.ts:13— maskSelectionBoundary.createMaskSelectionBoundary has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 4 (6 pts), boolean chains 2 (nesting depth added 13). Of this number, 24 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
djiManifest.parseCompositeManifest (cognitive 24) electron/devices/dji/djiManifest.ts:69— djiManifest.parseCompositeManifest has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 9, loops 3, boolean chains 1 (nesting depth added 4). Most of this is not in the body itself: 3 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 80). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
liveUsageAnalytics.createLiveUsageAnalytics.message (cognitive 24) electron/infrastructure/liveUsageAnalytics.ts:112— liveUsageAnalytics.createLiveUsageAnalytics.message has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (17 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.
lunaBleWebBluetoothTransport.errorMessage (cognitive 24) electron/devices/insta360/lunaBleWebBluetoothTransport.ts:22— lunaBleWebBluetoothTransport.errorMessage has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 4 (6 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebGpuVideoPreview.WebGpuVideoPreview (cognitive 24) src/components/WebGpuVideoPreview.tsx:31— WebGpuVideoPreview.WebGpuVideoPreview has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11, ternaries 7, boolean chains 6. Most of this is not in the body itself: 4 of the 24 points are its own statements and the rest belongs to 9 function items inside it that branch (syncLatestLayers, a function literal at line 96, a function literal at line 122, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
previewStageExport.exportPreviewVideo (cognitive 24) src/components/previewStageExport.ts:206— previewStageExport.exportPreviewVideo has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 7, ternaries 1 (2 pts), error handling 1, loops 1 (nesting depth added 5). Most of this is not in the body itself: 9 of the 24 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 259, startNativeProgressWatcher, reportVideoProgress, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
useMaskShortcuts.useMaskShortcuts (cognitive 24) src/workspace/context/useMaskShortcuts.ts:17— useMaskShortcuts.useMaskShortcuts has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 4, ternaries 2 (4 pts) (nesting depth added 4). None of this is in the body itself: all 24 points belong to 2 function literals inside it that branch (lines 24, 22). 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.
DirectorPlanImportDialog.DirectorPlanImportDialog (cognitive 24) src/components/DirectorPlanImportDialog.tsx:14— DirectorPlanImportDialog.DirectorPlanImportDialog has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 10 (16 pts), boolean chains 4, if/else 3, error handling 1 (nesting depth added 6). Most of this is not in the body itself: 8 of the 24 points are its own statements and the rest belongs to 2 function items inside it that branch (importPlan, a function literal at line 42). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
server.parseArgs (cognitive 23) REDACTED:44— server.parseArgs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 20 (21 pts), boolean chains 1, 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.
Insta360TcpSession.listFilePaths (cognitive 23) REDACTED:314— Insta360TcpSession.listFilePaths has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 4 (6 pts), ternaries 5 (6 pts), boolean chains 2, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
downloadedLibraryService.listDownloadedFiles (cognitive 23) electron/media/downloadedLibraryService.ts:35— downloadedLibraryService.listDownloadedFiles has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 3 (5 pts), boolean chains 3, error handling 1 (2 pts), loops 2 (nesting depth added 5). Most of this is not in the body itself: 8 of the 23 points are its own statements and the rest belongs to 3 function items inside it that branch (walk, isCacheDirectory, appendFile). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
DjiCameraSession.deleteFiles (cognitive 23) REDACTED:1051— DjiCameraSession.deleteFiles has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 7, error handling 2 (3 pts) (nesting depth added 2). Of this number, 22 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DjiPreviewReassembler.feed (cognitive 23) electron/devices/dji/djiPreview.ts:242— DjiPreviewReassembler.feed has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
localMediaShareFiles.listSharedFileItems (cognitive 23) electron/media/local-share/localMediaShareFiles.ts:76— localMediaShareFiles.listSharedFileItems has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (13 pts), error handling 3 (6 pts), loops 2 (3 pts), ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
aiSelectionAlgorithms.buildSimilarityGroups (cognitive 23) electron/features/ai-selection/aiSelectionAlgorithms.ts:248— aiSelectionAlgorithms.buildSimilarityGroups has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 6 (7 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 9). Of this number, 20 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
livePhotoService.isGoogleMotionPhoto (cognitive 23) electron/media/livePhotoService.ts:206— livePhotoService.isGoogleMotionPhoto has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 4, loops 2 (3 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Dialog.Dialog (cognitive 23) src/ui/Dialog.tsx:80— Dialog.Dialog has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 13, if/else 7, ternaries 3. Of this number, 13 points are the body's own statements and 10 belong to 5 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.
DjiVideoStreamAdapter.tickPreviewWatchdog (cognitive 22) electron/devices/dji/djiVideoStreamAdapter.ts:262— DjiVideoStreamAdapter.tickPreviewWatchdog has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12, boolean chains 5, ternaries 4 (5 pts) (nesting depth added 1). Of this number, 11 points are the body's own statements and 11 belong to 3 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
watermarkLibrary.differsBySingleEdit (cognitive 22) src/shared/watermarkLibrary.ts:19— watermarkLibrary.differsBySingleEdit has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
aiSelectionVideoFaceFrames.ensureVideoFaceFrames (cognitive 22) electron/features/ai-selection/aiSelectionVideoFaceFrames.ts:34— aiSelectionVideoFaceFrames.ensureVideoFaceFrames has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (4 pts), error handling 1 (3 pts), boolean chains 2, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
colorMaskComponentNormalization.normalizeColorMaskComponent (cognitive 22) src/workspace/shared/colorMaskComponentNormalization.ts:43— colorMaskComponentNormalization.normalizeColorMaskComponent has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 9, ternaries 7, if/else 5 (6 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PreviewThumbnailStrip.PreviewThumbnailStrip (cognitive 22) src/components/PreviewThumbnailStrip.tsx:89— PreviewThumbnailStrip.PreviewThumbnailStrip has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 5, ternaries 3 (5 pts) (nesting depth added 3). None of this is in the body itself: all 22 points belong to 10 function items inside it that branch (a function literal at line 147, a function literal at line 102, a function literal at line 113, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
WifiTab.WifiTab (cognitive 22) src/pages/WifiTab.tsx:15— WifiTab.WifiTab has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, ternaries 5 (7 pts) (nesting depth added 3). Most of this is not in the body itself: 5 of the 22 points are its own statements and the rest belongs to 9 function items inside it that branch (connectWifi, recordWifiResult, refreshWifiStatus, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
AiSelectionCreateDialog.AiSelectionCreateDialog (cognitive 22) src/ai-selection/AiSelectionCreateDialog.tsx:36— AiSelectionCreateDialog.AiSelectionCreateDialog has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10, ternaries 5 (6 pts), boolean chains 5, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 4 of the 22 points are its own statements and the rest belongs to 7 function items inside it that branch (create, a function literal at line 67, a function literal at line 82, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
BeautyMaskOverlay.BeautyMaskOverlay (cognitive 22) src/workspace/beauty/BeautyMaskOverlay.tsx:18— BeautyMaskOverlay.BeautyMaskOverlay has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 6 (7 pts), if/else 4 (6 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 6). None of this is in the body itself: all 22 points belong to 6 function literals inside it that branch (lines 66, 28, 55, …). 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.
DirectorPlanMainContent.DirectorPlanMainContent (cognitive 22) src/components/DirectorPlanMainContent.tsx:14— DirectorPlanMainContent.DirectorPlanMainContent has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, error handling 2 (4 pts), ternaries 2 (3 pts) (nesting depth added 6). Most of this is not in the body itself: 3 of the 22 points are its own statements and the rest belongs to 2 function items inside it that branch (save, changeOpen). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
AppRoutes.AppRoutes (cognitive 22) src/routes/AppRoutes.tsx:28— AppRoutes.AppRoutes has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11, boolean chains 8, ternaries 2 (3 pts) (nesting depth added 1). Of this number, 12 points are the body's own statements and 10 belong to 8 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MockCameraServer.replyPayload (cognitive 21) REDACTED:665— MockCameraServer.replyPayload has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (15 pts), ternaries 3 (6 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.
fileOperationDiagnostics.friendlyFileOperationError (cognitive 21) electron/storage/fileOperationDiagnostics.ts:87— fileOperationDiagnostics.friendlyFileOperationError has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 8, if/else 7, ternaries 3 (6 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
LocalVideoStreamServer.start (cognitive 21) electron/devices/common/localVideoStreamServer.ts:52— LocalVideoStreamServer.start has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, ternaries 2 (3 pts), error handling 1 (2 pts), loops 1 (nesting depth added 5). Of this number, 17 points are the body's own statements and 4 belong to 2 function literals 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.
liveStreamService.startLiveStream (cognitive 21) electron/media/live-stream/liveStreamService.ts:253— liveStreamService.startLiveStream has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 8, error handling 1, ternaries 1 (nesting depth added 2). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 263, 255, 282, …). 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.
DefaultLunaWirelessPreparation.prepare (cognitive 21) REDACTED:89— DefaultLunaWirelessPreparation.prepare has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (11 pts), ternaries 4 (8 pts), error handling 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
inpaintMask.dilateInpaintMask (cognitive 21) electron/features/segmentation/inpaintMask.ts:336— inpaintMask.dilateInpaintMask has cognitive complexity 21 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 3 (9 pts) (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
NasSyncService.getDebugLocalRoot (cognitive 21) REDACTED:267— NasSyncService.getDebugLocalRoot has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 5, error handling 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
generate-changelog.mdToHtml (cognitive 21) landing/generate-changelog.cjs:45— generate-changelog.mdToHtml has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 9). Of this number, 19 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
instanceStrokeSelection.hardExpandMask (cognitive 21) src/workspace/removal/instanceStrokeSelection.ts:75— instanceStrokeSelection.hardExpandMask has cognitive complexity 21 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 3 (9 pts) (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
DeviceConnectPage.DeviceConnectPage::handleConnect (cognitive 21) src/pages/DeviceConnectPage.tsx:194— DeviceConnectPage.DeviceConnectPage::handleConnect has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 5 (12 pts), if/else 3 (5 pts), boolean chains 4 (nesting depth added 9). 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. This shape REPEATS in the file: one other method here (DeviceConnectPage.DeviceConnectPage) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
LutManagementDialog.LutManagementDialog (cognitive 21) src/components/LutManagementDialog.tsx:13— LutManagementDialog.LutManagementDialog has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 7 (12 pts), if/else 4, boolean chains 3, error handling 2 (nesting depth added 5). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to 5 function items inside it that branch (confirmDelete, a function literal at line 20, a function literal at line 34, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
editHistory.collectHistoryMaskPaths (cognitive 21) src/workspace/shared/editHistory.ts:48— editHistory.collectHistoryMaskPaths has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 4 (9 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
useDirectorPlanSync.useDirectorPlanSync.resolveConflict (cognitive 21) src/hooks/useDirectorPlanSync.ts:373— useDirectorPlanSync.useDirectorPlanSync.resolveConflict has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 7, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
writeRange (cognitive 21) REDACTED:940— writeRange has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 3 (5 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FfmpegPipeline.execute (cognitive 20) electron/platform/ffmpeg/pipeline.ts:110— FfmpegPipeline.execute has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3, ternaries 2, loops 1 (nesting depth added 5). Of this number, 14 points are the body's own statements and 6 belong to 3 function literals 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.
djiModels.decodeDjiAdvertisement (cognitive 20) electron/devices/dji/djiModels.ts:105— djiModels.decodeDjiAdvertisement has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 7 (18 pts), boolean chains 2 (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.
WirelessCameraMediaSource.connect (cognitive 20) REDACTED:153— WirelessCameraMediaSource.connect has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 3 (5 pts), boolean chains 4, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
aiSelectionPeopleManager.reconcileGlobalPeopleSources (cognitive 20) electron/features/ai-selection/aiSelectionPeopleManager.ts:264— aiSelectionPeopleManager.reconcileGlobalPeopleSources has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ipcDirectorLabService.validateRequest (cognitive 20) electron/ipc/ipcDirectorLabService.ts:43— ipcDirectorLabService.validateRequest has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 7, if/else 7, ternaries 6. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
videoOutputMarkers.markerValidationReason (cognitive 20) src/workspace/trim/videoOutputMarkers.ts:103— videoOutputMarkers.markerValidationReason has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
editPipeline.normalizeReferenceMatch (cognitive 20) src/workspace/shared/editPipeline.ts:511— editPipeline.normalizeReferenceMatch has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 7, if/else 7, ternaries 6. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
WebGpuResourceManager.videoResource (cognitive 20) src/components/webgpu/webgpuResources.ts:338— WebGpuResourceManager.videoResource has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 11, if/else 8 (9 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
webgpuReadback.readWebGpuOutputFrame (cognitive 20) src/components/webgpu/webgpuReadback.ts:5— webgpuReadback.readWebGpuOutputFrame has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 5 (8 pts), boolean chains 2 (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ColorPresetPanel.ColorPresetPanel (cognitive 20) src/workspace/color/ColorPresetPanel.tsx:20— ColorPresetPanel.ColorPresetPanel has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 9 (11 pts), if/else 5, error handling 4 (nesting depth added 2). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 9 function items inside it that branch (handleOverwrite, handleNew, a function literal at line 32, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
FilterItem.FilterItem (cognitive 20) src/workspace/lut/FilterItem.tsx:83— FilterItem.FilterItem has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, if/else 6, ternaries 5 (6 pts) (nesting depth added 1). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 131, 112, 144, …). 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.
BorderPanel.BorderPanel (cognitive 20) src/workspace/border/BorderPanel.tsx:29— BorderPanel.BorderPanel has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, ternaries 5 (6 pts), if/else 2 (nesting depth added 1). Of this number, 15 points are the body's own statements and 5 belong to 5 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
NeuralPresetSession::run (cognitive 20) luna-render-core/src/bin/neural_preset_worker.rs:45— NeuralPresetSession::run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
fetchGitHubRelease (cognitive 20) landing/script.js:121— fetchGitHubRelease has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 5, error handling 1 (nesting depth added 6). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 127, 123, 129, …). 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.
MockDjiBleTransport.exchangeFrame (cognitive 19) electron/devices/dji/djiBleSession.ts:308— MockDjiBleTransport.exchangeFrame has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
DjiVideoStreamAdapter.startInternal (cognitive 19) electron/devices/dji/djiVideoStreamAdapter.ts:102— DjiVideoStreamAdapter.startInternal has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 3, ternaries 1 (2 pts), error handling 1 (nesting depth added 4). Of this number, 15 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
directorPlanSync.directorPlanConflictDetails (cognitive 19) src/lib/directorPlanSync.ts:55— directorPlanSync.directorPlanConflictDetails has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 2 (3 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). Of this number, 18 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LunaKaHttpClient.loadCredentials (cognitive 19) electron/network/lunaka_http_client.ts:294— LunaKaHttpClient.loadCredentials has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 2 (4 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
colorMaskService.parsePgm (cognitive 19) electron/features/segmentation/colorMaskService.ts:49— colorMaskService.parsePgm has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (10 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 3). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to one function item inside it that branches (nextToken). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
inpaintMask.createInpaintRefinementJobs (cognitive 19) electron/features/segmentation/inpaintMask.ts:164— inpaintMask.createInpaintRefinementJobs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 4 (8 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.
subtitleSegmentation.selectSplit (cognitive 19) src/shared/subtitleSegmentation.ts:89— subtitleSegmentation.selectSplit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nasSyncService.normalizeItem (cognitive 19) REDACTED:200— nasSyncService.normalizeItem has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 11, boolean chains 7, if/else 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.
livePhotoService.findXmpInsertPos (cognitive 19) electron/media/livePhotoService.ts:75— livePhotoService.findXmpInsertPos has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, 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.
WebGpuVideoRenderer.syncVideoClocks (cognitive 19) src/components/webgpuVideoRenderer.ts:667— WebGpuVideoRenderer.syncVideoClocks has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, ternaries 2 (3 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
previewStageExport.waitForExportItem (cognitive 19) src/components/previewStageExport.ts:466— previewStageExport.waitForExportItem has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pixelStretchLayers.erodeMaskOnePixel (cognitive 19) src/workspace/creative/pixel-stretch/pixelStretchLayers.ts:72— pixelStretchLayers.erodeMaskOnePixel has cognitive complexity 19 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 3 (7 pts), boolean chains 2 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
usePixelFlowBatchExport.usePixelFlowBatchExport.handleExport (cognitive 19) src/workspace/creative/pixel-flow/usePixelFlowBatchExport.ts:43— usePixelFlowBatchExport.usePixelFlowBatchExport.handleExport has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 3 (6 pts), boolean chains 2, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
useTripleStitchSources.useTripleStitchSources (cognitive 19) src/workspace/creative/triple-stitch/useTripleStitchSources.ts:36— useTripleStitchSources.useTripleStitchSources has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, boolean chains 5, error handling 2, ternaries 2. None of this is in the body itself: all 19 points belong to 12 function literals inside it that branch (lines 90, 112, 74, …). 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.
WorkspacePreviewToolbar.WorkspacePreviewToolbar (cognitive 19) src/workspace/components/WorkspacePreviewToolbar.tsx:33— WorkspacePreviewToolbar.WorkspacePreviewToolbar has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (8 pts), boolean chains 6, if/else 4 (5 pts) (nesting depth added 2). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to 3 function items inside it that branch (resetAdjustments, a function literal at line 73, a function literal at line 82). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
DirectorPlanConflictDialog.DirectorPlanConflictDialog (cognitive 19) src/components/DirectorPlanConflictDialog.tsx:15— DirectorPlanConflictDialog.DirectorPlanConflictDialog has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (10 pts), boolean chains 6, if/else 2, error handling 1 (nesting depth added 4). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to 4 function items inside it that branch (confirm, a function literal at line 51, a function literal at line 64, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
DirectorLabView.DirectorLabView (cognitive 19) src/components/DirectorLabView.tsx:33— DirectorLabView.DirectorLabView has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 16, ternaries 2, if/else 1. Of this number, 18 points are the body's own statements and 1 belongs to 2 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.
webgpuVideoExport.exportVideoWithWebGpu::captureCanvasFrame (cognitive 19) src/components/webgpuVideoExport.ts:338— webgpuVideoExport.exportVideoWithWebGpu::captureCanvasFrame has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 2 (6 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (webgpuVideoExport.exportVideoWithWebGpu) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D3d12VideoEncoder::new (cognitive 19) luna-render-core/src/windows/encoder.rs:94— D3d12VideoEncoder::new has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
lunaBleCodec.parseWireFields (cognitive 18) REDACTED:97— lunaBleCodec.parseWireFields has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mediaMetadataService.formatMetadataValue (cognitive 18) electron/media/mediaMetadataService.ts:128— mediaMetadataService.formatMetadataValue has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
segmentationModelPrefetchService.prefetchItem (cognitive 18) electron/features/segmentation/segmentationModelPrefetchService.ts:41— segmentationModelPrefetchService.prefetchItem has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 1 (4 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dolbyVisionHvcc.findHvccBoxes (cognitive 18) electron/export/dolbyVisionHvcc.ts:178— dolbyVisionHvcc.findHvccBoxes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
referenceMatch.symmetricEigen (cognitive 18) src/workspace/color/referenceMatch.ts:220— referenceMatch.symmetricEigen has cognitive complexity 18 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 2 (6 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
releaseNotesService.listReleaseNotes (cognitive 18) electron/infrastructure/releaseNotesService.ts:38— releaseNotesService.listReleaseNotes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 3 (6 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.
startupWindowService.showStartupFailure (cognitive 18) electron/infrastructure/startupWindowService.ts:31— startupWindowService.showStartupFailure has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (8 pts), if/else 3 (5 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ipcSettingsService.chooseWritableStorageTarget (cognitive 18) electron/ipc/ipcSettingsService.ts:67— ipcSettingsService.chooseWritableStorageTarget has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 1 (3 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExportTaskTable.TaskItemRow (cognitive 18) src/components/ExportTaskTable.tsx:46— ExportTaskTable.TaskItemRow has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, ternaries 7 (8 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
AppNav.AppNav (cognitive 18) src/components/AppNav.tsx:22— AppNav.AppNav has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 10 (11 pts), boolean chains 7 (nesting depth added 1). Of this number, 11 points are the body's own statements and 7 belong to 8 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ExportSettingsDialog.ExportSettingsDialog (cognitive 18) src/components/ExportSettingsDialog.tsx:48— ExportSettingsDialog.ExportSettingsDialog has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, ternaries 5, if/else 4. Of this number, 14 points are the body's own statements and 4 belong to 3 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.
useProjectManager.useProjectManager (cognitive 18) src/workspace/hooks/useProjectManager.ts:28— useProjectManager.useProjectManager has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 2 (3 pts), boolean chains 2, error handling 1 (nesting depth added 3). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 80, 60, 88, …). 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.
ReferenceMatchPanel.ReferenceMatchPanel (cognitive 18) src/workspace/color/ReferenceMatchPanel.tsx:27— ReferenceMatchPanel.ReferenceMatchPanel has cognitive complexity 18 (threshold 15). Drivers by points: if/else 23 (28 pts), ternaries 16 (21 pts), boolean chains 10, error handling 2 (3 pts), loops 1 (nesting depth added 11). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: one other method here (ReferenceMatchPanel.ReferenceMatchPanel::generate) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
AppleDriverDownloadButton.AppleDriverDownloadButton (cognitive 18) src/components/AppleDriverDownloadButton.tsx:7— AppleDriverDownloadButton.AppleDriverDownloadButton has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (12 pts), boolean chains 4, error handling 1, if/else 1 (nesting depth added 7). Of this number, 14 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
useDirectorLab.useDirectorLab.savePlanTitleEdit (cognitive 18) src/hooks/useDirectorLab.ts:445— useDirectorLab.useDirectorLab.savePlanTitleEdit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 2 (4 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HotUpdateStartupDialog.HotUpdateStartupDialog (cognitive 18) src/components/HotUpdateStartupDialog.tsx:11— HotUpdateStartupDialog.HotUpdateStartupDialog has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 4, ternaries 3 (4 pts), error handling 1 (nesting depth added 1). Of this number, 10 points are the body's own statements and 8 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
HotUpdateBanner.HotUpdateBanner (cognitive 18) src/components/HotUpdateBanner.tsx:12— HotUpdateBanner.HotUpdateBanner has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 4, ternaries 2 (3 pts), error handling 1 (nesting depth added 1). Of this number, 12 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
uploadFiles (cognitive 18) public/local-share/app.js:450— uploadFiles has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 2 (4 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
hotUpdateArchiveService.downloadLegacyArchive (cognitive 17) electron/infrastructure/hotUpdateArchiveService.ts:115— hotUpdateArchiveService.downloadLegacyArchive has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 2 (4 pts), boolean chains 1, loops 1, ternaries 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.
DjiDumlStreamAssembler.feed (cognitive 17) electron/devices/dji/djiUdpTransport.ts:125— DjiDumlStreamAssembler.feed has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DjiUdpTransport.collectPackets (cognitive 17) electron/devices/dji/djiUdpTransport.ts:613— DjiUdpTransport.collectPackets has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 2 (nesting depth added 2). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 640, 623, 627, …). 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.
DjiPreviewReassembler.trackSequence (cognitive 17) electron/devices/dji/djiPreview.ts:434— DjiPreviewReassembler.trackSequence has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (17 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.
IosTcpReceiver.startProxy (cognitive 17) electron/media/live-stream/iosTcpReceiver.ts:114— IosTcpReceiver.startProxy has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7, boolean chains 6, ternaries 2 (3 pts), error handling 1 (nesting depth added 1). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 4 function items inside it that branch (output, a function literal at line 129, a function literal at line 143, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
ipcWindowService.register (cognitive 17) electron/ipc/ipcWindowService.ts:113— ipcWindowService.register has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, loops 1 (nesting depth added 2). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 124, 137, 118, …). 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.
jpegExifMetadata.jpegDimensions (cognitive 17) electron/media/jpegExifMetadata.ts:10— jpegExifMetadata.jpegDimensions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 7, 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.
aiSelectionAlgorithms.buildShootingEvents (cognitive 17) electron/features/ai-selection/aiSelectionAlgorithms.ts:33— aiSelectionAlgorithms.buildShootingEvents has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 5, if/else 2 (5 pts), loops 3 (4 pts), ternaries 1 (3 pts) (nesting depth added 6). Of this number, 13 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
referenceMatch.generateReferenceMatchLut (cognitive 17) src/workspace/color/referenceMatch.ts:518— referenceMatch.generateReferenceMatchLut has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (8 pts), loops 3 (6 pts), boolean chains 2, if/else 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.
directorLabMediaCleanup.cleanupDirectorMedia (cognitive 17) electron/features/director-lab/directorLabMediaCleanup.ts:15— directorLabMediaCleanup.cleanupDirectorMedia has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 5). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals 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.
runtimeResourceService.parseSevenZipEntries (cognitive 17) electron/infrastructure/runtimeResourceService.ts:144— runtimeResourceService.parseSevenZipEntries has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ipcConnectivityService.register (cognitive 17) electron/ipc/ipcConnectivityService.ts:19— ipcConnectivityService.register has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 4 (5 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 4). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 24, 37, 62). 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.
ipcOriginalFileExport.register (cognitive 17) electron/ipc/ipcOriginalFileExport.ts:12— ipcOriginalFileExport.register has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 3 (4 pts), boolean chains 3, error handling 1 (nesting depth added 6). None of this is in the body itself: all 17 points belong to one function literal inside it that branches (line 13). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
server.parseUcd2Frames (cognitive 17) REDACTED:107— server.parseUcd2Frames has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebGpuVideoRenderer.setPlayback (cognitive 17) src/components/webgpuVideoRenderer.ts:307— WebGpuVideoRenderer.setPlayback has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 6, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
annexB.splitNalUnits (cognitive 17) src/lib/annexB.ts:19— annexB.splitNalUnits has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 2 (5 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.
RemovalPanel.RemovalPanel (cognitive 17) src/workspace/removal/RemovalPanel.tsx:17— RemovalPanel.RemovalPanel has cognitive complexity 17 (threshold 15). Drivers by points: if/else 20 (23 pts), ternaries 12 (21 pts), boolean chains 12, error handling 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (RemovalPanel.RemovalPanel::startRemoval) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
onlyYourColorBatchExport.exportOnlyYourColorBatch (cognitive 17) src/workspace/creative/only-your-color/onlyYourColorBatchExport.ts:42— onlyYourColorBatchExport.exportOnlyYourColorBatch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 2 (5 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 7). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
load (cognitive 17) public/local-share/app.js:313— load has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 6, boolean chains 1, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MockCameraServer.handleHttp (cognitive 16) REDACTED:912— MockCameraServer.handleHttp has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, boolean chains 7, ternaries 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
exifReader.readMediaDeviceInfo (cognitive 16) electron/media/exifReader.ts:123— exifReader.readMediaDeviceInfo has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), error handling 3 (5 pts), ternaries 3, boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
DjiBleSession.activate (cognitive 16) electron/devices/dji/djiBleSession.ts:69— DjiBleSession.activate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 3, error handling 2 (3 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
appleDeviceServiceControl.startAppleDeviceService (cognitive 16) electron/platform/windows/appleDeviceServiceControl.ts:9— appleDeviceServiceControl.startAppleDeviceService has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 3 (6 pts), error handling 2 (nesting depth added 5). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
aiSelectionFaceGroups.buildFaceGroups (cognitive 16) electron/features/ai-selection/aiSelectionFaceGroups.ts:127— aiSelectionFaceGroups.buildFaceGroups has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 5, if/else 3 (5 pts), ternaries 2 (4 pts), loops 2 (nesting depth added 4). Of this number, 10 points are the body's own statements and 6 belong to 6 function literals 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.
aiSelectionMedia.indexMediaSource (cognitive 16) electron/features/ai-selection/aiSelectionMedia.ts:92— aiSelectionMedia.indexMediaSource has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
subtitleTrack.normalizeSubtitleStyle (cognitive 16) src/shared/subtitleTrack.ts:45— subtitleTrack.normalizeSubtitleStyle has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 10 (12 pts), boolean chains 4 (nesting depth added 2). Of this number, 14 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
beautyAnalysisService.decodeImage (cognitive 16) electron/features/beauty/beautyAnalysisService.ts:42— beautyAnalysisService.decodeImage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 3, loops 2 (3 pts), ternaries 3 (nesting depth added 4). None of this is in the body itself: all 16 points belong to 2 function literals inside it that branch (lines 56, 44). 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.
directorLabMaterialDelete.deleteDirectorLocalMaterial (cognitive 16) electron/features/director-lab/directorLabMaterialDelete.ts:7— directorLabMaterialDelete.deleteDirectorLocalMaterial has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, error handling 2, ternaries 1 (nesting depth added 3). Of this number, 11 points are the body's own statements and 5 belong to 4 function literals 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.
ipcDirectorLabService.probeMediaOne (cognitive 16) electron/ipc/ipcDirectorLabService.ts:502— ipcDirectorLabService.probeMediaOne has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (6 pts), if/else 5, boolean chains 4, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 522, 581). 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.
storageMigrationService.migrateLocalStorage (cognitive 16) electron/storage/storageMigrationService.ts:266— storageMigrationService.migrateLocalStorage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (5 pts), loops 4, error handling 2 (3 pts), boolean chains 2, ternaries 2 (nesting depth added 3). Of this number, 13 points are the body's own statements and 3 belong to 2 function literals 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.
server.httpServer (cognitive 16) REDACTED:487— server.httpServer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 4, ternaries 1 (2 pts), error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
DeviceConnectionContext.enrichConnectionStatus (cognitive 16) src/context/DeviceConnectionContext.tsx:72— DeviceConnectionContext.enrichConnectionStatus has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (13 pts), error handling 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MarkdownViewer.parseInline (cognitive 16) src/ui/MarkdownViewer.tsx:17— MarkdownViewer.parseInline has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
useMediaLibraryTransferActions.useMediaLibraryTransferActions.startDownload (cognitive 16) src/pages/useMediaLibraryTransferActions.ts:174— useMediaLibraryTransferActions.useMediaLibraryTransferActions.startDownload has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), loops 4 (6 pts), boolean chains 2, error handling 1 (nesting depth added 3). Of this number, 10 points are the body's own statements and 6 belong to 2 function literals 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.
AiSelectionPeopleList.AiSelectionPersonRow (cognitive 16) src/ai-selection/AiSelectionPeopleList.tsx:85— AiSelectionPeopleList.AiSelectionPersonRow has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 3 (5 pts), boolean chains 2 (nesting depth added 5). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 3 function items inside it that branch (saveName, a function literal at line 118, a function literal at line 90). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
aiCompositionGeometry.compositionCropCandidates (cognitive 16) src/workspace/transform/aiCompositionGeometry.ts:62— aiCompositionGeometry.compositionCropCandidates has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (7 pts), if/else 4, boolean chains 3, ternaries 2 (nesting depth added 3). Of this number, 13 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RemovalPanel.RemovalPanel::startRemoval (cognitive 16) src/workspace/removal/RemovalPanel.tsx:111— RemovalPanel.RemovalPanel::startRemoval has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 1 (3 pts), boolean chains 2, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (RemovalPanel.RemovalPanel) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
InpaintSession::run (cognitive 16) luna-render-core/src/inpaint.rs:33— InpaintSession::run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), loops 4 (6 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous) (cognitive 16) REDACTED:487— (anonymous) has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 4, ternaries 1 (2 pts), error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
Near-duplicate member pair (84 shared lines) luna-render-core/src/macos/preview.rs:314— luna-render-core/src/macos/preview.rs:314-492 | luna-render-core/src/windows/preview.rs:256-426 — These two members are variants of one another: 84 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (71 shared lines) luna-render-core/src/macos/mod.rs:276— luna-render-core/src/macos/mod.rs:276-527 | luna-render-core/src/windows/export.rs:483-818 — These two members are variants of one another: 71 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Edited copy of a member (76 corresponding lines) · ×1
Edited copy of a member (76 corresponding lines) luna-render-core/src/lib.rs:458— luna-render-core/src/lib.rs:458-533 | luna-render-core/src/lib.rs:538-616 — These two members are one piece of code written twice and then edited apart: 76 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (50 corresponding lines) · ×1
Edited copy of a member (50 corresponding lines) luna-render-core/src/specialized_segmentation/parsing_features.rs:34— luna-render-core/src/specialized_segmentation/parsing_features.rs:34-84 | luna-render-core/src/specialized_segmentation/parsing_features.rs:90-139 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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) luna-render-core/src/specialized_segmentation/yolo.rs:33— luna-render-core/src/specialized_segmentation/yolo.rs:33-73 | luna-render-core/src/specialized_segmentation/yolo.rs:118-155 — 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 (27 corresponding lines) · ×1
Edited copy of a member (27 corresponding lines) luna-render-core/src/specialized_segmentation/parsing_features.rs:145— luna-render-core/src/specialized_segmentation/parsing_features.rs:145-171 | luna-render-core/src/specialized_segmentation/parsing_features.rs:177-207 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×1
Edited copy of a member (22 corresponding lines) luna-render-core/src/specialized_segmentation/faces.rs:197— luna-render-core/src/specialized_segmentation/faces.rs:197-221 | luna-render-core/src/specialized_segmentation/parsing_features.rs:7-28 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×1
Edited copy of a member (32 corresponding lines) luna-render-core/src/windows/capabilities.rs:212— luna-render-core/src/windows/capabilities.rs:212-243 | luna-render-core/src/windows/capabilities.rs:250-286 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×1
Edited copy of a member (12 corresponding lines) luna-render-core/src/bin/neural_preset_worker.rs:18— luna-render-core/src/bin/neural_preset_worker.rs:18-29 | luna-render-core/src/inpaint.rs:20-31 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×1
Edited copy of a member (15 corresponding lines) luna-render-core/src/specialized_segmentation/preprocess.rs:81— luna-render-core/src/specialized_segmentation/preprocess.rs:81-95 | luna-render-core/src/specialized_segmentation/preprocess.rs:101-116 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×1
Edited copy of a member (11 corresponding lines) luna-render-core/src/windows/nvenc.rs:781— luna-render-core/src/windows/nvenc.rs:781-791 | luna-render-core/src/windows/nvenc.rs:796-808 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×1
Edited copy of a member (14 corresponding lines) luna-render-core/src/windows/converter.rs:800— luna-render-core/src/windows/converter.rs:800-813 | luna-render-core/src/windows/encoder.rs:1210-1223 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×1
Edited copy of a member (7 corresponding lines) luna-render-core/src/windows/capabilities.rs:318— luna-render-core/src/windows/capabilities.rs:318-324 | luna-render-core/src/windows/ffmpeg_d3d11.rs:335-341 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (51–52 lines × 2) luna-render-core/src/macos/mod.rs:377— luna-render-core/src/macos/mod.rs:377-427 | luna-render-core/src/windows/export.rs:668-719 — before extracting anything, compare `luna-render-core/src/macos/mod.rs` and `luna-render-core/src/windows/export.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `luna-render-core/src/macos/mod.rs:377` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `luna-render-core/src/macos/mod.rs:428` calls `elapsed`, `as_micros`, `now` and `luna-render-core/src/windows/export.rs:721` 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 (30–33 lines × 2) luna-render-core/src/windows/encoder.rs:180— luna-render-core/src/windows/encoder.rs:180-212 | luna-render-core/src/windows/encoder.rs:499-528 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `luna-render-core/src/windows/encoder.rs:180` 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 (30–31 lines × 2) luna-render-core/src/macos/preview.rs:400— luna-render-core/src/macos/preview.rs:400-429 | luna-render-core/src/windows/preview.rs:313-343 — `luna-render-core/src/macos/preview.rs` and `luna-render-core/src/windows/preview.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 87 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `luna-render-core/src/macos/preview.rs:400` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (24–25 lines × 2) luna-render-core/src/macos/preview.rs:450— luna-render-core/src/macos/preview.rs:450-474 | luna-render-core/src/windows/preview.rs:362-385 — `luna-render-core/src/macos/preview.rs` and `luna-render-core/src/windows/preview.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 87 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `luna-render-core/src/macos/preview.rs:450` it begins part-way through the construct above it, so those exact lines 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–20 lines × 2) luna-render-core/src/compositor/gpu.rs:319— luna-render-core/src/compositor/gpu.rs:319-337 | luna-render-core/src/compositor/gpu.rs:364-383 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `luna-render-core/src/compositor/gpu.rs:319` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14–16 lines × 2) luna-render-core/src/macos/preview.rs:433— luna-render-core/src/macos/preview.rs:433-448 | luna-render-core/src/windows/preview.rs:347-360 — `luna-render-core/src/macos/preview.rs` and `luna-render-core/src/windows/preview.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 87 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `luna-render-core/src/macos/preview.rs:433` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (14 lines × 2) luna-render-core/src/specialized_segmentation/yolo_masks.rs:44— luna-render-core/src/specialized_segmentation/yolo_masks.rs:44-57 | luna-render-core/src/specialized_segmentation/yolo_masks.rs:121-134 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12–13 lines × 2) luna-render-core/src/macos/mod.rs:432— luna-render-core/src/macos/mod.rs:432-443 | luna-render-core/src/windows/export.rs:721-733 — before extracting anything, compare `luna-render-core/src/macos/mod.rs` and `luna-render-core/src/windows/export.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `luna-render-core/src/macos/mod.rs:428` calls `elapsed`, `as_micros`, `now` and `luna-render-core/src/windows/export.rs:719` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 2) luna-render-core/src/specialized_segmentation/parsing_features.rs:70— luna-render-core/src/specialized_segmentation/parsing_features.rs:70-82 | luna-render-core/src/specialized_segmentation/parsing_features.rs:123-135 — both copies are in the same file, so extract the 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–12 lines × 2) luna-render-core/src/composition/video_export.rs:50— luna-render-core/src/composition/video_export.rs:50-59 | luna-render-core/src/composition/video_export.rs:378-389 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `luna-render-core/src/composition/video_export.rs:50` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8–9 lines × 2) luna-render-core/src/macos/preview.rs:331— luna-render-core/src/macos/preview.rs:331-338 | luna-render-core/src/windows/preview.rs:268-276 — `luna-render-core/src/macos/preview.rs` and `luna-render-core/src/windows/preview.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 87 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `luna-render-core/src/macos/preview.rs:331` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (15 lines × 2) luna-render-core/src/specialized_segmentation/yolo.rs:43— luna-render-core/src/specialized_segmentation/yolo.rs:43-57 | luna-render-core/src/specialized_segmentation/yolo.rs:125-139 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `luna-render-core/src/specialized_segmentation/yolo.rs:41` calls `Err`, `to_string` and `luna-render-core/src/specialized_segmentation/yolo.rs:124` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) luna-render-core/src/windows/converter.rs:377— luna-render-core/src/windows/converter.rs:377-383 | luna-render-core/src/windows/device.rs:150-156 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 6) luna-render-core/src/bin/luna_asr_worker.rs:456— luna-render-core/src/bin/luna_asr_worker.rs:456-464 | luna-render-core/src/bin/luna_inpaint_worker.rs:182-190 | luna-render-core/src/bin/luna_punctuation_worker.rs:178-186 | luna-render-core/src/bin/neural_preset_worker.rs:114-122 | luna-render-core/src/bin/sam_segmentation_worker.rs:35-43 | luna-render-core/src/bin/semantic_segmentation_worker.rs:59-67 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 6 call sites, so a change lands once.
Duplicated block (10 lines × 2) luna-render-core/src/composition/video_export.rs:292— luna-render-core/src/composition/video_export.rs:292-301 | luna-render-core/src/composition/video_export.rs:340-349 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `luna-render-core/src/composition/video_export.rs:292` it begins part-way through the construct above it, so those exact lines 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) luna-render-core/src/specialized_segmentation/yolo_masks.rs:17— luna-render-core/src/specialized_segmentation/yolo_masks.rs:17-25 | luna-render-core/src/specialized_segmentation/yolo_masks.rs:82-90 — both copies are in the same file, so extract the 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.
Coverage not measured — JavaScript/TypeScript suite — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the node:test suite in dji_mock_server/opc/ ran but wrote no lcov report. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan.
IC1 · Incompleteness & stubs· Guard cannot change the result · ×1
Guard cannot change the result — returns what the code already falls through to electron/export/watermarkAssets.ts:28— The guard above `return null;` also returns `null`, so no input can make it matter. Implement the distinction that was intended, or delete the guard.
Forked directory tree (7 identical files, ~2042 lines × 2 trees) resources/ios-usb/darwin-arm64/licenses/libimobiledevice/COPYING.LESSER:1— resources/ios-usb/darwin-arm64/ and resources/ios-usb/darwin-x64/ are near-verbatim copies of each other: 7 files are byte-identical under the same relative paths (~2042 lines; the trees hold 11 and 11 files). That is one structural fact, not 7 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place.
Duplication concentrated across 9 sibling directories (67 clone groups) src/components/DirectorLabView.tsx:34— 67 duplicated blocks under src/ have copies in at least two of the sibling directories ai-selection, components, hooks, lib, pages, routes (+3 more sibling(s) not listed) — 33 of them are reported below, and 34 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 67 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 67 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 67 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.
Duplication concentrated across 7 sibling directories (44 clone groups) resources/ios-usb/darwin-arm64/licenses/build-macos-ios-usb.mjs:2— 44 duplicated blocks under the repository root have copies in at least two of the sibling directories electron, landing, luna_mock_server, public, resources, scripts (+1 more sibling(s) not listed) — 30 of them are reported below, and 14 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 44 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 44 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 44 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.
Duplication concentrated across 9 sibling directories (32 clone groups) REDACTED:62— 32 duplicated blocks under electron/ have copies in at least two of the sibling directories devices, devtools, export, features, infrastructure, ipc (+3 more sibling(s) not listed) — 18 of them are reported below, and 14 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 32 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 32 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 32 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.
Duplication concentrated across 5 sibling directories (19 clone groups) src/workspace/creative/only-your-color/OnlyYourColorCreative.tsx:76— 19 duplicated blocks under src/workspace/creative/ have copies in at least two of the sibling directories color-reveal, only-your-color, pixel-flow, pixel-stretch, triple-stitch — 13 of them are reported below, and 6 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 19 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 19 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 19 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.
Duplication concentrated across 12 sibling directories (18 clone groups) src/workspace/border/BorderItem.tsx:89— 18 duplicated blocks under src/workspace/ have copies in at least two of the sibling directories beauty, border, color, components, context, creative (+6 more sibling(s) not listed) — 14 of them are reported below, and 4 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 18 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 18 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 18 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.
Duplication concentrated across 4 sibling directories (16 clone groups) electron/devices/dji/djiWebBluetoothTransport.ts:57— 16 duplicated blocks under electron/devices/ have copies in at least two of the sibling directories common, dji, go-ultra, insta360 — 15 of them are reported below, and 1 is 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 16 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 16 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 16 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.
Duplication concentrated across 7 sibling directories (7 clone groups) electron/features/beauty/beautyBlemishDetection.ts:71— 7 of the duplicated blocks reported below have copies in at least two of the sibling directories ai-selection, beauty, color, composition, segmentation, subtitles (+1 more sibling(s) not listed) under electron/features/. That concentration is one structural fact, not 7 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 7 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication· Duplicated block with local edits (221 matched lines × 2 locations) · ×1
Duplicated block with local edits (221 matched lines × 2 locations) src/workspace/creative/only-your-color/OnlyYourColorCreative.tsx:76— src/workspace/creative/only-your-color/OnlyYourColorCreative.tsx:76 · src/workspace/creative/pixel-stretch/PixelStretchCreative.tsx:90 — the two spans are one implementation copied and then locally edited — 1872 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (180 matched lines × 2 locations) · ×1
Duplicated block with local edits (180 matched lines × 2 locations) electron/devices/dji/djiWebBluetoothTransport.ts:57— electron/devices/dji/djiWebBluetoothTransport.ts:57 · electron/devices/insta360/lunaBleWebBluetoothTransport.ts:90 — the two spans are one implementation copied and then locally edited — 1076 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.
Wholesale file copy (108 identical lines × 3 files) resources/ios-usb/darwin-arm64/licenses/build-macos-ios-usb.mjs:2— resources/ios-usb/darwin-arm64/licenses/build-macos-ios-usb.mjs:2 · resources/ios-usb/darwin-x64/licenses/build-macos-ios-usb.mjs:2 · scripts/build-macos-ios-usb.mjs:2 — these 3 files are line-for-line copies of one another — 108 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 with local edits (91 matched lines × 2 locations) · ×1
Duplicated block with local edits (91 matched lines × 2 locations) electron/devices/go-ultra/debugAdapter.ts:15— electron/devices/go-ultra/debugAdapter.ts:15 · REDACTED:17 — the two spans are one implementation copied and then locally edited — 447 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (83 matched lines × 2 locations) · ×1
Duplicated block with local edits (83 matched lines × 2 locations) electron/devices/dji/djiVideoStreamAdapter.ts:38— electron/devices/dji/djiVideoStreamAdapter.ts:38 · electron/devices/insta360/lunaVideoStreamAdapter.ts:27 — the two spans are one implementation copied and then locally edited — 573 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (69 matched lines × 2 locations) · ×1
Duplicated block with local edits (69 matched lines × 2 locations) src/pages/CameraMediaPage.tsx:72— src/pages/CameraMediaPage.tsx:72 · src/pages/LocalMediaPage.tsx:53 — the two spans are one implementation copied and then locally edited — 446 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (54 matched lines × 2 locations) · ×1
Duplicated block with local edits (54 matched lines × 2 locations) src/components/HelpDialog.tsx:170— src/components/HelpDialog.tsx:170 · src/components/HotUpdateBanner.tsx:51 — the two spans are one implementation copied and then locally edited — 421 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (52 matched lines × 2 locations) · ×1
Duplicated block with local edits (52 matched lines × 2 locations) REDACTED:323— REDACTED:323 · REDACTED:388 — the two spans are one implementation copied and then locally edited — 382 tokens are still identical, in the same order in both spans, 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.
Duplicated block (50 lines × 2 locations) src/components/DirectorLabView.tsx:34— src/components/DirectorLabView.tsx:34 · src/hooks/useDirectorLab.ts:506 — the 2 copies are spread across 2 files, and what repeats is a LIST OF ENTRIES rather than behaviour — the same entries written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator's options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents.
Duplicated block (47 lines × 2 locations) electron/media/live-stream/liveConnectionDebugService.ts:349— electron/media/live-stream/liveConnectionDebugService.ts:349 · electron/media/live-stream/liveConnectionDebugService.ts:437 — all 2 copies are in the same file, 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 (44 lines × 2 locations) scripts/test-jpeg-hdr-metadata.mjs:14— scripts/test-jpeg-hdr-metadata.mjs:14 · scripts/test-rendered-jpeg-color-metadata.mjs:20 — the 2 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.
R10 · Code Duplication· Duplicated block with local edits (37 matched lines × 2 locations) · ×1
Duplicated block with local edits (37 matched lines × 2 locations) electron/ipc/ipcDolbyVisionExport.ts:18— electron/ipc/ipcDolbyVisionExport.ts:18 · electron/ipc/ipcOriginalFileExport.ts:23 — the two spans are one implementation copied and then locally edited — 255 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.
Duplicated block (35 lines × 2 locations) electron/features/beauty/beautyBlemishDetection.ts:111— electron/features/beauty/beautyBlemishDetection.ts:111 · electron/features/beauty/beautyBlemishDetection.ts:167 — both copies are in the same file, so extract the 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 with local edits (34 matched lines × 2 locations) · ×1
Duplicated block with local edits (34 matched lines × 2 locations) electron/media/fileDownloadService.ts:197— electron/media/fileDownloadService.ts:197 · electron/media/fileDownloadService.ts:249 — the two spans are one implementation copied and then locally edited — 167 tokens are still identical, in the same order in both spans, 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.
Duplicated block (32 lines × 2 locations) electron/platform/render/lunaRenderCoreNormalize.ts:5— electron/platform/render/lunaRenderCoreNormalize.ts:5 · src/shared/types/render.ts:36 — the 2 copies are spread across 2 files, and what repeats is a LIST OF ENTRIES rather than behaviour — the same entries written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator's options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents.
Duplicated block (26 lines × 2 locations) electron/features/ai-selection/aiSelectionPerson.ts:48— electron/features/ai-selection/aiSelectionPerson.ts:48 · src/shared/compositionAnalysis.ts:35 — 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.
Duplicated block (23 lines × 2 locations) electron/devices/dji/djiBleSession.ts:279— electron/devices/dji/djiBleSession.ts:279 · electron/devices/dji/djiBleSession.ts:382 — all 2 copies are in the same file, 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 (22 lines × 2 locations) electron/devices/dji/djiWebBluetoothTransport.ts:21— electron/devices/dji/djiWebBluetoothTransport.ts:21 · electron/devices/insta360/lunaBleWebBluetoothTransport.ts:58 — 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.
Complex function validate (cyclomatic 240, cognitive 223) dji_mock_server/opc/state.js:220— validate has cyclomatic complexity 240 and cognitive complexity 223; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function DeviceConnectPage (cyclomatic 97, cognitive 82) src/pages/DeviceConnectPage.tsx:56— DeviceConnectPage has cyclomatic complexity 97 and cognitive complexity 82; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 92, cognitive 132) REDACTED:131— (anonymous) has cyclomatic complexity 92 and cognitive complexity 132; 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 main (cyclomatic 87, cognitive 134) · ×1
Complex function main (cyclomatic 87, cognitive 134) scripts/test-gpu-export.mjs:292— main has cyclomatic complexity 87 and cognitive complexity 134; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function AiSelectionPage (cyclomatic 87, cognitive 72) src/pages/AiSelectionPage.tsx:94— AiSelectionPage has cyclomatic complexity 87 and cognitive complexity 72; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 79, cognitive 156) src/hooks/useDirectorPlanSync.ts:92— (anonymous) has cyclomatic complexity 79 and cognitive complexity 156; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 75, cognitive 85) src/workspace/border/buildBorderLayer.ts:236— (anonymous) has cyclomatic complexity 75 and cognitive complexity 85; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 65, cognitive 66) electron/ipc/ipcWorkspaceService.ts:587— (anonymous) has cyclomatic complexity 65 and cognitive complexity 66; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function apply (cyclomatic 61, cognitive 57) dji_mock_server/opc/state.js:490— apply has cyclomatic complexity 61 and cognitive complexity 57; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function PreviewModal (cyclomatic 60, cognitive 57) src/components/PreviewModal.tsx:79— PreviewModal has cyclomatic complexity 60 and cognitive complexity 57; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function PreviewStage (cyclomatic 56, cognitive 49) src/components/PreviewStage.tsx:57— PreviewStage has cyclomatic complexity 56 and cognitive complexity 49; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 55, cognitive 44) electron/ipc/ipcDirectorLabService.ts:289— (anonymous) has cyclomatic complexity 55 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function renderMultipleLayerVideoFrame (cyclomatic 53, cognitive 71) src/components/multipleLayerVideoFrameRenderer.ts:263— renderMultipleLayerVideoFrame has cyclomatic complexity 53 and cognitive complexity 71; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function createLayerParams (cyclomatic 51, cognitive 51) src/components/webgpu/webgpuLayerMath.ts:214— createLayerParams has cyclomatic complexity 51 and cognitive complexity 51; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function handleKeyDown (cyclomatic 51, cognitive 47) src/pages/WorkspacePage.tsx:1076— handleKeyDown has cyclomatic complexity 51 and cognitive complexity 47; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function LiveControlPanel (cyclomatic 50, cognitive 24) src/components/LiveControlPanel.tsx:46— LiveControlPanel has cyclomatic complexity 50 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function PixelStretchCreative (cyclomatic 48, cognitive 39) src/workspace/creative/pixel-stretch/PixelStretchCreative.tsx:56— PixelStretchCreative has cyclomatic complexity 48 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function MaskPanel (cyclomatic 47, cognitive 44) src/workspace/mask/MaskPanel.tsx:48— MaskPanel has cyclomatic complexity 47 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function reconcileLocalDirectorPlanUnlocked (cyclomatic 46, cognitive 50) electron/features/director-lab/directorLabPlanStorage.ts:234— reconcileLocalDirectorPlanUnlocked has cyclomatic complexity 46 and cognitive complexity 50; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function diagnoseLiveConnection (cyclomatic 45, cognitive 83) electron/media/live-stream/liveConnectionDebugService.ts:180— diagnoseLiveConnection has cyclomatic complexity 45 and cognitive complexity 83; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function prepare (cyclomatic 44, cognitive 68) REDACTED:218— prepare has cyclomatic complexity 44 and cognitive complexity 68; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function buildVideoMetadata (cyclomatic 44, cognitive 53) electron/media/videoMetadata.ts:156— buildVideoMetadata has cyclomatic complexity 44 and cognitive complexity 53; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function MediaCardImpl (cyclomatic 44, cognitive 35) src/components/MediaCard.tsx:41— MediaCardImpl has cyclomatic complexity 44 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function generatePairedReferenceMatchLut (cyclomatic 43, cognitive 103) src/workspace/color/referenceMatch.ts:584— generatePairedReferenceMatchLut has cyclomatic complexity 43 and cognitive complexity 103; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 43, cognitive 99) src/workspace/shared/workspaceMixedExport.ts:186— (anonymous) has cyclomatic complexity 43 and cognitive complexity 99; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function validateLifecycle (cyclomatic 43, cognitive 49) REDACTED:513— validateLifecycle has cyclomatic complexity 43 and cognitive complexity 49; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function handleCommand (cyclomatic 42, cognitive 49) REDACTED:615— handleCommand has cyclomatic complexity 42 and cognitive complexity 49; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function WorkspaceEditSidebar (cyclomatic 42, cognitive 41) src/workspace/components/WorkspaceEditSidebar.tsx:139— WorkspaceEditSidebar has cyclomatic complexity 42 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function OnlyYourColorCreative (cyclomatic 42, cognitive 38) src/workspace/creative/only-your-color/OnlyYourColorCreative.tsx:54— OnlyYourColorCreative has cyclomatic complexity 42 and cognitive complexity 38; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function WorkspacePageInner (cyclomatic 42, cognitive 37) src/pages/WorkspacePage.tsx:145— WorkspacePageInner has cyclomatic complexity 42 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function verifyMacosIosUsbResources (cyclomatic 41, cognitive 61) scripts/macos-ios-usb-resources.mjs:12— verifyMacosIosUsbResources has cyclomatic complexity 41 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function autoJoinDeviceWifi (cyclomatic 40, cognitive 62) electron/platform/network/wifiAutoJoinService.ts:199— autoJoinDeviceWifi has cyclomatic complexity 40 and cognitive complexity 62; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function WatermarkSettings (cyclomatic 40, cognitive 31) src/components/WatermarkSettings.tsx:175— WatermarkSettings has cyclomatic complexity 40 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 39, cognitive 94) src/components/previewStageExport.ts:519— (anonymous) has cyclomatic complexity 39 and cognitive complexity 94; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function render (cyclomatic 39, cognitive 51) src/components/webgpuVideoRenderer.ts:709— render has cyclomatic complexity 39 and cognitive complexity 51; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function applyControlPatch (cyclomatic 39, cognitive 43) REDACTED:1075— applyControlPatch has cyclomatic complexity 39 and cognitive complexity 43; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function consume (cyclomatic 38, cognitive 110) src/components/AnnexBVideoCanvas.tsx:234— consume has cyclomatic complexity 38 and cognitive complexity 110; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function downloadToFile (cyclomatic 38, cognitive 49) electron/media/fileDownloadService.ts:177— downloadToFile has cyclomatic complexity 38 and cognitive complexity 49; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 37, cognitive 47) electron/features/director-lab/directorLabLocalImport.ts:167— (anonymous) has cyclomatic complexity 37 and cognitive complexity 47; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function exportVideoWithWebGpu (cyclomatic 37, cognitive 42) src/components/webgpuVideoExport.ts:182— exportVideoWithWebGpu has cyclomatic complexity 37 and cognitive complexity 42; 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.
REDACTED: 1524 lines of code REDACTED:1— REDACTED has 1524 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· src/pages/WorkspacePage.tsx · ×1
src/pages/WorkspacePage.tsx: 1345 lines of code src/pages/WorkspacePage.tsx:1— src/pages/WorkspacePage.tsx has 1345 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 1119 lines of code REDACTED:1— REDACTED has 1119 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· src/workspace/creative/triple-stitch/TripleStitchCreative.tsx · ×1
src/workspace/creative/triple-stitch/TripleStitchCreative.tsx: 1009 lines of code src/workspace/creative/triple-stitch/TripleStitchCreative.tsx:1— src/workspace/creative/triple-stitch/TripleStitchCreative.tsx has 1009 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· electron/ipc/ipcWorkspaceService.ts · ×1
electron/ipc/ipcWorkspaceService.ts: 920 lines of code electron/ipc/ipcWorkspaceService.ts:1— electron/ipc/ipcWorkspaceService.ts has 920 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· electron/ipc/ipcLunaRenderCore.ts · ×1
electron/ipc/ipcLunaRenderCore.ts: 917 lines of code electron/ipc/ipcLunaRenderCore.ts:1— electron/ipc/ipcLunaRenderCore.ts has 917 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· src/components/webgpuVideoRenderer.ts · ×1
src/components/webgpuVideoRenderer.ts: 869 lines of code src/components/webgpuVideoRenderer.ts:1— src/components/webgpuVideoRenderer.ts has 869 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 857 lines of code REDACTED:1— REDACTED has 857 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· src/components/previewStageExport.ts · ×1
src/components/previewStageExport.ts: 798 lines of code src/components/previewStageExport.ts:1— src/components/previewStageExport.ts has 798 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· electron/devices/dji/djiUdpTransport.ts · ×1
electron/devices/dji/djiUdpTransport.ts: 797 lines of code electron/devices/dji/djiUdpTransport.ts:1— electron/devices/dji/djiUdpTransport.ts has 797 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· dji_mock_server/opc/state.js · ×1
dji_mock_server/opc/state.js: 786 lines of code dji_mock_server/opc/state.js:1— dji_mock_server/opc/state.js has 786 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 769 lines of code REDACTED:1— REDACTED has 769 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· src/pages/DeviceConnectPage.tsx · ×1
src/pages/DeviceConnectPage.tsx: 726 lines of code src/pages/DeviceConnectPage.tsx:1— src/pages/DeviceConnectPage.tsx has 726 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· electron/ipc/ipcDirectorLabService.ts · ×1
electron/ipc/ipcDirectorLabService.ts: 722 lines of code electron/ipc/ipcDirectorLabService.ts:1— electron/ipc/ipcDirectorLabService.ts has 722 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· src/components/PreviewStage.tsx · ×1
src/components/PreviewStage.tsx: 689 lines of code src/components/PreviewStage.tsx:1— src/components/PreviewStage.tsx has 689 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· src/workspace/trim/TrimPanel.tsx · ×1
src/workspace/trim/TrimPanel.tsx: 685 lines of code src/workspace/trim/TrimPanel.tsx:1— src/workspace/trim/TrimPanel.tsx has 685 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· src/workspace/color/referenceMatch.ts · ×1
src/workspace/color/referenceMatch.ts: 666 lines of code src/workspace/color/referenceMatch.ts:1— src/workspace/color/referenceMatch.ts has 666 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 654 lines of code REDACTED:1— REDACTED has 654 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· src/workspace/mask/MaskOverlay.tsx · ×1
src/workspace/mask/MaskOverlay.tsx: 628 lines of code src/workspace/mask/MaskOverlay.tsx:1— src/workspace/mask/MaskOverlay.tsx has 628 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· electron/storage/fileService.ts · ×1
electron/storage/fileService.ts: 625 lines of code electron/storage/fileService.ts:1— electron/storage/fileService.ts has 625 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
electron/preload.ts: 599 lines of code electron/preload.ts:1— electron/preload.ts has 599 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· src/workspace/shared/editPipeline.ts · ×1
src/workspace/shared/editPipeline.ts: 592 lines of code src/workspace/shared/editPipeline.ts:1— src/workspace/shared/editPipeline.ts has 592 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· src/pages/useMediaLibraryController.ts · ×1
src/pages/useMediaLibraryController.ts: 590 lines of code src/pages/useMediaLibraryController.ts:1— src/pages/useMediaLibraryController.ts has 590 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· scripts/webgpu-comparison-page.ts · ×1
scripts/webgpu-comparison-page.ts: 570 lines of code scripts/webgpu-comparison-page.ts:1— scripts/webgpu-comparison-page.ts has 570 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
electron/appMain.ts: 564 lines of code electron/appMain.ts:1— electron/appMain.ts has 564 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/pages/SettingsPage.tsx: 561 lines of code src/pages/SettingsPage.tsx:1— src/pages/SettingsPage.tsx has 561 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 560 lines of code REDACTED:1— REDACTED has 560 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
public/local-share/app.js: 560 lines of code public/local-share/app.js:1— public/local-share/app.js has 560 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· src/components/webgpu/webgpuResources.ts · ×1
src/components/webgpu/webgpuResources.ts: 551 lines of code src/components/webgpu/webgpuResources.ts:1— src/components/webgpu/webgpuResources.ts has 551 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· src/components/PreviewModal.tsx · ×1
src/components/PreviewModal.tsx: 547 lines of code src/components/PreviewModal.tsx:1— src/components/PreviewModal.tsx has 547 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· src/context/DeviceConnectionContext.tsx · ×1
src/context/DeviceConnectionContext.tsx: 532 lines of code src/context/DeviceConnectionContext.tsx:1— src/context/DeviceConnectionContext.tsx has 532 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· src/hooks/useDirectorLab.ts · ×1
src/hooks/useDirectorLab.ts: 525 lines of code src/hooks/useDirectorLab.ts:1— src/hooks/useDirectorLab.ts has 525 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 523 lines of code REDACTED:1— REDACTED has 523 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 503 lines of code REDACTED:1— REDACTED has 503 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· src/components/webgpuVideoExport.ts · ×1
src/components/webgpuVideoExport.ts: 497 lines of code src/components/webgpuVideoExport.ts:1— src/components/webgpuVideoExport.ts has 497 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· src/pages/AiSelectionPage.tsx · ×1
src/pages/AiSelectionPage.tsx: 497 lines of code src/pages/AiSelectionPage.tsx:1— src/pages/AiSelectionPage.tsx has 497 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· src/workspace/context/WorkspaceMaskContext.tsx · ×1
src/workspace/context/WorkspaceMaskContext.tsx: 497 lines of code src/workspace/context/WorkspaceMaskContext.tsx:1— src/workspace/context/WorkspaceMaskContext.tsx has 497 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· src/workspace/creative/pixel-stretch/PixelStretchCreative.tsx · ×1
src/workspace/creative/pixel-stretch/PixelStretchCreative.tsx: 492 lines of code src/workspace/creative/pixel-stretch/PixelStretchCreative.tsx:1— src/workspace/creative/pixel-stretch/PixelStretchCreative.tsx has 492 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· src/components/MultipleLayerVideoPreviewLrcRender.tsx · ×1
src/components/MultipleLayerVideoPreviewLrcRender.tsx: 490 lines of code src/components/MultipleLayerVideoPreviewLrcRender.tsx:1— src/components/MultipleLayerVideoPreviewLrcRender.tsx has 490 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 485 lines of code REDACTED:1— REDACTED has 485 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R6 · Tooling· This package's lint script runs in no CI job · ×1
This package's lint script runs in no CI job package.json:108— The root package declares the lint script `lint` (`eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run lint` in `.` (or the workspace's task runner).
Dead file (~525 LoC) src/components/webgpuVideoExport.ts— no import path from any entry point (250 application, 34 tooling, 37 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 (~489 LoC) src/components/NativeGpuVideoPreview.tsx— no import path from any entry point (250 application, 34 tooling, 37 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 (~238 LoC) electron/devices/go-ultra/debugAdapter.ts— no import path from any entry point (250 application, 34 tooling, 37 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 (~223 LoC) REDACTED— no import path from any entry point (250 application, 34 tooling, 37 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 (~210 LoC) src/workspace/shared/workspaceLivePhotoExport.ts— no import path from any entry point (250 application, 34 tooling, 37 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 (~151 LoC) electron/media/nativePreviewIpc.ts— no import path from any entry point (250 application, 34 tooling, 37 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 (~139 LoC) src/lib/exportTaskRunner.ts— no import path from any entry point (250 application, 34 tooling, 37 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 (~133 LoC) scripts/test-live-gimbal-keyboard.mjs— no import path from any entry point (250 application, 34 tooling, 37 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 (~102 LoC) scripts/test-director-local-edits.mjs— no import path from any entry point (250 application, 34 tooling, 37 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 (~85 LoC) scripts/publish-apple-device-support.mjs— no import path from any entry point (250 application, 34 tooling, 37 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 (~78 LoC) scripts/test-director-plan-import.mjs— no import path from any entry point (250 application, 34 tooling, 37 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 (~68 LoC) src/components/LivePhotoPlayer.tsx— no import path from any entry point (250 application, 34 tooling, 37 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) scripts/test-downloaded-library.mjs— no import path from any entry point (250 application, 34 tooling, 37 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 (~62 LoC) scripts/test-usage-analytics.mjs— no import path from any entry point (250 application, 34 tooling, 37 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 (~61 LoC) scripts/test-director-plan-deletion.mjs— no import path from any entry point (250 application, 34 tooling, 37 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 (~60 LoC) scripts/test-hotfix-file-operations.mjs— no import path from any entry point (250 application, 34 tooling, 37 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 (~59 LoC) src/workspace/shared/colorLut.ts— no import path from any entry point (250 application, 34 tooling, 37 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 (~53 LoC) scripts/test-director-take-markers.mjs— no import path from any entry point (250 application, 34 tooling, 37 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 (~52 LoC) src/components/UpdateBanner.tsx— no import path from any entry point (250 application, 34 tooling, 37 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 (~47 LoC) scripts/test-director-take-range.mjs— no import path from any entry point (250 application, 34 tooling, 37 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 (~43 LoC) src/workspace/creative/only-your-color/exportOnlyYourColorImage.ts— no import path from any entry point (250 application, 34 tooling, 37 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 (~25 LoC) scripts/test-ios-proxy-debug.mjs— no import path from any entry point (250 application, 34 tooling, 37 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 (~22 LoC) src/workspace/lut/lunaUltraRestoreLut.ts— no import path from any entry point (250 application, 34 tooling, 37 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 (~19 LoC) scripts/test-export-file-name.mjs— no import path from any entry point (250 application, 34 tooling, 37 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 (~17 LoC) src/workspace/effects/EffectsPanel.tsx— no import path from any entry point (250 application, 34 tooling, 37 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 (~10 LoC) scripts/test-live-zoom-range.mjs— no import path from any entry point (250 application, 34 tooling, 37 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 (~4 LoC) src/workspace/hooks/index.ts— no import path from any entry point (250 application, 34 tooling, 37 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 (~3 LoC) src/workspace/context/index.ts— no import path from any entry point (250 application, 34 tooling, 37 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 (~1 LoC) src/components/DjiWirelessConnectionPanel.tsx— no import path from any entry point (250 application, 34 tooling, 37 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
X13 · Undrained process stream· Redirected process stream is never drained (deadlock) · ×1
Redirected process stream is never drained (deadlock) electron/ipc/ipcDirectorLabService.ts:607— `spawn` pipes `stdout` here — it is given no `stdio` option, or `'pipe'` — but nothing in this scope ever reads `child.stdout`, while `child.stderr` is read and the child's end is awaited. Node holds an unread pipe's output only up to its buffer: once the child writes more than that to stdout (measured on Linux: about 128 KB — the 64 KB pipe plus Node's 64 KB read-ahead — and less elsewhere), the child blocks on the write, never exits, and the `close`/`exit` this code waits for never fires. Nothing fails loudly: the promise never settles, the request never returns, and the stuck child holds its resources until something kills it. Consume both streams (`child.stdout.on('data', …)`, or `child.stdout.resume()` to discard it), or stop piping the one you do not want — `stdio: ['pipe', 'pipe', 'inherit']` or `'ignore'` in that slot.
X17 · Uncapped recursion over a caller-supplied document· Recursive walk over a caller-supplied document has no depth cap · ×1
Recursive walk over a caller-supplied document has no depth cap src/shared/crashDiagnosticUtils.ts:22— `serializeDiagnosticValue` is exported and takes `value: unknown` from its caller, and it calls itself at line 22 (`serializeDiagnosticValue`) with a piece of `value` (and at line 30, line 32) — and nowhere in `serializeDiagnosticValue` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `serializeDiagnosticValue` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Duplicated predicate electron/ipc/ipcDirectorLabService.ts:415— `!!attribute && typeof attribute === 'object' && typeof attribute.name === 'string' && attribute.name.trim().length > 0` appears character-identically in 2 files — electron/ipc/ipcDirectorLabService.ts, src/lib/directorLanPlans.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 src/workspace/mask/maskTimeline.ts:7— `!Number.isFinite(duration) || duration <= 0` appears character-identically in 3 files — src/workspace/mask/maskTimeline.ts, src/workspace/shared/workspaceMixedExport.ts, src/workspace/shared/workspaceSourceLivePhotoExport.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 electron/features/ai-selection/aiSelectionPerson.ts:220— `!Number.isFinite(duration) || duration <= 0.2` appears character-identically in 2 files — electron/features/ai-selection/aiSelectionPerson.ts, electron/features/ai-selection/aiSelectionVideo.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 src/workspace/trim/TrimPanel.tsx:58— `!Number.isFinite(seconds) || seconds < 0` appears character-identically in 2 files — src/workspace/trim/TrimPanel.tsx, src/workspace/trim/TrimStrip.tsx. 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 src/pages/WorkspacePage.tsx:1427— `!currentSettings.exportDir && !currentSettings.chooseTransferDirectoryBeforeAction` appears character-identically in 2 files — src/pages/WorkspacePage.tsx, src/workspace/creative/pixel-flow/usePixelFlowBatchExport.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 src/components/useCanvasViewportInteraction.ts:162— `!drag || drag.pointerId !== event.pointerId` appears character-identically in 2 files — src/components/useCanvasViewportInteraction.ts, src/components/useHtmlPreviewViewport.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 src/components/webgpu/webgpuLayerMath.ts:71— `!hex || (hex.length !== 6 && hex.length !== 8) || !/^[0-9a-f]+$/i.test(hex)` appears character-identically in 2 files — src/components/webgpu/webgpuLayerMath.ts, src/components/webgpuTextRaster.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 electron/devices/go-ultra/debugAdapter.ts:19— `!isNaN(port) && port > 0 && port <= 65535` appears character-identically in 2 files — electron/devices/go-ultra/debugAdapter.ts, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/components/LrcRender.tsx:271— `!lrc || !canvas || destroyRef.current || !activeRef.current` appears character-identically in 2 files — src/components/LrcRender.tsx, src/components/MultipleLayerVideoPreviewLrcRender.tsx. 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 src/pages/WorkspacePage.tsx:742— `!media.currentProject || !media.activeMedia` appears character-identically in 2 files — src/pages/WorkspacePage.tsx, src/workspace/removal/RemovalPanel.tsx. 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 resources/ios-usb/darwin-arm64/licenses/build-macos-ios-usb.mjs:122— `!name.split('/').includes('.DS_Store') && statSync(join(licenses, name)).isFile()` appears character-identically in 3 files — resources/ios-usb/darwin-arm64/licenses/build-macos-ios-usb.mjs, resources/ios-usb/darwin-x64/licenses/build-macos-ios-usb.mjs, scripts/build-macos-ios-usb.mjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate electron/features/director-lab/directorLabMediaCleanup.ts:28— `!segment || segment === '.' || segment === '..'` appears character-identically in 2 files — electron/features/director-lab/directorLabMediaCleanup.ts, electron/media/local-share/localMediaShareFiles.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 src/components/PreviewModal.tsx:377— `!settings.exportDir && !settings.chooseTransferDirectoryBeforeAction` appears character-identically in 5 files — src/components/PreviewModal.tsx, src/pages/WorkspacePage.tsx, src/workspace/creative/color-reveal/ColorRevealCreative.tsx, src/workspace/creative/only-your-color/exportOnlyYourColorImage.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 electron/export/watermark/customWatermarkService.ts:40— `!sourceStat.isFile() || sourceStat.size <= 0` appears character-identically in 2 files — electron/export/watermark/customWatermarkService.ts, electron/ipc/ipcSubtitleService.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 electron/features/ai-selection/aiSelectionMedia.ts:100— `!stats.isDirectory() || stats.isSymbolicLink()` appears character-identically in 2 files — electron/features/ai-selection/aiSelectionMedia.ts, electron/features/workspace/workspaceProjectService.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 electron/devices/common/mountedCameraMediaSource.ts:297— `!stats.isFile() || stats.isSymbolicLink()` appears character-identically in 2 files — electron/devices/common/mountedCameraMediaSource.ts, electron/features/ai-selection/aiSelectionMedia.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 electron/devices/dji/djiWebBluetoothTransport.ts:169— `!transport || !transport.acceptsSender(event.sender)` appears character-identically in 2 files — electron/devices/dji/djiWebBluetoothTransport.ts, electron/devices/insta360/lunaBleWebBluetoothTransport.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 electron/devices/dji/djiWebBluetoothTransport.ts:484— `(process.platform === 'darwin' || process.platform === 'win32') && win` appears character-identically in 2 files — electron/devices/dji/djiWebBluetoothTransport.ts, electron/devices/insta360/lunaBleWebBluetoothTransport.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 scripts/copy-ffmpeg.mjs:53— `(value.startsWith('"') && value.endsWith('"')) || (value.startsWith("'") && value.endsWith("'"))` appears character-identically in 4 files — scripts/copy-ffmpeg.mjs, scripts/prepare-macos-x64-runtime.mjs, scripts/publish-build-dependencies.mjs, scripts/publish-hot-update.mjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/pages/WorkspacePage.tsx:1205— `Boolean(asset) && !media.brokenPaths.has(asset.path)` appears character-identically in 2 files — src/pages/WorkspacePage.tsx, src/workspace/creative/pixel-flow/usePixelFlowBatchExport.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 src/pages/WorkspacePage.tsx:964— `Boolean(media.media[index]) && !media.brokenPaths.has(media.media[index].path)` appears character-identically in 2 files — src/pages/WorkspacePage.tsx, src/workspace/creative/color-reveal/ColorRevealCreative.tsx. 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 electron/media/mediaMetadataService.ts:219— `Number.isFinite(parsedDuration) && parsedDuration > 0` appears character-identically in 2 files — electron/media/mediaMetadataService.ts, electron/platform/ffmpeg/pipeline.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 electron/platform/render/lunaRenderCoreNormalize.ts:181— `Number.isFinite(point.x) && Number.isFinite(point.y)` appears character-identically in 2 files — electron/platform/render/lunaRenderCoreNormalize.ts, src/workspace/shared/editPipeline.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 REDACTED:73— `a.internal || a.family !== 'IPv4' || !a.netmask` appears character-identically in 2 files — REDACTED, electron/platform/network/networkDiagnostics.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 src/shared/subtitleTrack.ts:92— `a.startMs - b.startMs || a.endMs - b.endMs` appears character-identically in 3 files — src/shared/subtitleTrack.ts, src/workspace/subtitles/SubtitlePanel.tsx, src/workspace/subtitles/subtitleLayers.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.
+ 15 more in this group — see findings.md.
P2 · Observability· Console output used as the logging channel · ×39
Console output used as the logging channel src/workspace/shared/workspaceMixedExport.ts:430— `src/workspace/shared/workspaceMixedExport.ts` reports through `console.*` at line 430 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/workspace/lut/LutManager.ts:25— `src/workspace/lut/LutManager.ts` reports through `console.*` at line 25 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/workspace/lut/LutManager.ts:41— `src/workspace/lut/LutManager.ts` reports through `console.*` at line 41 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/workspace/creative/WorkspaceCreativeFactory.tsx:83— `src/workspace/creative/WorkspaceCreativeFactory.tsx` reports through `console.*` at line 83 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/workspace/border/borderPresets.ts:18— `src/workspace/border/borderPresets.ts` reports through `console.*` at line 18 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/ui/ErrorBoundary.tsx:24— `src/ui/ErrorBoundary.tsx` reports through `console.*` at line 24 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/pages/useMediaLibraryTransferActions.ts:170— `src/pages/useMediaLibraryTransferActions.ts` reports through `console.*` at line 170 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/pages/useMediaLibraryTransferActions.ts:185— `src/pages/useMediaLibraryTransferActions.ts` reports through `console.*` at line 185 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/pages/useMediaLibraryTransferActions.ts:264— `src/pages/useMediaLibraryTransferActions.ts` reports through `console.*` at line 264 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/components/multipleLayerVideoFrameRenderer.ts:102— `src/components/multipleLayerVideoFrameRenderer.ts` reports through `console.*` at line 102 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/components/multipleLayerVideoFrameRenderer.ts:320— `src/components/multipleLayerVideoFrameRenderer.ts` reports through `console.*` at line 320 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/components/multipleLayerVideoFrameRenderer.ts:335— `src/components/multipleLayerVideoFrameRenderer.ts` reports through `console.*` at line 335 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/components/previewStageExport.ts:394— `src/components/previewStageExport.ts` reports through `console.*` at line 394 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/components/previewStageExport.ts:604— `src/components/previewStageExport.ts` reports through `console.*` at line 604 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/components/previewStageExport.ts:605— `src/components/previewStageExport.ts` reports through `console.*` at line 605 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/components/previewStageExport.ts:628— `src/components/previewStageExport.ts` reports through `console.*` at line 628 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/components/AnnexBVideoCanvas.tsx:160— `src/components/AnnexBVideoCanvas.tsx` reports through `console.*` at line 160 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/components/AnnexBVideoCanvas.tsx:203— `src/components/AnnexBVideoCanvas.tsx` reports through `console.*` at line 203 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/components/DownloadProgressModal.tsx:211— `src/components/DownloadProgressModal.tsx` reports through `console.*` at line 211 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/components/DownloadProgressModal.tsx:311— `src/components/DownloadProgressModal.tsx` reports through `console.*` at line 311 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/components/GlobalDownloadProgress.tsx:42— `src/components/GlobalDownloadProgress.tsx` reports through `console.*` at line 42 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/components/PreviewStage.tsx:388— `src/components/PreviewStage.tsx` reports through `console.*` at line 388 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/components/PreviewStage.tsx:400— `src/components/PreviewStage.tsx` reports through `console.*` at line 400 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/components/PreviewStage.tsx:424— `src/components/PreviewStage.tsx` reports through `console.*` at line 424 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/components/PreviewStage.tsx:461— `src/components/PreviewStage.tsx` reports through `console.*` at line 461 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Silent fallback default in catch electron/media/resumableDownloadService.ts:80— `fileSize` swallows every exception into `return -1` — 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 electron/infrastructure/crashDiagnostics.ts:50— `findCrashDumps` 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 electron/media/fileDownloadService.ts:28— `fileSize` 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.
Silent fallback default in catch electron/platform/ffmpeg/pipeline.ts:31— `getFfmpegPath` swallows every exception into `return 'ffmpeg'` — 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 electron/platform/ffmpeg/pipeline.ts:241— `getFfprobePath` swallows every exception into `return 'ffprobe'` — 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 electron/media/mediaMetadataService.ts:102— `getFfprobePath` swallows every exception into `return 'ffprobe'` — 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 electron/storage/fileService.ts:75— `fileSize` 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.
Silent fallback default in catch REDACTED:116— `readSharedFileRoots` 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 electron/devices/common/mountedCameraMediaSource.ts:116— `childDirectories` 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 electron/devices/common/mountedCameraMediaSource.ts:134— `windowsRemovableVolumeRoots` 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 electron/features/ai-selection/aiSelectionPeopleStore.ts:133— `loadPeopleStore` 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 electron/features/workspace/workspaceProjectService.ts:240— `listWorkspaceProjects` 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 electron/features/ai-selection/aiSelectionVideo.ts:62— `readCachedStory` swallows every exception into `return false` — 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 electron/features/color/colorPresetsService.ts:29— `readPresets` 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 electron/network/lunaka_http_client.ts:112— `authorizationHeadersFor` 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 electron/ipc/ipcDirectorLabService.ts:475— `listLocalPlans` 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 landing/download-platform.js:22— `readGpuRenderer` 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 src/lib/rendererLogger.ts:29— `formatConsoleArgument` 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 src/workspace/color/colorPresets.ts:21— `loadUserPresets` 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 src/workspace/color/colorPresets.ts:46— `deserializePresetColor` 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 src/hooks/useDirectorLab.ts:138— `useDirectorLab.refreshLocalPlans` 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.
Disabled test e2e/beauty.e2e.spec.ts:61— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test e2e/beauty.e2e.spec.ts:231— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test e2e/beauty.e2e.spec.ts:291— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test e2e/object-removal.e2e.spec.ts:22— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test e2e/webgpu-preview.e2e.spec.ts:62— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test e2e/workspace-export-gpu.e2e.spec.ts:13— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test e2e/workspace-watermark-export.e2e.spec.ts:15— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test e2e/workspace-webgpu-color.e2e.spec.ts:9— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test e2e/workspace-webgpu-color.e2e.spec.ts:10— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test e2e/workspace-webgpu-playback.e2e.spec.ts:9— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test e2e/workspace-webgpu-playback.e2e.spec.ts:10— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Fat interface: DirectorLabApi (20 required operations) src/shared/types/directorLab.ts:93— `DirectorLabApi` declares 20 required operations: `download`, `downloadPlan`, `discover`, `listLocalPlans`, `reconcilePlanDeletions`, `addLocalShot`, `importShots`, `importPlan`, `importPlanText`, `saveLocalPlan`, `importMaterials`, `deleteLocalMaterial`, `syncMaterials`, `onMaterialSyncProgress`, `acknowledgeLocalPlan`, `prepareThumbnail`, `reconcileLocalPlan`, `onDownloadProgress`, `preparePreview`, `probeMedia`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: LunaApi (106 required operations) src/shared/types/api.ts:149— `LunaApi` declares 106 required operations: `startupReady`, `trackPageOpened`, `trackLiveUsage`, `setFullScreen`, `setLiveWindowMode`, `onLiveWindowModeEnd`, `updateLivePreviewWindowSettings`, `getLivePreviewWindowSettings`, `onLivePreviewWindowSettings`, `resizeLivePreviewWindow`, `onFullScreenChange`, `log`, `logExport`, `getLogDir`, `exportDiagnosticsBundle`, `clearLogs`, `getPathForFile`, `copyText`, `getSettings`, `saveSettings`, `listDevices`, `chooseBaseDir`, `chooseLocalResourcesDir`, `chooseExportDir`, `chooseDirectorPlanDir`, `chooseTransferDirectory`, `chooseLutDir`, `chooseMockMediaDir`, `chooseCustomWatermarks`, `listCustomWatermarks`, `deleteCustomWatermark`, `startMockServer`, `stopMockServer`, `getMockServerStatus`, `getMockServerStatuses`, `getCacheStats`, `clearCache`, `organizeDownloadedFiles`, `migrateLocalStorage`, `listCustomLuts`, and 66 more. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: WorkspaceMaskValue (31 required operations) src/workspace/context/WorkspaceMaskContextTypes.ts:22— `WorkspaceMaskValue` declares 31 required operations: `setVideoFrameTime`, `setEditing`, `setSelectionOperation`, `setManualTool`, `setBrushSize`, `setBrushFeather`, `setShowOverlay`, `setReconstructing`, `setSemanticPicking`, `setAiMaskExpansion`, `clearSegmentationError`, `cancelSegmentation`, `prepareVideoMasksForExport`, `setActiveLayerId`, `setActiveComponentId`, `createMask`, `updateLayer`, `updateActiveLayer`, `duplicateLayer`, `removeLayer`, `moveLayer`, `moveActiveLayer`, `commitMask`, `removeActiveComponent`, `duplicateActiveComponent`, `updateActiveComponent`, `updateMaskSettings`, `updateGroupedMaskSettings`, `removeMask`, `generateSemanticMask`, `generateInstanceStrokeMask`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×2
Projects may be oversized for their cohesion package.json:1— `(repository root)` (123975 LoC, 1391 module-visible types across 74 directories) overshoots its size bounds. 2 of 3 build unit(s) (Cargo, npm) overshoot their size bounds, lowering Project Cohesion to 0.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
Projects may be oversized for their cohesion luna-render-core/Cargo.toml:1— `luna-render-core` (19133 LoC, 188 module-visible types across 10 directories) overshoots its size bounds. 2 of 3 build unit(s) (Cargo, npm) overshoot their size bounds, lowering Project Cohesion to 0.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
No ADRs found luna-render-core/Cargo.toml:10— 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 `luna-render-core/Cargo.toml` makes this repository a deployable product (line 10).
D21 · Naming Consistency· `fetchLatestHotUpdateViaAPI` spells `API` where 23 names in the project spell it `Api` · ×1
`fetchLatestHotUpdateViaAPI` spells `API` where 23 names in the project spell it `Api` REDACTED:106— 23 of 24 names in project luna-ai-cut spell the token `Api` (23 of 24; unit: names in project luna-ai-cut containing `Api`). Peers: electron.preload.LunaExportTaskApi (electron/preload.ts:66); scripts.webgpu-comparison-page.ComparisonApi (scripts/webgpu-comparison-page.ts:155); webgpu-comparison-page.installStandaloneApi (scripts/webgpu-comparison-page.ts:254); src.components.NativeGpuVideoPreview.NativePreviewApi (src/components/NativeGpuVideoPreview.tsx:21); NativeGpuVideoPreview.nativePreviewApi (src/components/NativeGpuVideoPreview.tsx:56). Rename to `fetchLatestHotUpdateViaApi`. [rule N6]
D28 · Secrets (history)· Rotate the exposed credentials · ×1
IC1 · Incompleteness & stubs· Empty method body · ×1
Empty method body electron/media/live-stream/liveStreamService.ts:69— `onPhoneDisconnected` has an empty body — confirm it's an intentional no-op and not an unfinished method.
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.
Logging is not universal — Only 2/3 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `dji_mock_server/opc`.
No SAST — No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 4 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
No dependency-update automation package.json:116— `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`.
X2 · Cancellation propagation· Not all async functions that make a request accept an AbortSignal · ×1
Not all async functions that make a request accept an AbortSignal — Only 53/73 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
Null assertions (`!`) override strict null checking — ~1.7 `!` null assertions per 1k TypeScript source lines — 184 assertion(s) across the 110804 source line(s) of the 695 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: src/workspace/mask/MaskOverlay.tsx (20), src/lib/annexB.ts (19), src/ai-selection/useAiSelection.ts (18). 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.
X7 · Silent fallback defaults· Pending state with no failure state · ×1
Pending state with no failure state src/components/ExportPreviewPane.tsx:194— The view draws `正在准备画面…` under `loading`, but `loading` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
Outdated: bytemuck — `bytemuck` is locked at 1.25.0 but 1.25.2 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in luna-render-core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p bytemuck` and commit the updated REDACTED.
Outdated: cc — `cc` is locked at 1.2.65 but 1.11.2 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in luna-render-core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p cc` and commit the updated REDACTED.
Outdated: napi-build — `napi-build` is locked at 2.3.2 but 2.6.0 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in luna-render-core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p napi-build` and commit the updated REDACTED.
Outdated: objc2 — `objc2` is locked at 0.6.4 but 0.6.5 is the current stable release on crates.io, and it already satisfies the `"0.6.4"` requirement declared in luna-render-core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p objc2` and commit the updated REDACTED.
Outdated: serde — `serde` is locked at 1.0.228 but 1.0.229 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in luna-render-core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p serde` and commit the updated REDACTED.
Outdated: serde_json — `serde_json` is locked at 1.0.150 but 1.0.154 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in luna-render-core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p serde_json` and commit the updated REDACTED.
Outdated: swash — `swash` is locked at 0.2.9 but 0.2.10 is the current stable release on crates.io, and it already satisfies the `"0.2"` requirement declared in luna-render-core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p swash` and commit the updated REDACTED.
Outdated: tokio — `tokio` is locked at 1.52.3 but 1.54.1 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in luna-render-core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tokio` and commit the updated REDACTED.
Outdated: wgpu — `wgpu` is locked at 30.0.1 but 30.0.2 is the current stable release on crates.io, and it already satisfies the `"30"` requirement declared in luna-render-core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p wgpu` and commit the updated REDACTED.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 11 file(s) — `electron/appMain.ts`, `electron/electron-env.d.ts`, `electron/features/beauty/beautyAnalysisService.ts`, `electron/infrastructure/runtimeResourceDefinitions.ts`, `electron/ipc/ipcConnectivityService.ts`, … (+6 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1e7e7-6215-7a49-9c27-e6e90d97a099 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 146 · Warnings: 1383 · Recommendations: 130 · Info: 9 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 17-11-2026 @ 05:07 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.