Public report of TryGhost/Ghost, published 13 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.3). 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, 13 November 2026, 18:09 UTC · Survey ID cd_e282d5867db748e7b12db92a82dcb834
TryGhost/Ghost
Measured 13 November 2026, 17:44 UTC, at code version 00d71bc
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
Up 3 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 462,400 lines of product code in 50 projects, tests not counted · Estimated rebuild effort: about 8.8 person-years · Weakest lens: Accessibility, 45
Findings by how serious they are
175 critical4155 serious846 minor
3 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
13 November 2026, 17:44 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
94of 94 dimensions measured by tools.
5005of 5176 findings point to an exact file and line, so you can open each one in the code. The other 171 concern the repository as a whole, such as missing documentation.
94dimensions across 8 lenses, read from 462,400 lines of product code in 50 projects.
TryGhost/Ghost falls short of our standard for production because it has controls that only work with a mouse. It scores 50 out of 100 and is rated Adequate, and 31 of its 175 critical findings are security problems.
Accessibility, at 45, is the weakest lens and counts most in the score. The best first steps are making the controls keyboard-usable and respecting the front end's boundaries, each worth about 3 points. Raising Accessibility to 70 would lift the score to about 54.
Thirty-eight controls can't be used without a mouse. Twelve weaknesses in the code could be used by an attacker, and twenty-three images have no description for people who can't see them. Making the controls work with a keyboard, fixing the weaknesses the scanner points to and describing the images would close these risks. The seven unsafe settings in infrastructure or container files need changing to safe values. The six passwords or keys in the code's history need replacing, with the old ones switched off. The 22 tests that check nothing need to check the result they produce.
The product code is 462,400 lines, about €1,300,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 45 to 70, the lowest score rated Strong, the score would rise from 50 to about 54.
Code composition: what the lines of code are
Product code 46%Tests 54%
New since the last survey: 470 findings
These 470 critical or serious findings weren't in the previous survey, on 24 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
God Classes · ClassTooLong: MemberWelcomeEmailService ghost/core/server/services/member-welcome-emails/member-welcome-email-service.js
God Classes · FunctionTooLong: create-custom-field-popover.CreateCustomFieldPopover apps/admin/src/shared/member-custom-fields/create-custom-field-popover.tsx
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 1898 findings
These 1898 critical or serious findings were in the previous survey, on 24 October 2026, and are gone from this one. The first 100 are listed here.
Test Quality · Skipped test: (unnamed test) e2e/visual-regression/capture-baselines.spec.ts
Test Quality · No assertions: renders the seeded subscriber KPIs and top newsletters apps/admin/src/analytics/analytics.acceptance.test.tsx
Test Quality · No assertions: marks an app served from the developer’s machine apps/admin/src/apps/install.acceptance.test.tsx
Test Quality · No assertions: opens a post in the editor apps/admin/src/apps/apps.acceptance.test.tsx
Test Quality · No assertions: opens a page in the editor apps/admin/src/apps/apps.acceptance.test.tsx
Test Quality · No assertions: dismisses a card warning when clicking another canvas card apps/admin/src/automations/validation-feedback.acceptance.test.tsx
Test Quality · No assertions: keeps genuine save failures as toasts apps/admin/src/automations/validation-feedback.acceptance.test.tsx
Test Quality · No assertions: still permits saving incomplete inactive emails apps/admin/src/automations/validation-feedback.acceptance.test.tsx
Test Quality · No assertions: shows the free description without controls apps/admin/src/automations/trigger-tiers.acceptance.test.tsx
Test Quality · No assertions: supports retry and closing without changing the draft apps/admin/src/automations/email-card-analytics.acceptance.test.tsx
Test Quality · No assertions: reloads the admin when the search modal failed to load apps/admin/src/global-search/global-search-load-failure.acceptance.test.tsx
Test Quality · No assertions: puts the create form away when another picker is opened apps/admin/src/members/import-members-custom-fields.acceptance.test.tsx
Test Quality · No assertions: shows a tax ID offered on every checkout while automatic tax is on apps/admin/src/settings/membership/checkout/checkout-fields.acceptance.test.tsx
Rebuild cost: about €1,300,000 · Estimate
Cost to rebuild
€430,000 to €2,100,000, for 7,106 to 22,542 hours of work, about 8.8 person-years for 5 to 17 engineers
Difficulty of the problem
High, 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: 462,400 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.
Fix the listed violations: import through the target package's declared public entry rather than a deep path into its internals or a relative path into its directory (69 rows); move the shared test helper into a source directory production code may depend on (1 row).
Raises the score by about 3 points · Medium effort · Import Boundaries
3
Break each cycle by extracting the shared piece into a module both sides can import.
Raises the score by about 3 points · Medium effort · Circular Imports
Diagnosis: what the measurements show together
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €1,300,000 to build again, about 8.8 person-years of work. Its weakest lens is Accessibility, at 45 (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 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 1,990,232 lines over the last 90 days, which is about 8,071,496 lines a year. At that pace, the extra work comes to an estimated 1073.8 to 6442.6 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
2174 modules, with 1404 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; 2134 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.
apps.activitypub.src.api.activitypub uses apps.admin.src.editor.card-config, so a change to apps.admin.src.editor.card-config can break apps.activitypub.src.api.activitypub, while a change to apps.activitypub.src.api.activitypub can't break apps.admin.src.editor.card-config.
Position
Below the diagonal: apps.activitypub.src.api.activitypub uses a module listed above it, which is the healthy direction.
apps.admin-x-framework.src.api uses apps.admin-x-framework.src.api.member-custom-fields, so a change to apps.admin-x-framework.src.api.member-custom-fields can break apps.admin-x-framework.src.api, while a change to apps.admin-x-framework.src.api can't break apps.admin-x-framework.src.api.member-custom-fields.
Position
Below the diagonal: apps.admin-x-framework.src.api uses a module listed above it, which is the healthy direction.
apps.admin-x-framework.src.utils.errors uses ghost.core.server.adapters.upgrade.HttpUpgradeAdapter, so a change to ghost.core.server.adapters.upgrade.HttpUpgradeAdapter can break apps.admin-x-framework.src.utils.errors, while a change to apps.admin-x-framework.src.utils.errors can't break ghost.core.server.adapters.upgrade.HttpUpgradeAdapter.
Position
Below the diagonal: apps.admin-x-framework.src.utils.errors uses a module listed above it, which is the healthy direction.
apps.admin.src.editor.engine.save-engine uses apps.admin-x-framework.src.api.content-types, so a change to apps.admin-x-framework.src.api.content-types can break apps.admin.src.editor.engine.save-engine, while a change to apps.admin.src.editor.engine.save-engine can't break apps.admin-x-framework.src.api.content-types.
Position
Below the diagonal: apps.admin.src.editor.engine.save-engine uses a module listed above it, which is the healthy direction.
apps.admin.src.editor.publish.flow-post uses apps.admin-x-framework.src.api.content-types, so a change to apps.admin-x-framework.src.api.content-types can break apps.admin.src.editor.publish.flow-post, while a change to apps.admin.src.editor.publish.flow-post can't break apps.admin-x-framework.src.api.content-types.
Position
Below the diagonal: apps.admin.src.editor.publish.flow-post uses a module listed above it, which is the healthy direction.
apps.admin.src.editor.publish.publish-options uses apps.admin-x-framework.src.api.content-types, so a change to apps.admin-x-framework.src.api.content-types can break apps.admin.src.editor.publish.publish-options, while a change to apps.admin.src.editor.publish.publish-options can't break apps.admin-x-framework.src.api.content-types.
Position
Below the diagonal: apps.admin.src.editor.publish.publish-options uses a module listed above it, which is the healthy direction.
apps.admin.src.layout.app-sidebar uses apps.admin.src.posts.list.post-resource, so a change to apps.admin.src.posts.list.post-resource can break apps.admin.src.layout.app-sidebar, while a change to apps.admin.src.layout.app-sidebar can't break apps.admin.src.posts.list.post-resource.
Position
Below the diagonal: apps.admin.src.layout.app-sidebar uses a module listed above it, which is the healthy direction.
apps.admin.src.members uses apps.shade.src.components.patterns.filters, so a change to apps.shade.src.components.patterns.filters can break apps.admin.src.members, while a change to apps.admin.src.members can't break apps.shade.src.components.patterns.filters.
Position
Below the diagonal: apps.admin.src.members uses a module listed above it, which is the healthy direction.
apps.admin.src.posts.list uses apps.admin-x-framework.src.api.content-types, so a change to apps.admin-x-framework.src.api.content-types can break apps.admin.src.posts.list, while a change to apps.admin.src.posts.list can't break apps.admin-x-framework.src.api.content-types.
Position
Below the diagonal: apps.admin.src.posts.list uses a module listed above it, which is the healthy direction.
apps.admin.src.posts.list uses apps.admin.src.posts.list.post-resource, so a change to apps.admin.src.posts.list.post-resource can break apps.admin.src.posts.list, while a change to apps.admin.src.posts.list can't break apps.admin.src.posts.list.post-resource.
Position
Below the diagonal: apps.admin.src.posts.list uses a module listed above it, which is the healthy direction.
apps.admin.src.posts.list.components uses apps.admin.src.posts.list.post-resource, so a change to apps.admin.src.posts.list.post-resource can break apps.admin.src.posts.list.components, while a change to apps.admin.src.posts.list.components can't break apps.admin.src.posts.list.post-resource.
Position
Below the diagonal: apps.admin.src.posts.list.components uses a module listed above it, which is the healthy direction.
apps.admin.src.editor.publish uses apps.admin.src.editor.engine.save-engine, so a change to apps.admin.src.editor.engine.save-engine can break apps.admin.src.editor.publish, while a change to apps.admin.src.editor.publish can't break apps.admin.src.editor.engine.save-engine.
Position
Below the diagonal: apps.admin.src.editor.publish uses a module listed above it, which is the healthy direction.
apps.admin.src.editor.publish uses apps.admin.src.editor.publish.flow-post, so a change to apps.admin.src.editor.publish.flow-post can break apps.admin.src.editor.publish, while a change to apps.admin.src.editor.publish can't break apps.admin.src.editor.publish.flow-post.
Position
Below the diagonal: apps.admin.src.editor.publish uses a module listed above it, which is the healthy direction.
apps.admin.src.editor.publish uses apps.admin.src.editor.publish.publish-options, so a change to apps.admin.src.editor.publish.publish-options can break apps.admin.src.editor.publish, while a change to apps.admin.src.editor.publish can't break apps.admin.src.editor.publish.publish-options.
Position
Below the diagonal: apps.admin.src.editor.publish uses a module listed above it, which is the healthy direction.
apps.admin.src.editor.session.editor-session uses apps.admin-x-framework.src.api.content-types, so a change to apps.admin-x-framework.src.api.content-types can break apps.admin.src.editor.session.editor-session, while a change to apps.admin.src.editor.session.editor-session can't break apps.admin-x-framework.src.api.content-types.
Position
Below the diagonal: apps.admin.src.editor.session.editor-session uses a module listed above it, which is the healthy direction.
apps.admin.src.editor.session.editor-session uses apps.admin.src.editor.engine.save-engine, so a change to apps.admin.src.editor.engine.save-engine can break apps.admin.src.editor.session.editor-session, while a change to apps.admin.src.editor.session.editor-session can't break apps.admin.src.editor.engine.save-engine.
Position
Below the diagonal: apps.admin.src.editor.session.editor-session uses a module listed above it, which is the healthy direction.
apps.admin.src.editor.session.use-editor-session uses apps.admin.src.editor.card-config, so a change to apps.admin.src.editor.card-config can break apps.admin.src.editor.session.use-editor-session, while a change to apps.admin.src.editor.session.use-editor-session can't break apps.admin.src.editor.card-config.
Position
Below the diagonal: apps.admin.src.editor.session.use-editor-session uses a module listed above it, which is the healthy direction.
apps.admin.src.editor.session.use-editor-session uses apps.admin.src.editor.engine.save-engine, so a change to apps.admin.src.editor.engine.save-engine can break apps.admin.src.editor.session.use-editor-session, while a change to apps.admin.src.editor.session.use-editor-session can't break apps.admin.src.editor.engine.save-engine.
Position
Below the diagonal: apps.admin.src.editor.session.use-editor-session uses a module listed above it, which is the healthy direction.
ghost.core.server.services.app-installations uses apps.admin-x-framework.src.utils.errors, so a change to apps.admin-x-framework.src.utils.errors can break ghost.core.server.services.app-installations, while a change to ghost.core.server.services.app-installations can't break apps.admin-x-framework.src.utils.errors.
Position
Below the diagonal: ghost.core.server.services.app-installations uses a module listed above it, which is the healthy direction.
ghost.core.server.services.members-metafields uses apps.admin-x-framework.src.utils.errors, so a change to apps.admin-x-framework.src.utils.errors can break ghost.core.server.services.members-metafields, while a change to ghost.core.server.services.members-metafields can't break apps.admin-x-framework.src.utils.errors.
Position
Below the diagonal: ghost.core.server.services.members-metafields uses a module listed above it, which is the healthy direction.
apps.admin.src.editor uses apps.admin.src.editor.card-config, so a change to apps.admin.src.editor.card-config can break apps.admin.src.editor, while a change to apps.admin.src.editor can't break apps.admin.src.editor.card-config.
Position
Below the diagonal: apps.admin.src.editor uses a module listed above it, which is the healthy direction.
apps.admin.src.editor uses apps.admin.src.editor.engine.save-engine, so a change to apps.admin.src.editor.engine.save-engine can break apps.admin.src.editor, while a change to apps.admin.src.editor can't break apps.admin.src.editor.engine.save-engine.
Position
Below the diagonal: apps.admin.src.editor uses a module listed above it, which is the healthy direction.
apps.admin.src.editor uses apps.admin.src.editor.publish.flow-post, so a change to apps.admin.src.editor.publish.flow-post can break apps.admin.src.editor, while a change to apps.admin.src.editor can't break apps.admin.src.editor.publish.flow-post.
Position
Below the diagonal: apps.admin.src.editor uses a module listed above it, which is the healthy direction.
apps.admin.src.editor uses apps.admin.src.editor.session.editor-session, so a change to apps.admin.src.editor.session.editor-session can break apps.admin.src.editor, while a change to apps.admin.src.editor can't break apps.admin.src.editor.session.editor-session.
Position
Below the diagonal: apps.admin.src.editor uses a module listed above it, which is the healthy direction.
apps.admin.src.editor.session uses apps.admin-x-framework.src.api.content-types, so a change to apps.admin-x-framework.src.api.content-types can break apps.admin.src.editor.session, while a change to apps.admin.src.editor.session can't break apps.admin-x-framework.src.api.content-types.
Position
Below the diagonal: apps.admin.src.editor.session uses a module listed above it, which is the healthy direction.
apps.admin.src.editor.session uses apps.admin.src.editor.card-config, so a change to apps.admin.src.editor.card-config can break apps.admin.src.editor.session, while a change to apps.admin.src.editor.session can't break apps.admin.src.editor.card-config.
Position
Below the diagonal: apps.admin.src.editor.session uses a module listed above it, which is the healthy direction.
apps.admin.src.editor.session uses apps.admin-x-framework.src.utils.errors, so a change to apps.admin-x-framework.src.utils.errors can break apps.admin.src.editor.session, while a change to apps.admin.src.editor.session can't break apps.admin-x-framework.src.utils.errors.
Position
Below the diagonal: apps.admin.src.editor.session uses a module listed above it, which is the healthy direction.
apps.admin.src.editor.session uses apps.admin.src.editor.engine.save-engine, so a change to apps.admin.src.editor.engine.save-engine can break apps.admin.src.editor.session, while a change to apps.admin.src.editor.session can't break apps.admin.src.editor.engine.save-engine.
Position
Below the diagonal: apps.admin.src.editor.session uses a module listed above it, which is the healthy direction.
apps.admin.src.editor.session uses apps.admin.src.editor.session.editor-session, so a change to apps.admin.src.editor.session.editor-session can break apps.admin.src.editor.session, while a change to apps.admin.src.editor.session can't break apps.admin.src.editor.session.editor-session.
Position
Below the diagonal: apps.admin.src.editor.session uses a module listed above it, which is the healthy direction.
apps.admin.src.editor.session uses apps.admin.src.editor.session.use-editor-session, so a change to apps.admin.src.editor.session.use-editor-session can break apps.admin.src.editor.session, while a change to apps.admin.src.editor.session can't break apps.admin.src.editor.session.use-editor-session.
Position
Below the diagonal: apps.admin.src.editor.session uses a module listed above it, which is the healthy direction.
apps.admin.src.editor.settings uses apps.admin.src.editor.card-config, so a change to apps.admin.src.editor.card-config can break apps.admin.src.editor.settings, while a change to apps.admin.src.editor.settings can't break apps.admin.src.editor.card-config.
Position
Below the diagonal: apps.admin.src.editor.settings uses a module listed above it, which is the healthy direction.
apps.admin.src.editor.settings uses apps.admin.src.editor.session.use-editor-session, so a change to apps.admin.src.editor.session.use-editor-session can break apps.admin.src.editor.settings, while a change to apps.admin.src.editor.settings can't break apps.admin.src.editor.session.use-editor-session.
Position
Below the diagonal: apps.admin.src.editor.settings uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 61% · Adequate · gated by 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
231
High / Critical
A02:2025 — Security Misconfiguration
18
High / Critical
A07:2025 — Authentication Failures
7
High / Critical
A03:2025 — Software Supply Chain Failures
7
Medium
A01:2025 — Broken Access Control
1
Medium
Roadmap
Top priorities: Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href; Fix the listed violations: import through the target package's declared public entry rather than a deep path into its internals or a relative path into its directory (69 rows); move the shared test helper into a source directory production code may depend on (1 row); Break each cycle by extracting the shared piece into a module both sides can import.
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.
Fix the listed violations: import through the target package's declared public entry rather than a deep path into its internals or a relative path into its directory (69 rows); move the shared test helper into a source directory production code may depend on (1 row).
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.
Test Quality: No assertions (empty test): rechecks limit readiness when the mounted flow moves to another post
REDACTED
2.8
Slop
IaC & Container Security: High IaC: REDACTED
REDACTED
3.7
Slop
Static Analysis (SAST): High: REDACTED
REDACTED
3.7
Slop
IaC & Container Security: High IaC: REDACTED
ghost/package.json
4.0
Slop
License Compliance: Banned license: ua-parser-js
REDACTED
4.0
Mixed
Static Analysis (SAST): Medium: REDACTED
REDACTED
4.0
Mixed
Static Analysis (SAST): Medium: REDACTED
REDACTED
4.0
Mixed
Static Analysis (SAST): Medium: REDACTED
REDACTED
4.0
Mixed
Static Analysis (SAST): Medium: REDACTED
REDACTED
4.0
Mixed
Static Analysis (SAST): Medium: REDACTED
REDACTED
4.1
Mixed
Static Analysis (SAST): Medium: REDACTED
REDACTED
4.2
Mixed
Static Analysis (SAST): Medium: REDACTED
REDACTED
4.3
Mixed
Static Analysis (SAST): High: REDACTED
REDACTED
4.4
Mixed
IaC & Container Security: High IaC: REDACTED
REDACTED
4.4
Mixed
IaC & Container Security: High IaC: REDACTED
REDACTED
4.6
Mixed
Static Analysis (SAST): Medium: REDACTED
REDACTED
4.9
Mixed
Static Analysis (SAST): Medium: REDACTED
REDACTED
4.9
Mixed
Static Analysis (SAST): Medium: REDACTED
How the grades work
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 175
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 — 4155
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 — 846
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 3
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 94 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 — 94 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, 5005 of 5176 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.
D11 Test Reliability — 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. Test reliability for the vitest suite in the repository root was NOT MEASURED: the dependency install for the repository root failed in the analyzer sandbox (ERR_PNPM_BROKEN_LOCKFILE The lockfile at "REDACTED" is broken: expected a single document in the stream, but found more), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — 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. Test reliability for the vitest suite in apps/activitypub/ was NOT MEASURED: the dependency install for apps/activitypub/ failed in the analyzer sandbox (ERR_PNPM_BROKEN_LOCKFILE The lockfile at "REDACTED" is broken: expected a single document in the stream, but found more), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — 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. Test reliability for the vitest suite in apps/admin/ was NOT MEASURED: the dependency install for apps/admin/ failed in the analyzer sandbox (ERR_PNPM_BROKEN_LOCKFILE The lockfile at "REDACTED" is broken: expected a single document in the stream, but found more), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — 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. Test reliability for the vitest suite in apps/admin-toolbar/ was NOT MEASURED: the dependency install for apps/admin-toolbar/ failed in the analyzer sandbox (ERR_PNPM_BROKEN_LOCKFILE The lockfile at "REDACTED" is broken: expected a single document in the stream, but found more), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — 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. Test reliability for the vitest suite in apps/admin-x-framework/ was NOT MEASURED: the dependency install for apps/admin-x-framework/ failed in the analyzer sandbox (ERR_PNPM_BROKEN_LOCKFILE The lockfile at "REDACTED" is broken: expected a single document in the stream, but found more), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — 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. Test reliability for the vitest suite in apps/announcement-bar/ was NOT MEASURED: the dependency install for apps/announcement-bar/ failed in the analyzer sandbox (ERR_PNPM_BROKEN_LOCKFILE The lockfile at "REDACTED" is broken: expected a single document in the stream, but found more), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — 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. Test reliability for the vitest suite in apps/comments-ui/ was NOT MEASURED: the dependency install for apps/comments-ui/ failed in the analyzer sandbox (ERR_PNPM_BROKEN_LOCKFILE The lockfile at "REDACTED" is broken: expected a single document in the stream, but found more), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — 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. Test reliability for the vitest suite in apps/portal/ was NOT MEASURED: the dependency install for apps/portal/ failed in the analyzer sandbox (ERR_PNPM_BROKEN_LOCKFILE The lockfile at "REDACTED" is broken: expected a single document in the stream, but found more), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — 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. Test reliability for the vitest suite in apps/shade/ was NOT MEASURED: the dependency install for apps/shade/ failed in the analyzer sandbox (ERR_PNPM_BROKEN_LOCKFILE The lockfile at "REDACTED" is broken: expected a single document in the stream, but found more), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — 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. Test reliability for the vitest suite in apps/sodo-search/ was NOT MEASURED: the dependency install for apps/sodo-search/ failed in the analyzer sandbox (ERR_PNPM_BROKEN_LOCKFILE The lockfile at "REDACTED" is broken: expected a single document in the stream, but found more), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 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 on C# first (docs/plans/deterministic-engine.md, P5): 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.
D23 Boundary Type-Coupling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind measured 0/40 valid on a seeded held-out sample of its rows on 98 C# repositories (docs/plans/deterministic-engine/adjudication/P5c-D23-units.md, "Version 1 ON MAIN"): the noise rows were dependencies on layer folders, shared cores and grouping folders read as contexts. By the pre-registered fallback (PREREGISTRATION v37) it publishes no row until version 4 passes its gate. The candidates are counted here, not reported as findings, and the score does not include them.
D31 IaC & Container Security — 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. Checkov ran but its report could not be read (checkov produced no output — not a clean result). Every misconfiguration only checkov reports — most of its Terraform, CloudFormation, Bicep and Ansible policies — is absent from this card, so its absence here is not evidence those resources are configured correctly.
D32 Data Compliance (PII/GDPR) — 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. `apps/admin-x-framework/src/api/automation-run-history.ts`, `apps/admin-x-framework/src/api/automations.ts`, `apps/admin-x-framework/src/utils/api/fetch-api.ts`, `apps/admin-x-framework/src/utils/deferred.ts`, `apps/admin/src/analytics/views/stats/growth/components/new-subscribers-cadence.tsx`, … (+181 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.
AC1 Text alternatives — 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 renders user interface from a TEMPLATE LANGUAGE — 1 Handlebars/Ember template file(s) carrying 74 markup element(s) (e.g. REDACTED) — and the accessibility cards on this run were measured over the 1118 parsed markup document(s) ONLY. The markup model reads .html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx, html`…` templates and DOM-assigned HTML strings in .ts/.js, the .erb/.ejs/.eex/.heex/.leex/.twig/.jinja/.j2/.liquid/.njk/.hbs/.mustache/.blade.php/.gohtml template languages, .astro/.templ/.pug/.jade/.haml/.slim, and the kotlinx.html/Compose HTML/kotlin-react, Giraffe/Falco/Fable.React/Feliz/Bolero and Jaspr builder DSLs; the file(s) above were REFUSED rather than unsupported — a template whose element NAME comes from an expression, or an Astro component whose frontmatter fence is never closed, leaves the element's identity unknown, and every accessibility rule is a statement about a NAMED element — so those views were not merely unparsed but unenumerated: not one of their elements entered the population any card scored. Their absence from the counts above is a gap in this analyzer's frontend coverage — not a finding that they carry text alternatives, labels, keyboard semantics or correct ARIA.
AC1 Text alternatives — 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 builds user interface as HTML STRINGS — 12 script file(s) building 37 markup element(s) as HTML strings, carrying 0 role/aria/tabindex attribute(s) (e.g. koenig/koenig-lexical/src/nodes/EmailNode.tsx, koenig/kg-unsplash-selector/src/ui/UnsplashImage.tsx, REDACTED) — that this run could NOT read, and the accessibility cards beside it were measured over the 1118 parsed markup document(s) only. The markup model reads .html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx, html`…` templates and DOM-assigned HTML strings in .ts/.js, the .erb/.ejs/.eex/.heex/.leex/.twig/.jinja/.j2/.liquid/.njk/.hbs/.mustache/.blade.php/.gohtml template languages, .astro/.templ/.pug/.jade/.haml/.slim, and the kotlinx.html/Compose HTML/kotlin-react, Giraffe/Falco/Fable.React/Feliz/Bolero and Jaspr builder DSLs; the runs counted here are the ones its producer could not take — an element whose TAG NAME is a concatenated expression has no statically knowable identity, and a string-built run inside a .jsx/.tsx file is already read as JSX — so they were not merely unparsed but unenumerated: not one of their elements entered the population any card scored. Their absence from the counts above is a gap in this analyzer's frontend coverage — not a finding that they carry text alternatives, labels, keyboard semantics or correct ARIA.
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. This repository renders user interface from a TEMPLATE LANGUAGE — 1 Handlebars/Ember template file(s) carrying 74 markup element(s) (e.g. REDACTED) — and the accessibility cards on this run were measured over the 1118 parsed markup document(s) ONLY. The markup model reads .html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx, html`…` templates and DOM-assigned HTML strings in .ts/.js, the .erb/.ejs/.eex/.heex/.leex/.twig/.jinja/.j2/.liquid/.njk/.hbs/.mustache/.blade.php/.gohtml template languages, .astro/.templ/.pug/.jade/.haml/.slim, and the kotlinx.html/Compose HTML/kotlin-react, Giraffe/Falco/Fable.React/Feliz/Bolero and Jaspr builder DSLs; the file(s) above were REFUSED rather than unsupported — a template whose element NAME comes from an expression, or an Astro component whose frontmatter fence is never closed, leaves the element's identity unknown, and every accessibility rule is a statement about a NAMED element — so those views were not merely unparsed but unenumerated: not one of their elements entered the population any card scored. Their absence from the counts above is a gap in this analyzer's frontend coverage — not a finding that they carry text alternatives, labels, keyboard semantics or correct ARIA.
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. This repository builds user interface as HTML STRINGS — 12 script file(s) building 37 markup element(s) as HTML strings, carrying 0 role/aria/tabindex attribute(s) (e.g. koenig/koenig-lexical/src/nodes/EmailNode.tsx, koenig/kg-unsplash-selector/src/ui/UnsplashImage.tsx, REDACTED) — that this run could NOT read, and the accessibility cards beside it were measured over the 1118 parsed markup document(s) only. The markup model reads .html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx, html`…` templates and DOM-assigned HTML strings in .ts/.js, the .erb/.ejs/.eex/.heex/.leex/.twig/.jinja/.j2/.liquid/.njk/.hbs/.mustache/.blade.php/.gohtml template languages, .astro/.templ/.pug/.jade/.haml/.slim, and the kotlinx.html/Compose HTML/kotlin-react, Giraffe/Falco/Fable.React/Feliz/Bolero and Jaspr builder DSLs; the runs counted here are the ones its producer could not take — an element whose TAG NAME is a concatenated expression has no statically knowable identity, and a string-built run inside a .jsx/.tsx file is already read as JSX — so they were not merely unparsed but unenumerated: not one of their elements entered the population any card scored. Their absence from the counts above is a gap in this analyzer's frontend coverage — not a finding that they carry text alternatives, labels, keyboard semantics or correct ARIA.
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. 35 further occurrence(s) are not listed individually; the score already reflects all 75.
AC3 Page structure — 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 renders user interface from a TEMPLATE LANGUAGE — 1 Handlebars/Ember template file(s) carrying 74 markup element(s) (e.g. REDACTED) — and the accessibility cards on this run were measured over the 1118 parsed markup document(s) ONLY. The markup model reads .html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx, html`…` templates and DOM-assigned HTML strings in .ts/.js, the .erb/.ejs/.eex/.heex/.leex/.twig/.jinja/.j2/.liquid/.njk/.hbs/.mustache/.blade.php/.gohtml template languages, .astro/.templ/.pug/.jade/.haml/.slim, and the kotlinx.html/Compose HTML/kotlin-react, Giraffe/Falco/Fable.React/Feliz/Bolero and Jaspr builder DSLs; the file(s) above were REFUSED rather than unsupported — a template whose element NAME comes from an expression, or an Astro component whose frontmatter fence is never closed, leaves the element's identity unknown, and every accessibility rule is a statement about a NAMED element — so those views were not merely unparsed but unenumerated: not one of their elements entered the population any card scored. Their absence from the counts above is a gap in this analyzer's frontend coverage — not a finding that they carry text alternatives, labels, keyboard semantics or correct ARIA.
AC3 Page structure — 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 builds user interface as HTML STRINGS — 12 script file(s) building 37 markup element(s) as HTML strings, carrying 0 role/aria/tabindex attribute(s) (e.g. koenig/koenig-lexical/src/nodes/EmailNode.tsx, koenig/kg-unsplash-selector/src/ui/UnsplashImage.tsx, REDACTED) — that this run could NOT read, and the accessibility cards beside it were measured over the 1118 parsed markup document(s) only. The markup model reads .html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx, html`…` templates and DOM-assigned HTML strings in .ts/.js, the .erb/.ejs/.eex/.heex/.leex/.twig/.jinja/.j2/.liquid/.njk/.hbs/.mustache/.blade.php/.gohtml template languages, .astro/.templ/.pug/.jade/.haml/.slim, and the kotlinx.html/Compose HTML/kotlin-react, Giraffe/Falco/Fable.React/Feliz/Bolero and Jaspr builder DSLs; the runs counted here are the ones its producer could not take — an element whose TAG NAME is a concatenated expression has no statically knowable identity, and a string-built run inside a .jsx/.tsx file is already read as JSX — so they were not merely unparsed but unenumerated: not one of their elements entered the population any card scored. Their absence from the counts above is a gap in this analyzer's frontend coverage — not a finding that they carry text alternatives, labels, keyboard semantics or correct ARIA.
AC3 Page structure — 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. 110 further occurrence(s) are not listed individually; the score already reflects all 150.
AC4 Keyboard semantics — 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 renders user interface from a TEMPLATE LANGUAGE — 1 Handlebars/Ember template file(s) carrying 74 markup element(s) (e.g. REDACTED) — and the accessibility cards on this run were measured over the 1118 parsed markup document(s) ONLY. The markup model reads .html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx, html`…` templates and DOM-assigned HTML strings in .ts/.js, the .erb/.ejs/.eex/.heex/.leex/.twig/.jinja/.j2/.liquid/.njk/.hbs/.mustache/.blade.php/.gohtml template languages, .astro/.templ/.pug/.jade/.haml/.slim, and the kotlinx.html/Compose HTML/kotlin-react, Giraffe/Falco/Fable.React/Feliz/Bolero and Jaspr builder DSLs; the file(s) above were REFUSED rather than unsupported — a template whose element NAME comes from an expression, or an Astro component whose frontmatter fence is never closed, leaves the element's identity unknown, and every accessibility rule is a statement about a NAMED element — so those views were not merely unparsed but unenumerated: not one of their elements entered the population any card scored. Their absence from the counts above is a gap in this analyzer's frontend coverage — not a finding that they carry text alternatives, labels, keyboard semantics or correct ARIA.
AC4 Keyboard semantics — 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 builds user interface as HTML STRINGS — 12 script file(s) building 37 markup element(s) as HTML strings, carrying 0 role/aria/tabindex attribute(s) (e.g. koenig/koenig-lexical/src/nodes/EmailNode.tsx, koenig/kg-unsplash-selector/src/ui/UnsplashImage.tsx, REDACTED) — that this run could NOT read, and the accessibility cards beside it were measured over the 1118 parsed markup document(s) only. The markup model reads .html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx, html`…` templates and DOM-assigned HTML strings in .ts/.js, the .erb/.ejs/.eex/.heex/.leex/.twig/.jinja/.j2/.liquid/.njk/.hbs/.mustache/.blade.php/.gohtml template languages, .astro/.templ/.pug/.jade/.haml/.slim, and the kotlinx.html/Compose HTML/kotlin-react, Giraffe/Falco/Fable.React/Feliz/Bolero and Jaspr builder DSLs; the runs counted here are the ones its producer could not take — an element whose TAG NAME is a concatenated expression has no statically knowable identity, and a string-built run inside a .jsx/.tsx file is already read as JSX — so they were not merely unparsed but unenumerated: not one of their elements entered the population any card scored. Their absence from the counts above is a gap in this analyzer's frontend coverage — not a finding that they carry text alternatives, labels, keyboard semantics or correct ARIA.
AC4 Keyboard semantics — 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. 38 further occurrence(s) are not listed individually; the score already reflects all 78.
AC5 ARIA correctness — 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 renders user interface from a TEMPLATE LANGUAGE — 1 Handlebars/Ember template file(s) carrying 74 markup element(s) (e.g. REDACTED) — and the accessibility cards on this run were measured over the 1118 parsed markup document(s) ONLY. The markup model reads .html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx, html`…` templates and DOM-assigned HTML strings in .ts/.js, the .erb/.ejs/.eex/.heex/.leex/.twig/.jinja/.j2/.liquid/.njk/.hbs/.mustache/.blade.php/.gohtml template languages, .astro/.templ/.pug/.jade/.haml/.slim, and the kotlinx.html/Compose HTML/kotlin-react, Giraffe/Falco/Fable.React/Feliz/Bolero and Jaspr builder DSLs; the file(s) above were REFUSED rather than unsupported — a template whose element NAME comes from an expression, or an Astro component whose frontmatter fence is never closed, leaves the element's identity unknown, and every accessibility rule is a statement about a NAMED element — so those views were not merely unparsed but unenumerated: not one of their elements entered the population any card scored. Their absence from the counts above is a gap in this analyzer's frontend coverage — not a finding that they carry text alternatives, labels, keyboard semantics or correct ARIA.
AC5 ARIA correctness — 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 builds user interface as HTML STRINGS — 12 script file(s) building 37 markup element(s) as HTML strings, carrying 0 role/aria/tabindex attribute(s) (e.g. koenig/koenig-lexical/src/nodes/EmailNode.tsx, koenig/kg-unsplash-selector/src/ui/UnsplashImage.tsx, REDACTED) — that this run could NOT read, and the accessibility cards beside it were measured over the 1118 parsed markup document(s) only. The markup model reads .html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx, html`…` templates and DOM-assigned HTML strings in .ts/.js, the .erb/.ejs/.eex/.heex/.leex/.twig/.jinja/.j2/.liquid/.njk/.hbs/.mustache/.blade.php/.gohtml template languages, .astro/.templ/.pug/.jade/.haml/.slim, and the kotlinx.html/Compose HTML/kotlin-react, Giraffe/Falco/Fable.React/Feliz/Bolero and Jaspr builder DSLs; the runs counted here are the ones its producer could not take — an element whose TAG NAME is a concatenated expression has no statically knowable identity, and a string-built run inside a .jsx/.tsx file is already read as JSX — so they were not merely unparsed but unenumerated: not one of their elements entered the population any card scored. Their absence from the counts above is a gap in this analyzer's frontend coverage — not a finding that they carry text alternatives, labels, keyboard semantics or correct ARIA.
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. This repository renders user interface from a TEMPLATE LANGUAGE — 1 Handlebars/Ember template file(s) carrying 74 markup element(s) (e.g. REDACTED) — and the accessibility cards on this run were measured over the 1118 parsed markup document(s) ONLY. The markup model reads .html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx, html`…` templates and DOM-assigned HTML strings in .ts/.js, the .erb/.ejs/.eex/.heex/.leex/.twig/.jinja/.j2/.liquid/.njk/.hbs/.mustache/.blade.php/.gohtml template languages, .astro/.templ/.pug/.jade/.haml/.slim, and the kotlinx.html/Compose HTML/kotlin-react, Giraffe/Falco/Fable.React/Feliz/Bolero and Jaspr builder DSLs; the file(s) above were REFUSED rather than unsupported — a template whose element NAME comes from an expression, or an Astro component whose frontmatter fence is never closed, leaves the element's identity unknown, and every accessibility rule is a statement about a NAMED element — so those views were not merely unparsed but unenumerated: not one of their elements entered the population any card scored. Their absence from the counts above is a gap in this analyzer's frontend coverage — not a finding that they carry text alternatives, labels, keyboard semantics or correct ARIA.
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. This repository builds user interface as HTML STRINGS — 12 script file(s) building 37 markup element(s) as HTML strings, carrying 0 role/aria/tabindex attribute(s) (e.g. koenig/koenig-lexical/src/nodes/EmailNode.tsx, koenig/kg-unsplash-selector/src/ui/UnsplashImage.tsx, REDACTED) — that this run could NOT read, and the accessibility cards beside it were measured over the 1118 parsed markup document(s) only. The markup model reads .html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx, html`…` templates and DOM-assigned HTML strings in .ts/.js, the .erb/.ejs/.eex/.heex/.leex/.twig/.jinja/.j2/.liquid/.njk/.hbs/.mustache/.blade.php/.gohtml template languages, .astro/.templ/.pug/.jade/.haml/.slim, and the kotlinx.html/Compose HTML/kotlin-react, Giraffe/Falco/Fable.React/Feliz/Bolero and Jaspr builder DSLs; the runs counted here are the ones its producer could not take — an element whose TAG NAME is a concatenated expression has no statically knowable identity, and a string-built run inside a .jsx/.tsx file is already read as JSX — so they were not merely unparsed but unenumerated: not one of their elements entered the population any card scored. Their absence from the counts above is a gap in this analyzer's frontend coverage — not a finding that they carry text alternatives, labels, keyboard semantics or correct ARIA.
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. 33 further occurrence(s) are not listed individually; the score already reflects all 73.
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 DockerCompose (compose.dev.analytics.yaml). compose up failed (exit 15 — the compose project is invalid) — service "ghost-dev" has neither an image nor a build context specified: invalid compose project; runtime evidence skipped.
DM9 Scattered domain decisions — 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. Arm two tells a construction that PRODUCES a measurement from one that merely passes it along, and this repository's frontend does not compute that fact. A measurement built independently in two places would not appear above.
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.
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. 960 further occurrence(s) are not listed individually; the score already reflects all 1000.
R11 Import Boundaries — 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. 30 further occurrence(s) are not listed individually; the score already reflects all 70.
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. 674 further occurrence(s) are not listed individually; the score already reflects all 714.
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. 135 further occurrence(s) are not listed individually; the score already reflects all 175.
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. 75 further occurrence(s) are not listed individually; the score already reflects all 115.
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. 159 further occurrence(s) are not listed individually; the score already reflects all 199.
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. 225 further occurrence(s) are not listed individually; the score already reflects all 265.
X24 Document value interpolated into markup unescaped — 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. 12 further occurrence(s) are not listed individually; the score already reflects all 52.
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. 72 further occurrence(s) are not listed individually; the score already reflects all 112.
X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP 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.
X7 Silent fallback defaults — 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. 5 further occurrence(s) are not listed individually; the score already reflects all 45.
Repo exclusion declarations: 9 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.
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.
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.
D8 Code Coverage: Coverage is measured by building and running the test suite inside our isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D11 Test Reliability: Flakiness is inferred from history/markers — we run the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
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.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
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.
D23 Boundary Type-Coupling: Boundary leakage is detected from type references across detected contexts — leaks that flow through primitives, serialization or shared infrastructure may not surface as a typed reference.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D32 Data Compliance (PII/GDPR): PII/GDPR signals are heuristic pattern matches in code — they flag likely handling concerns, not legal compliance, and cannot trace where data actually flows at runtime.
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 REDACTED (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.
DM4 Rich vs anemic model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of purity.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
464 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was linkSubscription at 130. A further 11 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 events.default at 36 — they are counted neither in the figure above nor in this dimension's score. 9 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: ghost/core/server/models/base/plugins/events.js (events.default at 36), ghost/core/server/models/base/plugins/crud.js (crud.default at 29), ghost/core/server/models/base/plugins/generate-slug.js (generate-slug.default at 27), ghost/core/server/models/base/plugins/sanitize.js (sanitize.default at 27), apps/portal/src/components/pages/gift/form-state.ts (form-state.parseGiftFormState at 21), and 4 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 416 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 2 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with linkSubscription (cyclomatic 130), onSaving (cyclomatic 121). — 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 2 together lifts Cyclomatic Complexity from 4.7 to about 4.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.
+ 480 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 2 bodies over 120 down to 120 or less in Cognitive Complexity — start with linkSubscription (cognitive 191), onSaving (cognitive 137). — 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 2 together lifts Cognitive Complexity from 3.2 to about 4.1/10, projected with the scoring formula itself and assuming each lands exactly at 120; 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 Classes6.8 / 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.
Resolve the 262 FunctionTooLong finding(s) in God Classes — start with REDACTED (5), use-activity-pub-queries.ts (3), REDACTED (3). — One of this dimension's main actionable groups (262 warning-level).
Resolve the 53 FileTooLong finding(s) in God Classes — start with sidebar.tsx (2), dots-pattern.tsx, REDACTED. — One of this dimension's main actionable groups (53 warning-level).
Resolve the 18 MethodTooLong finding(s) in God Classes — start with member-repository.js (4), product-repository.js (2), posts-stats-service.js (2). — 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.
Do you agree with this assessment?
D5 · Coupling8.0 / 10Strong✓ 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.
49 production modules (npm), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 13 module(s) off the main sequence, with abstractness counted on 44 of the 49 (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).
Off the main sequence: @internal/cfg-oxlint · ×12
Off the main sequence: @tryghost/app-contracts
What to do
Resolve the 12 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (12 warning-level).
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 9 Low cohesion finding(s) in Cohesion (LCOM4) — start with event-repository.js, REDACTED, REDACTED. — One of this dimension's main actionable groups (9 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the code is actually exercised by tests.
Method: Coverage from the analyzer's own run of the suite, computed per-file with structured exclusions for generated, trivial, and glue code. A coverage report found in the repository is never read. When the suite can't be built/run in-image, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.
Line coverage 95.2%. Measured from the JavaScript/TypeScript suite (node:test via `npm ci --ignore-scripts` in .github/scripts/i18n-review/; vitest in apps/admin-x-framework/: not run; vitest in apps/announcement-bar/: not run; vitest in apps/comments-ui/: not run; vitest in apps/portal/: not run; vitest in apps/shade/: not run; vitest in apps/sodo-search/: not run).
✓ On the Gold path — maintain.
Detailed fixes: d8_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality9.0 / 10Adequategated by 22 critical findings✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
61 skipped (42 with a documented reason), 1809 zero-assertion, 4 synchronised by a fixed sleep, no mocking-framework packages referenced (hand-written doubles or no mocking) across 26974 tests.
No assertions (empty test): can register without node loaded in editor · ×22koenig/kg-default-transforms/test/transforms/remove-at-link-nodes.test.ts:504
No assertions: does nothing when this checkout has no Codex stack · ×1787tools/gx/test/dev-lifecycle.test.ts:130
Skipped test: can copy/paste · ×19koenig/koenig-lexical/test/e2e/card-behaviour.test.ts:1861
Fixed-sleep synchronisation: does not coalesce fetches across a prefix_hash cycle (reset) · ×4ghost/test/unit/server/adapters/lib/redis/adapter-cache-redis.test.js:340
Mock-dominated test: ensure default serializers are called with apiConfig and frame · ×275packages/api-framework/test/serializers/handle.test.ts:34
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 22 No assertions (empty test) finding(s) in Test Quality — start with publish-flow.component.test.tsx (8), jobs-service.test.ts (2), site-exporter.test.ts (2). — One of this dimension's main actionable groups (22 issue-level).
Resolve the 1787 No assertions finding(s) in Test Quality — start with comments.test.js (61), ghost-head.test.js (53), members.test.js (53). — One of this dimension's main actionable groups (1787 warning-level).
Resolve the 19 Skipped test finding(s) in Test Quality — start with UnsplashSelector.test.ts (10), image-card.test.ts (2), card-behaviour.test.ts. — One of this dimension's main actionable groups (19 warning-level).
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests pass reliably, with no flakiness.
Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.
0 flaky across 1 measured tier(s). JavaScript/TypeScript (vitest via `pnpm install --frozen-lockfile --ignore-scripts` in the repository root; node:test via `npm ci --ignore-scripts` in .github/scripts/i18n-review/ (6 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in apps/activitypub/; vitest via `pnpm install --frozen-lockfile --ignore-scripts` in apps/admin/; vitest via `pnpm install --frozen-lockfile --ignore-scripts` in apps/admin-toolbar/; vitest via `pnpm install --frozen-lockfile --ignore-scripts` in apps/admin-x-framework/; vitest via `pnpm install --frozen-lockfile --ignore-scripts` in apps/announcement-bar/; vitest via `pnpm install --frozen-lockfile --ignore-scripts` in apps/comments-ui/; vitest via `pnpm install --frozen-lockfile --ignore-scripts` in apps/portal/; vitest via `pnpm install --frozen-lockfile --ignore-scripts` in apps/shade/; vitest via `pnpm install --frozen-lockfile --ignore-scripts` in apps/sodo-search/): measured (0 flaky).
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.
144 outdated direct production npm dependency(ies) of 266 graded, 0 pinning defect(s), across 59 REDACTED (55 of them the product) and 1 committed lockfile(s). Development dependencies are deliberately not graded for currency: that grade is about what SHIPS. 4 direct dependency(ies) — production, development or optional — are marked DEPRECATED by their publisher (the registry's per-version mark, or the lockfile's copy of it when the registry could not be asked); deprecated transitive packages are listed but not charged. Whether any is UNMAINTAINED is not graded — the registry publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either: that is a source question, and the frontend dependency lens (R8) answers it in this same run. Known CVEs in this dependency graph are D30's question, read from the manifest there.
Resolve the 39 Deprecated finding(s) in Dependency Hygiene — start with REDACTED (39). — One of this dimension's main actionable groups (39 warning-level).
Resolve the 37 Deprecated finding(s) in Dependency Hygiene — start with REDACTED (37). — One of this dimension's main actionable groups (37 recommendation-level).
Resolve the 12 Outdated (npm) finding(s) in Dependency Hygiene — start with REDACTED (12). — One of this dimension's main actionable groups (12 recommendation-level).
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
16 of 1558 shipped npm package(s) use a banned license. Licences were resolved from registry.npmjs.org over the 1558 package(s) this repository's committed lockfile installs for a consumer — its 268 production, optional and peer dependency(ies), across 55 product REDACTED manifest(s), and everything those install in turn. Its 795 `devDependencies` declaration(s), and every package only they reach, are excluded: a consumer installs none of them. ★ Each licence is the one the registry publishes for the package's CURRENT release rather than for the pinned version, which is the same caveat the Hex and RubyGems arms carry. 5 of them publish no licence this pass can read on registry.npmjs.org — an absent field, `UNLICENSED`, or a `SEE LICENSE IN <file>` pointer into a tarball this pass does not download; that is missing data, not a violation, and none of them is charged. This repository publishes itself under MIT, which is its own choice and is not judged here.
Resolve the 16 Banned license finding(s) in License Compliance — start with REDACTED (15), REDACTED. — One of this dimension's main actionable groups (16 issue-level).
Detailed fixes: d14_recommendation.md · top locations in Appendix A, every location in findings.md.
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: apps/admin/src/automations/components/canvas/automation-canvas.tsx (39×84=3276); apps/admin/src/editor/editor-screen.tsx (60×48=2880); apps/admin/src/automations/editor.tsx (28×101=2828) Repeated repair below the complexity floor: apps/admin/src/editor/session/error-mapping.ts (5 of 8 changes were fixes); apps/admin-x-framework/src/hooks/use-handle-error.ts (3 of 5 changes were fixes); apps/admin/src/editor/use-post-link-suggestions.ts (3 of 4 changes were fixes)
Resolve the 242 Hotspot finding(s) in Churn × Complexity Hotspots — start with api.js (2), importer.ts (2), overview.tsx (2). — One of this dimension's main actionable groups (242 warning-level).
Resolve the 5 Repeated repair finding(s) in Churn × Complexity Hotspots — start with error-mapping.ts, use-handle-error.ts, use-post-link-suggestions.ts. — One of this dimension's main actionable groups (5 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor8.6 / 10Strong✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
236 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is ghost/core/server/services/automations/database-automations-repository.ts. Counted over 1709 of the 4126 production source files in this repository: 2410 are under the ~2,400-byte size floor this dimension measures over, and the remaining 7 have no attributable history left to measure.
Off-boarding risk: anonymized user #1 · ×13
Further sole-owners (lower concentration)
What to do
Resolve the 13 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (13 recommendation-level).
Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d16_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.
36 deducted task-comment markers across 295539 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
Resolve the 36 TodoComment finding(s) in Explicit Debt — start with limit-service.test.ts (2), i18n.test.ts, denest.ts. — One of this dimension's main actionable groups (36 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
2 of 2 documentation facets pass in full. 150 document(s) read across 53 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 REDACTED. — 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 14 declarations measured against a convention their peers follow.
`emailCTATemplate` spells `CTA` where 13 names in the project spell it `Cta`koenig/kg-default-nodes/src/nodes/call-to-action/calltoaction-renderer.ts:95
What to do
Resolve the 1 `emailCTATemplate` spells `CTA` where 13 names in the project spell it… finding(s) in Naming Consistency — start with calltoaction-renderer.ts. — 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 domain types (IDs, enums, value objects) leak across bounded-context boundaries.
Method: Cross-context domain-type leakage via Roslyn structural classification (strongly-typed IDs / value objects) over every public surface. Exhaustive, deterministic, type-level aggregate-boundary check.
Coverage: Bounded contexts derived from NAMESPACE prefix (or graph-inferred where available); cross-boundary domain-type leakage then checked exhaustively over every public member of every type.
50 domain type(s) cross context boundaries across 44 contexts; they are measured and withheld (not published, not scored). Contexts: activitypub, admin, admin-api-schema, admin-toolbar, admin-x-framework, announcement-bar, api-framework, app-contracts, app-sdk, checkout, comments-ui, eslint and 32 more.
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.
doc comments repeat the names · ×4tools/scripts/ci/boot-modules.ts:25
What to do
Resolve the 173 redundant comment finding(s) in Comment Value — start with posts.test.js (6), screenshot.test.ts (4), browser-test-utils.ts (4). — One of this dimension's main actionable groups (173 recommendation-level).
Detailed fixes: d24_recommendation.md · top locations in Appendix A, every location in findings.md.
6 of 50 build units (npm) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
11 % of calls cross a namespace and 0 % go through an interface, but 88 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
6 finding(s): 0 critical, 6 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
REDACTED
What to do
Resolve the 5 REDACTED finding(s) in Secrets (history) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (5 issue-level).
Resolve the 1 High secret finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 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).
236 finding(s): 0 critical, 18 high, 210 medium, 8 low. semgrep hit a parse error in 207 file(s) — `.agents/setup` (lines 2–40), `.devcontainer/start-dev-stack.sh` (line 9), `apps/admin-x-framework/src/api/automation-run-history.ts` (lines 97–99, lines 115–117), `apps/admin-x-framework/src/api/automations.ts` (lines 190–192, lines 267–269), `apps/admin-x-framework/src/utils/api/fetch-api.ts` (line 211), … (+202 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 5 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
+ 22 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 4 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED, REDACTED. — One of this dimension's main actionable groups (4 issue-level).
Resolve the 4 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (4 issue-level).
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 3 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (3). — One of this dimension's main actionable groups (3 warning-level).
Resolve the 1 Medium vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 7 High IaC finding(s) in IaC & Container Security — start with REDACTED (6), REDACTED. — One of this dimension's main actionable groups (7 issue-level).
Resolve the 6 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (3), REDACTED (3). — One of this dimension's main actionable groups (6 warning-level).
Resolve the 5 Low IaC finding(s) in IaC & Container Security — start with REDACTED (3), REDACTED, REDACTED. — One of this dimension's main actionable groups (5 recommendation-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D32 · Data Compliance (PII/GDPR)9.0 / 10Stronggated by 1 serious finding✓ Tool-verified
What it measures: Likely personal-data (PII / GDPR) handling concerns — logging or storing data without safeguards.
Method: Heuristic PII/GDPR LEAK scan via semgrep across the repo, using our own ruleset: personal data crossing a boundary it should not — reaching a log/console sink, a URL or query string, or unprotected browser storage. Matches map to severity and a 0-10 wide normalizer. A clean sweep is unscored rather than an unearned 10, and is a statement about the leak paths checked only — this dimension does not inventory the personal data a repository holds (the personal-data map and the C1-C5 compliance cards do that), so it never reports that a repository has no personal-data surface. Reported LOUDLY as a measurement gap if the ruleset is missing from the analyzer image. Exhaustive over the leak paths, advisory-leaning; degrades on parse failure.
1 finding(s): 0 critical, 0 high, 1 medium, 0 low. semgrep could not parse 186 file(s) — `apps/admin-x-framework/src/api/automation-run-history.ts`, `apps/admin-x-framework/src/api/automations.ts`, `apps/admin-x-framework/src/utils/api/fetch-api.ts`, `apps/admin-x-framework/src/utils/deferred.ts`, `apps/admin/src/analytics/views/stats/growth/components/new-subscribers-cadence.tsx`, … (+181 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
REDACTED
What to do
Resolve the 1 REDACTED finding(s) in Data Compliance (PII/GDPR) — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d32_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.
10 of 1716 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is ghost/core/server/services/members/emails/update-email.js. Counted over 1716 of the 4126 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 2 Boundary-crossing change coupling finding(s) in Change Coupling — start with use-newsletter-stats-with-range.ts, top-content.tsx. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 20 Change coupling finding(s) in Change Coupling — start with feed-list.tsx (2), gift-redemption-page.jsx (2), stats.js (2). — One of this dimension's main actionable groups (20 warning-level).
Resolve the 2 Change-coupling hub finding(s) in Change Coupling — start with REDACTED, use-activity-pub-queries.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.
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
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 10 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
✓ On the Gold path — maintain.
Detailed fixes: d44_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives5.0 / 10Weak✓ Tool-verified
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
Video with no captions <track> offers no captions. 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). (×2) — apps/activitypub/src/components/feed/feed-item.tsx:176, apps/activitypub/src/components/feed/feed-item.tsx:443
An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. (×21) — apps/activitypub/src/components/feed/feed-item.tsx:428, apps/activitypub/src/components/feed/feed-item.tsx:437, apps/activitypub/src/components/feed/feed-item.tsx:463, …
An svg presented as an image needs a name — add a <title> child or an aria-label/aria-labelledby. (×2) — apps/activitypub/src/views/preferences/components/bluesky-sharing.tsx:223, apps/activitypub/src/views/preferences/components/bluesky-sharing.tsx:281
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 & labels5.5 / 10Adequate✓ 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 <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. (×2) — apps/activitypub/src/components/feed/feed-item.tsx:734, apps/activitypub/src/components/layout/layout.tsx:93
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. (×10) — apps/activitypub/src/components/layout/sidebar/sidebar.tsx:69, apps/admin/src/members/custom-fields/filter-renderer.tsx:101, apps/admin/src/members/custom-fields/filter-renderer.tsx:117, …
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. (×3) — apps/activitypub/src/components/modals/new-note-modal.tsx:394, apps/admin/src/members/label-picker/label-picker.tsx:561, apps/comments-ui/src/components/popups/add-details-popup.tsx:203
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. (×9) — apps/activitypub/src/components/modals/new-note-modal.tsx:451, apps/admin/src/global-search/global-search-modal.tsx:124, apps/admin/src/members/components/bulk-action-modals/import-members/field-picker.tsx:262, …
A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label. (×3) — apps/activitypub/src/views/preferences/components/profile.tsx:463, apps/activitypub/src/views/preferences/components/profile.tsx:476, apps/activitypub/src/views/preferences/components/profile.tsx:515
This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id alone, wherever it is set, names nothing until a label points at it). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. 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. (×7) — apps/admin/src/analytics/views/stats/growth/components/new-subscribers-cadence.tsx:270, apps/admin/src/analytics/views/stats/growth/components/paid-subscription-change-chart.tsx:410, apps/admin/src/editor/publish/components/publish-at-options.tsx:27, …
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. (×2) — apps/admin/src/members/components/bulk-action-modals/import-members/mapping-step.tsx:574, apps/portal/src/components/pages/account-plan-page.jsx:249
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. — apps/admin/src/shared/member-custom-fields/custom-field-form.tsx:101
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) — apps/comments-ui/src/components/content/buttons/more-button.tsx:24, apps/comments-ui/src/components/popups/close-button.tsx:9
This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. — apps/portal/src/components/common/date-picker.jsx:326
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 structure4.5 / 10Weak✓ Tool-verified
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). (×5) — .github/embed-renderer/404.html:2, REDACTED:2, REDACTED:2, …
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×13) — .github/embed-renderer/404.html:2, apps/admin/index.html:2, apps/signup-form/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. (×5) — apps/admin/index.html:8, apps/comments-ui/src/components/frame.tsx:28, REDACTED:333, …
A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope). (×12) — REDACTED:106, REDACTED:106, REDACTED:118, …
A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>. (×5) — REDACTED:4, REDACTED:4, REDACTED:4, …
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".
A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. (×34) — apps/activitypub/src/components/activities/activity-item.tsx:21, apps/activitypub/src/components/feed/feed-item.tsx:136, apps/activitypub/src/components/feed/feed-item.tsx:163, …
This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus. (×2) — apps/activitypub/src/components/feed/table-of-contents.tsx:193, apps/activitypub/src/components/layout/onboarding/step-3.tsx:396
An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action. — apps/activitypub/src/components/layout/error/error.tsx:123
This <div> announces itself as a role="button" and binds a click, but nothing can put focus on it: no tabIndex={0} in any spelling, no key handler, and nothing in this file moves focus or sets aria-activedescendant. The role tells assistive tech what the control IS; it does not make the control reachable, so a keyboard user cannot operate it at all (WCAG 2.1.1). Give it tabIndex={0}="0" and an Enter/Space key handler, or make it a native <button>. If a parent widget owns the keyboard model, that parent must move focus onto the active role="button" or point aria-activedescendant at it. — apps/activitypub/src/views/notifications/components/notification-item.tsx:32
A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabIndex={0}. — apps/activitypub/src/views/preferences/components/edit-profile.tsx:284
This <div> carries tabIndex={0}, so it is in the tab order and a keyboard user will land on it — but its behaviour is bound to the pointer only, with no key handler. A tabindex makes an element focusable, not operable: Enter and Space fire a click on a native <button> or <a href> and nowhere else, so this can be focused and never activated. Use a <button>, or handle Enter/Space in a key handler. — apps/activitypub/src/views/preferences/components/settings.tsx:189
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.
The combobox role requires aria-expanded to convey its state. Add it. — apps/admin/src/settings/advanced/history-modal.tsx:278
What to do
Use valid, non-abstract roles, supply the ARIA state each role requires, and never put aria-hidden on a focusable element.
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.
This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade. (×6) — apps/activitypub/src/components/layout/onboarding/step-3.tsx:77, apps/activitypub/src/components/layout/onboarding/step-3.tsx:131, apps/activitypub/src/components/layout/onboarding/step-3.tsx:232, …
<input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). (×8) — apps/admin/src/editor/feature-image.tsx:130, apps/comments-ui/src/components/popups/add-details-popup.tsx:172, apps/comments-ui/src/components/popups/add-details-popup.tsx:203, …
<main> moves — its `animate-[admin-frame-fade-in_500ms_ease-out_520ms_both]` utility runs with no motion-safe:/motion-reduce: variant — 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:. — apps/admin/src/layout/admin-layout.tsx:378
<div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — 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:. (×6) — apps/admin/src/settings/site/theme/theme-file-tree.tsx:222, koenig/kg-unsplash-selector/src/ui/UnsplashGallery.tsx:37, koenig/koenig-lexical/src/components/ui/UrlInput.tsx:43, …
<button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). (×4) — apps/comments-ui/src/components/content/buttons/more-button.tsx:24, apps/comments-ui/src/components/content/forms/form.tsx:155, apps/comments-ui/src/components/content/forms/sorting-form.tsx:65, …
<span> moves — its inline style sets `transition: transform 800ms var(${easing.cssVar})` — 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:. — apps/shade/src/docs/showcase/motion-gallery.tsx:59
`body` sets color: #808284 on background-color: #ffffff — 3.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. (×4) — REDACTED:25, REDACTED:25, REDACTED:25, …
The inline foreground/background colours fall below the 4.5:1 WCAG AA minimum for normal text. Darken/lighten one of them. — REDACTED:8
`.kg-header-card.kg-style-image` sets color: #ffffff on background-color: #e7e7eb — 1.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — ghost/core/server/services/email-service/email-templates/partials/styles.hbs:600
<svg> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — 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:. — koenig/koenig-lexical/src/components/ui/Spinner.tsx:16
`nav.mode > a.selected` sets color: white on background-color: #ff0095 — 3.7:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — apps/signup-form/src/styles/demo.css:42
`.koenig-lexical button:focus-visible` 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. — koenig/koenig-lexical/src/styles/preflight.css:326
`.koenig-lexical [contenteditable]` 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. — koenig/koenig-lexical/src/styles/components/koenig-lexical.css:35
`.CodeMirror-scroll` 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. — koenig/kg-simplemde/debug/simplemde.css:177
`.CodeMirror-code` 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. — koenig/kg-simplemde/debug/simplemde.css:287
`.kg-audio-player-container input[type='range']:focus` 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. — ghost/core/frontend/src/cards/css/audio.css:215
`.kg-header-card a.kg-header-card-button` 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. — ghost/core/frontend/src/cards/css/header.css:143
What to do
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Architecture — Whether 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.
`EditorSession` declares 37 required operations: `getState`, `getView`, `subscribe`, `getSaveSnapshot`, `isDirty`, `hasUnsavedContent`, `patchTitle`, `patchExcerpt`, `patchFeatureImage`, `patchFields`, `getFields`, `editPublishedAt`, `getPublishedAt`, `commitField`, `commitSettings`, `getSlug`, `editSlug`, `patchLexical`, `restoreRevision`, `setBaseline`, `baselineFailed`, `commitTitle`, `dispatchAutosave`, `dispatchExplicit`, `retrySave`, `invalidField`, `dispatchPublish`, `dispatchSchedule`, `dispatchRevert`, `getLiveLexical`, `recordRefetched`, `recordReloaded`, `reauthSucceeded`, `reauthAbandoned`, `leaveRequested`, `flushLocalRevision`, `dispose`. 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. — apps/admin/src/editor/session/editor-session.ts:164
`EditorSessionHandle` declares 17 required operations: `isDirty`, `hasUnsavedContent`, `contentText`, `reload`, `restoreRevision`, `editSettings`, `stageSettings`, `commitSettings`, `commitField`, `editPublishedAt`, `retrySave`, `saveExplicit`, `requestReauth`, `reauthSucceeded`, `reauthAbandoned`, `leaveRequested`, `dispose`. 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. — apps/admin/src/editor/session/use-editor-session.ts:82
`ChangeTracker` declares 17 required operations: `load`, `setSaved`, `saveAcknowledged`, `setBaseline`, `baselineFailed`, `setLive`, `markSaveError`, `clearSaveError`, `revisionRestored`, `verdict`, `dirtyFields`, `bodyDivergence`, `isFieldDirty`, `holdsWrite`, `savedValue`, `hasChangedSinceRevision`, `dispose`. 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. — apps/admin/src/editor/engine/change-tracker.ts:113
`GiftRepository` declares 17 required operations: `existsByCheckoutSessionId`, `getById`, `getByToken`, `getByPaymentIntentId`, `findPendingConsumption`, `findPendingExpiration`, `findPendingReminder`, `findUnsentReminders`, `deleteAbandonedCheckouts`, `getActiveByMember`, `getActiveByMembers`, `browsePurchaseEvents`, `browseRedemptionEvents`, `create`, `update`, `deletePendingCheckout`, `transaction`. 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. — ghost/core/server/services/gifts/gift-bookshelf-repository.ts:61
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Do you agree with this assessment?
C2 · Access Controls7.0 / 10Strong✓ Tool-verified
Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.
Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.
Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) — this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect. — apps/admin-x-framework/src/utils/api/handle-response.ts:40
What to do
Name the access rules — roles/permissions declared once (a @Roles/@Permissions decorator with its guard, a CASL ability, a casbin model, or Supabase CREATE POLICY) and consulted where access is checked, so the rule set is reviewable and testable on its own.
Do you agree with this assessment?
DM10 · One transaction, one aggregate9.3 / 10Exemplary✓ Tool-verified
Other · Domain Modelling — Whether a single operation mutates more than one aggregate root. An aggregate is a consistency boundary, so saving two together fuses them into one — the second's invariants come to depend on the first's transaction, and the pair can no longer be separated. Reads of other aggregates are not counted.
Method: Neutral body surface (DDD-gated): every method body scanned for repository WRITE calls (Add/Update/Save/Remove/Delete/Insert/Store and their async forms), keyed on the ARGUMENT type rather than the repository type — three `IRepository<T>` writes collapse to one repository but are three distinct aggregates. Reads (Get/Find/Load/Query) are excluded, so loading another aggregate for context never counts. Score is offending methods over methods that write at all. Deterministic.
`GiftService.redeemGift` saves `MemberRepository`, `GiftRepository` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — ghost/core/server/services/gifts/gift-service.ts:893
`GiftService.reassignRedeemer` saves `MemberRepository`, `GiftRepository` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — ghost/core/server/services/gifts/gift-service.ts:1063
`GiftService.handlePaymentRefund` saves `GiftRepository`, `MemberRepository` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — ghost/core/server/services/gifts/gift-service.ts:1149
What to do
Mutate one aggregate per operation and let the others follow from a domain event — the second aggregate reaching consistency a moment later is the design, not a compromise.
Do you agree with this assessment?
DM4 · Rich vs anemic model7.7 / 10Strong✓ Tool-verified
Other · Domain Modelling — Whether aggregates/entities carry the behaviour that protects their invariants, rather than being data bags driven by external services.
Method: Roslyn (DDD-gated): entity method BODIES classified mutator-vs-query — only methods that mutate the entity's own declared state count as invariant-protecting behaviour, so a getter/passthrough doesn't rescue an anemic class. Deterministic, exhaustive over domain-layer entities.
Coverage: Population: entities by name/base convention; rich-vs-anemic judged by classifying each method body mutator-vs-query — logic-bearing domain types outside the convention are invisible.
`SubscribeEvent` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — ghost/core/server/services/recommendations/service/subscribe-event.ts:3
What to do
Move business rules onto the aggregates/entities they govern so invariants are enforced at the source, not in anemic services.
Other · Domain Modelling — Whether the domain layer stays free of infrastructure dependencies — a domain aggregate fused to a persistence ORM (TypeORM/Prisma/MikroORM/Sequelize/Mongoose) on its own declaration (active-record) couples the domain to infrastructure. The clean-architecture dependency rule.
Method: Roslyn (DDD-gated): domain-layer types scanned for infrastructure usage in member SIGNATURES and inside method/accessor BODIES — resolved calls and object-creations into EF/Marten/HTTP/Mongo/Redis/message-bus types (not just a namespace allowlist). Deterministic, symbol-resolved, exhaustive over domain-layer bodies, DDD-native.
Coverage: Domain layer identified by NAMESPACE heuristic; infrastructure then resolved by symbol in member SIGNATURES and method/accessor BODIES — rename the layer and the check evaporates.
Other · Domain Modelling — Whether one domain rule is decided — or one measurement produced — in more than one place, rather than living on the type that owns it.
Method: Neutral body surface plus Roslyn (DDD-gated), two arms. DECISION (Roslyn only): a predicate over a domain type's members judged in two or more types, where none of those decisions live on the owning type — operands of comparisons and relational property patterns only, so a member merely passed as an argument is not judged. DERIVATION: a plain all-numeric carrier of ≥2 members, with no base type and exactly one constructor, CONSTRUCTED as the result of a method (returned or assigned, never inline as an argument) in two or more types other than its own — the same measurement produced twice, which centralising the judgement does not fix. DERIVATION runs on every language whose frontend declares the produced-or-passed fact per construction (Roslyn and the Java sidecar today); a target with only the derivation arm carries an engine gap naming the decision arm as not assessed, and a frontend that declares nothing keeps the dimension not measured rather than clean. Single-member rules, test code and generated code are out of population for both. Advisory.
apps.admin.src.automations.utils.LexicalNode's [children, type] are judged in apps.admin.src.automations.utils, apps.admin.src.utils.is-empty-lexical — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
apps.admin.src.editor.publish.flow-post.PublishFlowPost's [displayName, email, status] are judged in apps.admin.src.editor.publish.update-flow-modal, apps.admin.src.editor.publish.use-publish-flow — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
What to do
Move each repeated judgement onto the type that owns the members it reads, so the rule has one home and cannot drift.
Do you agree with this assessment?
ED3 · Event naming8.5 / 10Strong✓ Tool-verified
Other · Event-Driven — Whether events are named in the past tense (a clarity nudge — low weight).
Method: Roslyn scan (event-driven gated): domain and integration events checked for past-tense naming (-ed/-en suffix or irregular set). Naming nudge, low-weight advisory.
`OfferCodeChangeEvent` reads as an instruction, not a fact that happened: events describe something that already occurred. Name new events for the fact that occurred (e.g. `OrderPlaced`). Do not rename this one if it is already stored or published: its type name is written with every event recorded under it, so a rename can break replay of the stored stream and every subscriber that reads it, and a clearer name does not pay for that. If it has never been written or sent, renaming it now is safe. — ghost/core/server/services/offers/domain/events/offer-code-change-event.js:10
What to do
Name new events in the past tense: they record facts that already happened. Do not rename an event that is already stored or published: its type name is written with every event recorded under it, so a rename can break replay of the stored stream and every subscriber that reads it.
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.
`onClick` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — apps/activitypub/src/components/modals/new-note-modal.tsx:373
`onStatusChange` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — apps/admin/src/automations/components/canvas/automation-sidebar.tsx:73
`onDismissValidationFeedback` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — apps/admin/src/automations/new-automation.tsx:78
`onPublish` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — apps/admin/src/automations/new-automation.tsx:79
`onSave` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — apps/admin/src/automations/new-automation.tsx:80
`onTurnOff` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — apps/admin/src/automations/new-automation.tsx:81
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. (×5) — apps/admin/src/posts/analytics/newsletter/components/newsletter-radial-chart.tsx:121, apps/admin/src/posts/analytics/newsletter/components/newsletter-radial-chart.tsx:126, apps/admin/src/posts/analytics/newsletter/components/newsletter-radial-chart.tsx:130, …
`onBlur` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — apps/admin/src/settings/site/announcement-bar-modal.tsx:191
`onLoadMore` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — REDACTED:2018
`activateTheme` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — ghost/core/bridge.js:79
`updateGlobalTemplateOptions` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — ghost/core/frontend/services/theme-engine/middleware/update-global-template-options.js:22
`hammertime` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — ghost/core/server/ghost-server.ts:215
The guard above `return 'png';` also returns `'png'`, so no input can make it matter. Implement the distinction that was intended, or delete the guard. — ghost/core/server/lib/image/blog-icon.js:83
`errorIfInvalidUrl` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — REDACTED:148
`disableRetries` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — REDACTED:162
`init` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. (×2) — ghost/core/server/services/identity-tokens/identity-token-service-wrapper.js:7, ghost/core/server/services/link-tracking/link-click-tracking-service.js:88
`createIntegrityToken` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — REDACTED:341
`setSetting` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — ghost/core/server/services/recommendations/recommendation-enabler-service.js:26
`requiresEmailVerification` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — ghost/core/server/services/settings/settings-bread-service.js:453
`connect` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — ghost/core/server/services/stripe/stripe-service.js:172
`configure` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — ghost/core/server/services/stripe/webhook-manager.js:106
`triggerDownload` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — koenig/kg-unsplash-selector/src/api/PhotoUseCase.ts:19
`validate` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/admin-api-schema/src/utils/json-schema.ts:44
`requestFocusedThreadView` has an empty body — confirm it's an intentional no-op and not an unfinished method. — apps/comments-ui/src/utils/nav-actions.ts:12
`requestInstantScroll` has an empty body — confirm it's an intentional no-op and not an unfinished method. — apps/comments-ui/src/utils/nav-actions.ts:13
`navigateBackToParent` has an empty body — confirm it's an intentional no-op and not an unfinished method. — apps/comments-ui/src/utils/nav-actions.ts:14
A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something. — apps/portal/test/app-frames.test.jsx:27
`noCleanup` has an empty body — confirm it's an intentional no-op and not an unfinished method. — ghost/core/server/services/content-import/import/source.ts:22
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.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
`apps/admin/src/home-redirect.tsx` reports through `console.*` at line 38 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/admin/src/home-redirect.tsx:38
`apps/admin/src/settings/growth/embed-signup/embed-signup-form-modal.tsx` reports through `console.*` at line 87 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/admin/src/settings/growth/embed-signup/embed-signup-form-modal.tsx:87
`apps/admin/src/settings/components/confirmation-modal.tsx` reports through `console.*` at line 80 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/admin/src/settings/components/confirmation-modal.tsx:80
`apps/admin/src/settings/components/error-boundary.tsx` reports through `console.*` at line 39 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/admin/src/settings/components/error-boundary.tsx:39
`apps/admin/src/settings/components/error-boundary.tsx` 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. — apps/admin/src/settings/components/error-boundary.tsx:41
`apps/admin/src/settings/components/koenig-editor-base.tsx` reports through `console.*` at line 74 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/admin/src/settings/components/koenig-editor-base.tsx:74
`apps/admin/src/settings/components/koenig-editor-base.tsx` reports through `console.*` at line 76 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/admin/src/settings/components/koenig-editor-base.tsx:76
`apps/admin/src/onboarding/onboarding-route.tsx` reports through `console.*` at line 65 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/admin/src/onboarding/onboarding-route.tsx:65
`apps/admin/src/onboarding/hooks/use-onboarding.ts` 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. — apps/admin/src/onboarding/hooks/use-onboarding.ts:83
`apps/admin/src/members/shared-views.ts` reports through `console.*` at line 70 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/admin/src/members/shared-views.ts:70
`apps/admin/src/members/hooks/use-multiple-active-subscriptions-banner.ts` reports through `console.*` at line 86 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/admin/src/members/hooks/use-multiple-active-subscriptions-banner.ts:86
`apps/admin/src/members/detail/map-data/generate-map.mjs` reports through `console.*` at line 135 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/admin/src/members/detail/map-data/generate-map.mjs:135
`apps/admin/src/layout/app-sidebar/shared-views.ts` reports through `console.*` at line 35 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/admin/src/layout/app-sidebar/shared-views.ts:35
`apps/admin/src/layout/app-sidebar/hooks/use-navigation-preferences.ts` reports through `console.*` at line 107 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/admin/src/layout/app-sidebar/hooks/use-navigation-preferences.ts:107
`apps/admin/src/hooks/use-theme.ts` reports through `console.*` at line 65 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/admin/src/hooks/use-theme.ts:65
`apps/admin/src/editor/report-error.ts` reports through `console.*` at line 32 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/admin/src/editor/report-error.ts:32
`apps/admin/src/apps/lib/report-error.ts` reports through `console.*` at line 9 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/admin/src/apps/lib/report-error.ts:9
`ghost/core/boot.js` reports through `console.*` at line 744 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ghost/core/boot.js:744
`ghost/core/boot.js` reports through `console.*` at line 867 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ghost/core/boot.js:867
`ghost/core/shared/labs.js` reports through `console.*` at line 149 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ghost/core/shared/labs.js:149
`ghost/core/shared/config/report.ts` reports through `console.*` at line 33 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ghost/core/shared/config/report.ts:33
`ghost/core/shared/config/report.ts` reports through `console.*` at line 50 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ghost/core/shared/config/report.ts:50
`ghost/core/shared/config/utils.ts` reports through `console.*` at line 110 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ghost/core/shared/config/utils.ts:110
`ghost/core/frontend/src/ghost-stats/ghost-stats.js` reports through `console.*` at line 133 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ghost/core/frontend/src/ghost-stats/ghost-stats.js:133
`ghost/core/frontend/src/ghost-stats/ghost-stats.js` reports through `console.*` at line 235 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ghost/core/frontend/src/ghost-stats/ghost-stats.js:235
What to do
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.
Add a health-check endpoint (@godaddy/terminus or a /health route) so orchestrators and load balancers can probe liveness/readiness.
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 25 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:3
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.
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.
Do you agree with this assessment?
P5 · DR & Backup7.0 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.
Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.
What to do
Enable purge protection / soft-delete (and prevent_destroy on critical resources) so data stores can't be lost to an accidental or malicious delete.
Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.
Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.
`fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×16) — ghost/core/frontend/public/private.js:270, ghost/core/frontend/public/private.js:279, ghost/core/frontend/src/admin-auth/message-handler.js:20, …
What to do
Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.
Readiness · Readiness — Whether database schema changes go through versioned migrations rather than being auto-created from the model at startup.
Method: Roslyn scan: EF Core DbContext for a versioned migrations directory versus bare EnsureCreated usage; off .NET, a file scan of dependency manifests, migration histories (Flyway, Liquibase, Alembic, Django, Rails, Prisma, TypeORM, Knex/Sequelize, golang-migrate, goose, Laravel, Doctrine, Diesel/sqlx) and schema auto-create in production source or config. Exhaustive, deterministic.
Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.
Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.
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.
`existsSync` in `checkTarget` 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. (×2) — apps/shade/scripts/pack-local.ts:154, apps/shade/scripts/pack-local.ts:158
`mkdirSync` in `generateStorybookDocs` 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. — apps/shade/scripts/storybook-docs.ts:70
`globSync` in `extract` 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. — ghost/core/server/data/importer/import-archive.ts:142
`globSync` in `prepareImportSource` 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. — ghost/core/server/services/content-import/import/source.ts:52
`fs.readdirSync` in `buildType` 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. — ghost/scripts/build-card-assets.mts:45
`fs.readFileSync` in `buildType` 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. — ghost/scripts/build-card-assets.mts:51
`fs.mkdirSync` in `buildCardAssets` 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. — ghost/scripts/build-card-assets.mts:77
`fs.writeFileSync` in `buildCardAssets` 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. — ghost/scripts/build-card-assets.mts:78
`existsSync` in `there` 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. — packages/app-sdk/src/vite/dev-vars.ts:19
`existsSync` in `resolveGhostDevEnv` 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. — REDACTED:175
`readFileSync` in `resolveGhostDevEnv` 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. — REDACTED:176
`writeFileSync` in `resolveGhostDevEnv` 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. (×2) — REDACTED:185, REDACTED:194
What to do
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 Safety7.0 / 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 — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): 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. Deterministic.
102 duplicated blocks under apps/admin/src/ have copies in at least two of the sibling directories analytics, apps, auth, automations, billing, comments (+14 more sibling(s) not listed) — 60 of them are reported below, and 42 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 102 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 102 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 102 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. — apps/admin/src/members/detail/member-detail.tsx:82
60 duplicated blocks under apps/ have copies in at least two of the sibling directories activitypub, admin, admin-toolbar, admin-x-framework, announcement-bar, comments-ui (+4 more sibling(s) not listed) — 33 of them are reported below, and 27 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 60 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 60 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 60 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. — apps/admin/src/settings/components/code-editor-view.tsx:99
59 duplicated blocks under ghost/core/server/services/ have copies in at least two of the sibling directories app-installations, audience-feedback, automations, comments, content-import, donations (+35 more sibling(s) not listed) — 24 of them are reported below, and 35 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 59 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 59 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 59 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. — ghost/core/server/services/indexnow-ping/indexnow-ping-service.ts:61
56 duplicated blocks under apps/admin/src/settings/ have copies in at least two of the sibling directories advanced, components, email, email-design, general, growth (+2 more sibling(s) not listed) — 29 of them are reported below, and 27 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 56 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 56 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 56 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. — apps/admin/src/settings/advanced/history-modal.tsx:108
32 duplicated blocks under ghost/core/server/data/migrations/versions/ have copies in at least two of the sibling directories 5.0, 5.10, 5.100, 5.102, 5.11, 5.113 (+37 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. — ghost/core/server/data/migrations/versions/5.3/2022-07-06-09-26-add-ghost-explore-integration-api-key.js:10
19 duplicated blocks under the repository root have copies in at least two of the sibling directories apps, ghost, koenig, packages, tools — 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. — apps/comments-ui/tailwind.config.js:1
16 duplicated blocks under ghost/core/server/ have copies in at least two of the sibling directories adapters, api, auth, data, lib, models (+2 more sibling(s) not listed) — 4 of them are reported below, and 12 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 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. — ghost/core/server/data/importer/import-manager.js:30
12 duplicated blocks under apps/activitypub/src/views/ have copies in at least two of the sibling directories feed, inbox, notifications, preferences, profile — 11 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 12 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 12 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 12 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/activitypub/src/views/feed/components/feed-list.tsx:34
8 duplicated blocks under apps/activitypub/src/ have copies in at least two of the sibling directories components, views — 5 of them are reported below, and 3 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 8 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 8 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 8 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. — apps/activitypub/src/components/global/suggested-profiles.tsx:22
6 duplicated blocks under ghost/core/ have copies in at least two of the sibling directories frontend, server, shared — 4 of them are reported below, and 2 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 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 6 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. — ghost/core/frontend/services/data/match-permalink-params.js:6
5 duplicated blocks under apps/admin/src/analytics/views/stats/ have copies in at least two of the sibling directories growth, locations, newsletters, overview, web — 4 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 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 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 5 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. — apps/admin/src/analytics/views/stats/growth/growth.tsx:239
5 duplicated blocks under apps/admin/src/editor/ have copies in at least two of the sibling directories engine, preview, publish, session, settings — 3 of them are reported below, and 2 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 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 5 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. — apps/admin/src/editor/session/session-banners.tsx:130
5 duplicated blocks under apps/admin/src/posts/analytics/ have copies in at least two of the sibling directories growth, newsletter, overview, web — 3 of them are reported below, and 2 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 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 5 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. — apps/admin/src/posts/analytics/newsletter/newsletter.tsx:588
5 duplicated blocks under apps/shade/src/components/ have copies in at least two of the sibling directories patterns, ui — 1 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 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 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 5 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:1697
5 of the duplicated blocks reported below have copies in at least two of the sibling directories cache, redirects, route-settings, storage, upgrade under ghost/core/server/adapters/. That concentration is one structural fact, not 5 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 5 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. — ghost/core/server/adapters/redirects/S3RedirectsStore.ts:30
apps/admin/src/members/detail/member-detail.tsx:82 · apps/admin/src/tags/detail/tag-detail.tsx:58 — the two spans are one implementation copied and then locally edited — 864 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. — apps/admin/src/members/detail/member-detail.tsx:82
apps/admin/src/automations/components/email-modal/email-content-modal.tsx:57 · apps/admin/src/settings/membership/member-emails/welcome-email-modal.tsx:64 — the two spans are one implementation copied and then locally edited — 846 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. — apps/admin/src/automations/components/email-modal/email-content-modal.tsx:57
apps/shade/src/components/ui/context-menu.tsx:8 · apps/shade/src/components/ui/dropdown-menu.tsx:8 — the two spans are one implementation copied and then locally edited — 875 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. — apps/shade/src/components/ui/context-menu.tsx:8
ghost/core/server/api/endpoints/utils/serializers/input/pages.js:15 · ghost/core/server/api/endpoints/utils/serializers/input/posts.js:15 — the two spans are one implementation copied and then locally edited — 1026 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. — ghost/core/server/api/endpoints/utils/serializers/input/pages.js:15
ghost/core/server/adapters/redirects/S3RedirectsStore.ts:30 · ghost/core/server/adapters/route-settings/S3RouteSettingsStore.ts:38 — the two spans are one implementation copied and then locally edited — 878 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. — ghost/core/server/adapters/redirects/S3RedirectsStore.ts:30
apps/comments-ui/tailwind.config.js:1 · koenig/kg-unsplash-selector/tailwind.config.cjs:1 — these 2 files are line-for-line copies of one another — 131 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. — apps/comments-ui/tailwind.config.js:1
apps/admin/src/layout/app-sidebar/sidebar-body-swap.tsx:22 · apps/admin/src/layout/sidebar-swap-transition.tsx:3 — the two spans are one implementation copied and then locally edited — 663 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. — apps/admin/src/layout/app-sidebar/sidebar-body-swap.tsx:22
apps/admin/src/settings/email/newsletters.tsx:21 · apps/admin/src/settings/email/newsletters/newsletters-tab-content.tsx:20 — the two spans are one implementation copied and then locally edited — 690 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. — apps/admin/src/settings/email/newsletters.tsx:21
apps/admin/src/automations/components/canvas/tier-scope-picker.tsx:56 · apps/admin/src/shared/pickers/chip-picker.tsx:175 — the two spans are one implementation copied and then locally edited — 675 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. — apps/admin/src/automations/components/canvas/tier-scope-picker.tsx:56
apps/admin/src/automations/components/email-modal/use-email-preview.ts:20 · apps/admin/src/settings/membership/member-emails/use-welcome-email-preview.ts:23 — the two spans are one implementation copied and then locally edited — 618 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. — apps/admin/src/automations/components/email-modal/use-email-preview.ts:20
apps/admin-x-framework/src/utils/source-utils.ts:56 · ghost/core/server/services/stats/referrers-stats-service.js:7 — the two spans are one implementation copied and then locally edited — 580 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. — apps/admin-x-framework/src/utils/source-utils.ts:56
apps/admin-x-framework/src/api/pages.ts:47 · apps/admin-x-framework/src/api/posts.ts:64 — the two spans are one implementation copied and then locally edited — 681 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. — apps/admin-x-framework/src/api/pages.ts:47
ghost/core/server/models/label.js:15 · ghost/core/server/models/tag.js:73 — the two spans are one implementation copied and then locally edited — 700 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. — ghost/core/server/models/label.js:15
apps/admin/src/settings/growth/offers/add-offer-modal.tsx:245 · apps/admin/src/settings/growth/offers/edit-retention-offer-modal.tsx:369 — the two spans are one implementation copied and then locally edited — 553 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. — apps/admin/src/settings/growth/offers/add-offer-modal.tsx:245
apps/admin/src/automations/components/email-modal/preview-frame.tsx:1 · apps/admin/src/settings/membership/member-emails/welcome-email-preview-frame.tsx:1 — these 2 files are line-for-line copies of one another — 90 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. — apps/admin/src/automations/components/email-modal/preview-frame.tsx:1
apps/admin/src/analytics/views/stats/web/components/sources-card.tsx:83 · apps/admin/src/posts/analytics/web/components/sources.tsx:76 — the two spans are one implementation copied and then locally edited — 427 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. — apps/admin/src/analytics/views/stats/web/components/sources-card.tsx:83
ghost/core/frontend/src/cards/js/audio.js:50 · ghost/core/frontend/src/cards/js/video.js:52 — the two spans are one implementation copied and then locally edited — 522 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. — ghost/core/frontend/src/cards/js/audio.js:50
ghost/core/server/services/indexnow-ping/indexnow-ping-service.ts:61 · ghost/core/server/services/slack-ping/slack-ping-service.ts:30 — the two spans are one implementation copied and then locally edited — 500 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. — ghost/core/server/services/indexnow-ping/indexnow-ping-service.ts:61
apps/comments-ui/src/actions.ts:310 · apps/comments-ui/src/actions.ts:418 — 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. — apps/comments-ui/src/actions.ts:310
ghost/core/server/api/endpoints/labels.js:36 · ghost/core/server/api/endpoints/tags.js:20 — 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. — ghost/core/server/api/endpoints/labels.js:36
apps/admin/src/settings/growth/offers/offers-index.tsx:108 · apps/admin/src/settings/growth/offers/offers-index.tsx:202 — the two spans are one implementation copied and then locally edited — 299 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. — apps/admin/src/settings/growth/offers/offers-index.tsx:108
apps/comments-ui/src/components/popups/delete-popup.tsx:1 · apps/comments-ui/src/components/popups/report-popup.tsx:1 — these 2 files are line-for-line copies of one another — 70 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. — apps/comments-ui/src/components/popups/delete-popup.tsx:1
apps/admin/src/settings/general/seo-meta.tsx:252 · apps/admin/src/settings/general/seo-meta.tsx:333 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — apps/admin/src/settings/general/seo-meta.tsx:252
apps/admin/src/automations/components/email-modal/test-email-dropdown.tsx:1 · apps/admin/src/settings/membership/member-emails/test-email-dropdown.tsx:1 — these 2 files are line-for-line copies of one another — 64 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. — apps/admin/src/automations/components/email-modal/test-email-dropdown.tsx:1
apps/admin/src/analytics/views/stats/web/web.tsx:29 · apps/admin/src/posts/analytics/web/web.tsx:49 — the two spans are one implementation copied and then locally edited — 479 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. — apps/admin/src/analytics/views/stats/web/web.tsx:29
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.
.dependency-cruiser.cjs:3 reaches into another package with a relative path (./tools/scripts/ci/service-dependency-resolver.mjs) — import the package by name instead. — .dependency-cruiser.cjs:3
apps/admin/vite.shared.ts:33 imports mingo/dist/mingo.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — apps/admin/vite.shared.ts:33
ghost/core/server/data/db/better-sqlite3-patches.js:199 imports knex/lib/dialects/better-sqlite3/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — ghost/core/server/data/db/better-sqlite3-patches.js:199
ghost/core/server/data/importer/importers/data/data-importer.js:18 imports @tryghost/string/lib, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — ghost/core/server/data/importer/importers/data/data-importer.js:18
ghost/core/server/data/migrations/init/2-create-fixtures.js:1 imports ghost/core/server/data/schema/fixtures/index.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — ghost/core/server/data/migrations/init/2-create-fixtures.js:1
ghost/core/server/models/base/plugins/overrides.js:1 imports bookshelf/lib/constants, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — ghost/core/server/models/base/plugins/overrides.js:1
koenig/kg-default-cards/src/cards/audio.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/audio.ts:1
koenig/kg-default-cards/src/cards/before-after.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/before-after.ts:1
koenig/kg-default-cards/src/cards/bookmark.ts:2 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/bookmark.ts:2
koenig/kg-default-cards/src/cards/button.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/button.ts:1
koenig/kg-default-cards/src/cards/callout.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/callout.ts:1
koenig/kg-default-cards/src/cards/code.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/code.ts:1
koenig/kg-default-cards/src/cards/email-cta.ts:2 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/email-cta.ts:2
koenig/kg-default-cards/src/cards/email.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/email.ts:1
koenig/kg-default-cards/src/cards/embed.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/embed.ts:1
koenig/kg-default-cards/src/cards/file.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/file.ts:1
koenig/kg-default-cards/src/cards/gallery.ts:8 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/gallery.ts:8
koenig/kg-default-cards/src/cards/header.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/header.ts:1
koenig/kg-default-cards/src/cards/html.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/html.ts:1
koenig/kg-default-cards/src/cards/image.ts:8 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/image.ts:8
koenig/kg-default-cards/src/cards/markdown.ts:2 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/markdown.ts:2
koenig/kg-default-cards/src/cards/product.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/product.ts:1
koenig/kg-default-cards/src/cards/toggle.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/toggle.ts:1
koenig/kg-default-cards/src/cards/video.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — koenig/kg-default-cards/src/cards/video.ts:1
packages/parse-email-address/src/mailbox.ts:1 imports nodemailer/lib/addressparser/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — packages/parse-email-address/src/mailbox.ts:1
tools/gx/benchmark-automations-drain.ts:93 reaches into another package with a relative path (../../ghost/core/boot.js) — import the package by name instead. — tools/gx/benchmark-automations-drain.ts:93
tools/gx/benchmark-automations-drain.ts:96 reaches into another package with a relative path (../../ghost/core/server/data/db/index.js) — import the package by name instead. — tools/gx/benchmark-automations-drain.ts:96
tools/gx/benchmark-automations-drain.ts:99 reaches into another package with a relative path (../../ghost/core/server/services/automations/database-automations-repository.ts) — import the package by name instead. — tools/gx/benchmark-automations-drain.ts:99
tools/gx/benchmark-automations-drain.ts:100 reaches into another package with a relative path (../../ghost/core/server/services/automations/poll.ts) — import the package by name instead. — tools/gx/benchmark-automations-drain.ts:100
tools/gx/benchmark-automations-drain.ts:101 reaches into another package with a relative path (../../ghost/core/server/lib/db-types/date.ts) — import the package by name instead. — tools/gx/benchmark-automations-drain.ts:101
tools/gx/benchmark-automations-drain.ts:103 reaches into another package with a relative path (../../ghost/core/server/services/member-welcome-emails) — import the package by name instead. — tools/gx/benchmark-automations-drain.ts:103
tools/gx/benchmark-recipient-preparation.ts:47 reaches into another package with a relative path (../../ghost/core/server/data/db/index.js) — import the package by name instead. — tools/gx/benchmark-recipient-preparation.ts:47
tools/gx/benchmark-recipient-preparation.ts:59 reaches into another package with a relative path (../../ghost/core/server/overrides.js) — import the package by name instead. — tools/gx/benchmark-recipient-preparation.ts:59
tools/gx/benchmark-recipient-preparation.ts:63 reaches into another package with a relative path (../../ghost/core/server/data/db/index.js) — import the package by name instead. — tools/gx/benchmark-recipient-preparation.ts:63
tools/gx/benchmark-recipient-preparation.ts:67 reaches into another package with a relative path (../../ghost/core/server/models/index.js) — import the package by name instead. — tools/gx/benchmark-recipient-preparation.ts:67
tools/gx/benchmark-recipient-preparation.ts:70 reaches into another package with a relative path (../../ghost/core/server/services/email-service/batch-sending-service.js) — import the package by name instead. — tools/gx/benchmark-recipient-preparation.ts:70
tools/gx/benchmark-recipient-preparation.ts:148 reaches into another package with a relative path (../../ghost/core/server/services/email-service/email-segmenter.js) — import the package by name instead. — tools/gx/benchmark-recipient-preparation.ts:148
tools/gx/create-package.ts:7 reaches into another package with a relative path (../scripts/lib/constants.ts) — import the package by name instead. — tools/gx/create-package.ts:7
tools/gx/create-package.ts:8 reaches into another package with a relative path (../scripts/lib/package-template.ts) — import the package by name instead. — tools/gx/create-package.ts:8
tools/gx/create-service.ts:7 reaches into another package with a relative path (../configs/oxlint/legacy-services.ts) — import the package by name instead. — tools/gx/create-service.ts:7
What to do
Fix the listed violations: import through the target package's declared public entry rather than a deep path into its internals or a relative path into its directory (69 rows); move the shared test helper into a source directory production code may depend on (1 row).
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.
linkSubscription has cyclomatic complexity 123 and cognitive complexity 179; 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. — ghost/core/server/services/members/members-api/repositories/member-repository.js:1503
onSaving has cyclomatic complexity 114 and cognitive complexity 125; 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. — ghost/core/server/models/post.js:572
(anonymous) has cyclomatic complexity 98 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. — REDACTED:56
FeedItem has cyclomatic complexity 85 and cognitive complexity 105; 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. — apps/activitypub/src/components/feed/feed-item.tsx:506
PostPreviewModal has cyclomatic complexity 74 and cognitive complexity 60; 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. — apps/admin/src/editor/preview/post-preview-modal.tsx:99
MemberDetailPage has cyclomatic complexity 69 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 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. — apps/admin/src/members/detail/member-detail.tsx:74
Domain has cyclomatic complexity 66 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. — apps/activitypub/src/views/preferences/components/domain.tsx:88
getDescription has cyclomatic complexity 61 and cognitive complexity 56; 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. — ghost/core/frontend/meta/description.js:5
NewsletterKPIs has cyclomatic complexity 60 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. — apps/admin/src/analytics/views/stats/newsletters/components/newsletters-kpis.tsx:128
update has cyclomatic complexity 56 and cognitive complexity 79; 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. — ghost/core/server/services/members/members-api/repositories/member-repository.js:850
TagDetail has cyclomatic complexity 55 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. — apps/admin/src/tags/detail/tag-detail.tsx:52
AdminLayout has cyclomatic complexity 53 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. — apps/admin/src/layout/admin-layout.tsx:132
(anonymous) has cyclomatic complexity 52 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 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. — apps/activitypub/src/views/notifications/notifications.tsx:414
ghost_head has cyclomatic complexity 51 and cognitive complexity 74; 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. — ghost/core/frontend/helpers/ghost_head.js:394
fetchLinkData has cyclomatic complexity 50 and cognitive complexity 70; 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:669
fetchQueryStrData has cyclomatic complexity 50 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 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:493
getAction has cyclomatic complexity 49 and cognitive complexity 63; 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. — apps/admin/src/members/detail/member-event.ts:246
(anonymous) has cyclomatic complexity 48 and cognitive complexity 45; 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. — apps/shade/src/components/ui/floating-sidebar.tsx:239
ActivityPage has cyclomatic complexity 48 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 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. — apps/admin/src/members/activity/member-activity.tsx:54
AutomationEditorContent has cyclomatic complexity 48 and cognitive complexity 34; 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. — apps/admin/src/automations/editor.tsx:111
(anonymous) has cyclomatic complexity 47 and cognitive complexity 34; 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. — apps/shade/src/components/patterns/settings-modal.tsx:93
ProfilePage has cyclomatic complexity 46 and cognitive complexity 40; 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. — apps/activitypub/src/views/profile/components/profile-page.tsx:58
(anonymous) has cyclomatic complexity 45 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 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. — apps/activitypub/src/views/preferences/components/profile.tsx:54
toggleCodeBlock has cyclomatic complexity 44 and cognitive complexity 118; 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. — koenig/kg-simplemde/src/js/simplemde.js:265
TagDetailForm has cyclomatic complexity 44 and cognitive complexity 40; 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. — apps/admin/src/tags/detail/tag-detail-form.tsx:74
commentMapper has cyclomatic complexity 42 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. — ghost/core/server/api/endpoints/utils/serializers/output/mappers/comments.js:51
Reader has cyclomatic complexity 42 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:535
create has cyclomatic complexity 41 and cognitive complexity 55; 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. — ghost/core/server/services/members/members-api/repositories/member-repository.js:585
MemberDetailSidebar has cyclomatic complexity 41 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — apps/admin/src/members/detail/member-detail-sidebar.tsx:49
exports has cyclomatic complexity 40 and cognitive complexity 55; 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. — ghost/core/server/api/endpoints/utils/serializers/output/mappers/posts.js:25
getTitle has cyclomatic complexity 40 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. — ghost/core/frontend/meta/title.js:11
Newsletter has cyclomatic complexity 40 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. — apps/admin/src/posts/analytics/newsletter/newsletter.tsx:100
RunList has cyclomatic complexity 40 and cognitive complexity 27; 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. — apps/admin/src/automations/components/canvas/run-list.tsx:150
update has cyclomatic complexity 39 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. — ghost/core/server/services/members/members-api/repositories/product-repository.js:374
reactAppConfig 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. — tools/configs/eslint-react/index.mjs:161
verifyService has cyclomatic complexity 38 and cognitive complexity 54; 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:201
NotificationText has cyclomatic complexity 38 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 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. — apps/portal/src/components/notification.jsx:31
EditorLoader has cyclomatic complexity 38 and cognitive complexity 34; 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. — apps/admin/src/editor/editor-screen.tsx:685
LatestPost has cyclomatic complexity 38 and cognitive complexity 32; 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. — apps/admin/src/analytics/views/stats/overview/components/latest-post.tsx:52
Overview has cyclomatic complexity 38 and cognitive complexity 27; 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. — apps/admin/src/posts/analytics/overview/overview.tsx:50
Do you agree with this assessment?
R3 · Large Files8.2 / 10Strong✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
apps/activitypub/src/views/preferences/components/dots-pattern.tsx has 3371 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/activitypub/src/views/preferences/components/dots-pattern.tsx:1
REDACTED has 3108 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
ghost/core/server/services/members/members-api/repositories/member-repository.js has 2716 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ghost/core/server/services/members/members-api/repositories/member-repository.js:1
apps/activitypub/src/hooks/use-activity-pub-queries.ts has 2692 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/activitypub/src/hooks/use-activity-pub-queries.ts:1
koenig/kg-simplemde/src/js/simplemde.js has 1897 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — koenig/kg-simplemde/src/js/simplemde.js:1
ghost/core/server/services/email-service/batch-sending-service.js has 1752 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ghost/core/server/services/email-service/batch-sending-service.js:1
ghost/core/server/services/automations/database-automations-repository.ts has 1646 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ghost/core/server/services/automations/database-automations-repository.ts:1
ghost/core/server/services/stats/posts-stats-service.js has 1558 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ghost/core/server/services/stats/posts-stats-service.js:1
ghost/core/server/models/post.js has 1493 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ghost/core/server/models/post.js:1
ghost/core/server/services/email-service/email-renderer.js has 1478 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ghost/core/server/services/email-service/email-renderer.js:1
REDACTED has 1398 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
ghost/core/server/services/gifts/gift-service.ts has 1360 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ghost/core/server/services/gifts/gift-service.ts:1
ghost/core/server/services/stripe/stripe-api.js has 1294 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ghost/core/server/services/stripe/stripe-api.js:1
apps/activitypub/src/components/feed/feed-item.tsx has 1253 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/activitypub/src/components/feed/feed-item.tsx:1
apps/portal/src/components/frame.styles.js has 1224 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/portal/src/components/frame.styles.js:1
ghost/core/server/services/members/members-api/controllers/router-controller.js has 1212 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ghost/core/server/services/members/members-api/controllers/router-controller.js:1
REDACTED has 1182 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
apps/admin/src/editor/engine/save-engine.ts has 1178 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/admin/src/editor/engine/save-engine.ts:1
apps/admin/src/editor/session/editor-session.ts has 1160 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/admin/src/editor/session/editor-session.ts:1
REDACTED has 1157 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
apps/portal/src/components/pages/gift-page.styles.js has 1140 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/portal/src/components/pages/gift-page.styles.js:1
apps/portal/src/actions.js has 1139 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/portal/src/actions.js:1
REDACTED has 1138 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
ghost/core/server/services/members/members-api/repositories/event-repository.js has 1128 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ghost/core/server/services/members/members-api/repositories/event-repository.js:1
apps/shade/src/components/patterns/filters.stories.tsx has 1113 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/shade/src/components/patterns/filters.stories.tsx:1
apps/portal/src/components/common/products-section.jsx has 1106 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/portal/src/components/common/products-section.jsx:1
REDACTED has 1059 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
apps/comments-ui/src/actions.ts has 1022 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/comments-ui/src/actions.ts:1
apps/admin/src/settings/email/newsletters/newsletter-detail-modal.tsx has 1005 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/admin/src/settings/email/newsletters/newsletter-detail-modal.tsx:1
apps/portal/src/utils/api.js has 998 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/portal/src/utils/api.js:1
apps/portal/src/utils/helpers.js has 964 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/portal/src/utils/helpers.js:1
apps/admin/src/automations/components/canvas/automation-canvas.tsx has 936 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/admin/src/automations/components/canvas/automation-canvas.tsx:1
REDACTED has 892 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
ghost/core/server/services/comments/comments-service.js has 879 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ghost/core/server/services/comments/comments-service.js:1
apps/admin-x-framework/src/api/members.ts has 856 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/admin-x-framework/src/api/members.ts:1
apps/portal/src/components/pages/signup-page.jsx has 848 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/portal/src/components/pages/signup-page.jsx:1
apps/portal/src/components/pages/account-plan-page.jsx has 834 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/portal/src/components/pages/account-plan-page.jsx:1
apps/portal/src/components/common/list-picker.tsx has 832 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/portal/src/components/common/list-picker.tsx:1
apps/admin/src/editor/editor-screen.tsx has 827 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/admin/src/editor/editor-screen.tsx:1
ghost/core/server/services/member-welcome-emails/member-welcome-email-service.js has 819 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ghost/core/server/services/member-welcome-emails/member-welcome-email-service.js:1
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Do you agree with this assessment?
R4 · Test Coverage9.7 / 10Exemplary✓ 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.
e2e/tests/fake-services/upgrade-host-protocol.test.ts:13 imports '../../../ghost/test/utils/fixtures/upgrade-supervisor', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — e2e/tests/fake-services/upgrade-host-protocol.test.ts:13
koenig/koenig-lexical/src/components/ui/cards/HtmlCard.stories.tsx:3 imports './HtmlCard.jsx', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/koenig-lexical/src/components/ui/cards/HtmlCard.stories.tsx:3
koenig/koenig-lexical/src/components/ui/cards/MarkdownCard.stories.tsx:3 imports './MarkdownCard.jsx', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — koenig/koenig-lexical/src/components/ui/cards/MarkdownCard.stories.tsx:3
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. (×37) — REDACTED:1, apps/comments-ui/src/app.tsx:1, apps/admin-toolbar/src/styles.ts:1, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
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 REDACTED script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: REDACTED scanned for test/lint/typecheck script wiring. Deterministic presence check.
This repository declares test tooling, and the ✓ above records that declaration — but e2e/tests/fake-services/upgrade-host-protocol.test.ts and 2 other test file(s) in this workspace cannot be loaded at all: it imports a module that names no file in this repository, so the runner throws while collecting it and none of its cases execute. The wiring is present and the suite it points at does not run as written, which is why the tooling tick must not be read as a statement that the tests pass. Fix the unloadable file(s) — each one is reported with its failing import under Test Coverage — then the declared script exercises what it claims to. — e2e/tests/fake-services/upgrade-host-protocol.test.ts:13
Do you agree with this assessment?
R7 · Dead Code7.9 / 10Strong✓ 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.
65 file(s) (~15153 LoC) were excluded from dead-code analysis. This package DOES declare main/module/exports — but every declared target is missing from the scanned tree, which is what a build-output entry (dist/, lib/, out/) looks like before the package is built. Point a declared target at the source entry, or build the package before scanning, so reachability can follow it. — koenig/kg-default-nodes
7 file(s) (~643 LoC) were excluded from dead-code analysis. This package DOES declare main/module/exports — but every declared target is missing from the scanned tree, which is what a build-output entry (dist/, lib/, out/) looks like before the package is built. Point a declared target at the source entry, or build the package before scanning, so reachability can follow it. — koenig/kg-lexical-html-renderer
130 file(s) (~25437 LoC) were excluded from dead-code analysis. This package DOES declare main/module/exports — but every declared target is missing from the scanned tree, which is what a build-output entry (dist/, lib/, out/) looks like before the package is built. Point a declared target at the source entry, or build the package before scanning, so reachability can follow it. — koenig/koenig-lexical
Unreachable from the 875 application, 558 tooling and 2886 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 (875 application, 558 tooling, 2886 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 (×34) — ghost/core/frontend/src/cards/js/video.js, ghost/core/frontend/src/cards/js/audio.js, ghost/core/server/data/migrations/versions/6.2/2025-09-30-14-28-09-add-utm-fields.js, …
no import path from any entry point (875 application, 558 tooling, 2886 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/admin/src/settings/components/selectors/unsplash-selector.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — apps/admin/src/settings/utils/portal.tsx
no import path from any entry point (875 application, 558 tooling, 2886 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (ghost/core/server/data/migrations/hooks/init/index.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — ghost/core/server/data/migrations/hooks/init/shutdown.js
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.
Declared in tools/gx/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Every import is type-only — move it to devDependencies. — ghost/core/frontend/meta/og-type.ts:1
Only test files import it (first: koenig/kg-default-nodes/test/generate-decorator-node.test.ts:3) — move it to devDependencies. — koenig/kg-default-nodes/package.json:80
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
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.
apps/activitypub/src/components/feed/feed-item-stats.tsx → apps/activitypub/src/components/modals/new-note-modal.tsx → apps/activitypub/src/components/feed/feed-item.tsx → apps/activitypub/src/components/feed/feed-item-stats.tsx (one verified cycle inside a mutually-dependent group of 4 files) — apps/activitypub/src/components/feed/feed-item-stats.tsx:1
apps/activitypub/src/components/layout/error/error.tsx → apps/activitypub/src/components/layout/layout.tsx → apps/activitypub/src/components/layout/header/index.tsx → apps/activitypub/src/components/layout/header/header.tsx → apps/activitypub/src/hooks/use-active-route.ts → apps/activitypub/src/routes.tsx → apps/activitypub/src/components/layout/error/index.ts → apps/activitypub/src/components/layout/error/error.tsx (one verified cycle inside a mutually-dependent group of 27 files) — apps/activitypub/src/components/layout/error/error.tsx:1
Other · Security — Read from this repository's JavaScript/TypeScript source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) — facts about code that hold whether or not it serves anything itself. Markup this repository SHIPS is scored for third-party script integrity whether or not the repository serves it itself, since a page handed to a consumer runs in that consumer’s origin. This repository commits the configuration that serves its own HTTP surface, so that configuration was read in full for the security response headers it sets. Of the server controls, two are read where the source shows them: every session or sign-in cookie the code sets is read for HttpOnly, Secure and SameSite at the line that sets it (a raw `Set-Cookie` header, Express, Fastify, Hono, Koa, Next.js, `cookie.serialize`, express-session and cookie-session), and every Node listener for HTTPS enforcement. HSTS, security response headers and input validation are NOT assessed for JavaScript/TypeScript: each is scored as an absence, an absence is only reportable over the production HTTP server, and in this ecosystem the file that opens the port is build output or a framework launcher rather than a file in the source tree. Their absence here is not a finding about this repository.
Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.
MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call. (×7) — ghost/core/frontend/services/asset-hash/index.js:82, ghost/core/frontend/services/rss/cache.js:10, ghost/core/frontend/web/routers/serve-favicon.js:14, …
`http://localhost:2368/ghost/assets/signup-form/signup-form.min.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository. 6 such include(s) across the repository's markup. — apps/signup-form/preview.html:22
What to do
Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 7 sites, not one: `ghost/core/frontend/services/asset-hash/index.js:82` (createHash("md5")), `ghost/core/frontend/services/rss/cache.js:10` (createHash("md5")), `ghost/core/frontend/web/routers/serve-favicon.js:14` (createHash("md5")), `REDACTED:96` (createHash("md5")), `ghost/core/server/lib/image/gravatar.js:21` (createHash("md5")), `ghost/core/server/services/remote-flags/resolve.ts:25` (createHash("md5")), `ghost/core/server/web/admin/controller.js:35` (createHash("md5")). Each is a separate decision — fixing only the line this row cites leaves the others in place.
Pin third-party scripts and verify them: name an exact version in the URL and add an `integrity="sha384-…"` hash alongside `crossorigin="anonymous"` (both are required — an integrity hash on a cross-origin script without `crossorigin` is not evaluated, it blocks the script). Where the vendor ships a continuously-updated loader and publishes no stable hash (tag managers, analytics, chat widgets), Subresource Integrity is not available: constrain it instead with a `Content-Security-Policy` that names the exact origins allowed to execute, and drop the script from the pages that do not need it. Where the page is shipped inside a package that others host, prefer vendoring the asset and serving it from the app’s own origin, so no consumer inherits a third-party dependency they did not choose.
Other · Code Health — Whether 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.
The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it. — apps/activitypub/src/views/preferences/components/profile.tsx:339
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 stream10.0 / 10Exemplary○ Nothing flagged
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.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
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 document2.0 / 10Critical✓ 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.
`checkSegmentPostAccess` is exported, takes a document from its caller (line 140) and hands it to `collectSegmentProductSlugs`, which calls itself at line 114 (`collectSegmentProductSlugs`) with a piece of `query` — and nowhere in `collectSegmentProductSlugs` 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 `collectSegmentProductSlugs` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — ghost/core/server/services/members/content-gating.js:114
`roughSize` is exported, takes a document from its caller (line 38) and hands it to `walk`, which calls itself at line 88 (`walk`) with a piece of `node` (and at line 96, line 106) — and nowhere in `walk` 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 `walk` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — ghost/core/server/adapters/cache/rough-size.ts:88
`deepMerge` is exported and takes `source: DeepPartial<T>` from its caller, and it calls itself at line 41 (`deepMerge`) with a piece of `source` — and nowhere in `deepMerge` 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 `deepMerge` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — apps/admin/src/utils/deep-merge.ts:41
`stripDirection` is exported and takes `value: unknown` from its caller, and it calls itself at line 40 (`stripDirection`) with a piece of `value` (and at line 48) — and nowhere in `stripDirection` 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 `stripDirection` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — apps/admin/src/editor/engine/lexical-compare.ts:40
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 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 9/26 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.
`fetchAndLog` 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 })`. — ghost/core/server/services/email-analytics/email-analytics-service-wrapper.ts:173
`getWebhookSecret` 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 })`. — ghost/core/server/services/activitypub/activity-pub-service.ts:92
`disableSite` 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 })`. — ghost/core/server/services/activitypub/activity-pub-service.ts:200
`sendEventsToTinybird` 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:531
`deleteSiteRows` 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:750
`fetchCounts` 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 })`. — ghost/core/frontend/src/comment-counts/comment-counts.js:62
`fetchPosts` 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 })`. — apps/sodo-search/src/search-index.ts:146
`fetchAuthors` 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 })`. — apps/sodo-search/src/search-index.ts:174
`fetchTags` 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 })`. — apps/sodo-search/src/search-index.ts:202
`getIntegrityToken` 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 })`. — apps/signup-form/src/utils/api.tsx:15
`sendMagicLink` 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 })`. — apps/signup-form/src/utils/api.tsx:31
`resolveGhostSiteUrl` 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 })`. — apps/admin/vite-backend-proxy.ts:9
`queryFn` 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 })`. — apps/admin/src/whats-new/hooks/use-changelog.ts:47
`onSave` 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 })`. — apps/admin/src/settings/growth/explore/testimonials-modal.tsx:55
`read` 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 })`. — apps/admin/src/members/detail/map-data/generate-map.mjs:21
`imageUrlToDataUrl` 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 })`. — apps/activitypub/src/utils/image.ts:10
`getSiteUrl` 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 })`. — apps/activitypub/src/hooks/use-activity-pub-queries.ts:44
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.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. 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 `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped5.1 / 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.
`content` 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. — REDACTED:175
`escapeHtml(author.profile_image)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns 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. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. — REDACTED:248
`text` 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. — apps/activitypub/src/views/preferences/components/edit-profile.tsx:35
`value.html` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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. — REDACTED:8
`extension?.container??''` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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. — apps/admin/src/client-extension-script.tsx:28
`item.html||''` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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. — REDACTED:50
`comment.html||''` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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. (×2) — REDACTED:94, REDACTED:58
`prompt` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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. — REDACTED:24
`processedFooterContent||''` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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. — REDACTED:622
`upgradeStatus.message` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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. — apps/admin/src/settings/general/about.tsx:73
`portalSignupTermsHtml?.toString()||''` 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. — apps/admin/src/settings/membership/portal/signup-options.tsx:66
`previewLayoutAttribute` is text this program did not author, and it is written into an unquoted attribute through markup this function returns 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. HTML text encoding does not help in an unquoted attribute — whitespace ends it; quote the attribute and encode the value. — apps/admin/src/settings/utils/generate-embed-code.ts:106
`settings.announcement` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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. — apps/announcement-bar/src/components/announcement-bar.tsx:40
`commentHtml` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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. — apps/comments-ui/src/components/content/comment.tsx:498
`styles` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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. (×5) — apps/comments-ui/src/components/frame.tsx:27, apps/portal/src/components/notification.jsx:310, REDACTED:332, …
`html` 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. — apps/comments-ui/src/utils/helpers.ts:259
`Object.entries(THEMES).map(([theme,prefix])=>`
${prefix} [data-chart=${id}] {
${colorConfig.map(([key,itemConfig])=>{…` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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. — REDACTED:76
`escapeExpression(getMarkdownUrl(canonicalUrl))` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns 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. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. — ghost/core/frontend/helpers/ghost_head.js:108
`html` is text this program did not author, and it is written into the text of an element through Handlebars' raw `{{{ }}}` output 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. (×2) — ghost/core/frontend/helpers/tpl/content-cta.hbs:1, ghost/core/server/services/email-service/email-templates/template.hbs:8
`preheaderSpacing` is text this program did not author, and it is written into the text of an element through Handlebars' raw `{{{ }}}` output 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. — REDACTED:14
`post.feature_image_caption` is text this program did not author, and it is written into the text of an element through Handlebars' raw `{{{ }}}` output 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. — REDACTED:140
`url` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns 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. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. (×2) — ghost/core/server/lib/magic-link/magic-link.js:222, ghost/core/server/lib/magic-link/magic-link.js:225
`replyHtml` is text this program did not author, and it is written into the text of an element through Handlebars' raw `{{{ }}}` output 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. — REDACTED:147
`commentHtml` is text this program did not author, and it is written into the text of an element through Handlebars' raw `{{{ }}}` output 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. (×2) — REDACTED:147, REDACTED:142
`escapeHTML(row.url as string)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns 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. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. — ghost/core/server/services/content-import/import/completion-email.ts:104
`postsUrl` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns 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. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. — ghost/core/server/services/content-import/import/completion-email.ts:119
`pagesUrl` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns 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. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. — ghost/core/server/services/content-import/import/completion-email.ts:120
`title` is text this program did not author, and it is written into the text of an element through Handlebars' raw `{{{ }}}` output 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. — REDACTED:9
`excerpt` is text this program did not author, and it is written into the text of an element through Handlebars' raw `{{{ }}}` output 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. — REDACTED:13
`footerContent` is text this program did not author, and it is written into the text of an element through Handlebars' raw `{{{ }}}` output 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. (×2) — ghost/core/server/services/email-service/email-templates/template.hbs:79, REDACTED:18
`content` is text this program did not author, and it is written into the text of an element through Handlebars' raw `{{{ }}}` output 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. — REDACTED:7
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.
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. (×23) — REDACTED:1081, packages/app-sdk/src/session.ts:224, REDACTED:70, …
`.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. (×10) — packages/app-sdk/src/session.ts:176, ghost/core/server/services/members-metafields/tracking.ts:91, ghost/core/server/services/members/import-export/tracking.ts:72, …
`.then(…, () => {})` 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. (×3) — ghost/core/server/services/offers/offer-bookshelf-repository.js:297, ghost/core/server/services/members/import-export/export/exporter.ts:188, ghost/core/server/services/gifts/gift-service.ts:885
`catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included. (×3) — ghost/core/server/services/oembed/extract-metadata.ts:166, REDACTED:426, ghost/core/server/services/machine-payments/adapters/x402-adapter.ts:48
`catch (err)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included. — ghost/core/server/services/member-attribution/url-translator.js:108
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.
45/99 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
~0.6 `!` null assertions per 1k TypeScript source lines — 196 assertion(s) across the 309284 source line(s) of the 2452 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: REDACTED (28), koenig/kg-converters/src/lexical-to-mobiledoc.ts (8), apps/activitypub/src/views/profile/profile.tsx (6). 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 — 3 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X6 Hand-rolled structured-format parsing — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not included — 41 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's 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 — Not applicable: 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).
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — compose up failed (exit 15 — the compose project is invalid) — service "ghost-dev" has neither an image nor a build context specified: invalid compose project; runtime evidence skipped 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, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no data at rest for these controls to protect. If it does persist personal data (through a hosted backend configured outside this repository, for instance), the controls belong to wherever that data is stored.
C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a hosted backend 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, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound. If it does (through a hosted backend configured outside this repository, for instance), the limit belongs wherever that data is stored.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over. If it does (through a hosted backend configured outside this repository, for instance), the rights are served wherever that data is stored.
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# only; the exposed JavaScript, TypeScript surface was not measured.
D25 ADR Conformance — no ADRs to check
D4 Code Duplication — This repository's production source (.mts, .ts, .tsx) is not read by D4's token comparison, which compares .NET source: duplication in it is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream. Not scored here — read the R10 card for this repository's duplication.
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
DM1 Aggregate boundaries — no aggregates detected — aggregate-boundary check not applicable
DM11 Constructible invalid state — no entities detected — construction-time invariants not assessable
DM2 Strongly-typed ids — no id-bearing domain types detected — strongly-typed-id adoption not assessable
DM3 Integration-event coupling — no integration events detected — coupling check not applicable
DM5 Encapsulated state — no domain entities found — DM5 grades how entities protect their state, and this repository declares none
DM7 Repository granularity — no repository abstraction detected (e.g. uses a document session)
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 — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
P9 Domain vs controller coverage — coverage data present for 3 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
R5 Dependency Freshness — uses a pnpm lockfile — dependency freshness not measured here; JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
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
X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
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
X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. TypeScript/JavaScript runs every callback on the one thread that owns its objects: a callback runs only when the body waiting on it has yielded, never alongside it, and a worker thread receives a COPY of what it is sent. A SharedArrayBuffer carries raw bytes, never an Array, Map or Set, so no collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
X27 Collection changed while being enumerated — Not applicable: this check looks for a loop whose body adds to or removes from the very collection the loop is walking, invalidating the enumerator it holds, and in this repository's languages that cannot happen. JavaScript and TypeScript have no iterator that a change can invalidate: an `Array` is walked by index against its live length, and a `Map` or `Set` by the ECMAScript specification's live entry list, so a body that adds to, removes from or empties what it walks raises nothing — every loop form (`for…of`, `for…in`, `forEach`, `map`, `filter`, `reduce`, `entries()`) on every built-in collection (`Array`, `Map`, `Set`, plain objects, `URLSearchParams`, `Headers`, `FormData`) runs to completion. Such a loop can still skip an element or never end, which is a different defect and not the one this check asks about. Not a gap in the analyzer and not a finding about your code.
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
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Critical — 175 finding(s)
AC4 · Keyboard semantics· Click handler on a non-interactive <div> · ×26
Click handler on a non-interactive <div> apps/activitypub/src/components/activities/activity-item.tsx:21— 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> apps/activitypub/src/components/feed/feed-item.tsx:734— 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> apps/activitypub/src/components/feed/feed-item.tsx:838— 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> apps/activitypub/src/components/feed/feed-item.tsx:875— 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> apps/activitypub/src/components/feed/feed-item.tsx:983— 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> apps/activitypub/src/components/feed/feed-item.tsx:996— 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> apps/activitypub/src/components/feed/feed-item.tsx:1079— 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> apps/activitypub/src/components/feed/feed-item.tsx:1194— 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> apps/activitypub/src/components/global/ap-avatar.tsx:183— 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> apps/activitypub/src/components/global/ap-avatar.tsx:203— 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> apps/activitypub/src/components/global/profile-preview-hover-card.tsx:158— 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> apps/activitypub/src/components/layout/layout.tsx:93— 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> apps/activitypub/src/views/explore/explore.tsx:51— 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> apps/activitypub/src/views/feed/components/suggested-profiles.tsx:131— 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> apps/activitypub/src/views/feed/note.tsx:220— 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> REDACTED:980— 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> apps/activitypub/src/views/notifications/notifications.tsx:501— 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> apps/activitypub/src/views/preferences/components/edit-profile.tsx:284— A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabIndex={0}.
Click handler on a non-interactive <div> apps/admin/src/analytics/views/stats/overview/components/latest-post.tsx:153— 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> apps/admin/src/analytics/views/stats/overview/components/latest-post.tsx:223— 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> apps/admin/src/analytics/views/stats/overview/components/latest-post.tsx:242— 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> apps/admin/src/analytics/views/stats/overview/components/latest-post.tsx:274— 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> apps/admin/src/analytics/views/stats/overview/components/latest-post.tsx:297— 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> apps/admin/src/analytics/views/stats/overview/components/top-posts.tsx:116— 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> apps/admin/src/analytics/views/stats/overview/components/top-posts.tsx:161— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
+ 1 more in this group — see findings.md.
D10 · Test Quality· No assertions (empty test) · ×22
No assertions (empty test): can register without node loaded in editor koenig/kg-default-transforms/test/transforms/remove-at-link-nodes.test.ts:504— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): re-init clears handlers so a reboot can register the same job types again ghost/test/unit/server/services/jobs-service/index.test.js:97— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): clearHandlers lets a rebooted process register the same job types again ghost/test/unit/server/services/jobs-service/jobs-service.test.ts:764— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): clearHandlers resets queue declarations so a reboot can re-declare them ghost/test/unit/server/services/jobs-service/jobs-service.test.ts:773— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): Can import the whole dataset without error ghost/test/unit/server/data/seeders/data-generator.test.js:50— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): destroys streaming sources and cleans up theme files when the client disconnects ghost/test/unit/server/data/exporter/site-exporter.test.ts:208— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): removes a theme zip that finishes staging after the client disconnects ghost/test/unit/server/data/exporter/site-exporter.test.ts:240— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): keeps a new field's form open until it has saved, then chooses the field apps/admin/src/settings/membership/checkout/checkout-fields.acceptance.test.tsx:557— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): does not show a send as complete while its status is loading apps/admin/src/posts/analytics/post-analytics.acceptance.test.tsx:298— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): holds the form still while its create saves apps/admin/src/members/import-members-custom-fields.acceptance.test.tsx:640— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): replaces the docked sidebar, pinned by default: admin7Design $admin7Design apps/admin/src/layout/floating-sidebar.acceptance.test.tsx:58— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): holds the input shut until the generator answers apps/admin/src/editor/editor-settings-url.acceptance.test.tsx:279— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): rechecks limit readiness when the mounted flow moves to another post apps/admin/src/editor/publish/publish-flow.component.test.tsx:1305— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): links the upgrade phrase when a host limit refuses the revert apps/admin/src/editor/publish/publish-flow.component.test.tsx:2002— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): names a since-archived newsletter a scheduled post was already sent to apps/admin/src/editor/publish/publish-flow.component.test.tsx:2118— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): describes the audience for a scheduled email that has not been sent yet apps/admin/src/editor/publish/publish-flow.component.test.tsx:2151— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): does not claim a scheduled email-only post will be published apps/admin/src/editor/publish/publish-flow.component.test.tsx:2176— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): does not count the current default newsletter for a missing persisted newsletter apps/admin/src/editor/publish/publish-flow.component.test.tsx:2205— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): does not replace a missing persisted segment with the current site default apps/admin/src/editor/publish/publish-flow.component.test.tsx:2234— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): does not claim that a failed published email was sent apps/admin/src/editor/publish/publish-flow.component.test.tsx:2262— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): keeps the dialog open while uninstalling, even on Escape apps/admin/src/apps/apps.acceptance.test.tsx:1513— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): keeps the notice on the review when trying again after confirming fails apps/admin/src/apps/install.acceptance.test.tsx:571— Test method has an empty body — it asserts nothing and exercises no code.
AC1 · Text alternatives· <img> without a text alternative · ×21
<img> without a text alternative apps/activitypub/src/components/feed/feed-item.tsx:428— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative apps/activitypub/src/components/feed/feed-item.tsx:437— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative apps/activitypub/src/components/feed/feed-item.tsx:463— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative apps/activitypub/src/components/global/ap-avatar.tsx:184— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative apps/activitypub/src/components/layout/onboarding/step-1.tsx:72— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative apps/activitypub/src/components/layout/onboarding/step-2.tsx:90— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative apps/activitypub/src/views/preferences/components/edit-profile.tsx:255— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative apps/activitypub/src/views/preferences/components/edit-profile.tsx:290— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative apps/activitypub/src/views/preferences/components/profile.tsx:600— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative apps/admin/src/posts/analytics/newsletter/components/feedback.tsx:153— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative apps/admin/src/settings/advanced/labs.tsx:62— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative apps/admin/src/settings/growth/explore.tsx:136— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative apps/admin/src/settings/growth/explore.tsx:194— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative apps/admin/src/settings/growth/network.tsx:106— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative apps/admin/src/settings/site/design-setting.tsx:34— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative REDACTED:23— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative REDACTED:121— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative REDACTED:121— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative REDACTED:121— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative REDACTED:121— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative koenig/kg-default-nodes/src/nodes/file/file-renderer.ts:65— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
Banned license: @img/sharp-libvips-darwin-arm64 REDACTED:5839— `@img/sharp-libvips-darwin-arm64` 1.3.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-darwin-x64 REDACTED:5844— `@img/sharp-libvips-darwin-x64` 1.3.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linux-arm REDACTED:5855— `@img/sharp-libvips-linux-arm` 1.3.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linux-arm64 REDACTED:5849— `@img/sharp-libvips-linux-arm64` 1.3.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linux-ppc64 REDACTED:5861— `@img/sharp-libvips-linux-ppc64` 1.3.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linux-riscv64 REDACTED:5867— `@img/sharp-libvips-linux-riscv64` 1.3.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linux-s390x REDACTED:5873— `@img/sharp-libvips-linux-s390x` 1.3.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linux-x64 REDACTED:5879— `@img/sharp-libvips-linux-x64` 1.3.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linuxmusl-arm64 REDACTED:5885— `@img/sharp-libvips-linuxmusl-arm64` 1.3.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linuxmusl-x64 REDACTED:5891— `@img/sharp-libvips-linuxmusl-x64` 1.3.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-wasm32 REDACTED:5953— `@img/sharp-wasm32` 0.35.5 is published on registry.npmjs.org under `Apache-2.0 AND LGPL-3.0-or-later AND MIT`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-win32-arm64 REDACTED:5962— `@img/sharp-win32-arm64` 0.35.5 is published on registry.npmjs.org under `Apache-2.0 AND LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-win32-ia32 REDACTED:5968— `@img/sharp-win32-ia32` 0.35.5 is published on registry.npmjs.org under `Apache-2.0 AND LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-win32-x64 REDACTED:5974— `@img/sharp-win32-x64` 0.35.5 is published on registry.npmjs.org under `Apache-2.0 AND LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: libheif-js REDACTED:12869— `libheif-js` 1.19.8 is published on registry.npmjs.org under `LGPL-3.0`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: ua-parser-js ghost/package.json:232— `ua-parser-js` 1.0.41 is published on registry.npmjs.org under `AGPL-3.0-or-later`, which this policy bans, and it is a production, optional or peer dependency this repository's committed lockfile resolves — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception.
AC4 · Keyboard semantics· Click handler on a non-interactive <span> · ×6
Click handler on a non-interactive <span> apps/activitypub/src/components/feed/feed-item.tsx:853— 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 <span> apps/activitypub/src/components/feed/feed-item.tsx:1207— 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 <span> apps/activitypub/src/components/feed/feed-item.tsx:1226— 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 <span> apps/activitypub/src/components/global/profile-preview-hover-card.tsx:176— 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 <span> apps/activitypub/src/components/global/profile-preview-hover-card.tsx:182— 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 <span> apps/activitypub/src/views/notifications/notifications.tsx:134— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
<html> without a lang .github/embed-renderer/404.html:2— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang REDACTED:2— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang REDACTED:2— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang REDACTED:2— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang REDACTED:2— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
Viewport restricts zoom apps/admin/index.html:8— 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.
Viewport restricts zoom apps/comments-ui/src/components/frame.tsx:28— 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.
Viewport restricts zoom REDACTED:333— 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.
Viewport restricts zoom apps/signup-form/src/components/frame.tsx:114— 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.
Viewport restricts zoom apps/sodo-search/src/components/popup-modal.tsx:692— 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.
AC3 · Page structure· Document without a <title> · ×5
Document without a <title> REDACTED:4— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> REDACTED:4— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> REDACTED:4— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> REDACTED:4— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> REDACTED:3— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
AC2 · Forms & labels· Link with no accessible name · ×3
Link with no accessible name apps/activitypub/src/views/preferences/components/profile.tsx:463— A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
Link with no accessible name apps/activitypub/src/views/preferences/components/profile.tsx:476— A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
Link with no accessible name apps/activitypub/src/views/preferences/components/profile.tsx:515— A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
AC2 · Forms & labels· <input> without a programmatic label · ×3
<input> without a programmatic label apps/admin/src/members/label-picker/label-picker.tsx:561— 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.
<input> without a programmatic label apps/comments-ui/src/components/popups/add-details-popup.tsx:203— 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.
<input> without a programmatic label apps/portal/src/components/common/date-picker.jsx:326— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC4 · Keyboard semantics· Click handler on a non-interactive <img> · ×3
Click handler on a non-interactive <img> apps/activitypub/src/components/feed/feed-item.tsx:136— 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 <img> apps/activitypub/src/components/feed/feed-item.tsx:163— 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 <img> apps/activitypub/src/components/feed/feed-item.tsx:207— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
AC1 · Text alternatives· <svg role="img"> without an accessible name · ×2
<svg role="img"> without an accessible name apps/activitypub/src/views/preferences/components/bluesky-sharing.tsx:223— An svg presented as an image needs a name — add a <title> child or an aria-label/aria-labelledby.
<svg role="img"> without an accessible name apps/activitypub/src/views/preferences/components/bluesky-sharing.tsx:281— An svg presented as an image needs a name — add a <title> child or an aria-label/aria-labelledby.
AC2 · Forms & labels· Custom control with no accessible name on <div> · ×2
Custom control with no accessible name on <div> apps/activitypub/src/components/feed/feed-item.tsx:734— This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
Custom control with no accessible name on <div> apps/activitypub/src/components/layout/layout.tsx:93— This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
AC2 · Forms & labels· <label> that labels no control · ×2
<label> that labels no control apps/admin/src/members/components/bulk-action-modals/import-members/mapping-step.tsx:574— 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 apps/portal/src/components/pages/account-plan-page.jsx:249— 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.
AC2 · Forms & labels· <button> with no accessible text · ×2
<button> with no accessible text apps/comments-ui/src/components/content/buttons/more-button.tsx:24— 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 apps/comments-ui/src/components/popups/close-button.tsx:9— 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· Hover-only interaction on <div> · ×2
Hover-only interaction on <div> apps/activitypub/src/components/feed/table-of-contents.tsx:193— This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus.
Hover-only interaction on <div> apps/activitypub/src/components/layout/onboarding/step-3.tsx:396— This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus.
Boundary-crossing change coupling: use-newsletter-stats-with-range.ts ↔ posts-stats-service.js apps/admin/src/analytics/hooks/use-newsletter-stats-with-range.ts:1— `apps/admin/src/analytics/hooks/use-newsletter-stats-with-range.ts` (context admin) and `ghost/core/server/services/stats/posts-stats-service.js` (context ghost) 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, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 `a4f835f3` 🐛 Fixed newsletter averages and charts to include all sends (#32281); `51772d07` Fixed Stats > Newsletters sort by clicks in the top newsletters compo… (at that commit the files were still `apps/stats/src/hooks/useNewsletterStatsWithRange.ts` and `ghost/core/core/server/services/stats/PostsStatsService.js`); `5f129db4` Improved Stats > Newsletter performance (#23809) (at that commit the files were still `apps/stats/src/hooks/useNewsletterStatsWithRange.ts` and `ghost/core/core/server/services/stats/PostsStatsService.js`) — run `git show` on any of them.
Boundary-crossing change coupling: top-content.tsx ↔ content-stats-service.js apps/admin/src/analytics/views/stats/web/components/top-content.tsx:1— `apps/admin/src/analytics/views/stats/web/components/top-content.tsx` (context admin) and `ghost/core/server/services/stats/content-stats-service.js` (context ghost) 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, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 `cc4eee9c` Added filter dropdown for UTM fields (#25422) (at that commit the files were still `apps/stats/src/views/Stats/Web/components/top-content.tsx` and `ghost/core/core/server/services/stats/ContentStatsService.js`); `66adb62a` Enhanced URL existence validation in stats services (#24046) (at that commit the files were still `apps/stats/src/views/Stats/Web/components/TopContent.tsx` and `ghost/core/core/server/services/stats/ContentStatsService.js`); `bc6de423` Fixed page filter for Stats > Top content component (#23745) (at that commit the files were still `apps/stats/src/views/Stats/Web.tsx` and `ghost/core/core/server/services/stats/ContentStatsService.js`) — run `git show` on any of them.
AC2 · Forms & labels· <textarea> without a programmatic label · ×1
<textarea> without a programmatic label apps/activitypub/src/components/modals/new-note-modal.tsx:394— 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.
AC4 · Keyboard semantics· Clickable role="button" that no keyboard user can reach · ×1
Clickable role="button" that no keyboard user can reach apps/activitypub/src/views/notifications/components/notification-item.tsx:32— This <div> announces itself as a role="button" and binds a click, but nothing can put focus on it: no tabIndex={0} in any spelling, no key handler, and nothing in this file moves focus or sets aria-activedescendant. The role tells assistive tech what the control IS; it does not make the control reachable, so a keyboard user cannot operate it at all (WCAG 2.1.1). Give it tabIndex={0}="0" and an Enter/Space key handler, or make it a native <button>. If a parent widget owns the keyboard model, that parent must move focus onto the active role="button" or point aria-activedescendant at it.
Focusable <div> isn't keyboard-operable apps/activitypub/src/views/preferences/components/settings.tsx:189— This <div> carries tabIndex={0}, so it is in the tab order and a keyboard user will land on it — but its behaviour is bound to the pointer only, with no key handler. A tabindex makes an element focusable, not operable: Enter and Space fire a click on a native <button> or <a href> and nowhere else, so this can be focused and never activated. Use a <button>, or handle Enter/Space in a key handler.
role="combobox" missing required aria-expanded apps/admin/src/settings/advanced/history-modal.tsx:278— The combobox role requires aria-expanded to convey its state. Add it.
No assertions: does nothing when this checkout has no Codex stack tools/gx/test/dev-lifecycle.test.ts:130— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: pairs a field only with its own shape packages/metafield-types/test/constraints.test.ts:20— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: stores only a value a rule accepted, with the shape it was accepted for packages/metafield-types/test/constraints.test.ts:25— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: keeps a cleared part out of a value, which never holds one packages/metafield-types/test/constraints.test.ts:34— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: keeps a write apart from a value packages/metafield-types/test/constraints.test.ts:41— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: types a shape's value as the catalog types its types' values packages/metafield-types/test/constraints.test.ts:49— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: passes if does not go over the limit packages/limit-service/test/limits.test.ts:207— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: passes if does not go over the limit packages/limit-service/test/limits.test.ts:300— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: accept correct values packages/limit-service/test/limits.test.ts:783— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: passes for values in the allowlist packages/limit-service/test/limits.test.ts:822— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: accepts real Knex connections and transactions packages/limit-service/test/types.test.ts:5— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: requires callers to handle nonnumeric count results packages/limit-service/test/types.test.ts:11— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: exports the context types as the contract defines them packages/app-sdk/test/index.test.ts:11— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: gives the app a read-only context packages/app-sdk/test/index.test.ts:17— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: reads GHOST_APP_URL from .env.production, which the environment overrides packages/app-sdk/test/vite.test.ts:356— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: only ever exposes calls that return promises packages/app-contracts/test/bridge/index.test.ts:45— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: parses to the PathMove type, which is written out without zod packages/app-contracts/test/bridge/paths.test.ts:172— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: parses to the Place type, which is written out without zod packages/app-contracts/test/bridge/places.test.ts:9— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: provides default and endpoint-specific value types packages/api-framework/test/frame.test.ts:23— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: allows empty values packages/api-framework/test/validators/input/all.test.ts:64— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: allows supported id values packages/api-framework/test/validators/input/all.test.ts:219— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: allows supported limit values packages/api-framework/test/validators/input/all.test.ts:276— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: no models passed packages/api-framework/test/serializers/handle.test.ts:120— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: Accepts valid JSON string in mobiledoc field packages/admin-api-schema/test/api.test.ts:123— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: Accepts lowercase event in webhook packages/admin-api-schema/test/api.test.ts:155— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
FunctionTooLong: dots-pattern.DotsPatternn apps/activitypub/src/views/preferences/components/dots-pattern.tsx:6— FunctionTooLong — DotsPatternn runs 3364 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3264 over it, 33.64× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: api.setupGhostApi apps/portal/src/utils/api.js:5— FunctionTooLong — setupGhostApi runs 746 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 646 over it, 7.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: feed-item.FeedItem apps/activitypub/src/components/feed/feed-item.tsx:506— FunctionTooLong — FeedItem runs 685 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 585 over it, 6.85× 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: editor-session.createEditorSession apps/admin/src/editor/session/editor-session.ts:319— FunctionTooLong — createEditorSession runs 622 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 522 over it, 6.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: save-engine.createSaveEngine apps/admin/src/editor/engine/save-engine.ts:424— FunctionTooLong — createSaveEngine runs 602 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 502 over it, 6.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: reader.Reader REDACTED:535— FunctionTooLong — Reader runs 567 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 467 over it, 5.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: theme-code-editor-modal.ThemeCodeEditorModal apps/admin/src/settings/site/theme/theme-code-editor-modal.tsx:298— FunctionTooLong — ThemeCodeEditorModal runs 556 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 456 over it, 5.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.
FunctionTooLong: domain.Domain apps/activitypub/src/views/preferences/components/domain.tsx:88— FunctionTooLong — Domain runs 461 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 361 over it, 4.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: tier-detail-modal.TierDetailModalContent apps/admin/src/settings/membership/tiers/tier-detail-modal.tsx:56— FunctionTooLong — TierDetailModalContent runs 449 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 349 over it, 4.49× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: automation-canvas.AutomationCanvas apps/admin/src/automations/components/canvas/automation-canvas.tsx:421— FunctionTooLong — AutomationCanvas runs 447 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 347 over it, 4.47× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: newsletter.Newsletter apps/admin/src/posts/analytics/newsletter/newsletter.tsx:100— FunctionTooLong — Newsletter runs 420 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 320 over it, 4.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: tag-detail-form.TagDetailForm apps/admin/src/tags/detail/tag-detail-form.tsx:74— FunctionTooLong — TagDetailForm runs 411 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 311 over it, 4.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: filters.FilterValueSelector REDACTED:2024— FunctionTooLong — FilterValueSelector 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: use-publish-flow.usePublishFlow apps/admin/src/editor/publish/use-publish-flow.ts:134— FunctionTooLong — usePublishFlow runs 396 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 296 over it, 3.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.
FunctionTooLong: filters.Filters REDACTED:2767— FunctionTooLong — Filters runs 396 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 296 over it, 3.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.
FunctionTooLong: gift-page.GiftPage apps/portal/src/components/pages/gift-page.tsx:80— FunctionTooLong — GiftPage runs 389 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 289 over it, 3.89× 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: tag-detail.TagDetail apps/admin/src/tags/detail/tag-detail.tsx:52— FunctionTooLong — TagDetail runs 377 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 277 over it, 3.77× 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: products-section.ProductsSectionStyles apps/portal/src/components/common/products-section.jsx:28— FunctionTooLong — ProductsSectionStyles runs 371 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 271 over it, 3.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: use-editor-session.useEditorSession apps/admin/src/editor/session/use-editor-session.ts:208— FunctionTooLong — useEditorSession runs 357 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 257 over it, 3.57× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: new-note-modal.NewNoteModal apps/activitypub/src/components/modals/new-note-modal.tsx:44— FunctionTooLong — NewNoteModal runs 346 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 246 over it, 3.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: new-subscribers-cadence.NewSubscribersCadence apps/admin/src/analytics/views/stats/growth/components/new-subscribers-cadence.tsx:66— FunctionTooLong — NewSubscribersCadence runs 345 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 245 over it, 3.45× 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: sidebar.Sidebar apps/admin/src/settings/layout/sidebar.tsx:320— FunctionTooLong — Sidebar runs 336 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 236 over it, 3.36× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: paid-subscription-change-chart.PaidMembersChangeChart apps/admin/src/analytics/views/stats/growth/components/paid-subscription-change-chart.tsx:182— FunctionTooLong — PaidMembersChangeChart 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: list-picker.ListPicker apps/portal/src/components/common/list-picker.tsx:448— FunctionTooLong — ListPicker runs 326 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 226 over it, 3.26× 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: mapping-step.MappingStep apps/admin/src/members/components/bulk-action-modals/import-members/mapping-step.tsx:103— FunctionTooLong — MappingStep runs 324 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 224 over it, 3.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Hotspot: apps/admin/src/automations/components/canvas/automation-canvas.tsx apps/admin/src/automations/components/canvas/automation-canvas.tsx:421— apps/admin/src/automations/components/canvas/automation-canvas.tsx changed 39 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 84 in automation-canvas.AutomationCanvas at line 421. 3 of those changes were fix/bug commits, and the other 36 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:34:22 -05:00' --until='2026-11-13 12:34:22 -05:00' --full-history --no-merges -- apps/admin/src/automations/components/canvas/automation-canvas.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: apps/admin/src/editor/editor-screen.tsx apps/admin/src/editor/editor-screen.tsx:685— apps/admin/src/editor/editor-screen.tsx changed 60 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in editor-screen.EditorLoader at line 685. 22 of those changes were fix/bug commits, and the other 38 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:34:22 -05:00' --until='2026-11-13 12:34:22 -05:00' --full-history --no-merges -- apps/admin/src/editor/editor-screen.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: apps/admin/src/automations/editor.tsx apps/admin/src/automations/editor.tsx:111— apps/admin/src/automations/editor.tsx changed 28 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 101 in editor.AutomationEditorContent at line 111. 2 of those changes were fix/bug commits, and the other 26 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:34:22 -05:00' --until='2026-11-13 12:34:22 -05:00' --full-history --no-merges -- apps/admin/src/automations/editor.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: ghost/core/server/services/members/members-api/repositories/member-repository.js ghost/core/server/services/members/members-api/repositories/member-repository.js:1503— ghost/core/server/services/members/members-api/repositories/member-repository.js changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 106 in MemberRepository.linkSubscription at line 1503. 2 of those changes were fix/bug commits, and the other 22 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:34:22 -05:00' --until='2026-11-13 12:34:22 -05:00' --full-history --no-merges -- ghost/core/server/services/members/members-api/repositories/member-repository.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: apps/admin/src/members/detail/member-detail.tsx apps/admin/src/members/detail/member-detail.tsx:74— apps/admin/src/members/detail/member-detail.tsx changed 25 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 89 in member-detail.MemberDetailPage at line 74. 3 of those changes were fix/bug commits, and the other 22 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:34:22 -05:00' --until='2026-11-13 12:34:22 -05:00' --full-history --no-merges -- apps/admin/src/members/detail/member-detail.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: apps/admin/src/editor/post-editor.tsx apps/admin/src/editor/post-editor.tsx:184— apps/admin/src/editor/post-editor.tsx changed 31 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 69 in post-editor.PostEditor at line 184. 9 of those changes were fix/bug commits, and the other 22 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:34:22 -05:00' --until='2026-11-13 12:34:22 -05:00' --full-history --no-merges -- apps/admin/src/editor/post-editor.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: apps/admin/src/editor/preview/post-preview-modal.tsx apps/admin/src/editor/preview/post-preview-modal.tsx:99— apps/admin/src/editor/preview/post-preview-modal.tsx changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 89 in post-preview-modal.PostPreviewModal at line 99. 6 of those changes were fix/bug commits, and the other 14 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:34:22 -05:00' --until='2026-11-13 12:34:22 -05:00' --full-history --no-merges -- apps/admin/src/editor/preview/post-preview-modal.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: apps/admin/src/editor/editor-header-actions.tsx apps/admin/src/editor/editor-header-actions.tsx:371— apps/admin/src/editor/editor-header-actions.tsx changed 34 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in editor-header-actions.PublishActions at line 371. 10 of those changes were fix/bug commits, and the other 24 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:34:22 -05:00' --until='2026-11-13 12:34:22 -05:00' --full-history --no-merges -- apps/admin/src/editor/editor-header-actions.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: apps/admin/src/tags/detail/tag-detail.tsx apps/admin/src/tags/detail/tag-detail.tsx:52— apps/admin/src/tags/detail/tag-detail.tsx changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 93 in tag-detail.TagDetail at line 52. 1 of those changes was a fix/bug commit, and the other 14 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:34:22 -05:00' --until='2026-11-13 12:34:22 -05:00' --full-history --no-merges -- apps/admin/src/tags/detail/tag-detail.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: apps/admin/src/layout/admin-layout.tsx apps/admin/src/layout/admin-layout.tsx:132— apps/admin/src/layout/admin-layout.tsx changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 68 in admin-layout.AdminLayout at line 132. 1 of those changes was a fix/bug commit, and the other 18 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:34:22 -05:00' --until='2026-11-13 12:34:22 -05:00' --full-history --no-merges -- apps/admin/src/layout/admin-layout.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: apps/portal/src/utils/api.js apps/portal/src/utils/api.js:5— apps/portal/src/utils/api.js changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 104 in api.setupGhostApi at line 5. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:34:22 -05:00' --until='2026-11-13 12:34:22 -05:00' --full-history --no-merges -- apps/portal/src/utils/api.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: apps/admin/src/editor/session/use-editor-session.ts apps/admin/src/editor/session/use-editor-session.ts:208— apps/admin/src/editor/session/use-editor-session.ts changed 39 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in use-editor-session.useEditorSession at line 208. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:34:22 -05:00' --until='2026-11-13 12:34:22 -05:00' --full-history --no-merges -- apps/admin/src/editor/session/use-editor-session.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:2024— REDACTED changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 80 in filters.FilterValueSelector at line 2024. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:34:22 -05:00' --until='2026-11-13 12:34:22 -05: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: ghost/core/server/services/automations/database-automations-repository.ts ghost/core/server/services/automations/database-automations-repository.ts:406— ghost/core/server/services/automations/database-automations-repository.ts changed 62 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in database-automations-repository.createDatabaseAutomationsRepository.edit at line 406. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:34:22 -05:00' --until='2026-11-13 12:34:22 -05:00' --full-history --no-merges -- ghost/core/server/services/automations/database-automations-repository.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: apps/admin/src/editor/session/editor-session.ts apps/admin/src/editor/session/editor-session.ts:395— apps/admin/src/editor/session/editor-session.ts changed 40 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in editor-session.createEditorSession.notifyChanged at line 395. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:34:22 -05:00' --until='2026-11-13 12:34:22 -05:00' --full-history --no-merges -- apps/admin/src/editor/session/editor-session.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: apps/admin/src/posts/analytics/components/post-analytics-header.tsx apps/admin/src/posts/analytics/components/post-analytics-header.tsx:82— apps/admin/src/posts/analytics/components/post-analytics-header.tsx changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in post-analytics-header.PostAnalyticsHeader at line 82. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:34:22 -05:00' --until='2026-11-13 12:34:22 -05:00' --full-history --no-merges -- apps/admin/src/posts/analytics/components/post-analytics-header.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: apps/admin/src/editor/settings/post-settings-sidebar.tsx apps/admin/src/editor/settings/post-settings-sidebar.tsx:158— apps/admin/src/editor/settings/post-settings-sidebar.tsx changed 32 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in post-settings-sidebar.PostSettingsSidebar at line 158. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:34:22 -05:00' --until='2026-11-13 12:34:22 -05:00' --full-history --no-merges -- apps/admin/src/editor/settings/post-settings-sidebar.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: apps/admin/src/members/components/bulk-action-modals/import-members/mapping-step.tsx apps/admin/src/members/components/bulk-action-modals/import-members/mapping-step.tsx:103— apps/admin/src/members/components/bulk-action-modals/import-members/mapping-step.tsx changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in mapping-step.MappingStep at line 103. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:34:22 -05:00' --until='2026-11-13 12:34:22 -05:00' --full-history --no-merges -- apps/admin/src/members/components/bulk-action-modals/import-members/mapping-step.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: apps/admin/src/settings/membership/tiers/tier-detail-modal.tsx apps/admin/src/settings/membership/tiers/tier-detail-modal.tsx:56— apps/admin/src/settings/membership/tiers/tier-detail-modal.tsx changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 70 in tier-detail-modal.TierDetailModalContent 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:34:22 -05:00' --until='2026-11-13 12:34:22 -05:00' --full-history --no-merges -- apps/admin/src/settings/membership/tiers/tier-detail-modal.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: apps/admin/src/members/components/bulk-action-modals/import-members/import-members-modal.tsx apps/admin/src/members/components/bulk-action-modals/import-members/import-members-modal.tsx:70— apps/admin/src/members/components/bulk-action-modals/import-members/import-members-modal.tsx changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 56 in import-members-modal.ImportMembersModal at line 70. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:34:22 -05:00' --until='2026-11-13 12:34:22 -05:00' --full-history --no-merges -- apps/admin/src/members/components/bulk-action-modals/import-members/import-members-modal.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: ghost/core/server/models/post.js ghost/core/server/models/post.js:572— ghost/core/server/models/post.js changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 114 in onSaving at line 572. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:34:22 -05:00' --until='2026-11-13 12:34:22 -05:00' --full-history --no-merges -- ghost/core/server/models/post.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: apps/admin/src/posts/analytics/newsletter/newsletter.tsx apps/admin/src/posts/analytics/newsletter/newsletter.tsx:100— apps/admin/src/posts/analytics/newsletter/newsletter.tsx changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 63 in newsletter.Newsletter at line 100. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:34:22 -05:00' --until='2026-11-13 12:34:22 -05:00' --full-history --no-merges -- apps/admin/src/posts/analytics/newsletter/newsletter.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: apps/admin/src/settings/general/user-detail-modal.tsx apps/admin/src/settings/general/user-detail-modal.tsx:122— apps/admin/src/settings/general/user-detail-modal.tsx changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 66 in user-detail-modal.UserDetailModalContent at line 122. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:34:22 -05:00' --until='2026-11-13 12:34:22 -05:00' --full-history --no-merges -- apps/admin/src/settings/general/user-detail-modal.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: apps/admin/src/automations/components/canvas/automation-sidebar.tsx apps/admin/src/automations/components/canvas/automation-sidebar.tsx:264— apps/admin/src/automations/components/canvas/automation-sidebar.tsx changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in automation-sidebar.AutomationSidebar at line 264. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:34:22 -05:00' --until='2026-11-13 12:34:22 -05:00' --full-history --no-merges -- apps/admin/src/automations/components/canvas/automation-sidebar.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: apps/admin/src/settings/site/theme/theme-code-editor-modal.tsx apps/admin/src/settings/site/theme/theme-code-editor-modal.tsx:298— apps/admin/src/settings/site/theme/theme-code-editor-modal.tsx changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 113 in theme-code-editor-modal.ThemeCodeEditorModal at line 298. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:34:22 -05:00' --until='2026-11-13 12:34:22 -05:00' --full-history --no-merges -- apps/admin/src/settings/site/theme/theme-code-editor-modal.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.
FileTooLong: components/dots-pattern.tsx apps/activitypub/src/views/preferences/components/dots-pattern.tsx— FileTooLong — 3368 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: DotsPatternn (6-3371). The bar is 500 significant lines; this is 2868 over it, 6.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: REDACTED REDACTED— FileTooLong — 2440 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1940 over it, 4.88× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: schema/schema.js ghost/core/server/data/schema/schema.js— FileTooLong — 2268 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). The bar is 1500 significant lines; this is 768 over it, 1.51× 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: hooks/use-activity-pub-queries.ts apps/activitypub/src/hooks/use-activity-pub-queries.ts— FileTooLong — 1889 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1389 over it, 3.78× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: repositories/member-repository.js ghost/core/server/services/members/members-api/repositories/member-repository.js— FileTooLong — 1713 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). The bar is 1500 significant lines; this is 213 over it, 1.14× 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: automations/database-automations-repository.ts ghost/core/server/services/automations/database-automations-repository.ts— FileTooLong — 1297 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 797 over it, 2.59× 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: email-service/batch-sending-service.js ghost/core/server/services/email-service/batch-sending-service.js— FileTooLong — 1119 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: BatchSendingService (46-1872). The bar is 500 significant lines; this is 619 over it, 2.24× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: feed/feed-item.tsx apps/activitypub/src/components/feed/feed-item.tsx— FileTooLong — 1084 significant lines (blank, comment-only and punctuation-only lines excluded), about 63% of them inside a single declaration: FeedItem (506-1336). The bar is 500 significant lines; this is 584 over it, 2.17× 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 — 1054 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: App (86-1518). The bar is 500 significant lines; this is 554 over it, 2.11× 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: gifts/gift-service.ts ghost/core/server/services/gifts/gift-service.ts— FileTooLong — 1053 significant lines (blank, comment-only and punctuation-only lines excluded), about 75% of them inside a single declaration: GiftService (323-1574). The bar is 500 significant lines; this is 553 over it, 2.11× 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: stats/posts-stats-service.js ghost/core/server/services/stats/posts-stats-service.js— FileTooLong — 982 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: PostsStatsService (79-1730). The bar is 500 significant lines; this is 482 over it, 1.96× 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 — 961 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 461 over it, 1.92× 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: common/products-section.jsx apps/portal/src/components/common/products-section.jsx— FileTooLong — 918 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 418 over it, 1.84× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 874 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 374 over it, 1.75× 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: src/actions.js apps/portal/src/actions.js— FileTooLong — 866 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). The bar is 500 significant lines; this is 366 over it, 1.73× 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: engine/save-engine.ts apps/admin/src/editor/engine/save-engine.ts— FileTooLong — 861 significant lines (blank, comment-only and punctuation-only lines excluded), about 70% of them inside a single declaration: createSaveEngine (424-1284). The bar is 500 significant lines; this is 361 over it, 1.72× 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: email-service/email-renderer.js ghost/core/server/services/email-service/email-renderer.js— FileTooLong — 856 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). The bar is 500 significant lines; this is 356 over it, 1.71× 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: newsletters/newsletter-detail-modal.tsx apps/admin/src/settings/email/newsletters/newsletter-detail-modal.tsx— FileTooLong — 845 significant lines (blank, comment-only and punctuation-only lines excluded), about 77% of them inside a single declaration: Sidebar (120-915). The bar is 500 significant lines; this is 345 over it, 1.69× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: session/editor-session.ts apps/admin/src/editor/session/editor-session.ts— FileTooLong — 837 significant lines (blank, comment-only and punctuation-only lines excluded), about 74% of them inside a single declaration: createEditorSession (319-1243). The bar is 500 significant lines; this is 337 over it, 1.67× 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 — 830 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 330 over it, 1.66× 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: repositories/event-repository.js ghost/core/server/services/members/members-api/repositories/event-repository.js— FileTooLong — 812 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 312 over it, 1.62× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: controllers/router-controller.js ghost/core/server/services/members/members-api/controllers/router-controller.js— FileTooLong — 800 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). The bar is 500 significant lines; this is 300 over it, 1.60× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/actions.ts apps/comments-ui/src/actions.ts— FileTooLong — 776 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 276 over it, 1.55× 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: canvas/automation-canvas.tsx apps/admin/src/automations/components/canvas/automation-canvas.tsx— FileTooLong — 770 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 270 over it, 1.54× 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: utils/api.js apps/portal/src/utils/api.js— FileTooLong — 750 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: setupGhostApi (5-1092). The bar is 500 significant lines; this is 250 over it, 1.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.
Boundary violation [package:relative-cross-package] .dependency-cruiser.cjs:3— .dependency-cruiser.cjs:3 reaches into another package with a relative path (./tools/scripts/ci/service-dependency-resolver.mjs) — import the package by name instead.
Boundary violation [package:third-party-deep-import] apps/admin/vite.shared.ts:33— apps/admin/vite.shared.ts:33 imports mingo/dist/mingo.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] ghost/core/server/data/db/better-sqlite3-patches.js:199— ghost/core/server/data/db/better-sqlite3-patches.js:199 imports knex/lib/dialects/better-sqlite3/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] ghost/core/server/data/importer/importers/data/data-importer.js:18— ghost/core/server/data/importer/importers/data/data-importer.js:18 imports @tryghost/string/lib, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:test-suite-dependency] ghost/core/server/data/migrations/init/2-create-fixtures.js:1— ghost/core/server/data/migrations/init/2-create-fixtures.js:1 imports ghost/core/server/data/schema/fixtures/index.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:third-party-deep-import] ghost/core/server/models/base/plugins/overrides.js:1— ghost/core/server/models/base/plugins/overrides.js:1 imports bookshelf/lib/constants, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/audio.ts:1— koenig/kg-default-cards/src/cards/audio.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/before-after.ts:1— koenig/kg-default-cards/src/cards/before-after.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/bookmark.ts:2— koenig/kg-default-cards/src/cards/bookmark.ts:2 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/button.ts:1— koenig/kg-default-cards/src/cards/button.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/callout.ts:1— koenig/kg-default-cards/src/cards/callout.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/code.ts:1— koenig/kg-default-cards/src/cards/code.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/email-cta.ts:2— koenig/kg-default-cards/src/cards/email-cta.ts:2 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/email.ts:1— koenig/kg-default-cards/src/cards/email.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/embed.ts:1— koenig/kg-default-cards/src/cards/embed.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/file.ts:1— koenig/kg-default-cards/src/cards/file.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/gallery.ts:8— koenig/kg-default-cards/src/cards/gallery.ts:8 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/header.ts:1— koenig/kg-default-cards/src/cards/header.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/html.ts:1— koenig/kg-default-cards/src/cards/html.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/image.ts:8— koenig/kg-default-cards/src/cards/image.ts:8 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/markdown.ts:2— koenig/kg-default-cards/src/cards/markdown.ts:2 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/product.ts:1— koenig/kg-default-cards/src/cards/product.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/toggle.ts:1— koenig/kg-default-cards/src/cards/toggle.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] koenig/kg-default-cards/src/cards/video.ts:1— koenig/kg-default-cards/src/cards/video.ts:1 imports @tryghost/url-utils/lib/utils/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] packages/parse-email-address/src/mailbox.ts:1— packages/parse-email-address/src/mailbox.ts:1 imports nodemailer/lib/addressparser/index.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
+ 15 more in this group — see findings.md.
X24 · Document value interpolated into markup unescaped· Untrusted text written into markup unescaped · ×40
Untrusted text written into markup unescaped REDACTED:175— `content` 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 REDACTED:248— `escapeHtml(author.profile_image)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns 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. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
Untrusted text written into markup unescaped apps/activitypub/src/views/preferences/components/edit-profile.tsx:35— `text` 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 REDACTED:8— `value.html` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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 apps/admin/src/client-extension-script.tsx:28— `extension?.container??''` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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 REDACTED:50— `item.html||''` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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 REDACTED:94— `comment.html||''` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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 REDACTED:58— `comment.html||''` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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 REDACTED:24— `prompt` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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 REDACTED:622— `processedFooterContent||''` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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 apps/admin/src/settings/general/about.tsx:73— `upgradeStatus.message` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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 apps/admin/src/settings/membership/portal/signup-options.tsx:66— `portalSignupTermsHtml?.toString()||''` 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 apps/admin/src/settings/utils/generate-embed-code.ts:106— `previewLayoutAttribute` is text this program did not author, and it is written into an unquoted attribute through markup this function returns 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. HTML text encoding does not help in an unquoted attribute — whitespace ends it; quote the attribute and encode the value.
Untrusted text written into markup unescaped apps/announcement-bar/src/components/announcement-bar.tsx:40— `settings.announcement` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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 apps/comments-ui/src/components/content/comment.tsx:498— `commentHtml` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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 apps/comments-ui/src/components/frame.tsx:27— `styles` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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 apps/comments-ui/src/utils/helpers.ts:259— `html` 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 apps/portal/src/components/notification.jsx:310— `styles` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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 REDACTED:332— `styles` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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 apps/portal/src/components/trigger-button.jsx:261— `styles` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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 REDACTED:76— `Object.entries(THEMES).map(([theme,prefix])=>`
${prefix} [data-chart=${id}] {
${colorConfig.map(([key,itemConfig])=>{…` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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 apps/signup-form/src/components/frame.tsx:113— `styles` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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 ghost/core/frontend/helpers/ghost_head.js:108— `escapeExpression(getMarkdownUrl(canonicalUrl))` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns 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. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
Untrusted text written into markup unescaped ghost/core/frontend/helpers/tpl/content-cta.hbs:1— `html` is text this program did not author, and it is written into the text of an element through Handlebars' raw `{{{ }}}` output 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 REDACTED:14— `preheaderSpacing` is text this program did not author, and it is written into the text of an element through Handlebars' raw `{{{ }}}` output 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.
Deprecated: eslint apps/activitypub/package.json:52— eslint 9.39.5, declared in apps/activitypub/package.json, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
Deprecated: eslint apps/admin-toolbar/package.json:40— eslint 9.39.5, declared in apps/admin-toolbar/package.json, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
Deprecated: eslint apps/admin-x-framework/package.json:133— eslint 9.39.5, declared in apps/admin-x-framework/package.json, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
Deprecated: eslint apps/admin/package.json:105— eslint 9.39.5, declared in apps/admin/package.json, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
Deprecated: eslint apps/announcement-bar/package.json:42— eslint 9.39.5, declared in apps/announcement-bar/package.json, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
Deprecated: eslint REDACTED:69— eslint 9.39.5, declared in REDACTED, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
Deprecated: eslint apps/portal/package.json:51— eslint 9.39.5, declared in apps/portal/package.json, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
Deprecated: recharts apps/shade/package.json:186— recharts 2.15.4, declared in apps/shade/package.json, is marked deprecated by its publisher: "1.x and 2.x branches are no longer active. Bump to Recharts v3 to receive latest features and bugfixes. See https://github.com/recharts/recharts/wiki/3.0-migration-guide". Replace it with the package or version that message names, or record why this one must stay.
Deprecated: eslint apps/shade/package.json:206— eslint 9.39.5, declared in apps/shade/package.json, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
Deprecated: eslint apps/signup-form/package.json:49— eslint 9.39.5, declared in apps/signup-form/package.json, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
Deprecated: eslint apps/sodo-search/package.json:47— eslint 9.39.5, declared in apps/sodo-search/package.json, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
Deprecated: eslint e2e/package.json:52— eslint 9.39.5, declared in e2e/package.json, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
Deprecated: path-match ghost/package.json:217— path-match 1.2.4, declared in ghost/package.json, is marked deprecated by its publisher: "This package is archived and no longer maintained. For support, visit https://github.com/expressjs/express/discussions". Replace it with the package or version that message names, or record why this one must stay.
Deprecated: eslint ghost/package.json:271— eslint 9.39.5, declared in ghost/package.json, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
Deprecated: eslint koenig/kg-unsplash-selector/package.json:42— eslint 9.39.5, declared in koenig/kg-unsplash-selector/package.json, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
Deprecated: eslint REDACTED:89— eslint 9.39.5, declared in REDACTED, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
Deprecated: eslint packages/adapters/cache-base/package.json:41— eslint 9.39.5, declared in packages/adapters/cache-base/package.json, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
Deprecated: eslint packages/adapters/jobs-base/package.json:52— eslint 9.39.5, declared in packages/adapters/jobs-base/package.json, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
Deprecated: eslint packages/adapters/redirects-base/package.json:43— eslint 9.39.5, declared in packages/adapters/redirects-base/package.json, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
Deprecated: eslint packages/adapters/route-settings-base/package.json:43— eslint 9.39.5, declared in packages/adapters/route-settings-base/package.json, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
Deprecated: eslint packages/adapters/scheduling-base/package.json:45— eslint 9.39.5, declared in packages/adapters/scheduling-base/package.json, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
Deprecated: eslint packages/adapters/sso-base/package.json:45— eslint 9.39.5, declared in packages/adapters/sso-base/package.json, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
Deprecated: eslint packages/adapters/storage-base/package.json:50— eslint 9.39.5, declared in packages/adapters/storage-base/package.json, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
Deprecated: eslint packages/adapters/upgrade-base/package.json:49— eslint 9.39.5, declared in packages/adapters/upgrade-base/package.json, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
Deprecated: eslint packages/admin-api-schema/package.json:47— eslint 9.39.5, declared in packages/admin-api-schema/package.json, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
+ 14 more in this group — see findings.md.
R4 · Test Coverage· No test reaches this file · ×37
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 apps/comments-ui/src/app.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/admin-toolbar/src/styles.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 ghost/scripts/pack.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/comments-ui/src/components/popups/add-details-popup.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 ghost/core/server/data/tinybird/scripts/docker-database-utils.js: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 ghost/core/frontend/src/member-attribution/member-attribution.js: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 apps/comments-ui/src/components/popups/delete-popup.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 ghost/scripts/minify-assets.mts: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 apps/comments-ui/src/components/popups/report-popup.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 apps/admin-toolbar/src/auth.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 apps/admin-toolbar/src/index.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 apps/comments-ui/src/components/frame.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 ghost/core/server/data/migrations/versions/6.2/2025-09-30-14-28-09-add-utm-fields.js: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 apps/comments-ui/src/components/iframe.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 ghost/core/server/data/migrations/versions/6.52/2026-07-08-17-00-01-add-email-tracking-fields-to-automations.js: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 apps/portal/src/index.jsx: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 apps/comments-ui/src/components/popups/generic-popup.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 ghost/core/server/data/migrations/versions/6.37/2026-05-04-07-51-14-add-members-created-at-id-index.js: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 apps/comments-ui/src/index.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 apps/comments-ui/src/utils/options.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 ghost/core/server/data/migrations/versions/5.89/2024-07-30-19-51-06-backfill-offer-redemptions.js: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 apps/admin/src/settings/hooks/use-check-theme-limit-error.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 apps/comments-ui/src/components/popup-box.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 ghost/core/frontend/apps/private-blogging/index.js: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.
TodoComment packages/limit-service/test/limit-service.test.ts:339— // TODO: allowlist type of limits doesn't have "checkIsOverLimit" implemented yet! — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/limit-service/test/limit-service.test.ts:388— // TODO: allowlist type of limits doesn't have "checkIsOverLimit" implemented yet! — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/i18n/test/i18n.test.ts:412— // The goal of the test below (TODO) is to make sure that new keys get added to context.json with — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment koenig/kg-default-transforms/src/transforms/denest.ts:118— // TODO: can we handle this elsewhere/more generically? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment koenig/kg-default-cards/test/cards/callout.test.ts:36— // TODO: proper email rendering — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment koenig/kg-converters/src/lexical-to-mobiledoc.ts:67— // TODO: Feels a little too explicit as it will need updating every time we add a new card. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ghost/test/unit/server/services/recommendations/service/recommendation-metadata-service.test.ts:181— // TODO: simulate DNS resolution failures if possible — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ghost/test/unit/server/data/importer/importers/data/posts.test.ts:137— // assert.equal(post.newsletter_id, TODO); — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ghost/test/integration/migrations/schema-sync.test.ts:484— // TODO: Fix this drift. See NY-1482 and NY-1483.
TodoComment ghost/core/server/services/stats/utils/tinybird.ts:179— // todo: refactor all uses to simply pass options through — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ghost/core/server/services/slack-ping/slack-ping-service.ts:265— // TODO: refactor post.published events to never fire on importing — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ghost/core/server/services/adapter-manager/adapter-paths.ts:22— // TODO: potentially deprecate/remove as part of Ghost 7.0 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment REDACTED:104— // TODO: check if mandatory values should be enforced — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ghost/core/server/auth/session/index.ts:39— // TODO: We have too many lines here, should move functions out into a utils module — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ghost/core/server/adapters/scheduling/error-capture.ts:10— // TODO: replace with dependency injection once the sentry module is TS — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ghost/core/server/adapters/scheduling/scheduling-default.ts:162— // TODO: fix this typing once @tryghost/request has types — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment e2e/tests/post-factory.test.ts:50— // TODO: Replace this with a 404 page object — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment e2e/tests/public/stripe-donation-checkout.test.ts:12— // TODO: REMOVE TEST — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment e2e/tests/public/stripe-offer-checkout.test.ts:12— // TODO: REMOVE TEST — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment e2e/helpers/pages/public/public-page.ts:117— // TODO: Ideally we should find a way to get rid of this. This is currently needed — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment apps/comments-ui/src/utils/hooks.ts:105— // TODO: This does not currently handle the case where the element is outOfViewport for both top&bottom or left&right — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment apps/comments-ui/src/utils/options.ts:23— // TODO: replace with dynamic data from script — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment apps/comments-ui/src/components/popup-box.tsx:6— // TODO: figure out what this type should be? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment apps/admin-x-framework/src/api/members.ts:113— // TODO: The server returns geolocation as a JSON-encoded string (not a parsed object). — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
Swallowed exception (empty catch) REDACTED:1081— 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) packages/app-sdk/src/session.ts:176— `.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) packages/app-sdk/src/session.ts:224— 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) REDACTED:70— 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) ghost/core/shared/one-at-a-time.ts:25— 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) ghost/core/server/services/stripe/webhook-manager.js:132— 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) ghost/core/server/services/offers/offer-bookshelf-repository.js:297— `.then(…, () => {})` 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) ghost/core/server/services/oembed/extract-metadata.ts:243— 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) REDACTED:390— 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) ghost/core/server/services/mentions/mention-sending-service.js:244— 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) ghost/core/server/services/members-metafields/tracking.ts:91— `.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) REDACTED:495— 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) ghost/core/server/services/members/import-export/index.ts:132— 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) ghost/core/server/services/members/import-export/tracking.ts:72— `.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) ghost/core/server/services/members/import-export/export/exporter.ts:188— `.then(…, () => {})` 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) ghost/core/server/services/member-attribution/member-attribution-service.js:64— 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) ghost/core/server/services/machine-payments/stripe/deposit-address-store.ts:179— 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) ghost/core/server/services/machine-payments/adapters/x402-adapter.ts:521— 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) ghost/core/server/services/indexnow-ping/indexnow-ping-service.ts:313— `.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) ghost/core/server/services/gifts/gift-service.ts:885— `.then(…, () => {})` 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) ghost/core/server/services/email-service/batch-sending-service.js:1353— 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) ghost/core/server/services/content-import/index.ts:54— 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) ghost/core/server/services/content-import/import/importer.ts:60— 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) ghost/core/server/services/content-import/import/staged-file.ts:27— `.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) ghost/core/server/services/audience-feedback/audience-feedback-controller.js:137— 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.
Change coupling: settings-fields.ts ↔ editor.ts apps/admin/src/editor/session/settings-fields.ts:1— `apps/admin/src/editor/session/settings-fields.ts` and `packages/testing/test-data/src/selectors/editor.ts` change together 57% of the time (8 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 8 shared commits counted here, the most recent 3 are `498cfe1b` Fixed the React editor refusing canonical URLs Ember accepts (#31266); `0237ab16` Added the X card pane to the React editor's settings sidebar (#30611); `78561ea0` Added the Facebook card pane to the React editor's settings sidebar (… — run `git show` on any of them.
Change coupling: sidebar.tsx ↔ membership-settings.tsx apps/admin/src/settings/layout/sidebar.tsx:1— `apps/admin/src/settings/layout/sidebar.tsx` and `apps/admin/src/settings/membership/membership-settings.tsx` change together 93% of the time (14 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 14 shared commits counted here, the most recent 3 are `c48b9d75` Added a host limit that can switch custom member fields off per site; `f14cc582` Changed feature flag reads to use the framework hook (#30147); `d1806864` 🐛 Fixed empty results while searching some keywords in /settings (#2… (at that commit the files were still `apps/admin-x-settings/src/components/sidebar.tsx` and `apps/admin-x-settings/src/components/settings/membership/membership-settings.tsx`) — run `git show` on any of them.
Change coupling: table-lists.js ↔ schema.js ghost/core/server/data/exporter/table-lists.js:1— `ghost/core/server/data/exporter/table-lists.js` and `ghost/core/server/data/schema/schema.js` change together 88% of the time (22 of the 25 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 22 shared commits counted here, the most recent 3 are `2c5f7c32` Removed the stored tax ID setting from the database; `c32034d1` Changed spam prevention to rate-limiter-flexible (#32643); `fa4d5e80` Added Ghost-specific Knex adapter tests for Better Auth (#32615) — run `git show` on any of them.
Change coupling: locations.tsx ↔ sources.tsx apps/admin/src/posts/analytics/web/components/locations.tsx:1— `apps/admin/src/posts/analytics/web/components/locations.tsx` and `apps/admin/src/posts/analytics/web/components/sources.tsx` 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, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 `bcf73020` Ported stats filter component and behavior to Post Analytics (#25641) (at that commit the files were still `apps/posts/src/views/PostAnalytics/Web/components/locations.tsx` and `apps/posts/src/views/PostAnalytics/Web/components/sources.tsx`); `ff7601c0` Ported stats filter component and behavior to Post Analytics (#25641) (at that commit the files were still `apps/posts/src/views/PostAnalytics/Web/components/locations.tsx` and `apps/posts/src/views/PostAnalytics/Web/components/sources.tsx`); `566b7180` Updated dark mode styles for stats overview (#24164) (at that commit the files were still `apps/posts/src/views/PostAnalytics/Web/components/Locations.tsx` and `apps/posts/src/views/PostAnalytics/Web/components/Sources.tsx`) — run `git show` on any of them.
Change coupling: feed-list.tsx ↔ inbox-list.tsx apps/activitypub/src/views/feed/components/feed-list.tsx:1— `apps/activitypub/src/views/feed/components/feed-list.tsx` and `apps/activitypub/src/views/inbox/components/inbox-list.tsx` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 7 shared commits counted here, the most recent 3 are `d0770050` Renamed Inbox and Feed to Reader and Notes in ActivityPub (#24115) (at that commit the files were still `apps/admin-x-activitypub/src/views/Feed/components/FeedList.tsx` and `apps/admin-x-activitypub/src/views/Inbox/components/InboxList.tsx`); `81f6471e` Added like count display in ActivityPub (#23677) (at that commit the files were still `apps/admin-x-activitypub/src/views/Feed/components/FeedList.tsx` and `apps/admin-x-activitypub/src/views/Inbox/components/InboxList.tsx`); `14adecfd` Added acceptance tests to `admin-x-activitypub` (#23562) (at that commit the files were still `apps/admin-x-activitypub/src/views/Feed/components/FeedList.tsx` and `apps/admin-x-activitypub/src/views/Inbox/components/InboxList.tsx`) — run `git show` on any of them.
Change coupling: ap-reply-box.tsx ↔ edit-profile.tsx apps/activitypub/src/components/global/ap-reply-box.tsx:1— `apps/activitypub/src/components/global/ap-reply-box.tsx` and `apps/activitypub/src/views/preferences/components/edit-profile.tsx` change together 64% of the time (9 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 `d8655aba` Improved new note and reply flow UX in ActivityPub (#23583) (at that commit the files were still `apps/admin-x-activitypub/src/components/global/APReplyBox.tsx` and `apps/admin-x-activitypub/src/views/Preferences/components/EditProfile.tsx`); `a31d5aaf` Added Sonner (toaster component) to Shade (#23482) (at that commit the files were still `apps/admin-x-activitypub/src/components/global/APReplyBox.tsx` and `apps/admin-x-activitypub/src/views/Preferences/components/EditProfile.tsx`); `740ac2b0` Migrated LoadingIndicator to Shade design system (#23421) (at that commit the files were still `apps/admin-x-activitypub/src/components/global/APReplyBox.tsx` and `apps/admin-x-activitypub/src/views/Preferences/components/EditProfile.tsx`) — run `git show` on any of them.
Change coupling: sources-card.tsx ↔ top-content.tsx apps/admin/src/analytics/views/stats/web/components/sources-card.tsx:1— `apps/admin/src/analytics/views/stats/web/components/sources-card.tsx` and `apps/admin/src/analytics/views/stats/web/components/top-content.tsx` change together 61% of the time (11 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 11 shared commits counted here, the most recent 3 are `fea5fadd` 🎨 Improved analytics chart bucketing for Year to date and All time r… (at that commit the files were still `apps/admin/src/analytics/views/Stats/Web/components/sources-card.tsx` and `apps/admin/src/analytics/views/Stats/Web/components/top-content.tsx`); `cc4eee9c` Added filter dropdown for UTM fields (#25422) (at that commit the files were still `apps/stats/src/views/Stats/Web/components/sources-card.tsx` and `apps/stats/src/views/Stats/Web/components/top-content.tsx`); `74205e4f` Added utm sources to Post Analytics > Web Sources (#24860) (at that commit the files were still `apps/stats/src/views/Stats/Web/components/SourcesCard.tsx` and `apps/stats/src/views/Stats/Web/components/TopContent.tsx`) — run `git show` on any of them.
Change coupling: gift-redemption-page.jsx ↔ gift-success-page.jsx apps/portal/src/components/pages/gift-redemption-page.jsx:1— `apps/portal/src/components/pages/gift-redemption-page.jsx` and `apps/portal/src/components/pages/gift-success-page.jsx` 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, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 `966c1ba1` Cleaned up gift subscription screens (#27825) (at that commit the files were still `apps/portal/src/components/pages/gift-redemption-page.js` and `apps/portal/src/components/pages/gift-success-page.js`); `80a109d8` Added noise effect to gift card preview and gift link preview image (… (at that commit the files were still `apps/portal/src/components/pages/gift-redemption-page.js` and `apps/portal/src/components/pages/gift-success-page.js`); `9c0edb73` Improved gift subscription Portal screens across selection, preview, … (at that commit the files were still `apps/portal/src/components/pages/gift-redemption-page.js` and `apps/portal/src/components/pages/gift-success-page.js`) — run `git show` on any of them.
Change coupling: recommendations.tsx ↔ explore.tsx apps/activitypub/src/components/layout/sidebar/recommendations.tsx:1— `apps/activitypub/src/components/layout/sidebar/recommendations.tsx` and `apps/activitypub/src/views/explore/explore.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, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 `76da41d1` Added profile preview card on hover feature to ActivityPub (#25049) (at that commit the files were still `apps/admin-x-activitypub/src/components/layout/Sidebar/Recommendations.tsx` and `apps/admin-x-activitypub/src/views/Explore/Explore.tsx`); `18e4433c` Improved text contrast in dark mode in ActivityPub (#24844) (at that commit the files were still `apps/admin-x-activitypub/src/components/layout/Sidebar/Recommendations.tsx` and `apps/admin-x-activitypub/src/views/Explore/Explore.tsx`); `62c4d442` Connected Explore and suggested profiles to optimized endpoint in AP … (at that commit the files were still `apps/admin-x-activitypub/src/components/layout/Sidebar/Recommendations.tsx` and `apps/admin-x-activitypub/src/views/Explore/Explore.tsx`) — run `git show` on any of them.
Change coupling: koenig-editor-base.tsx ↔ member-email-editor.tsx apps/admin/src/settings/components/koenig-editor-base.tsx:1— `apps/admin/src/settings/components/koenig-editor-base.tsx` and `apps/admin/src/settings/membership/member-emails/member-email-editor.tsx` 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, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 7 shared commits counted here, the most recent 3 are `225c9793` Refactored email editor into a standalone component (#26796) (at that commit the files were still `apps/admin-x-design-system/src/global/form/koenig-editor-base.tsx` and `apps/admin-x-settings/src/components/settings/membership/member-emails/member-email-editor.tsx`); `7a3f0ec8` Started handling clicks at bottom of welcome email editor (#26661) (at that commit the files were still `apps/admin-x-design-system/src/global/form/koenig-editor-base.tsx` and `apps/admin-x-settings/src/components/settings/membership/member-emails/member-email-editor.tsx`); `32cc3763` Added image upload support to new welcome email editor (#26600) (at that commit the files were still `apps/admin-x-design-system/src/global/form/koenig-editor-base.tsx` and `apps/admin-x-settings/src/components/settings/membership/member-emails/member-email-editor.tsx`) — run `git show` on any of them.
Change coupling: note.tsx ↔ REDACTED apps/activitypub/src/views/feed/note.tsx:1— `apps/activitypub/src/views/feed/note.tsx` and `REDACTED` change together 56% of the time (15 of the 27 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 15 shared commits counted here, the most recent 3 are `3ae1986b` Fixed social web handle not being constructed from API in Notes/Reade…; `76da41d1` Added profile preview card on hover feature to ActivityPub (#25049) (at that commit the files were still `apps/admin-x-activitypub/src/views/Feed/Note.tsx` and `apps/admin-x-activitypub/src/views/Inbox/components/Reader.tsx`); `84f6af7b` Fixed reply count double increment bug in ActivityPub (#24885) (at that commit the files were still `apps/admin-x-activitypub/src/views/Feed/Note.tsx` and `apps/admin-x-activitypub/src/views/Inbox/components/Reader.tsx`) — run `git show` on any of them.
Change coupling: stats.js ↔ posts-stats-service.js ghost/core/server/api/endpoints/stats.js:1— `ghost/core/server/api/endpoints/stats.js` and `ghost/core/server/services/stats/posts-stats-service.js` change together 54% of the time (14 of the 26 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 14 shared commits counted here, the most recent 3 are `a4f835f3` 🐛 Fixed newsletter averages and charts to include all sends (#32281); `b71a99be` Fixed stats endpoints inconsistently handling timezone (#24574) (at that commit the files were still `ghost/core/core/server/api/endpoints/stats.js` and `ghost/core/core/server/services/stats/PostsStatsService.js`); `8c46c5d8` Fixed sorting in Stats > Growth > Top sources (#24022) (at that commit the files were still `ghost/core/core/server/api/endpoints/stats.js` and `ghost/core/core/server/services/stats/PostsStatsService.js`) — run `git show` on any of them.
Change coupling: comments.js ↔ comments-service.js ghost/core/server/api/endpoints/utils/serializers/output/mappers/comments.js:1— `ghost/core/server/api/endpoints/utils/serializers/output/mappers/comments.js` and `ghost/core/server/services/comments/comments-service.js` 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, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 7 shared commits counted here, the most recent 3 are `5fdc8067` 🐛 Fixed comments on gated posts being hidden from readers without ac… (at that commit the files were still `ghost/core/core/server/api/endpoints/utils/serializers/output/mappers/comments.js` and `ghost/core/core/server/services/comments/comments-service.js`); `e76828b3` Added comment dislike server support (#28020) (at that commit the files were still `ghost/core/core/server/api/endpoints/utils/serializers/output/mappers/comments.js` and `ghost/core/core/server/services/comments/comments-service.js`); `0bc4c70c` Added count.direct_replies to comments API (at that commit the files were still `ghost/core/core/server/api/endpoints/utils/serializers/output/mappers/comments.js` and `ghost/core/core/server/services/comments/comments-service.js`) — run `git show` on any of them.
Change coupling: stats-service.js ↔ REDACTED ghost/core/server/services/stats/stats-service.js:1— `ghost/core/server/services/stats/stats-service.js` and `REDACTED` change together 52% of the time (15 of the 29 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 15 shared commits counted here, the most recent 3 are `f9b448ba` Removed /stats/utm-growth endpoint (#25900) (at that commit the files were still `ghost/core/core/server/services/stats/stats-service.js` and `ghost/core/core/server/web/api/endpoints/admin/routes.js`); `e62550f6` Added stats utm endpoints with fixture data (#25068) (at that commit the files were still `ghost/core/core/server/services/stats/StatsService.js` and `ghost/core/core/server/web/api/endpoints/admin/routes.js`); `b2bf6315` Added JWT authentication for Tinybird API endpoints (#24133) (at that commit the files were still `ghost/core/core/server/services/stats/StatsService.js` and `ghost/core/core/server/web/api/endpoints/admin/routes.js`) — run `git show` on any of them.
Change coupling: card.tsx ↔ tabs.tsx apps/shade/src/components/ui/card.tsx:1— `apps/shade/src/components/ui/card.tsx` and `apps/shade/src/components/ui/tabs.tsx` change together 50% of the time (8 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 `bb46e86d` Shade: moved gh-chart, filters and KPI wrappers (#27665); `f364a9f1` Shade component cleanup (#27565); `5e02c7a5` Improved responsive design in site-wide analytics (#24059) — run `git show` on any of them.
Change coupling: feed-list.tsx ↔ REDACTED apps/activitypub/src/views/feed/components/feed-list.tsx:1— `apps/activitypub/src/views/feed/components/feed-list.tsx` and `REDACTED` 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, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 5 shared commits counted here, the most recent 3 are `d0770050` Renamed Inbox and Feed to Reader and Notes in ActivityPub (#24115) (at that commit the files were still `apps/admin-x-activitypub/src/views/Feed/components/FeedList.tsx` and `apps/admin-x-activitypub/src/views/Inbox/components/Reader.tsx`); `81f6471e` Added like count display in ActivityPub (#23677) (at that commit the files were still `apps/admin-x-activitypub/src/views/Feed/components/FeedList.tsx` and `apps/admin-x-activitypub/src/views/Inbox/components/Reader.tsx`); `d8655aba` Improved new note and reply flow UX in ActivityPub (#23583) (at that commit the files were still `apps/admin-x-activitypub/src/views/Feed/components/FeedList.tsx` and `apps/admin-x-activitypub/src/views/Inbox/components/Reader.tsx`) — run `git show` on any of them.
Change coupling: stats.js ↔ content-stats-service.js ghost/core/server/api/endpoints/stats.js:1— `ghost/core/server/api/endpoints/stats.js` and `ghost/core/server/services/stats/content-stats-service.js` 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, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 5 shared commits counted here, the most recent 3 are `5c73aaf7` Added gift link filter to web analytics (#28987) (at that commit the files were still `ghost/core/core/server/api/endpoints/stats.js` and `ghost/core/core/server/services/stats/content-stats-service.js`); `6931a9d3` Added devices filter to Analytics > Web (#25635) (at that commit the files were still `ghost/core/core/server/api/endpoints/stats.js` and `ghost/core/core/server/services/stats/ContentStatsService.js`); `cc4eee9c` Added filter dropdown for UTM fields (#25422) (at that commit the files were still `ghost/core/core/server/api/endpoints/stats.js` and `ghost/core/core/server/services/stats/ContentStatsService.js`) — run `git show` on any of them.
Change coupling: feed-item.tsx ↔ recommendations.tsx apps/activitypub/src/components/feed/feed-item.tsx:1— `apps/activitypub/src/components/feed/feed-item.tsx` and `apps/activitypub/src/components/layout/sidebar/recommendations.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, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 5 shared commits counted here, the most recent 3 are `76da41d1` Added profile preview card on hover feature to ActivityPub (#25049) (at that commit the files were still `apps/admin-x-activitypub/src/components/feed/FeedItem.tsx` and `apps/admin-x-activitypub/src/components/layout/Sidebar/Recommendations.tsx`); `18e4433c` Improved text contrast in dark mode in ActivityPub (#24844) (at that commit the files were still `apps/admin-x-activitypub/src/components/feed/FeedItem.tsx` and `apps/admin-x-activitypub/src/components/layout/Sidebar/Recommendations.tsx`); `24496978` Added inline follow button next to user avatars in ActivityPub (#24028) (at that commit the files were still `apps/admin-x-activitypub/src/components/feed/FeedItem.tsx` and `apps/admin-x-activitypub/src/components/layout/Sidebar/Recommendations.tsx`) — run `git show` on any of them.
Change coupling: gift-redemption-page.jsx ↔ magic-link-page.jsx apps/portal/src/components/pages/gift-redemption-page.jsx:1— `apps/portal/src/components/pages/gift-redemption-page.jsx` and `apps/portal/src/components/pages/magic-link-page.jsx` 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, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 `966c1ba1` Cleaned up gift subscription screens (#27825) (at that commit the files were still `apps/portal/src/components/pages/gift-redemption-page.js` and `apps/portal/src/components/pages/magic-link-page.js`); `9c0edb73` Improved gift subscription Portal screens across selection, preview, … (at that commit the files were still `apps/portal/src/components/pages/gift-redemption-page.js` and `apps/portal/src/components/pages/magic-link-page.js`); `29f8ab36` Polished Portal gift card design (#27757) (at that commit the files were still `apps/portal/src/components/pages/gift-redemption-page.js` and `apps/portal/src/components/pages/magic-link-page.js`) — run `git show` on any of them.
Change coupling: layout.tsx ↔ inbox-list.tsx apps/activitypub/src/components/layout/layout.tsx:1— `apps/activitypub/src/components/layout/layout.tsx` and `apps/activitypub/src/views/inbox/components/inbox-list.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, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 5 shared commits counted here, the most recent 3 are `2c9fc667` Updated ActivityPub to use dynamic topics and recommendations from AP… (at that commit the files were still `apps/activitypub/src/components/layout/Layout.tsx` and `apps/activitypub/src/views/Inbox/components/InboxList.tsx`); `3f756554` Added topic filtering to Explore view with feature flag (#25438) (at that commit the files were still `apps/activitypub/src/components/layout/Layout.tsx` and `apps/activitypub/src/views/Inbox/components/InboxList.tsx`); `ade070eb` ✨ Added discovery feeds to the Network tab (#25359) (at that commit the files were still `apps/activitypub/src/components/layout/Layout.tsx` and `apps/activitypub/src/views/Inbox/components/InboxList.tsx`) — run `git show` on any of them.
Skipped test: can copy/paste koenig/koenig-lexical/test/e2e/card-behaviour.test.ts:1861— Skipped — switched off by test.skip
Skipped test: "# " before list item converts list to h1 koenig/koenig-lexical/test/e2e/text-transforms/headings.test.ts:172— Skipped — switched off by test.skip
Skipped test: can use emojis in captions koenig/koenig-lexical/test/e2e/plugins/EmojiPickerPlugin.test.ts:233— Skipped — switched off by test.skip
Skipped test: can open selector koenig/koenig-lexical/test/e2e/modals/UnsplashSelector.test.ts:20— Skipped — switched off by test.skip
Skipped test: renders (empty) image card under container koenig/koenig-lexical/test/e2e/modals/UnsplashSelector.test.ts:28— Skipped — switched off by test.skip
Skipped test: can close selector koenig/koenig-lexical/test/e2e/modals/UnsplashSelector.test.ts:37— Skipped — switched off by test.skip
Skipped test: empty image card removed when closing model koenig/koenig-lexical/test/e2e/modals/UnsplashSelector.test.ts:47— Skipped — switched off by test.skip
Skipped test: renders unsplash gallery koenig/koenig-lexical/test/e2e/modals/UnsplashSelector.test.ts:58— Skipped — switched off by test.skip
Skipped test: can select / zoom image koenig/koenig-lexical/test/e2e/modals/UnsplashSelector.test.ts:68— Skipped — switched off by test.skip
Skipped test: can download image koenig/koenig-lexical/test/e2e/modals/UnsplashSelector.test.ts:81— Skipped — switched off by test.skip
Skipped test: can click like button, opens in new tab koenig/koenig-lexical/test/e2e/modals/UnsplashSelector.test.ts:98— Skipped — switched off by test.skip
Skipped test: can search for photos koenig/koenig-lexical/test/e2e/modals/UnsplashSelector.test.ts:116— Skipped — switched off by test.skip
Skipped test: closes a zoomed image when searching koenig/koenig-lexical/test/e2e/modals/UnsplashSelector.test.ts:136— Skipped — switched off by test.skip
Skipped test: paste as link button removes card and inserts text node link koenig/koenig-lexical/test/e2e/cards/bookmark-card-with-search.test.ts:188— Skipped — switched off by test.skip
Skipped test: paste as link button removes card and inserts text node link koenig/koenig-lexical/test/e2e/cards/bookmark-card-without-search.test.ts:182— Skipped — switched off by test.skip
Skipped test: can delete and undo without losing caption koenig/koenig-lexical/test/e2e/cards/embed-card.test.ts:400— Skipped — switched off by test.skip
Skipped test: can paste html to caption koenig/koenig-lexical/test/e2e/cards/image-card.test.ts:326— Skipped — switched off by test.skip
Skipped test: can drag image card onto image card to create gallery koenig/koenig-lexical/test/e2e/cards/image-card.test.ts:1148— Skipped — switched off by test.skip
Skipped test: changes the layout options from the settings panel koenig/koenig-lexical/test/e2e/cards/signup-card.test.ts:470— Skipped — switched off by test.skip
MethodTooLong: MemberRepository.linkSubscription ghost/core/server/services/members/members-api/repositories/member-repository.js:1503— MethodTooLong — linkSubscription runs 478 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 378 over it, 4.78× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ProductRepository.update ghost/core/server/services/members/members-api/repositories/product-repository.js:374— MethodTooLong — update runs 231 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 131 over it, 2.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: MemberRepository.update ghost/core/server/services/members/members-api/repositories/member-repository.js:850— MethodTooLong — update runs 199 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 99 over it, 1.99× 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: PostsStatsService.getTopPostsViews ghost/core/server/services/stats/posts-stats-service.js:1321— MethodTooLong — getTopPostsViews runs 163 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 63 over it, 1.63× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: MembersCSVImporter.writeRows ghost/core/server/services/members/import-export/import/importer.ts:445— MethodTooLong — writeRows runs 152 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 52 over it, 1.52× 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: MemberRepository.create ghost/core/server/services/members/members-api/repositories/member-repository.js:585— MethodTooLong — create runs 151 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 51 over it, 1.51× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: App.fetchLinkData REDACTED:669— MethodTooLong — fetchLinkData runs 144 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 44 over it, 1.44× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: GiftDeliveryService.send ghost/core/server/services/gifts/gift-delivery-service.ts:229— MethodTooLong — send runs 143 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 43 over it, 1.43× 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: EmailServiceWrapper.init ghost/core/server/services/email-service/email-service-wrapper.js:18— MethodTooLong — init runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: MembersStripeCustomersSubscriptionsImporter.generate ghost/core/server/data/seeders/importers/members-stripe-customers-subscriptions-importer.js:100— MethodTooLong — generate runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ProductRepository.create ghost/core/server/services/members/members-api/repositories/product-repository.js:174— MethodTooLong — create runs 118 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 18 over it, 1.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: GiftService.startCheckout ghost/core/server/services/gifts/gift-service.ts:330— MethodTooLong — startCheckout runs 115 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 15 over it, 1.15× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ContentCSVImporter.processRows ghost/core/server/services/content-import/import/importer.ts:231— MethodTooLong — processRows 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: MemberController.updateSubscription REDACTED:100— MethodTooLong — updateSubscription 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: MemberWelcomeEmailRenderer.render ghost/core/server/services/member-welcome-emails/member-welcome-email-renderer.js:121— MethodTooLong — render runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: App.getPageFromLinkPath REDACTED:1176— MethodTooLong — getPageFromLinkPath runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× 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: PostsStatsService.getNewsletterBasicStats ghost/core/server/services/stats/posts-stats-service.js:835— MethodTooLong — getNewsletterBasicStats runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× 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: MemberRepository.setComplimentarySubscription ghost/core/server/services/members/members-api/repositories/member-repository.js:2772— MethodTooLong — setComplimentarySubscription runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.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.
X2 · Cancellation propagation· Async function without AbortSignal · ×17
Async function without AbortSignal: fetchAndLog ghost/core/server/services/email-analytics/email-analytics-service-wrapper.ts:173— `fetchAndLog` 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: getWebhookSecret ghost/core/server/services/activitypub/activity-pub-service.ts:92— `getWebhookSecret` 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: disableSite ghost/core/server/services/activitypub/activity-pub-service.ts:200— `disableSite` 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: sendEventsToTinybird REDACTED:531— `sendEventsToTinybird` 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: deleteSiteRows REDACTED:750— `deleteSiteRows` 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: fetchCounts ghost/core/frontend/src/comment-counts/comment-counts.js:62— `fetchCounts` 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: fetchPosts apps/sodo-search/src/search-index.ts:146— `fetchPosts` 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: fetchAuthors apps/sodo-search/src/search-index.ts:174— `fetchAuthors` 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: fetchTags apps/sodo-search/src/search-index.ts:202— `fetchTags` 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: getIntegrityToken apps/signup-form/src/utils/api.tsx:15— `getIntegrityToken` 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: sendMagicLink apps/signup-form/src/utils/api.tsx:31— `sendMagicLink` 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: resolveGhostSiteUrl apps/admin/vite-backend-proxy.ts:9— `resolveGhostSiteUrl` 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: queryFn apps/admin/src/whats-new/hooks/use-changelog.ts:47— `queryFn` 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: onSave apps/admin/src/settings/growth/explore/testimonials-modal.tsx:55— `onSave` 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: read apps/admin/src/members/detail/map-data/generate-map.mjs:21— `read` 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: imageUrlToDataUrl apps/activitypub/src/utils/image.ts:10— `imageUrlToDataUrl` 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: getSiteUrl apps/activitypub/src/hooks/use-activity-pub-queries.ts:44— `getSiteUrl` 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 })`.
Outbound HTTP without resilience ghost/core/frontend/public/private.js:270— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience ghost/core/frontend/public/private.js:279— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience ghost/core/frontend/src/admin-auth/message-handler.js:20— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience ghost/core/frontend/src/admin-auth/message-handler.js:33— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience ghost/core/frontend/src/admin-auth/message-handler.js:45— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience ghost/core/frontend/src/admin-auth/message-handler.js:46— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience ghost/core/frontend/src/admin-auth/message-handler.js:47— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience ghost/core/frontend/src/admin-auth/message-handler.js:48— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience ghost/core/frontend/src/comment-counts/comment-counts.js:70— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience REDACTED:536— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience REDACTED:752— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience REDACTED:767— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience ghost/core/server/services/activitypub/activity-pub-service.ts:96— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience ghost/core/server/services/activitypub/activity-pub-service.ts:204— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience ghost/core/server/services/automations/tinybird-automation-stats.ts:8— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience ghost/core/server/services/email-analytics/email-analytics-service-wrapper.ts:179— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Fake-async — async method never awaits ghost/core/bridge.js:79— `activateTheme` 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 ghost/core/frontend/services/theme-engine/middleware/update-global-template-options.js:22— `updateGlobalTemplateOptions` 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 ghost/core/server/ghost-server.ts:215— `hammertime` 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 REDACTED:148— `errorIfInvalidUrl` 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 REDACTED:162— `disableRetries` 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 ghost/core/server/services/identity-tokens/identity-token-service-wrapper.js:7— `init` 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 ghost/core/server/services/link-tracking/link-click-tracking-service.js:88— `init` 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 REDACTED:341— `createIntegrityToken` 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 ghost/core/server/services/recommendations/recommendation-enabler-service.js:26— `setSetting` 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 ghost/core/server/services/settings/settings-bread-service.js:453— `requiresEmailVerification` 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 ghost/core/server/services/stripe/stripe-service.js:172— `connect` 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 ghost/core/server/services/stripe/webhook-manager.js:106— `configure` 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 koenig/kg-unsplash-selector/src/api/PhotoUseCase.ts:19— `triggerDownload` 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 packages/admin-api-schema/src/utils/json-schema.ts:44— `validate` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Sync-over-async blocking apps/shade/scripts/pack-local.ts:154— `existsSync` in `checkTarget` 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 apps/shade/scripts/pack-local.ts:158— `existsSync` in `checkTarget` 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 apps/shade/scripts/storybook-docs.ts:70— `mkdirSync` in `generateStorybookDocs` 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 ghost/core/server/data/importer/import-archive.ts:142— `globSync` in `extract` 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 ghost/core/server/services/content-import/import/source.ts:52— `globSync` in `prepareImportSource` 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 ghost/scripts/build-card-assets.mts:45— `fs.readdirSync` in `buildType` 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 ghost/scripts/build-card-assets.mts:51— `fs.readFileSync` in `buildType` 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 ghost/scripts/build-card-assets.mts:77— `fs.mkdirSync` in `buildCardAssets` 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 ghost/scripts/build-card-assets.mts:78— `fs.writeFileSync` in `buildCardAssets` 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 packages/app-sdk/src/vite/dev-vars.ts:19— `existsSync` in `there` 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 REDACTED:175— `existsSync` in `resolveGhostDevEnv` 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 REDACTED:176— `readFileSync` in `resolveGhostDevEnv` 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 REDACTED:185— `writeFileSync` in `resolveGhostDevEnv` 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 REDACTED:194— `writeFileSync` in `resolveGhostDevEnv` 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.
AC3 · Page structure· Page without a main landmark · ×13
Page without a main landmark .github/embed-renderer/404.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark apps/admin/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>.
Page without a main landmark apps/signup-form/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>.
Page without a main landmark apps/signup-form/preview.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark REDACTED:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark REDACTED:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark REDACTED:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark REDACTED:4— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark REDACTED:4— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark REDACTED:4— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark REDACTED:4— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark REDACTED:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark REDACTED:3— 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· Data table has no header cells · ×12
Data table has no header cells REDACTED:106— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
Data table has no header cells REDACTED:106— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
Data table has no header cells REDACTED:118— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
Data table has no header cells REDACTED:91— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
Data table has no header cells REDACTED:109— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
Data table has no header cells REDACTED:91— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
Data table has no header cells REDACTED:108— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
Data table has no header cells REDACTED:91— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
Data table has no header cells REDACTED:110— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
Data table has no header cells REDACTED:91— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
Data table has no header cells REDACTED:112— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
Data table has no header cells REDACTED:106— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
Focus outline removed inline apps/admin/src/editor/feature-image.tsx:130— <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline apps/comments-ui/src/components/content/buttons/more-button.tsx:24— <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline apps/comments-ui/src/components/content/forms/form.tsx:155— <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline apps/comments-ui/src/components/content/forms/sorting-form.tsx:65— <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline apps/comments-ui/src/components/popups/add-details-popup.tsx:172— <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline apps/comments-ui/src/components/popups/add-details-popup.tsx:203— <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline apps/sodo-search/src/components/popup-modal.tsx:112— <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline koenig/kg-unsplash-selector/src/ui/UnsplashSelector.tsx:41— <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline koenig/koenig-lexical/src/components/ui/Dropdown.tsx:68— <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline koenig/koenig-lexical/src/components/ui/MultiSelectDropdown.tsx:129— <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline koenig/koenig-lexical/src/components/ui/UrlInput.tsx:64— <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline koenig/koenig-lexical/src/components/ui/cards/CodeBlockCard.tsx:59— <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Off the main sequence: @internal/cfg-oxlint — @internal/cfg-oxlint: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: @tryghost/admin-api-schema — @tryghost/admin-api-schema: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: @tryghost/image-transform — @tryghost/image-transform: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: @tryghost/kg-converters — @tryghost/kg-converters: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Off the main sequence: @tryghost/kg-default-transforms — @tryghost/kg-default-transforms: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: @tryghost/kg-utils — @tryghost/kg-utils: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Off the main sequence: @tryghost/nql-string — @tryghost/nql-string: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
Off the main sequence: @tryghost/parse-email-address — @tryghost/parse-email-address: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: @internal/scripts — @internal/scripts: abstractness 0.02, instability 0.00, distance 0.98 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: @tryghost/checkout — @tryghost/checkout: abstractness 0.00, instability 0.25, distance 0.75 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
Off the main sequence: @tryghost/kg-unsplash-selector — @tryghost/kg-unsplash-selector: abstractness 0.25, instability 0.00, distance 0.75 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: @tryghost/shade — @tryghost/shade: abstractness 0.25, instability 0.00, distance 0.75 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
AC6 · Visual & motion safety· Animation without a prefers-reduced-motion guard · ×9
Animation without a prefers-reduced-motion guard apps/admin/src/layout/admin-layout.tsx:378— <main> moves — its `animate-[admin-frame-fade-in_500ms_ease-out_520ms_both]` utility runs with no motion-safe:/motion-reduce: variant — 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 apps/admin/src/settings/site/theme/theme-file-tree.tsx:222— <div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — 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 apps/shade/src/docs/showcase/motion-gallery.tsx:59— <span> moves — its inline style sets `transition: transform 800ms var(${easing.cssVar})` — 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 koenig/kg-unsplash-selector/src/ui/UnsplashGallery.tsx:37— <div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — 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 koenig/koenig-lexical/src/components/ui/Spinner.tsx:16— <svg> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — 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 koenig/koenig-lexical/src/components/ui/UrlInput.tsx:43— <div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — 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 koenig/koenig-lexical/src/components/ui/UrlSearchInput.tsx:33— <div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — 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 koenig/koenig-lexical/src/components/ui/file-selectors/Gif/Loader.tsx:5— <div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — 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 koenig/koenig-lexical/src/components/ui/file-selectors/Gif/Loader.tsx:11— <div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — 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:.
ClassTooLong: BatchSendingService ghost/core/server/services/email-service/batch-sending-service.js:46— ClassTooLong — 1088 significant lines (blank, comment-only and punctuation-only lines excluded), 69 methods. The bar is 400 significant lines; this is 688 over it, 2.72× 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: App REDACTED:86— ClassTooLong — 984 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 584 over it, 2.46× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PostsStatsService ghost/core/server/services/stats/posts-stats-service.js:79— ClassTooLong — 977 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 577 over it, 2.44× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: GiftService ghost/core/server/services/gifts/gift-service.ts:323— ClassTooLong — 792 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods. The bar is 400 significant lines; this is 392 over it, 1.98× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: MemberWelcomeEmailService ghost/core/server/services/member-welcome-emails/member-welcome-email-service.js:45— ClassTooLong — 528 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 128 over it, 1.32× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: CommentsService ghost/core/server/services/comments/comments-service.js:106— ClassTooLong — 474 significant lines (blank, comment-only and punctuation-only lines excluded), 37 methods. The bar is 400 significant lines; this is 74 over it, 1.19× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: DockerAnalyticsManager REDACTED:34— ClassTooLong — 441 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 41 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: StaffServiceEmails ghost/core/server/services/staff/staff-service-emails.js:4— ClassTooLong — 432 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 32 over it, 1.08× 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: ActivityPubAPI apps/activitypub/src/api/activitypub.ts:320— ClassTooLong — 402 significant lines (blank, comment-only and punctuation-only lines excluded), 53 methods. The bar is 400 significant lines; this is 2 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.
Low cohesion: EventRepository (LCOM4 10) ghost/core/server/services/members/members-api/repositories/event-repository.js:29— EventRepository's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: AnalyticsWebTrafficPage (LCOM4 7) REDACTED:5— AnalyticsWebTrafficPage's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: PostAnalyticsWebTrafficPage (LCOM4 7) REDACTED:5— PostAnalyticsWebTrafficPage's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: MemberDetailsPage (LCOM4 7) e2e/helpers/pages/admin/members/member-details-page.ts:54— MemberDetailsPage's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: MockedApi (LCOM4 5) apps/comments-ui/test/utils/mocked-api.ts:14— MockedApi's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: PostsPage (LCOM4 5) e2e/helpers/pages/admin/posts/posts-page.ts:11— PostsPage's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: MembersListPage (LCOM4 4) REDACTED:14— MembersListPage's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: MemberWelcomeEmailsSection (LCOM4 4) e2e/helpers/pages/admin/settings/sections/member-welcome-emails-section.ts:16— MemberWelcomeEmailsSection's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: PostEditorPage (LCOM4 4) e2e/helpers/pages/admin/posts/post/post-editor-page.ts:133— PostEditorPage's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
TooManyMethods: BatchSendingService ghost/core/server/services/email-service/batch-sending-service.js:46— TooManyMethods — 69 methods. The bar is 30 methods; this is 39 over it, 2.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ActivityPubAPI apps/activitypub/src/api/activitypub.ts:320— TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: StripeAPI ghost/core/server/services/stripe/stripe-api.js:157— 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: MemberRepository ghost/core/server/services/members/members-api/repositories/member-repository.js:139— TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: App REDACTED:86— TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: CommentsService ghost/core/server/services/comments/comments-service.js:106— TooManyMethods — 37 methods. The bar is 30 methods; this is 7 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.
TooManyMethods: GiftService ghost/core/server/services/gifts/gift-service.ts:323— TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: EventRepository ghost/core/server/services/members/members-api/repositories/event-repository.js:29— TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
IC1 · Incompleteness & stubs· Markup wires an event to an empty handler · ×8
Markup wires an event to an empty handler apps/activitypub/src/components/modals/new-note-modal.tsx:373— `onClick` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
Markup wires an event to an empty handler apps/admin/src/automations/components/canvas/automation-sidebar.tsx:73— `onStatusChange` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
Markup wires an event to an empty handler apps/admin/src/automations/new-automation.tsx:78— `onDismissValidationFeedback` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
Markup wires an event to an empty handler apps/admin/src/automations/new-automation.tsx:79— `onPublish` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
Markup wires an event to an empty handler apps/admin/src/automations/new-automation.tsx:80— `onSave` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
Markup wires an event to an empty handler apps/admin/src/automations/new-automation.tsx:81— `onTurnOff` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
Markup wires an event to an empty handler apps/admin/src/settings/site/announcement-bar-modal.tsx:191— `onBlur` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
Markup wires an event to an empty handler REDACTED:2018— `onLoadMore` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
Weak hash algorithm ghost/core/frontend/services/asset-hash/index.js:82— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm ghost/core/frontend/services/rss/cache.js:10— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm ghost/core/frontend/web/routers/serve-favicon.js:14— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm REDACTED:96— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm ghost/core/server/lib/image/gravatar.js:21— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm ghost/core/server/services/remote-flags/resolve.ts:25— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm ghost/core/server/web/admin/controller.js:35— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
AC2 · Forms & labels· <Input> field component without a label · ×6
<Input> field component without a label apps/activitypub/src/components/modals/new-note-modal.tsx:451— 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.
<Input> field component without a label apps/admin/src/members/components/manage-view-popover.tsx:99— 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.
<Input> field component without a label apps/admin/src/members/label-picker/edit-row.tsx:67— 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.
<Input> field component without a label apps/admin/src/posts/analytics/newsletter/newsletter.tsx:554— 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.
<Input> field component without a label REDACTED:111— 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.
<Input> field component without a label apps/admin/src/settings/membership/member-emails/welcome-email-modal.tsx:341— 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.
AC6 · Visual & motion safety· Focus outline removed in CSS without a · ×6
Focus outline removed in CSS without a :focus replacement koenig/koenig-lexical/src/styles/preflight.css:326— `.koenig-lexical button:focus-visible` 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 koenig/koenig-lexical/src/styles/components/koenig-lexical.css:35— `.koenig-lexical [contenteditable]` 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 koenig/kg-simplemde/debug/simplemde.css:177— `.CodeMirror-scroll` 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 koenig/kg-simplemde/debug/simplemde.css:287— `.CodeMirror-code` 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 ghost/core/frontend/src/cards/css/audio.css:215— `.kg-audio-player-container input[type='range']:focus` 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 ghost/core/frontend/src/cards/css/header.css:143— `.kg-header-card a.kg-header-card-button` 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.
AC2 · Forms & labels· <Select> field component without a label · ×5
<Select> field component without a label apps/admin/src/analytics/views/stats/growth/components/new-subscribers-cadence.tsx:270— This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id alone, wherever it is set, names nothing until a label points at it). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. 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 apps/admin/src/analytics/views/stats/growth/components/paid-subscription-change-chart.tsx:410— This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id alone, wherever it is set, names nothing until a label points at it). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. 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 apps/admin/src/settings/email-design/design-fields/body-font-field.tsx:17— This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id alone, wherever it is set, names nothing until a label points at it). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. 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 apps/admin/src/settings/email-design/design-fields/heading-font-field.tsx:21— This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id alone, wherever it is set, names nothing until a label points at it). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. 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 apps/admin/src/settings/email-design/design-fields/heading-weight-field.tsx:21— This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id alone, wherever it is set, names nothing until a label points at it). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. 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.
AC2 · Forms & labels· <CommandInput> field component without a label · ×5
<CommandInput> field component without a label apps/admin/src/global-search/global-search-modal.tsx:124— 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.
<CommandInput> field component without a label apps/admin/src/members/components/bulk-action-modals/import-members/field-picker.tsx:262— 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.
<CommandInput> field component without a label apps/admin/src/members/label-picker/label-picker.tsx:548— 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.
<CommandInput> field component without a label apps/admin/src/settings/advanced/migration-tools/content-import/field-picker.tsx:61— 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.
<CommandInput> field component without a label apps/admin/src/shared/member-custom-fields/custom-field-picker.tsx:168— 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.
Repeated repair: apps/admin/src/editor/session/error-mapping.ts apps/admin/src/editor/session/error-mapping.ts:177— apps/admin/src/editor/session/error-mapping.ts changed 8 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 14 (its worst body is error-mapping.toSaveError at line 177), 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: “Fixed the React editor's publish error handling to match Ember (#31620)”; “Fixed the React editor's dead ends when saving stops for good (#31351)”; “Fixed React editor Update getting stuck once a scheduled post published (#31137)”; “Fixed hosting limit errors in the React editor hiding the upgrade path (#31268)”. 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:34:22 -05:00' --until='2026-11-13 12:34:22 -05:00' --full-history --no-merges -- apps/admin/src/editor/session/error-mapping.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.
Repeated repair: apps/admin-x-framework/src/hooks/use-handle-error.ts apps/admin-x-framework/src/hooks/use-handle-error.ts:27— apps/admin-x-framework/src/hooks/use-handle-error.ts changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is use-handle-error.useHandleError.handleError at line 27), 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: “Fixed the new custom field forms showing a fault's own wording”; “Fixed handled errors never reaching Sentry in React Admin (#31382)”; “Fixed signed-out Admin loads racing the signin redirect (#31066)”. 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:34:22 -05:00' --until='2026-11-13 12:34:22 -05:00' --full-history --no-merges -- apps/admin-x-framework/src/hooks/use-handle-error.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.
Repeated repair: apps/admin/src/editor/use-post-link-suggestions.ts apps/admin/src/editor/use-post-link-suggestions.ts:68— apps/admin/src/editor/use-post-link-suggestions.ts changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is use-post-link-suggestions.usePostLinkSuggestions.loadIndex at line 68), 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: “Fixed React editor saves re-reading whole search-index lists (#31582)”; “🐛 Fixed stale staff link suggestions in the React editor (#31523)”; “Fixed the editor session leaving saved posts permanently dirty (#30478)”. 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:34:22 -05:00' --until='2026-11-13 12:34:22 -05:00' --full-history --no-merges -- apps/admin/src/editor/use-post-link-suggestions.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.
Repeated repair: koenig/kg-unsplash-selector/src/ui/UnsplashImage.tsx koenig/kg-unsplash-selector/src/ui/UnsplashImage.tsx:31— koenig/kg-unsplash-selector/src/ui/UnsplashImage.tsx changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is UnsplashImage.UnsplashImage at line 31), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fixed Unsplash picker links, keyboard access and disabled-setting checks (#31361)”; “Fixed missing Unsplash referral on photographer credit links (#31356)”; “Fixed the Unsplash image selector ignoring dark mode (#30329)”. 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:34:22 -05:00' --until='2026-11-13 12:34:22 -05:00' --full-history --no-merges -- koenig/kg-unsplash-selector/src/ui/UnsplashImage.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.
Repeated repair: apps/admin/src/editor/use-post-snippets.tsx apps/admin/src/editor/use-post-snippets.tsx:37— apps/admin/src/editor/use-post-snippets.tsx changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is use-post-snippets.usePostSnippets at line 37), 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: “Fixed legacy snippets missing from the React editor's card menu (#31222)”; “Fixed the React editor's tier list and snippets menu stopping at 100 rows (#30949)”; “Fixed the editor session leaving saved posts permanently dirty (#30478)”. 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:34:22 -05:00' --until='2026-11-13 12:34:22 -05:00' --full-history --no-merges -- apps/admin/src/editor/use-post-snippets.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.
IC1 · Incompleteness & stubs· Both branches are identical · ×5
Both branches are identical — the condition decides nothing apps/admin/src/posts/analytics/newsletter/components/newsletter-radial-chart.tsx:121— 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 apps/admin/src/posts/analytics/newsletter/components/newsletter-radial-chart.tsx:126— 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 apps/admin/src/posts/analytics/newsletter/components/newsletter-radial-chart.tsx:130— 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 apps/admin/src/posts/analytics/newsletter/components/newsletter-radial-chart.tsx:134— 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 ghost/core/server/services/members/members-api/controllers/router-controller.js:691— 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.
Low contrast colour pair in CSS (3.9:1) REDACTED:25— `body` sets color: #808284 on background-color: #ffffff — 3.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.9:1) REDACTED:25— `body` sets color: #808284 on background-color: #ffffff — 3.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.9:1) REDACTED:25— `body` sets color: #808284 on background-color: #ffffff — 3.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.9:1) REDACTED:25— `body` sets color: #808284 on background-color: #ffffff — 3.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
D10 · Test Quality· Fixed-sleep synchronisation · ×4
Fixed-sleep synchronisation: does not coalesce fetches across a prefix_hash cycle (reset) ghost/test/unit/server/adapters/lib/redis/adapter-cache-redis.test.js:340— This test starts work it did not wait for (`pA`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => {
setTimeout(resolve, 0);
})` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
Fixed-sleep synchronisation: deletes the tag without deadlocking an edit of that post ghost/test/integration/models/post-edit-locking.test.ts:231— This test starts work it did not wait for (`deletion`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => {
setTimeout(resolve, 500);
})` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
Fixed-sleep synchronisation: stop() waits out an in-flight submission ghost/test/integration/jobs/outbox-relay.test.ts:656— This test starts work it did not wait for (`stopping`, still running when the sleep starts) and then orders itself against it with `delay(100)` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
Fixed-sleep synchronisation: creates a new backup on every overwrite ghost/test/integration/adapters/route-settings/s3-route-settings-store.test.ts:236— This test starts work it did not wait for (`store`, still running when the sleep starts) and then orders itself against it with `sleep(1100)` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
Dead file (~24 LoC) ghost/core/server/adapters/storage/LocalMediaStorage.ts— no import path from any entry point (875 application, 558 tooling, 2886 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 (~24 LoC) ghost/core/server/data/migrations/versions/5.6/2022-07-27-13-40-change-explore-type.js— no import path from any entry point (875 application, 558 tooling, 2886 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 (~24 LoC) ghost/core/server/data/migrations/versions/5.9/2022-08-09-08-32-added-new-integration-type.js— no import path from any entry point (875 application, 558 tooling, 2886 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 (~24 LoC) ghost/core/server/data/migrations/versions/5.94/2024-09-03-20-09-40-null-analytics-jobs-timings.js— no import path from any entry point (875 application, 558 tooling, 2886 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
X17 · Uncapped recursion over a caller-supplied document· Recursive walk over a caller-supplied document has no depth cap · ×4
Recursive walk over a caller-supplied document has no depth cap ghost/core/server/services/members/content-gating.js:114— `checkSegmentPostAccess` is exported, takes a document from its caller (line 140) and hands it to `collectSegmentProductSlugs`, which calls itself at line 114 (`collectSegmentProductSlugs`) with a piece of `query` — and nowhere in `collectSegmentProductSlugs` 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 `collectSegmentProductSlugs` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap ghost/core/server/adapters/cache/rough-size.ts:88— `roughSize` is exported, takes a document from its caller (line 38) and hands it to `walk`, which calls itself at line 88 (`walk`) with a piece of `node` (and at line 96, line 106) — and nowhere in `walk` 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 `walk` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap apps/admin/src/utils/deep-merge.ts:41— `deepMerge` is exported and takes `source: DeepPartial<T>` from its caller, and it calls itself at line 41 (`deepMerge`) with a piece of `source` — and nowhere in `deepMerge` 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 `deepMerge` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap apps/admin/src/editor/engine/lexical-compare.ts:40— `stripDirection` is exported and takes `value: unknown` from its caller, and it calls itself at line 40 (`stripDirection`) with a piece of `value` (and at line 48) — and nowhere in `stripDirection` 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 `stripDirection` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Swallowed exception (caught, then discarded) ghost/core/server/services/oembed/extract-metadata.ts:166— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
Swallowed exception (caught, then discarded) REDACTED:426— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
Swallowed exception (caught, then discarded) ghost/core/server/services/member-attribution/url-translator.js:108— `catch (err)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
Swallowed exception (caught, then discarded) ghost/core/server/services/machine-payments/adapters/x402-adapter.ts:48— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
Low contrast Tailwind colour pair (2.4:1) apps/activitypub/src/components/layout/onboarding/step-3.tsx:131— This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade.
Low contrast Tailwind colour pair (2.4:1) apps/activitypub/src/components/layout/onboarding/step-3.tsx:232— This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade.
Low contrast Tailwind colour pair (2.4:1) apps/admin/src/settings/membership/checkout/checkout-preview.tsx:130— This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade.
DM10 · One transaction, one aggregate· One operation mutates 2 aggregates · ×3
One operation mutates 2 aggregates: GiftService.redeemGift ghost/core/server/services/gifts/gift-service.ts:893— `GiftService.redeemGift` saves `MemberRepository`, `GiftRepository` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
One operation mutates 2 aggregates: GiftService.reassignRedeemer ghost/core/server/services/gifts/gift-service.ts:1063— `GiftService.reassignRedeemer` saves `MemberRepository`, `GiftRepository` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
One operation mutates 2 aggregates: GiftService.handlePaymentRefund ghost/core/server/services/gifts/gift-service.ts:1149— `GiftService.handlePaymentRefund` saves `GiftRepository`, `MemberRepository` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
Duplication concentrated across 5 sibling directories (5 clone groups) apps/admin/src/analytics/views/stats/growth/growth.tsx:239— 5 duplicated blocks under apps/admin/src/analytics/views/stats/ have copies in at least two of the sibling directories growth, locations, newsletters, overview, web — 4 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 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 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 5 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 (5 clone groups) apps/admin/src/editor/session/session-banners.tsx:130— 5 duplicated blocks under apps/admin/src/editor/ have copies in at least two of the sibling directories engine, preview, publish, session, settings — 3 of them are reported below, and 2 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 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 5 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 (5 clone groups) ghost/core/server/adapters/redirects/S3RedirectsStore.ts:30— 5 of the duplicated blocks reported below have copies in at least two of the sibling directories cache, redirects, route-settings, storage, upgrade under ghost/core/server/adapters/. That concentration is one structural fact, not 5 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 5 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.
R4 · Test Coverage· This test file cannot be loaded · ×3
This test file cannot be loaded e2e/tests/fake-services/upgrade-host-protocol.test.ts:13— e2e/tests/fake-services/upgrade-host-protocol.test.ts:13 imports '../../../ghost/test/utils/fixtures/upgrade-supervisor', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded koenig/koenig-lexical/src/components/ui/cards/HtmlCard.stories.tsx:3— koenig/koenig-lexical/src/components/ui/cards/HtmlCard.stories.tsx:3 imports './HtmlCard.jsx', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded koenig/koenig-lexical/src/components/ui/cards/MarkdownCard.stories.tsx:3— koenig/koenig-lexical/src/components/ui/cards/MarkdownCard.stories.tsx:3 imports './MarkdownCard.jsx', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
Dead file (~31 LoC) apps/admin/src/settings/components/selectors/unsplash-selector.tsx— no import path from any entry point (875 application, 558 tooling, 2886 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 (~31 LoC) ghost/core/server/data/migrations/versions/5.30/2023-01-13-04-25-unsubscribe-suppressed-emails.js— no import path from any entry point (875 application, 558 tooling, 2886 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 (~31 LoC) ghost/core/server/data/migrations/versions/6.24/2026-03-26-15-46-51-add-email-design-settings-table.js— no import path from any entry point (875 application, 558 tooling, 2886 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 (~20 LoC) ghost/core/server/data/migrations/hooks/init/shutdown.js— no import path from any entry point (875 application, 558 tooling, 2886 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (ghost/core/server/data/migrations/hooks/init/index.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~20 LoC) ghost/core/server/data/migrations/versions/5.81/2024-03-18-16-20-add-missing-post-permissions.js— no import path from any entry point (875 application, 558 tooling, 2886 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 (~20 LoC) ghost/core/server/data/migrations/versions/6.66/2026-09-28-18-58-53-add-signing-key-rotation-settings.js— no import path from any entry point (875 application, 558 tooling, 2886 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
AC1 · Text alternatives· <video> without a captions track · ×2
<video> without a captions track apps/activitypub/src/components/feed/feed-item.tsx:176— 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 apps/activitypub/src/components/feed/feed-item.tsx:443— 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· <RadioGroup> field component without a label · ×2
<RadioGroup> field component without a label apps/admin/src/editor/publish/components/publish-at-options.tsx:27— This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id alone, wherever it is set, names nothing until a label points at it). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. 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.
<RadioGroup> field component without a label apps/admin/src/editor/publish/components/publish-type-options.tsx:91— This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id alone, wherever it is set, names nothing until a label points at it). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. 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.
AC2 · Forms & labels· <FilterSegmentSelect> field component without a label · ×2
<FilterSegmentSelect> field component without a label apps/admin/src/members/custom-fields/filter-renderer.tsx:101— 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.
<FilterSegmentSelect> field component without a label apps/admin/src/members/custom-fields/filter-renderer.tsx:117— 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.
AC2 · Forms & labels· <InputGroupInput> field component without a label · ×2
<InputGroupInput> field component without a label apps/admin/src/settings/growth/offers/add-offer-modal.tsx:357— 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.
<InputGroupInput> field component without a label apps/admin/src/settings/growth/offers/edit-retention-offer-modal.tsx:434— 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.
Low contrast Tailwind colour pair (4.1:1) apps/activitypub/src/components/layout/onboarding/step-3.tsx:77— This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade.
Low contrast Tailwind colour pair (4.1:1) apps/activitypub/src/components/layout/sidebar/sidebar-menu-link.tsx:38— This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade.
theme-code-editor-modal.ThemeCodeEditorModal::handleSave (cognitive 33) apps/admin/src/settings/site/theme/theme-code-editor-modal.tsx:823— theme-code-editor-modal.ThemeCodeEditorModal::handleSave has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (17 pts), ternaries 8 (11 pts), boolean chains 4, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (theme-code-editor-modal.ThemeCodeEditorModal, theme-code-editor-modal.ThemeCodeEditorModal::handleRenameSelected) 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.
theme-code-editor-modal.ThemeCodeEditorModal::handleRenameSelected (cognitive 17) apps/admin/src/settings/site/theme/theme-code-editor-modal.tsx:623— theme-code-editor-modal.ThemeCodeEditorModal::handleRenameSelected has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 4, boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This shape REPEATS in the file: 2 other methods here (theme-code-editor-modal.ThemeCodeEditorModal, theme-code-editor-modal.ThemeCodeEditorModal::handleSave) 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: REDACTED → editor-screen.tsx, settings-fields.ts, access-section.tsx, post-settings-sidebar.tsx REDACTED— `REDACTED` changes together with 4 other files — `apps/admin/src/editor/editor-screen.tsx`, `apps/admin/src/editor/session/settings-fields.ts`, `apps/admin/src/editor/settings/access-section.tsx`, `apps/admin/src/editor/settings/post-settings-sidebar.tsx` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
Change-coupling hub: use-activity-pub-queries.ts → feed-item-stats.tsx, explore.tsx, inbox.tsx apps/activitypub/src/hooks/use-activity-pub-queries.ts— `apps/activitypub/src/hooks/use-activity-pub-queries.ts` changes together with 3 other files — `apps/activitypub/src/components/feed/feed-item-stats.tsx`, `apps/activitypub/src/views/explore/explore.tsx`, `apps/activitypub/src/views/inbox/inbox.tsx` — 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.
R10 · Code Duplication· Duplicated block with local edits (100 matched lines × 2 locations) · ×2
Duplicated block with local edits (100 matched lines × 2 locations) apps/admin/src/automations/components/canvas/tier-scope-picker.tsx:56— apps/admin/src/automations/components/canvas/tier-scope-picker.tsx:56 · apps/admin/src/shared/pickers/chip-picker.tsx:175 — the two spans are one implementation copied and then locally edited — 675 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 with local edits (100 matched lines × 2 locations) apps/admin/src/automations/components/email-modal/use-email-preview.ts:20— apps/admin/src/automations/components/email-modal/use-email-preview.ts:20 · apps/admin/src/settings/membership/member-emails/use-welcome-email-preview.ts:23 — the two spans are one implementation copied and then locally edited — 618 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 (96 matched lines × 2 locations) · ×2
Duplicated block with local edits (96 matched lines × 2 locations) apps/admin-x-framework/src/api/pages.ts:47— apps/admin-x-framework/src/api/pages.ts:47 · apps/admin-x-framework/src/api/posts.ts:64 — the two spans are one implementation copied and then locally edited — 681 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 with local edits (96 matched lines × 2 locations) ghost/core/server/models/label.js:15— ghost/core/server/models/label.js:15 · ghost/core/server/models/tag.js:73 — the two spans are one implementation copied and then locally edited — 700 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 (82 matched lines × 2 locations) · ×2
Duplicated block with local edits (82 matched lines × 2 locations) ghost/core/frontend/src/cards/js/audio.js:50— ghost/core/frontend/src/cards/js/audio.js:50 · ghost/core/frontend/src/cards/js/video.js:52 — the two spans are one implementation copied and then locally edited — 522 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 with local edits (82 matched lines × 2 locations) ghost/core/server/services/indexnow-ping/indexnow-ping-service.ts:61— ghost/core/server/services/indexnow-ping/indexnow-ping-service.ts:61 · ghost/core/server/services/slack-ping/slack-ping-service.ts:30 — the two spans are one implementation copied and then locally edited — 500 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.
Dead file (~38 LoC) ghost/core/server/data/migrations/versions/5.117/2025-04-14-02-36-30-add-additional-social-accounts-columns-to-user-table.js— no import path from any entry point (875 application, 558 tooling, 2886 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 (~38 LoC) ghost/core/server/data/migrations/versions/5.67/2023-10-03-00-32-32-rollback-source-theme.js— no import path from any entry point (875 application, 558 tooling, 2886 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 (~30 LoC) ghost/core/server/data/migrations/init/1-create-tables.js— no import path from any entry point (875 application, 558 tooling, 2886 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 (~30 LoC) ghost/core/server/data/migrations/versions/6.67/2026-09-29-16-22-08-add-description-to-automations.js— no import path from any entry point (875 application, 558 tooling, 2886 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 (~26 LoC) apps/admin/src/settings/components/color-swatch-field.tsx— no import path from any entry point (875 application, 558 tooling, 2886 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 (~26 LoC) tools/scripts/ci/assert-boot-skips-modules.ts— no import path from any entry point (875 application, 558 tooling, 2886 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) apps/admin/src/settings/utils/fetch-frontend-preview.ts— no import path from any entry point (875 application, 558 tooling, 2886 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) ghost/core/server/data/migrations/versions/5.93/2024-09-03-18-51-01-update-stripe-prices-nickname-length.js— no import path from any entry point (875 application, 558 tooling, 2886 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· <SearchInput> field component without a label · ×1
<SearchInput> field component without a label apps/activitypub/src/components/layout/sidebar/sidebar.tsx:69— 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.
AC2 · Forms & labels· <FilterSegmentMultiSelect> field component without a label · ×1
<FilterSegmentMultiSelect> field component without a label apps/admin/src/members/custom-fields/filter-renderer.tsx:128— 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.
AC2 · Forms & labels· <FilterSegmentInput> field component without a label · ×1
<FilterSegmentInput> field component without a label apps/admin/src/members/custom-fields/filter-renderer.tsx:141— 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.
AC2 · Forms & labels· <TextCursorInput> field component without a label · ×1
<TextCursorInput> field component without a label apps/admin/src/settings/membership/custom-fields.tsx:141— 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.
AC2 · Forms & labels· <fieldset> without a <legend> · ×1
<fieldset> without a <legend> apps/admin/src/shared/member-custom-fields/custom-field-form.tsx:101— 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.
AC4 · Keyboard semantics· Anchor without href · ×1
Anchor without href apps/activitypub/src/components/layout/error/error.tsx:123— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Low contrast Tailwind colour pair (3.6:1) REDACTED:208— This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade.
Low contrast colour pair (3.9:1) REDACTED:8— The inline foreground/background colours fall below the 4.5:1 WCAG AA minimum for normal text. Darken/lighten one of them.
Low contrast colour pair in CSS (1.2:1) ghost/core/server/services/email-service/email-templates/partials/styles.hbs:600— `.kg-header-card.kg-style-image` sets color: #ffffff on background-color: #e7e7eb — 1.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.7:1) apps/signup-form/src/styles/demo.css:42— `nav.mode > a.selected` sets color: white on background-color: #ff0095 — 3.7:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
linkSubscription (cyclomatic 130) ghost/core/server/services/members/members-api/repositories/member-repository.js:1503— linkSubscription has cyclomatic complexity 130 (threshold 15). Of this number, 123 points are the body's own statements and 7 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.
onSaving (cyclomatic 121) ghost/core/server/models/post.js:572— onSaving has cyclomatic complexity 121 (threshold 15). Of this number, 114 points are the body's own statements and 7 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.
feed-item.FeedItem (cyclomatic 112) apps/activitypub/src/components/feed/feed-item.tsx:506— feed-item.FeedItem has cyclomatic complexity 112 (threshold 15). Of this number, 79 points are the body's own statements and 33 belong to 15 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.
api.setupGhostApi (cyclomatic 104) apps/portal/src/utils/api.js:5— api.setupGhostApi has cyclomatic complexity 104 (threshold 15). Of this number, 70 points are the body's own statements and 34 belong to 30 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.
floating-sidebar.FloatingSidebar (cyclomatic 104) apps/shade/src/components/ui/floating-sidebar.tsx:239— floating-sidebar.FloatingSidebar has cyclomatic complexity 104 (threshold 15). Of this number, 48 points are the body's own statements and 56 belong to 21 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.
editor.AutomationEditorContent (cyclomatic 101) apps/admin/src/automations/editor.tsx:111— editor.AutomationEditorContent has cyclomatic complexity 101 (threshold 15). Of this number, 48 points are the body's own statements and 53 belong to 17 function items inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
newsletter-preview-content.NewsletterPreviewContent (cyclomatic 98) REDACTED:56— newsletter-preview-content.NewsletterPreviewContent has cyclomatic complexity 98 (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.
tag-detail.TagDetail (cyclomatic 93) apps/admin/src/tags/detail/tag-detail.tsx:52— tag-detail.TagDetail has cyclomatic complexity 93 (threshold 15). Of this number, 53 points are the body's own statements and 40 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.
reader.Reader (cyclomatic 92) REDACTED:535— reader.Reader has cyclomatic complexity 92 (threshold 15). Of this number, 44 points are the body's own statements and 48 belong to 17 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.
post-preview-modal.PostPreviewModal (cyclomatic 89) apps/admin/src/editor/preview/post-preview-modal.tsx:99— post-preview-modal.PostPreviewModal has cyclomatic complexity 89 (threshold 15). Of this number, 67 points are the body's own statements and 22 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.
member-detail.MemberDetailPage (cyclomatic 89) apps/admin/src/members/detail/member-detail.tsx:74— member-detail.MemberDetailPage has cyclomatic complexity 89 (threshold 15). Of this number, 61 points are the body's own statements and 28 belong to 11 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.
automation-canvas.AutomationCanvas (cyclomatic 84) apps/admin/src/automations/components/canvas/automation-canvas.tsx:421— automation-canvas.AutomationCanvas has cyclomatic complexity 84 (threshold 15). Of this number, 29 points are the body's own statements and 55 belong to 27 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.
domain.Domain (cyclomatic 83) apps/activitypub/src/views/preferences/components/domain.tsx:88— domain.Domain has cyclomatic complexity 83 (threshold 15). Of this number, 64 points are the body's own statements and 19 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.
filters.FilterValueSelector (cyclomatic 80) REDACTED:2024— filters.FilterValueSelector has cyclomatic complexity 80 (threshold 15). Of this number, 64 points are the body's own statements and 16 belong to 9 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.
filters.Filters (cyclomatic 80) REDACTED:2767— filters.Filters has cyclomatic complexity 80 (threshold 15). Of this number, 25 points are the body's own statements and 55 belong to 18 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.
newsletters-kpis.NewsletterKPIs (cyclomatic 79) apps/admin/src/analytics/views/stats/newsletters/components/newsletters-kpis.tsx:128— newsletters-kpis.NewsletterKPIs has cyclomatic complexity 79 (threshold 15). Of this number, 60 points are the body's own statements and 19 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.
new-note-modal.NewNoteModal (cyclomatic 78) apps/activitypub/src/components/modals/new-note-modal.tsx:44— new-note-modal.NewNoteModal has cyclomatic complexity 78 (threshold 15). Of this number, 28 points are the body's own statements and 50 belong to 15 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.
add-offer-modal.AddOfferModal (cyclomatic 72) apps/admin/src/settings/growth/offers/add-offer-modal.tsx:450— add-offer-modal.AddOfferModal has cyclomatic complexity 72 (threshold 15). Most of this is not in the body itself: 10 of the 72 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 536, a function literal at line 744, a function literal at line 813, …). 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.
tier-detail-modal.TierDetailModalContent (cyclomatic 70) apps/admin/src/settings/membership/tiers/tier-detail-modal.tsx:56— tier-detail-modal.TierDetailModalContent has cyclomatic complexity 70 (threshold 15). Of this number, 37 points are the body's own statements and 33 belong to 17 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.
post-editor.PostEditor (cyclomatic 69) apps/admin/src/editor/post-editor.tsx:184— post-editor.PostEditor has cyclomatic complexity 69 (threshold 15). Of this number, 23 points are the body's own statements and 46 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.
admin-layout.AdminLayout (cyclomatic 68) apps/admin/src/layout/admin-layout.tsx:132— admin-layout.AdminLayout has cyclomatic complexity 68 (threshold 15). Of this number, 53 points are the body's own statements and 15 belong to 6 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
user-detail-modal.UserDetailModalContent (cyclomatic 66) apps/admin/src/settings/general/user-detail-modal.tsx:122— user-detail-modal.UserDetailModalContent has cyclomatic complexity 66 (threshold 15). Of this number, 34 points are the body's own statements and 32 belong to 13 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.
edit-retention-offer-modal.EditRetentionOfferModal (cyclomatic 66) apps/admin/src/settings/growth/offers/edit-retention-offer-modal.tsx:502— edit-retention-offer-modal.EditRetentionOfferModal has cyclomatic complexity 66 (threshold 15). Most of this is not in the body itself: 9 of the 66 points are its own statements and the rest belongs to 18 function items inside it that branch (a function literal at line 585, a function literal at line 674, handleSaveError, …). 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.
newsletter.Newsletter (cyclomatic 63) apps/admin/src/posts/analytics/newsletter/newsletter.tsx:100— newsletter.Newsletter has cyclomatic complexity 63 (threshold 15). Of this number, 43 points are the body's own statements and 20 belong to 8 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.
description.getDescription (cyclomatic 61) ghost/core/frontend/meta/description.js:5— description.getDescription has cyclomatic complexity 61 (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.
settings-modal.SettingsModal (cyclomatic 60) apps/shade/src/components/patterns/settings-modal.tsx:93— settings-modal.SettingsModal has cyclomatic complexity 60 (threshold 15). Of this number, 47 points are the body's own statements and 13 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.
profile-page.ProfilePage (cyclomatic 58) apps/activitypub/src/views/profile/components/profile-page.tsx:58— profile-page.ProfilePage has cyclomatic complexity 58 (threshold 15). Of this number, 45 points are the body's own statements and 13 belong to 9 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.
profile.ProfileCard (cyclomatic 57) apps/activitypub/src/views/preferences/components/profile.tsx:54— profile.ProfileCard has cyclomatic complexity 57 (threshold 15). Of this number, 45 points are the body's own statements and 12 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
member-activity.ActivityPage (cyclomatic 57) apps/admin/src/members/activity/member-activity.tsx:54— member-activity.ActivityPage has cyclomatic complexity 57 (threshold 15). Of this number, 45 points are the body's own statements and 12 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.
import-members-modal.ImportMembersModal (cyclomatic 56) apps/admin/src/members/components/bulk-action-modals/import-members/import-members-modal.tsx:70— import-members-modal.ImportMembersModal has cyclomatic complexity 56 (threshold 15). Of this number, 17 points are the body's own statements and 39 belong to 13 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.
posts.default (cyclomatic 56) ghost/core/server/api/endpoints/utils/serializers/output/mappers/posts.js:25— posts.default has cyclomatic complexity 56 (threshold 15). Of this number, 39 points are the body's own statements and 17 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.
update (cyclomatic 56) ghost/core/server/services/members/members-api/repositories/member-repository.js:850— update has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
tier-scope-picker.TierScopePicker (cyclomatic 55) apps/admin/src/automations/components/canvas/tier-scope-picker.tsx:42— tier-scope-picker.TierScopePicker has cyclomatic complexity 55 (threshold 15). Of this number, 22 points are the body's own statements and 33 belong to 12 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.
authors.extendModel (cyclomatic 54) ghost/core/server/models/relations/authors.js:32— authors.extendModel has cyclomatic complexity 54 (threshold 15). Most of this is not in the body itself: 1 of the 54 points is its own statement and the rest belongs to 15 function literals inside it that branch (lines 354, 141, 40, …). 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.
newsletter-detail-modal.Sidebar (cyclomatic 53) apps/admin/src/settings/email/newsletters/newsletter-detail-modal.tsx:127— newsletter-detail-modal.Sidebar has cyclomatic complexity 53 (threshold 15). Of this number, 28 points are the body's own statements and 25 belong to 8 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.
ghost_head (cyclomatic 52) ghost/core/frontend/helpers/ghost_head.js:394— ghost_head has cyclomatic complexity 52 (threshold 15). Of this number, 51 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.
mapping-step.MappingStep (cyclomatic 50) apps/admin/src/members/components/bulk-action-modals/import-members/mapping-step.tsx:103— mapping-step.MappingStep has cyclomatic complexity 50 (threshold 15). Of this number, 19 points are the body's own statements and 31 belong to 17 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.
App.fetchQueryStrData (cyclomatic 50) REDACTED:493— App.fetchQueryStrData has cyclomatic complexity 50 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
build-docs.convertMdx (cyclomatic 50) REDACTED:841— build-docs.convertMdx has cyclomatic complexity 50 (threshold 15). Of this number, 31 points are the body's own statements and 19 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.
newsletter-preview.NewsletterPreview (cyclomatic 49) apps/admin/src/settings/email/newsletters/newsletter-preview.tsx:9— newsletter-preview.NewsletterPreview has cyclomatic complexity 49 (threshold 15). Of this number, 26 points are the body's own statements and 23 belong to 8 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.
App.fetchLinkData (cyclomatic 49) REDACTED:669— App.fetchLinkData has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
editor-screen.EditorLoader (cyclomatic 48) apps/admin/src/editor/editor-screen.tsx:685— editor-screen.EditorLoader has cyclomatic complexity 48 (threshold 15). Of this number, 36 points are the body's own statements and 12 belong to 6 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.
member-event.getAction (cyclomatic 48) apps/admin/src/members/detail/member-event.ts:246— member-event.getAction has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
overview.Overview (cyclomatic 48) apps/admin/src/posts/analytics/overview/overview.tsx:50— overview.Overview has cyclomatic complexity 48 (threshold 15). Of this number, 37 points are the body's own statements and 11 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.
email-content-modal.EmailContentModal (cyclomatic 48) apps/admin/src/automations/components/email-modal/email-content-modal.tsx:132— email-content-modal.EmailContentModal has cyclomatic complexity 48 (threshold 15). Of this number, 22 points are the body's own statements and 26 belong to 9 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.
permissible (cyclomatic 48) REDACTED:913— permissible has cyclomatic complexity 48 (threshold 15). Of this number, 36 points are the body's own statements and 12 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
reader.ArticleBody (cyclomatic 47) REDACTED:75— reader.ArticleBody has cyclomatic complexity 47 (threshold 15). Of this number, 23 points are the body's own statements and 24 belong to 12 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.
paid-subscription-change-chart.PaidMembersChangeChart (cyclomatic 46) apps/admin/src/analytics/views/stats/growth/components/paid-subscription-change-chart.tsx:182— paid-subscription-change-chart.PaidMembersChangeChart has cyclomatic complexity 46 (threshold 15). Most of this is not in the body itself: 10 of the 46 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 222, 484, 205, …). 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.
date-time-picker.DateTimePicker (cyclomatic 46) apps/admin/src/editor/date-time-picker.tsx:75— date-time-picker.DateTimePicker has cyclomatic complexity 46 (threshold 15). Most of this is not in the body itself: 15 of the 46 points are its own statements and the rest belongs to 12 function items inside it that branch (commitTime, onDateKeyDown, commitTypedDate, …). 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.
edit-profile.EditProfile (cyclomatic 45) apps/activitypub/src/views/preferences/components/edit-profile.tsx:63— edit-profile.EditProfile has cyclomatic complexity 45 (threshold 15). Most of this is not in the body itself: 14 of the 45 points are its own statements and the rest belongs to 7 function items inside it that branch (onSubmit, handleProfileImageUpload, handleCoverImageUpload, …). 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.
new-subscribers-cadence.NewSubscribersCadence (cyclomatic 45) apps/admin/src/analytics/views/stats/growth/components/new-subscribers-cadence.tsx:66— new-subscribers-cadence.NewSubscribersCadence has cyclomatic complexity 45 (threshold 15). Of this number, 29 points are the body's own statements and 16 belong to 11 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.
editor-header-actions.PublishActions (cyclomatic 45) apps/admin/src/editor/editor-header-actions.tsx:371— editor-header-actions.PublishActions has cyclomatic complexity 45 (threshold 15). Of this number, 25 points are the body's own statements and 20 belong to 12 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.
editor-screen.EditorContent (cyclomatic 45) apps/admin/src/editor/editor-screen.tsx:179— editor-screen.EditorContent has cyclomatic complexity 45 (threshold 15). Of this number, 23 points are the body's own statements and 22 belong to 11 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.
MembersCSVImporter.writeRows (cyclomatic 45) ghost/core/server/services/members/import-export/import/importer.ts:445— MembersCSVImporter.writeRows has cyclomatic complexity 45 (threshold 15). Of this number, 42 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.
search.Search (cyclomatic 44) apps/activitypub/src/components/modals/search.tsx:53— search.Search has cyclomatic complexity 44 (threshold 15). Of this number, 18 points are the body's own statements and 26 belong to 6 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.
notifications.Notifications (cyclomatic 44) apps/activitypub/src/views/notifications/notifications.tsx:306— notifications.Notifications 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 (notifications.Notifications::handleNotificationClick) 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.
source-utils.processSources (cyclomatic 44) apps/admin-x-framework/src/utils/source-utils.ts:297— source-utils.processSources has cyclomatic complexity 44 (threshold 15). Most of this is not in the body itself: 14 of the 44 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 320, 403). 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.
ghost-updates.GhostUpdates (cyclomatic 44) apps/admin/src/settings/general/ghost-updates/ghost-updates.tsx:172— ghost-updates.GhostUpdates has cyclomatic complexity 44 (threshold 15). Of this number, 32 points are the body's own statements and 12 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.
note.Note (cyclomatic 43) apps/activitypub/src/views/feed/note.tsx:25— note.Note has cyclomatic complexity 43 (threshold 15). Most of this is not in the body itself: 10 of the 43 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 287, a function literal at line 65, a function literal at line 55, …). 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.
global-settings.GlobalSettings::fontClassName (cyclomatic 43) apps/admin/src/settings/site/design-and-branding/global-settings.tsx:151— global-settings.GlobalSettings::fontClassName has cyclomatic complexity 43 (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 (global-settings.GlobalSettings) 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.
update-flow-modal.KeyedUpdateFlowModal (cyclomatic 42) apps/admin/src/editor/publish/update-flow-modal.tsx:57— update-flow-modal.KeyedUpdateFlowModal has cyclomatic complexity 42 (threshold 15). Of this number, 34 points are the body's own statements and 8 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.
run-list.RunList (cyclomatic 42) apps/admin/src/automations/components/canvas/run-list.tsx:150— run-list.RunList has cyclomatic complexity 42 (threshold 15). Of this number, 39 points are the body's own statements and 3 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.
comments.commentMapper (cyclomatic 42) ghost/core/server/api/endpoints/utils/serializers/output/mappers/comments.js:51— comments.commentMapper 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.
create (cyclomatic 42) ghost/core/server/services/members/members-api/repositories/member-repository.js:585— create has cyclomatic complexity 42 (threshold 15). Of this number, 41 points are the body's own statements and 1 belongs to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
#mapPosts (cyclomatic 42) ghost/core/server/services/posts/posts-exporter.js:192— #mapPosts has cyclomatic complexity 42 (threshold 15). Most of this is not in the body itself: 14 of the 42 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 205, 229, 238, …). 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.
latest-post.LatestPost (cyclomatic 41) apps/admin/src/analytics/views/stats/overview/components/latest-post.tsx:52— latest-post.LatestPost has cyclomatic complexity 41 (threshold 15). Of this number, 37 points are the body's own statements and 4 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.
billing-frame.BillingAppFrame (cyclomatic 41) apps/admin/src/billing/billing-frame.tsx:71— billing-frame.BillingAppFrame has cyclomatic complexity 41 (threshold 15). Most of this is not in the body itself: 9 of the 41 points are its own statements and the rest belongs to 10 function items inside it that branch (handleMessage, sendToken, sendForceUpgradeInfo, …). 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.
post-analytics-header.PostAnalyticsHeader (cyclomatic 41) apps/admin/src/posts/analytics/components/post-analytics-header.tsx:82— post-analytics-header.PostAnalyticsHeader has cyclomatic complexity 41 (threshold 15). Of this number, 29 points are the body's own statements and 12 belong to 4 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.
profile.Profile (cyclomatic 40) apps/activitypub/src/views/preferences/components/profile.tsx:242— profile.Profile has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 13 of the 40 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 255, handleCopy, getGradient, …). 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.
ProductRepository.update (cyclomatic 40) ghost/core/server/services/members/members-api/repositories/product-repository.js:374— ProductRepository.update has cyclomatic complexity 40 (threshold 15). Of this number, 39 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.
title.getTitle (cyclomatic 40) ghost/core/frontend/meta/title.js:11— title.getTitle has cyclomatic complexity 40 (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.
profile-preview-hover-card.ProfilePreviewHoverCard (cyclomatic 39) apps/activitypub/src/components/global/profile-preview-hover-card.tsx:36— profile-preview-hover-card.ProfilePreviewHoverCard has cyclomatic complexity 39 (threshold 15). Of this number, 31 points are the body's own statements and 8 belong to 4 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.
feed-item.renderFeedAttachment (cyclomatic 39) apps/activitypub/src/components/feed/feed-item.tsx:78— feed-item.renderFeedAttachment has cyclomatic complexity 39 (threshold 15). Of this number, 30 points are the body's own statements and 9 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
growth.Growth (cyclomatic 39) apps/admin/src/analytics/views/stats/growth/growth.tsx:74— growth.Growth has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 14 of the 39 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 322, 164, 127, …). 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.
top-level-group.TopLevelGroup (cyclomatic 39) apps/admin/src/settings/components/top-level-group.tsx:42— top-level-group.TopLevelGroup has cyclomatic complexity 39 (threshold 15). Of this number, 28 points are the body's own statements and 11 belong to 6 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
filters.ResolvedSelectOptionsPopover (cyclomatic 39) REDACTED:1657— filters.ResolvedSelectOptionsPopover has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 13 of the 39 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 1789, 1910, 1773, …). 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.
add-offer-modal.Sidebar (cyclomatic 38) apps/admin/src/settings/growth/offers/add-offer-modal.tsx:131— add-offer-modal.Sidebar 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, 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.
web.Web (cyclomatic 38) apps/admin/src/posts/analytics/web/web.tsx:45— web.Web has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 14 of the 38 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 105, 157, 68, …). 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.
welcome-email-customize-modal.WelcomeEmailCustomizeModal (cyclomatic 38) apps/admin/src/settings/membership/member-emails/welcome-email-customize-modal.tsx:297— welcome-email-customize-modal.WelcomeEmailCustomizeModal has cyclomatic complexity 38 (threshold 15). Of this number, 19 points are the body's own statements and 19 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.
app.App (cyclomatic 38) apps/comments-ui/src/app.tsx:41— app.App has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 3 of the 38 points are its own statements and the rest belongs to 12 function items inside it that branch (initSetup, initAdminAuth, paginateToComment, …). 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.
notification.NotificationText (cyclomatic 38) apps/portal/src/components/notification.jsx:31— notification.NotificationText has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
pagemenu.PageMenu (cyclomatic 38) apps/shade/src/components/ui/pagemenu.tsx:39— pagemenu.PageMenu has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 14 of the 38 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 83, 76, 59, …). 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.
unsubscribe-page.UnsubscribePage (cyclomatic 37) apps/portal/src/components/pages/unsubscribe-page.jsx:83— unsubscribe-page.UnsubscribePage has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 9 of the 37 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 200, HeaderNotification, updateMemberPreference, …). 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.
getTemplateData (cyclomatic 37) ghost/core/server/services/email-service/email-renderer.js:1304— getTemplateData has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
save-engine.createSaveEngine.run (cyclomatic 36) apps/admin/src/editor/engine/save-engine.ts:749— save-engine.createSaveEngine.run 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.
automation-sidebar.AutomationSidebar (cyclomatic 36) apps/admin/src/automations/components/canvas/automation-sidebar.tsx:264— automation-sidebar.AutomationSidebar has cyclomatic complexity 36 (threshold 15). Of this number, 30 points are the body's own statements and 6 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.
posts-list-screen.PostsListScreen (cyclomatic 36) apps/admin/src/posts/list/posts-list-screen.tsx:71— posts-list-screen.PostsListScreen has cyclomatic complexity 36 (threshold 15). Of this number, 32 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.
tag-detail-form.TagDetailForm (cyclomatic 36) apps/admin/src/tags/detail/tag-detail-form.tsx:74— tag-detail-form.TagDetailForm has cyclomatic complexity 36 (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.
access.Access (cyclomatic 36) apps/admin/src/settings/membership/access.tsx:136— access.Access has cyclomatic complexity 36 (threshold 15). Of this number, 32 points are the body's own statements and 4 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.
api.setupGhostApi (cyclomatic 36) apps/comments-ui/src/utils/api.ts:3— api.setupGhostApi has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 15 of the 36 points are its own statements and the rest belongs to 17 function items inside it that branch (contentEndpointFor, a function literal at line 97, a function literal at line 110, …). 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.
PopupContent.render (cyclomatic 36) REDACTED:160— PopupContent.render has cyclomatic complexity 36 (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.
foreach.foreach (cyclomatic 36) ghost/core/frontend/helpers/foreach.js:22— foreach.foreach has cyclomatic complexity 36 (threshold 15). Of this number, 32 points are the body's own statements and 4 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.
design-and-theme-modal.DesignAndThemeModal (cyclomatic 35) apps/admin/src/settings/site/design-and-theme-modal.tsx:12— design-and-theme-modal.DesignAndThemeModal has cyclomatic complexity 35 (threshold 15). Of this number, 17 points are the body's own statements and 18 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.
signup-options.SignupOptions (cyclomatic 35) apps/admin/src/settings/membership/portal/signup-options.tsx:44— signup-options.SignupOptions has cyclomatic complexity 35 (threshold 15). Of this number, 18 points are the body's own statements and 17 belong to 7 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.
tiers.Tiers (cyclomatic 35) apps/admin/src/settings/membership/tiers.tsx:101— tiers.Tiers has cyclomatic complexity 35 (threshold 15). Of this number, 26 points are the body's own statements and 9 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.
locale-validation.validateLocale (cyclomatic 35) apps/admin/src/settings/utils/locale-validation.ts:46— locale-validation.validateLocale 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.
gift-redemption-page.GiftRedemptionPage (cyclomatic 35) apps/portal/src/components/pages/gift-redemption-page.jsx:58— gift-redemption-page.GiftRedemptionPage has cyclomatic complexity 35 (threshold 15). Of this number, 23 points are the body's own statements and 12 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.
PostsStatsService.getTopPostsViews (cyclomatic 35) ghost/core/server/services/stats/posts-stats-service.js:1321— PostsStatsService.getTopPostsViews has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 15 of the 35 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 1515, 1406, 1383, …). 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.
unblock-dialog.UnblockDialog (cyclomatic 34) apps/activitypub/src/views/profile/components/unblock-dialog.tsx:31— unblock-dialog.UnblockDialog has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 5 of the 34 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 43, a function literal at line 69, renderDualView, …). 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.
locations-card.LocationsCard (cyclomatic 34) apps/admin/src/analytics/views/stats/locations/components/locations-card.tsx:96— locations-card.LocationsCard has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 6 of the 34 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 298, a function literal at line 110, a function literal at line 152, …). 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.
member-detail-sidebar.MemberDetailSidebar (cyclomatic 34) apps/admin/src/members/detail/member-detail-sidebar.tsx:49— member-detail-sidebar.MemberDetailSidebar has cyclomatic complexity 34 (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.
edit-retention-offer-modal.RetentionOfferSidebar (cyclomatic 33) apps/admin/src/settings/growth/offers/edit-retention-offer-modal.tsx:254— edit-retention-offer-modal.RetentionOfferSidebar has cyclomatic complexity 33 (threshold 15). Of this number, 30 points are the body's own statements and 3 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.
create-custom-field-popover.CreateCustomFieldPopover (cyclomatic 33) apps/admin/src/shared/member-custom-fields/create-custom-field-popover.tsx:76— create-custom-field-popover.CreateCustomFieldPopover has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 12 of the 33 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 188, a function literal at line 155, a function literal at line 96, …). 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.
UnsplashSearchModal.UnsplashSearchModal (cyclomatic 33) koenig/kg-unsplash-selector/src/UnsplashSearchModal.tsx:18— UnsplashSearchModal.UnsplashSearchModal has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 2 of the 33 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 82, a function literal at line 112, a function literal at line 45, …). 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.
handleSubscriptionEvent (cyclomatic 33) ghost/core/server/services/stripe/services/webhook/checkout-session-event-service.js:389— handleSubscriptionEvent 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.
side-panel.SidePanel (cyclomatic 32) apps/admin/src/layout/side-panel/side-panel.tsx:32— side-panel.SidePanel has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 6 of the 32 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 65, 137, 122, …). 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.
use-editor-session.useEditorSession (cyclomatic 32) apps/admin/src/editor/session/use-editor-session.ts:208— use-editor-session.useEditorSession has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 5 of the 32 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 454, a function literal at line 443, a function literal at line 278, …). 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.
email-sending-status-provider.EmailSendingStatusProvider (cyclomatic 32) apps/admin/src/posts/analytics/email-sending-status/email-sending-status-provider.tsx:25— email-sending-status-provider.EmailSendingStatusProvider has cyclomatic complexity 32 (threshold 15). Of this number, 21 points are the body's own statements and 11 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.
gift-page.GiftPage (cyclomatic 32) apps/portal/src/components/pages/gift-page.tsx:80— gift-page.GiftPage 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. This shape REPEATS in the file: one other method here (gift-page.GiftPage::handlePurchase) 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.
actions.default (cyclomatic 32) ghost/core/server/models/base/plugins/actions.js:12— actions.default has cyclomatic complexity 32 (threshold 15). Of this number, 26 points are the body's own statements and 6 belong to 4 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.
fetch-api.useFetchApi (cyclomatic 31) apps/admin-x-framework/src/utils/api/fetch-api.ts:269— fetch-api.useFetchApi has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 1 of the 31 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 275, 321, 366, …). 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.
growth-kpis.GrowthKPIs (cyclomatic 31) apps/admin/src/analytics/views/stats/growth/components/growth-kpis.tsx:158— growth-kpis.GrowthKPIs has cyclomatic complexity 31 (threshold 15). Of this number, 21 points are the body's own statements and 10 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
tier-detail-preview.TierDetailPreview (cyclomatic 31) apps/admin/src/settings/membership/tiers/tier-detail-preview.tsx:81— tier-detail-preview.TierDetailPreview has cyclomatic complexity 31 (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.
get-portal-preview-url.getPortalPreviewUrl (cyclomatic 31) apps/admin/src/settings/utils/get-portal-preview-url.ts:19— get-portal-preview-url.getPortalPreviewUrl has cyclomatic complexity 31 (threshold 15). Of this number, 30 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.
list-picker.ListPicker (cyclomatic 31) apps/portal/src/components/common/list-picker.tsx:448— list-picker.ListPicker has cyclomatic complexity 31 (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 (list-picker.ListPicker::onListKeyDown) 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.
paid-account-actions.PaidAccountActions (cyclomatic 31) apps/portal/src/components/pages/AccountHomePage/components/paid-account-actions.jsx:21— paid-account-actions.PaidAccountActions has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 8 of the 31 points are its own statements and the rest belongs to 7 function items inside it that branch (PlanLabel, PlanUpdateButton, a function literal at line 183, …). 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.
chart.ChartTooltipContent (cyclomatic 31) REDACTED:108— chart.ChartTooltipContent has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 5 of the 31 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 170, 128). 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.
EmailRenderer.renderBody (cyclomatic 31) ghost/core/server/services/email-service/email-renderer.js:591— EmailRenderer.renderBody has cyclomatic complexity 31 (threshold 15). Of this number, 20 points are the body's own statements and 11 belong to 5 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.
publication-language.PublicationLanguage (cyclomatic 30) apps/admin/src/settings/general/publication-language.tsx:33— publication-language.PublicationLanguage has cyclomatic complexity 30 (threshold 15). Of this number, 16 points are the body's own statements and 14 belong to 7 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.
build-docs.storySnippet (cyclomatic 30) REDACTED:567— build-docs.storySnippet has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
multi-select-combobox.MultiSelectCombobox (cyclomatic 30) apps/shade/src/components/ui/multi-select-combobox.tsx:171— multi-select-combobox.MultiSelectCombobox has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 14 of the 30 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 262, handleSelectMulti, a function literal at line 225, …). 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.
fetch-from-app.createAppFetcher.fetchFromApp (cyclomatic 30) ghost/core/server/services/app-installations/fetch-from-app.ts:120— fetch-from-app.createAppFetcher.fetchFromApp has cyclomatic complexity 30 (threshold 15). Of this number, 15 points are the body's own statements and 15 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.
exports (cyclomatic 30) ghost/core/server/models/base/plugins/crud.js:58— exports has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 1 of the 30 points is its own statement and the rest belongs to 19 function items inside it that branch (findPage, edit, findAll, …). 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.
use-activity-pub-queries.useDeleteMutationForUser (cyclomatic 29) apps/activitypub/src/hooks/use-activity-pub-queries.ts:2191— use-activity-pub-queries.useDeleteMutationForUser has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 1 of the 29 points is its own statement and the rest belongs to 16 function literals inside it that branch (lines 2201, 2520, 2454, …). 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.
newsletter-radial-chart.NewsletterRadialChart (cyclomatic 29) apps/admin/src/posts/analytics/newsletter/components/newsletter-radial-chart.tsx:27— newsletter-radial-chart.NewsletterRadialChart has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 11 of the 29 points are its own statements and the rest belongs to 3 function items inside it that branch (getSizeConfig, a function literal at line 150, normalizePercentageValue). 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.
App.fetchOfferQueryStrData (cyclomatic 29) REDACTED:435— App.fetchOfferQueryStrData 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.
clean.post (cyclomatic 29) ghost/core/server/api/endpoints/utils/serializers/output/utils/clean.js:81— clean.post 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.
MemberController.updateSubscription (cyclomatic 29) REDACTED:100— MemberController.updateSubscription 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.
SettingsImporter.beforeImport (cyclomatic 29) ghost/core/server/data/importer/importers/data/settings-importer.js:99— SettingsImporter.beforeImport has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 12 of the 29 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 226, 169, 147, …). 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.
getNewsletterBasicStats (cyclomatic 29) ghost/core/server/services/stats/posts-stats-service.js:835— getNewsletterBasicStats 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.
export-account.ExportAccount (cyclomatic 28) apps/activitypub/src/views/preferences/components/account-migration/export-account.tsx:29— export-account.ExportAccount has cyclomatic complexity 28 (threshold 15). Of this number, 20 points are the body's own statements and 8 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.
reauth-dialog.ReauthForm (cyclomatic 28) apps/admin/src/editor/session/reauth-dialog.tsx:67— reauth-dialog.ReauthForm 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 4 function items inside it that branch (submitToken, submitPassword, onSubmit, …). 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.
collect-settings.MultiPicker (cyclomatic 28) apps/admin/src/settings/membership/checkout/collect-settings.tsx:70— collect-settings.MultiPicker has cyclomatic complexity 28 (threshold 15). Of this number, 16 points are the body's own statements and 12 belong to 5 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.
member-event.getIcon (cyclomatic 28) apps/admin/src/members/detail/member-event.ts:119— member-event.getIcon 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.
activity-email-preview.ActivityEmailPreview (cyclomatic 28) apps/admin/src/members/activity/activity-email-preview.tsx:31— activity-email-preview.ActivityEmailPreview has cyclomatic complexity 28 (threshold 15). Of this number, 21 points are the body's own statements and 7 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.
universal-import-modal.UniversalImportModal (cyclomatic 28) apps/admin/src/settings/advanced/migration-tools/universal-import-modal.tsx:22— universal-import-modal.UniversalImportModal has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 13 of the 28 points are its own statements and the rest belongs to 5 function items inside it that branch (importFile, importCSV, finishImport, …). 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.
scroll-section-provider.ScrollSectionProvider (cyclomatic 28) apps/admin/src/settings/hooks/scroll-section-provider.tsx:181— scroll-section-provider.ScrollSectionProvider has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to 8 function literals inside it that branch (lines 297, 322, 246, …). 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.
welcome-email-modal.WelcomeEmailModal (cyclomatic 28) apps/admin/src/settings/membership/member-emails/welcome-email-modal.tsx:115— welcome-email-modal.WelcomeEmailModal has cyclomatic complexity 28 (threshold 15). Of this number, 21 points are the body's own statements and 7 belong to 4 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.
use-scroll-restoration.useScrollRestoration (cyclomatic 28) apps/admin/src/shared/virtual-list/use-scroll-restoration.tsx:126— use-scroll-restoration.useScrollRestoration has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to 10 function literals inside it that branch (lines 260, 299, 210, …). 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.
filters.FilterInput (cyclomatic 28) REDACTED:472— filters.FilterInput has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 8 of the 28 points are its own statements and the rest belongs to 4 function items inside it that branch (handleBlur, getValidationMessage, handleKeyDown, …). 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.
route-settings-parser.serializeRouteSettings (cyclomatic 28) ghost/core/server/services/route-settings/route-settings-parser.ts:501— route-settings-parser.serializeRouteSettings 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.
navigation.navigation (cyclomatic 28) ghost/core/frontend/helpers/navigation.js:98— navigation.navigation has cyclomatic complexity 28 (threshold 15). Of this number, 17 points are the body's own statements and 11 belong to 4 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.
member-activity-pagination.loadMemberActivityPage (cyclomatic 27) apps/admin-x-framework/src/api/member-activity-pagination.ts:71— member-activity-pagination.loadMemberActivityPage has cyclomatic complexity 27 (threshold 15). Of this number, 23 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
use-limiter.useLimiter (cyclomatic 27) apps/admin-x-framework/src/hooks/use-limiter.ts:38— use-limiter.useLimiter has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 6 of the 27 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 78, 102, 70, …). 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.
email-preview.EmailPreview (cyclomatic 27) apps/admin/src/editor/preview/email-preview.tsx:140— email-preview.EmailPreview has cyclomatic complexity 27 (threshold 15). Of this number, 26 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.
options-step.OptionsStep (cyclomatic 27) apps/admin/src/editor/publish/components/options-step.tsx:103— options-step.OptionsStep has cyclomatic complexity 27 (threshold 15). Of this number, 25 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.
post-settings-sidebar.PostSettingsSidebar (cyclomatic 27) apps/admin/src/editor/settings/post-settings-sidebar.tsx:158— post-settings-sidebar.PostSettingsSidebar has cyclomatic complexity 27 (threshold 15). Of this number, 18 points are the body's own statements and 9 belong to 4 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.
url-suggestion-input.UrlSuggestionInput (cyclomatic 27) apps/admin/src/settings/site/navigation/url-suggestion-input.tsx:65— url-suggestion-input.UrlSuggestionInput has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 4 of the 27 points are its own statements and the rest belongs to 9 function items inside it that branch (handleKeyDown, a function literal at line 240, a function literal at line 266, …). 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.
edit-offer-modal.Sidebar (cyclomatic 27) apps/admin/src/settings/growth/offers/edit-offer-modal.tsx:54— edit-offer-modal.Sidebar has cyclomatic complexity 27 (threshold 15). Of this number, 23 points are the body's own statements and 4 belong to 4 function items inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
edit-offer-modal.EditOfferModal (cyclomatic 27) apps/admin/src/settings/growth/offers/edit-offer-modal.tsx:272— edit-offer-modal.EditOfferModal has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 6 of the 27 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 336, 384, 299). 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.
members-actions.MembersActions (cyclomatic 27) apps/admin/src/members/components/members-actions.tsx:39— members-actions.MembersActions has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 12 of the 27 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 134, 84, 109, …). 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.
preview-frame.EmailPreviewFrame (cyclomatic 27) apps/admin/src/automations/components/email-modal/preview-frame.tsx:10— preview-frame.EmailPreviewFrame has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 11 of the 27 points are its own statements and the rest belongs to 5 function items inside it that branch (syncPreviewHeight, handlePreviewLoad, cleanupPreviewMeasurement, …). 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.
preview-modal.PreviewModalContent (cyclomatic 27) apps/admin/src/settings/components/preview-modal.tsx:103— preview-modal.PreviewModalContent has cyclomatic complexity 27 (threshold 15). Of this number, 22 points are the body's own statements and 5 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.
default-recipients.DefaultRecipients (cyclomatic 27) apps/admin/src/settings/email/default-recipients.tsx:83— default-recipients.DefaultRecipients has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 6 of the 27 points are its own statements and the rest belongs to 13 function items inside it that branch (setDefaultRecipientValue, updateSelectedSegments, requestSegmentOptions, …). 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.
welcome-email-preview-frame.WelcomeEmailPreviewFrame (cyclomatic 27) apps/admin/src/settings/membership/member-emails/welcome-email-preview-frame.tsx:10— welcome-email-preview-frame.WelcomeEmailPreviewFrame has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 11 of the 27 points are its own statements and the rest belongs to 5 function items inside it that branch (syncPreviewHeight, handlePreviewLoad, cleanupPreviewMeasurement, …). 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.
App.getPageFromLinkPath (cyclomatic 27) REDACTED:1176— App.getPageFromLinkPath 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.
knex-adapter.createCustomAdapter.<returned closure>.applyCondition (cyclomatic 27) ghost/core/server/auth/better-auth/knex-adapter.ts:100— knex-adapter.createCustomAdapter.<returned closure>.applyCondition has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
body_class.body_class (cyclomatic 27) ghost/core/frontend/helpers/body_class.js:19— body_class.body_class 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.
get.get (cyclomatic 27) ghost/core/frontend/helpers/get.js:405— get.get 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.
handle-image-sizes.handleImageSizes (cyclomatic 27) ghost/core/frontend/web/middleware/handle-image-sizes.js:16— handle-image-sizes.handleImageSizes has cyclomatic complexity 27 (threshold 15). Of this number, 15 points are the body's own statements and 12 belong to 6 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.
handleDataAttributes (cyclomatic 27) apps/portal/src/data-attributes.js:234— handleDataAttributes 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 33 function items inside it that branch (a function literal at line 276, (anonymous)::clickHandler, (anonymous)::clickHandler, …). 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.
create (cyclomatic 27) ghost/core/server/services/offers/domain/models/offer.js:288— create 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.
suggested-profiles.SuggestedProfiles (cyclomatic 26) apps/activitypub/src/views/feed/components/suggested-profiles.tsx:12— suggested-profiles.SuggestedProfiles has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 8 of the 26 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 130, updateScrollButtons, scrollLeft, …). 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.
bluesky-sharing.BlueskySharing (cyclomatic 26) apps/activitypub/src/views/preferences/components/bluesky-sharing.tsx:35— bluesky-sharing.BlueskySharing has cyclomatic complexity 26 (threshold 15). Of this number, 17 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.
newsletters.Newsletters (cyclomatic 26) apps/admin/src/analytics/views/stats/newsletters/newsletters.tsx:291— newsletters.Newsletters has cyclomatic complexity 26 (threshold 15). Of this number, 13 points are the body's own statements and 13 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.
unsubscribe-modal.UnsubscribeModal (cyclomatic 26) apps/admin/src/members/components/bulk-action-modals/unsubscribe-modal.tsx:30— unsubscribe-modal.UnsubscribeModal has cyclomatic complexity 26 (threshold 15). Of this number, 13 points are the body's own statements and 13 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.
members.MembersPage (cyclomatic 26) apps/admin/src/members/members.tsx:47— members.MembersPage has cyclomatic complexity 26 (threshold 15). Of this number, 24 points are the body's own statements and 2 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.
form.FormEditor (cyclomatic 26) apps/comments-ui/src/components/content/forms/form.tsx:27— form.FormEditor has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 9 of the 26 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 110, 80, 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.
gift-success-page.GiftSuccessPage (cyclomatic 26) apps/portal/src/components/pages/gift-success-page.jsx:139— gift-success-page.GiftSuccessPage 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.
validator.validateSchema (cyclomatic 26) REDACTED:44— validator.validateSchema has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 3 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 50). 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.
OEmbedService.#fetchOembedDataFromUrl (cyclomatic 26) REDACTED:860— OEmbedService.#fetchOembedDataFromUrl 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.
createCheckoutSession (cyclomatic 26) ghost/core/server/services/members/members-api/controllers/router-controller.js:781— createCheckoutSession has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 3 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 783). 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.
use-publish-flow.usePublishFlow (cyclomatic 25) apps/admin/src/editor/publish/use-publish-flow.ts:134— use-publish-flow.usePublishFlow has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 12 of the 25 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 316, 291, 358, …). 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.
theme-code-editor-modal.ThemeCodeEditorModal::handleSave (cyclomatic 25) apps/admin/src/settings/site/theme/theme-code-editor-modal.tsx:823— theme-code-editor-modal.ThemeCodeEditorModal::handleSave has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (theme-code-editor-modal.ThemeCodeEditorModal) 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.
embed-signup-sidebar.EmbedSignupSidebar (cyclomatic 25) apps/admin/src/settings/growth/embed-signup/embed-signup-sidebar.tsx:45— embed-signup-sidebar.EmbedSignupSidebar has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 8 of the 25 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 73, 208, 97, …). 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.
label-picker.ComboboxPicker (cyclomatic 25) apps/admin/src/members/label-picker/label-picker.tsx:399— label-picker.ComboboxPicker has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 6 of the 25 points are its own statements and the rest belongs to 8 function items inside it that branch (handleInputKeyDown, pointAtAddedLabel, a function literal at line 460, …). 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.
popover.Popover (cyclomatic 25) apps/portal/src/components/common/popover.tsx:134— popover.Popover 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 5 function literals inside it that branch (lines 152, 201, 212, …). 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.
build-docs.loadStories (cyclomatic 25) REDACTED:227— build-docs.loadStories has cyclomatic complexity 25 (threshold 15). Of this number, 24 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.
email-design.getEmailDesign (cyclomatic 25) ghost/core/server/lib/email-rendering/email-design.js:71— email-design.getEmailDesign has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
GiftDeliveryService.send (cyclomatic 25) ghost/core/server/services/gifts/gift-delivery-service.ts:229— GiftDeliveryService.send has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
ghost_head.getAdminToolbarHelper (cyclomatic 25) ghost/core/frontend/helpers/ghost_head.js:269— ghost_head.getAdminToolbarHelper has cyclomatic complexity 25 (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.
MembersStripeCustomersSubscriptionsImporter.generate (cyclomatic 25) ghost/core/server/data/seeders/importers/members-stripe-customers-subscriptions-importer.js:100— MembersStripeCustomersSubscriptionsImporter.generate 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.
createSessionFromMagicLink (cyclomatic 25) REDACTED:467— createSessionFromMagicLink has cyclomatic complexity 25 (threshold 15). Of this number, 21 points are the body's own statements and 4 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.
editor-session.createEditorSession.notifyChanged (cyclomatic 24) apps/admin/src/editor/session/editor-session.ts:395— editor-session.createEditorSession.notifyChanged has cyclomatic complexity 24 (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.
theme-modal.ChangeThemeModal (cyclomatic 24) apps/admin/src/settings/site/theme-modal.tsx:318— theme-modal.ChangeThemeModal has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 7 of the 24 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 346, a function literal at line 393, performInstallation, …). 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.
theme-code-editor-modal.ThemeCodeEditorModal (cyclomatic 24) apps/admin/src/settings/site/theme/theme-code-editor-modal.tsx:298— theme-code-editor-modal.ThemeCodeEditorModal 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. This shape REPEATS in the file: one other method here (theme-code-editor-modal.ThemeCodeEditorModal::handleSave) 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.
comment-likes-modal.CommentLikesModal (cyclomatic 24) REDACTED:33— comment-likes-modal.CommentLikesModal has cyclomatic complexity 24 (threshold 15). Of this number, 21 points are the body's own statements and 3 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.
tag-image-field.TagImageField (cyclomatic 24) apps/admin/src/tags/detail/tag-image-field.tsx:45— tag-image-field.TagImageField has cyclomatic complexity 24 (threshold 15). Of this number, 16 points are the body's own statements and 8 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
use-member-filter-fields.useMemberFilterFields (cyclomatic 24) apps/admin/src/members/use-member-filter-fields.ts:284— use-member-filter-fields.useMemberFilterFields has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 320, 509, 384, …). 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.
member-emails.MemberEmails (cyclomatic 24) apps/admin/src/settings/membership/member-emails.tsx:173— member-emails.MemberEmails has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 8 of the 24 points are its own statements and the rest belongs to 4 function items inside it that branch (handleToggle, a function literal at line 229, handleEditClick, …). 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.
share-modal.ShareModal (cyclomatic 24) apps/portal/src/components/pages/share/share-modal.jsx:16— share-modal.ShareModal has cyclomatic complexity 24 (threshold 15). Of this number, 17 points are the body's own statements and 7 belong to 4 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.
data-attributes.formSubmitHandler (cyclomatic 24) apps/portal/src/data-attributes.js:19— data-attributes.formSubmitHandler has cyclomatic complexity 24 (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.
tabs.renderTabsTriggerLabel (cyclomatic 24) apps/shade/src/components/ui/tabs.tsx:151— tabs.renderTabsTriggerLabel has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 5 of the 24 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 160, a function literal at line 210, flushLabel). 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.
permissible (cyclomatic 24) ghost/core/server/models/post.js:1530— permissible has cyclomatic complexity 24 (threshold 15). Of this number, 22 points are the body's own statements and 2 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.
top-posts.TopPosts (cyclomatic 23) apps/admin/src/analytics/views/stats/overview/components/top-posts.tsx:79— top-posts.TopPosts has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 110, 253, 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.
sidebar.Sidebar (cyclomatic 23) apps/admin/src/settings/layout/sidebar.tsx:320— sidebar.Sidebar has cyclomatic complexity 23 (threshold 15). Of this number, 12 points are the body's own statements and 11 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.
format-url.formatUrl (cyclomatic 23) apps/admin/src/settings/utils/format-url.ts:3— format-url.formatUrl 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.
route-settings-parser.parseRouteSettings (cyclomatic 23) ghost/core/server/services/route-settings/route-settings-parser.ts:389— route-settings-parser.parseRouteSettings 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.
EmailAnalyticsService.#fetchEventsForJob (cyclomatic 23) ghost/core/server/services/email-analytics/email-analytics-service.ts:453— EmailAnalyticsService.#fetchEventsForJob has cyclomatic complexity 23 (threshold 15). Of this number, 17 points are the body's own statements and 6 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.
MemberWelcomeEmailRenderer.render (cyclomatic 23) ghost/core/server/services/member-welcome-emails/member-welcome-email-renderer.js:121— MemberWelcomeEmailRenderer.render has cyclomatic complexity 23 (threshold 15). Of this number, 16 points are the body's own statements and 7 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.
moderation.Moderation (cyclomatic 22) apps/activitypub/src/views/preferences/components/moderation.tsx:41— moderation.Moderation has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 181, a function literal at line 266, handleShowSensitiveMediaChange). 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.
overview.Overview (cyclomatic 22) apps/admin/src/analytics/views/stats/overview/overview.tsx:84— overview.Overview has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 7 of the 22 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 145, 200, 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.
editor-session.createEditorSession.prepare (cyclomatic 22) apps/admin/src/editor/session/editor-session.ts:664— editor-session.createEditorSession.prepare 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.
access-section.AccessSection (cyclomatic 22) apps/admin/src/editor/settings/access-section.tsx:56— access-section.AccessSection has cyclomatic complexity 22 (threshold 15). Of this number, 12 points are the body's own statements and 10 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.
invite-user-modal.InviteUserModal (cyclomatic 22) apps/admin/src/settings/general/invite-user-modal.tsx:48— invite-user-modal.InviteUserModal 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 (invite-user-modal.InviteUserModal::handleSubmit) 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.
add-recommendation-modal.AddRecommendationModal (cyclomatic 22) apps/admin/src/settings/growth/recommendations/add-recommendation-modal.tsx:45— add-recommendation-modal.AddRecommendationModal has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 8 of the 22 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 131, 75, 157, …). 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.
newsletter-overview.NewsletterOverview (cyclomatic 22) apps/admin/src/posts/analytics/overview/components/newsletter-overview.tsx:40— newsletter-overview.NewsletterOverview has cyclomatic complexity 22 (threshold 15). Of this number, 14 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.
analytics-sync.AnalyticsSync (cyclomatic 22) apps/admin/src/posts/debug/analytics-sync.tsx:112— analytics-sync.AnalyticsSync has cyclomatic complexity 22 (threshold 15). Of this number, 17 points are the body's own statements and 5 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.
use-automation-runs.useAutomationRuns (cyclomatic 22) apps/admin/src/automations/hooks/use-automation-runs.ts:11— use-automation-runs.useAutomationRuns has cyclomatic complexity 22 (threshold 15). Of this number, 17 points are the body's own statements and 5 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.
run-history.mapStep (cyclomatic 22) apps/admin/src/automations/utils/run-history.ts:86— run-history.mapStep 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.
gift-link-modal.GiftLinkModal (cyclomatic 22) apps/admin/src/posts/analytics/modals/gift-link-modal.tsx:44— gift-link-modal.GiftLinkModal has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 74, 127, 143, …). 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.
yaml-file-editor-modal.YamlFileEditorModal (cyclomatic 22) apps/admin/src/settings/advanced/labs/yaml-file-editor-modal.tsx:34— yaml-file-editor-modal.YamlFileEditorModal has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 8 of the 22 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 61, handleSave, a function literal at line 119). 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.
color-picker-field.ColorPickerField (cyclomatic 22) apps/admin/src/settings/components/color-picker-field.tsx:63— color-picker-field.ColorPickerField has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 85, a function literal at line 91, a function literal at line 146, …). 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.
list-picker.ListPicker::onListKeyDown (cyclomatic 22) apps/portal/src/components/common/list-picker.tsx:620— list-picker.ListPicker::onListKeyDown has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (list-picker.ListPicker) 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.
build-docs.exportOrigin (cyclomatic 22) REDACTED:386— build-docs.exportOrigin 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.
pack-local.main (cyclomatic 22) apps/shade/scripts/pack-local.ts:318— pack-local.main 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 5 function items inside it that branch (pass, a function literal at line 378, shutdown, …). 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.
app.App (cyclomatic 22) apps/sodo-search/src/app.tsx:43— app.App has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 149, 171, 89, …). 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.
filter.createMetafieldsFilterTransformer (cyclomatic 22) ghost/core/server/services/members-metafields/filter.ts:107— filter.createMetafieldsFilterTransformer 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 6 function items inside it that branch (toElemMatch, transform, buildElemMatch, …). 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.
MemberRepository.applyOfferToSubscription (cyclomatic 22) ghost/core/server/services/members/members-api/repositories/member-repository.js:2539— MemberRepository.applyOfferToSubscription 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.
MemberBREADService.add (cyclomatic 22) ghost/core/server/services/members/members-api/services/member-bread-service.js:527— MemberBREADService.add 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.
ProductRepository.create (cyclomatic 22) ghost/core/server/services/members/members-api/repositories/product-repository.js:174— ProductRepository.create 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.
MppAdapter.#run (cyclomatic 22) ghost/core/server/services/machine-payments/adapters/mpp-adapter.ts:141— MppAdapter.#run 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.
video.handleVideoPlayer (cyclomatic 22) ghost/core/frontend/src/cards/js/video.js:2— video.handleVideoPlayer 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 9 function items inside it that branch (a function literal at line 143, a function literal at line 131, a function literal at line 109, …). 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.
AutomationRunStepsImporter.import (cyclomatic 22) ghost/core/server/data/seeders/importers/automation-run-steps-importer.ts:55— AutomationRunStepsImporter.import 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.
NewslettersService.prepAttrsForEmailVerification (cyclomatic 22) ghost/core/server/services/newsletters/newsletters-service.js:305— NewslettersService.prepAttrsForEmailVerification 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.
feed-item-stats.FeedItemStats (cyclomatic 21) apps/activitypub/src/components/feed/feed-item-stats.tsx:28— feed-item-stats.FeedItemStats has cyclomatic complexity 21 (threshold 15). Of this number, 17 points are the body's own statements and 4 belong to 4 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.
handle-response.handleResponse (cyclomatic 21) apps/admin-x-framework/src/utils/api/handle-response.ts:26— handle-response.handleResponse 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.
actions.getLinkTarget (cyclomatic 21) apps/admin-x-framework/src/api/actions.ts:134— actions.getLinkTarget 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.
web.Web (cyclomatic 21) apps/admin/src/analytics/views/stats/web/web.tsx:26— web.Web has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 7 of the 21 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 64, 52, 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.
growth-sources.GrowthSources (cyclomatic 21) apps/admin/src/analytics/views/stats/growth/components/growth-sources.tsx:111— growth-sources.GrowthSources has cyclomatic complexity 21 (threshold 15). Of this number, 11 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.
email-recipients-options.EmailRecipientsOptions (cyclomatic 21) apps/admin/src/editor/publish/components/email-recipients-options.tsx:43— email-recipients-options.EmailRecipientsOptions 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 6 function literals inside it that branch (lines 83, 68, 99, …). 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.
history-modal.HistoryModal (cyclomatic 21) apps/admin/src/settings/advanced/history-modal.tsx:429— history-modal.HistoryModal has cyclomatic complexity 21 (threshold 15). Of this number, 13 points are the body's own statements and 8 belong to 4 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.
webhook-modal.WebhookModal (cyclomatic 21) apps/admin/src/settings/advanced/integrations/webhook-modal.tsx:32— webhook-modal.WebhookModal has cyclomatic complexity 21 (threshold 15). Of this number, 14 points are the body's own statements and 7 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.
members-list.MembersList (cyclomatic 21) apps/admin/src/members/components/members-list.tsx:57— members-list.MembersList has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 5 of the 21 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 117, a function literal at line 146, a function literal at line 133, …). 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.
post-list-row.PostListRowComponent (cyclomatic 21) apps/admin/src/posts/list/components/post-list-row.tsx:136— post-list-row.PostListRowComponent 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.
use-post-selection.usePostSelection (cyclomatic 21) apps/admin/src/posts/list/hooks/use-post-selection.ts:47— use-post-selection.usePostSelection has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 91, 131, 121, …). 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.
recommendations-page.RecommendationItem (cyclomatic 21) apps/portal/src/components/pages/recommendations-page.jsx:195— recommendations-page.RecommendationItem has cyclomatic complexity 21 (threshold 15). Of this number, 11 points are the body's own statements and 10 belong to 4 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.
gift-page.GiftPage::handlePurchase (cyclomatic 21) apps/portal/src/components/pages/gift-page.tsx:450— gift-page.GiftPage::handlePurchase 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. This shape REPEATS in the file: one other method here (gift-page.GiftPage) 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.
code-editor-view.CodeEditorView (cyclomatic 21) apps/shade/src/components/ui/code-editor-view.tsx:54— code-editor-view.CodeEditorView has cyclomatic complexity 21 (threshold 15). Of this number, 11 points are the body's own statements and 10 belong to 6 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.
MetafieldDefinitionsService.edit (cyclomatic 21) ghost/core/server/services/members-metafields/definitions-service.ts:577— MetafieldDefinitionsService.edit has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 595, 584). 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.
post-data.buildPostData (cyclomatic 21) ghost/core/server/services/content-import/import/post-data.ts:82— post-data.buildPostData 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.
context.setResponseContext (cyclomatic 21) ghost/core/frontend/services/rendering/context.js:19— context.setResponseContext 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.
poll.processStep (cyclomatic 21) ghost/core/server/services/automations/poll.ts:192— poll.processStep 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.
generate-img-attrs.generateImgSrcAttrs (cyclomatic 21) koenig/kg-default-cards/src/utils/generate-img-attrs.ts:64— generate-img-attrs.generateImgSrcAttrs 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.
#run (cyclomatic 21) ghost/core/server/data/seeders/data-generator.js:251— #run has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
use-keyboard-shortcuts.useKeyboardShortcuts (cyclomatic 20) apps/activitypub/src/hooks/use-keyboard-shortcuts.tsx:11— use-keyboard-shortcuts.useKeyboardShortcuts 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 one function literal inside it that branches (line 16). 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.
inbox-list.InboxList (cyclomatic 20) apps/activitypub/src/views/inbox/components/inbox-list.tsx:34— inbox-list.InboxList has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 59, 64, 105, …). 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.
nav-content.NavContent (cyclomatic 20) apps/admin/src/layout/app-sidebar/nav-content.tsx:77— nav-content.NavContent 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.
use-leave-guard.useEditorLeaveGuard (cyclomatic 20) apps/admin/src/editor/session/use-leave-guard.ts:35— use-leave-guard.useEditorLeaveGuard 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 9 function literals inside it that branch (lines 99, 131, 149, …). 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.
user-detail-modal.UserDetailModal (cyclomatic 20) apps/admin/src/settings/general/user-detail-modal.tsx:655— user-detail-modal.UserDetailModal has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body's own statements and 6 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.
portal-modal.PortalModal (cyclomatic 20) apps/admin/src/settings/membership/portal/portal-modal.tsx:99— portal-modal.PortalModal has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 170, a function literal at line 121, onSelectURL, …). 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.
history-modal.HistoryFilter (cyclomatic 20) apps/admin/src/settings/advanced/history-modal.tsx:99— history-modal.HistoryFilter 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 literals inside it that branch (lines 115, 132, 168, …). 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.
history-modal.HistoryActionDescription (cyclomatic 20) apps/admin/src/settings/advanced/history-modal.tsx:342— history-modal.HistoryActionDescription has cyclomatic complexity 20 (threshold 15). Of this number, 19 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.
use-upgrade-job.useUpgradeJob (cyclomatic 20) apps/admin/src/settings/general/ghost-updates/use-upgrade-job.ts:62— use-upgrade-job.useUpgradeJob has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 90, 75, 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.
welcome-email-sender-details.resolveWelcomeEmailSenderDetails (cyclomatic 20) apps/admin/src/settings/utils/welcome-email-sender-details.ts:34— welcome-email-sender-details.resolveWelcomeEmailSenderDetails 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.
wait-duration-field.WaitDurationField (cyclomatic 20) apps/admin/src/automations/components/canvas/wait-duration-field.tsx:39— wait-duration-field.WaitDurationField has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 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.
comments-list.CommentsList (cyclomatic 20) apps/admin/src/comments/components/comments-list.tsx:42— comments-list.CommentsList has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 125, a function literal at line 86, handleCloseSidebar, …). 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.
manage-view-popover.ManageViewPopoverContent (cyclomatic 20) apps/admin/src/members/components/manage-view-popover.tsx:21— manage-view-popover.ManageViewPopoverContent has cyclomatic complexity 20 (threshold 15). Of this number, 10 points are the body's own statements and 10 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
users.Users (cyclomatic 20) apps/admin/src/settings/general/users.tsx:328— users.Users has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 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.
use-pintura-editor.usePinturaEditor (cyclomatic 20) apps/admin/src/settings/hooks/use-pintura-editor.ts:49— use-pintura-editor.usePinturaEditor has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 66, 108, 67, …). 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.
chip-picker.ChipPicker (cyclomatic 20) apps/admin/src/shared/pickers/chip-picker.tsx:141— chip-picker.ChipPicker 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 (chip-picker.ChipPicker::handleKeyDown) 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.
main-form.MainForm (cyclomatic 20) apps/comments-ui/src/components/content/forms/main-form.tsx:11— main-form.MainForm has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 49, 15, 42, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
actions.updateProfile (cyclomatic 20) apps/portal/src/actions.js:1007— actions.updateProfile 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.
search-index.isCJK (cyclomatic 20) apps/sodo-search/src/search-index.ts:46— search-index.isCJK 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.
popup-modal.Search (cyclomatic 20) apps/sodo-search/src/components/popup-modal.tsx:582— popup-modal.Search has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 620, 614, 656). 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.
commands.addTableColumn (cyclomatic 20) ghost/core/server/data/schema/commands.js:28— commands.addTableColumn 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.
EmailAddressService.getAddress (cyclomatic 20) ghost/core/server/services/email-address/email-address-service.ts:103— EmailAddressService.getAddress 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.
PostsService.bulkEdit (cyclomatic 20) ghost/core/server/services/posts/posts-service.js:178— PostsService.bulkEdit has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
StripeCoupon.create (cyclomatic 20) ghost/core/server/services/offers/domain/models/stripe-coupon.js:48— StripeCoupon.create 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.
api.createApiInstance (cyclomatic 20) ghost/core/server/services/members/api.js:63— api.createApiInstance has cyclomatic complexity 20 (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.
PostMediaInliner.inlineLexicalChildren (cyclomatic 20) ghost/core/server/services/content-import/import/media.ts:198— PostMediaInliner.inlineLexicalChildren 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.
markdown.renderEntryMarkdown (cyclomatic 20) ghost/core/frontend/services/llms/markdown.js:152— markdown.renderEntryMarkdown 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.
has.has (cyclomatic 20) ghost/core/frontend/helpers/has.js:129— has.has 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 7 function literals inside it that branch (lines 145, 148, 151, …). 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.
rough-size.roughSize::walk (cyclomatic 20) ghost/core/server/adapters/cache/rough-size.ts:43— rough-size.roughSize::walk 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.
DockerAnalyticsManager.generateSession (cyclomatic 20) REDACTED:557— DockerAnalyticsManager.generateSession 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.
clean-basic-html.cleanBasicHtml (cyclomatic 20) koenig/kg-clean-basic-html/src/clean-basic-html.ts:12— clean-basic-html.cleanBasicHtml has cyclomatic complexity 20 (threshold 15). Of this number, 13 points are the body's own statements and 7 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.
extendModel::permissible (cyclomatic 20) ghost/core/server/models/relations/authors.js:354— extendModel::permissible 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.
exports (cyclomatic 20) ghost/core/server/models/base/plugins/bulk-operations.js:90— exports 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 11 function items inside it that branch (bulkEdit, bulkDestroy, transactionLockingLinked, …). 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.
use-growth-stats.calculateTotals (cyclomatic 19) apps/admin/src/analytics/hooks/use-growth-stats.ts:18— use-growth-stats.calculateTotals 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.
floating-sidebar-content-sync.FloatingSidebarContentSync (cyclomatic 19) apps/admin/src/layout/floating-sidebar-content-sync.tsx:94— floating-sidebar-content-sync.FloatingSidebarContentSync has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 151, 127, 107, …). 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.
editor-header-actions.EditorHeaderActions (cyclomatic 19) apps/admin/src/editor/editor-header-actions.tsx:192— editor-header-actions.EditorHeaderActions has cyclomatic complexity 19 (threshold 15). Of this number, 12 points are the body's own statements and 7 belong to 4 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.
use-writing-focus.useWritingFocus (cyclomatic 19) apps/admin/src/editor/use-writing-focus.ts:41— use-writing-focus.useWritingFocus has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 70, 54, 61, …). 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.
portal-links.PortalLinks (cyclomatic 19) apps/admin/src/settings/membership/portal/portal-links.tsx:46— portal-links.PortalLinks has cyclomatic complexity 19 (threshold 15). Of this number, 17 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.
install-dialog.InstallDialog (cyclomatic 19) apps/admin/src/apps/components/install-dialog/install-dialog.tsx:61— install-dialog.InstallDialog has cyclomatic complexity 19 (threshold 15). Of this number, 10 points are the body's own statements and 9 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.
editable-email-card.EditableEmailCard (cyclomatic 19) apps/admin/src/automations/components/canvas/editable-email-card.tsx:108— editable-email-card.EditableEmailCard has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
members-header-search.MembersHeaderSearch (cyclomatic 19) apps/admin/src/members/components/members-header-search.tsx:16— members-header-search.MembersHeaderSearch has cyclomatic complexity 19 (threshold 15). Of this number, 11 points are the body's own statements and 8 belong to 4 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.
addressing.customFieldAddressing.matchCompound (cyclomatic 19) apps/admin/src/members/custom-fields/addressing.ts:155— addressing.customFieldAddressing.matchCompound has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
member-value-semantics.subscriptionSemantics.parseClauses (cyclomatic 19) apps/admin/src/members/member-value-semantics.ts:46— member-value-semantics.subscriptionSemantics.parseClauses 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.
label-picker.LabelListItems (cyclomatic 19) apps/admin/src/members/label-picker/label-picker.tsx:116— label-picker.LabelListItems 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 7 function items inside it that branch (handleCreate, a function literal at line 135, a function literal at line 184, …). 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.
activity-row.ActivityRow (cyclomatic 19) apps/admin/src/members/activity/activity-row.tsx:26— activity-row.ActivityRow has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
manage-post-view-popover.PopoverBody (cyclomatic 19) apps/admin/src/posts/list/components/manage-post-view-popover.tsx:57— manage-post-view-popover.PopoverBody has cyclomatic complexity 19 (threshold 15). 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 (handleSave, handleDelete, a function literal at line 133). 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.
upcoming-run-steps.mapUpcomingRunSteps (cyclomatic 19) apps/admin/src/automations/utils/upcoming-run-steps.ts:9— upcoming-run-steps.mapUpcomingRunSteps 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.
field-picker.FieldPicker (cyclomatic 19) apps/admin/src/members/components/bulk-action-modals/import-members/field-picker.tsx:88— field-picker.FieldPicker has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 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.
post-list-row-email-status.PostListRowEmailStatus (cyclomatic 19) apps/admin/src/posts/list/components/post-list-row-email-status.tsx:22— post-list-row-email-status.PostListRowEmailStatus has cyclomatic complexity 19 (threshold 15). Of this number, 12 points are the body's own statements and 7 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.
export-all-modal.ExportAllModal (cyclomatic 19) apps/admin/src/settings/advanced/migration-tools/export-all-modal.tsx:81— export-all-modal.ExportAllModal has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 6 function items inside it that branch (startExport, handleOpenChange, a function literal at line 96, …). 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.
emails.EmailsGroup (cyclomatic 19) apps/admin/src/settings/email/emails.tsx:82— emails.EmailsGroup has cyclomatic complexity 19 (threshold 15). Of this number, 10 points are the body's own statements and 9 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.
admin-api.setupAdminAPI (cyclomatic 19) apps/comments-ui/src/utils/admin-api.ts:1— admin-api.setupAdminAPI has cyclomatic complexity 19 (threshold 15). Of this number, 15 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.
input-field.InputField (cyclomatic 19) apps/portal/src/components/common/input-field.jsx:179— input-field.InputField 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
plan-step.GiftPlanStep (cyclomatic 19) apps/portal/src/components/pages/gift/plan-step.tsx:74— plan-step.GiftPlanStep has cyclomatic complexity 19 (threshold 15). Of this number, 10 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.
use-share-data.gatherShareData (cyclomatic 19) apps/portal/src/components/pages/share/use-share-data.js:44— use-share-data.gatherShareData has cyclomatic complexity 19 (threshold 15). 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, 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.
GiftService.startCheckout (cyclomatic 19) ghost/core/server/services/gifts/gift-service.ts:330— GiftService.startCheckout 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, 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.
RouterController._getSubscriptionCheckoutData (cyclomatic 19) ghost/core/server/services/members/members-api/controllers/router-controller.js:468— RouterController._getSubscriptionCheckoutData 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.
RouterController.getMemberOffers (cyclomatic 19) ghost/core/server/services/members/members-api/controllers/router-controller.js:1252— RouterController.getMemberOffers 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.
ExternalMediaInliner.getRemoteMedia (cyclomatic 19) REDACTED:227— ExternalMediaInliner.getRemoteMedia has cyclomatic complexity 19 (threshold 15). 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ContentCSVImporter.processRows (cyclomatic 19) ghost/core/server/services/content-import/import/importer.ts:231— ContentCSVImporter.processRows 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.
error-handler.themeErrorRenderer (cyclomatic 19) REDACTED:46— error-handler.themeErrorRenderer 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SlackPingService.ping (cyclomatic 19) ghost/core/server/services/slack-ping/slack-ping-service.ts:122— SlackPingService.ping 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.
MentionsAPI.#updateWebmention (cyclomatic 19) ghost/core/server/services/mentions/mentions-api.js:189— MentionsAPI.#updateWebmention 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.
resolve.checkAdminApiRequest (cyclomatic 19) packages/app-contracts/src/bridge/resolve.ts:61— resolve.checkAdminApiRequest 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.
onUpdated (cyclomatic 19) ghost/core/server/models/post.js:420— onUpdated 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.
add (cyclomatic 19) REDACTED:663— add has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to 8 function items inside it that branch (resolveRole, a function literal at line 767, getAuthorRole, …). 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.
ap-avatar.APAvatar (cyclomatic 18) apps/activitypub/src/components/global/ap-avatar.tsx:83— ap-avatar.APAvatar has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
recommendations.Recommendations (cyclomatic 18) apps/activitypub/src/components/layout/sidebar/recommendations.tsx:13— recommendations.Recommendations has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 38, 68). 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.
actions.getActionTitle (cyclomatic 18) apps/admin-x-framework/src/api/actions.ts:184— actions.getActionTitle 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.
use-growth-stats.useGrowthStats (cyclomatic 18) apps/admin/src/analytics/hooks/use-growth-stats.ts:181— use-growth-stats.useGrowthStats has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 234, 210). 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.
save-engine.createSaveEngine.decideLeave (cyclomatic 18) apps/admin/src/editor/engine/save-engine.ts:1200— save-engine.createSaveEngine.decideLeave 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.
image-field.ImageField (cyclomatic 18) apps/admin/src/editor/image-field.tsx:74— image-field.ImageField has cyclomatic complexity 18 (threshold 15). Of this number, 16 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.
theme-modal.ThemeToolbar (cyclomatic 18) apps/admin/src/settings/site/theme-modal.tsx:70— theme-modal.ThemeToolbar has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to 4 function items inside it that branch (handleThemeUpload, handleUpload, a function literal at line 89, …). 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.
profile-tab.BasicInputs (cyclomatic 18) apps/admin/src/settings/general/users/profile-tab.tsx:19— profile-tab.BasicInputs 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.
custom-integration-modal.CustomIntegrationModalContent (cyclomatic 18) apps/admin/src/settings/advanced/integrations/custom-integration-modal.tsx:30— custom-integration-modal.CustomIntegrationModalContent has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 belong to 7 function items inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
growth-sources.GrowthSources (cyclomatic 18) apps/admin/src/posts/analytics/growth/components/growth-sources.tsx:147— growth-sources.GrowthSources 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.
post-debug.DebugContent (cyclomatic 18) apps/admin/src/posts/debug/post-debug.tsx:34— post-debug.DebugContent 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.
filter-renderer.CustomFieldFilterRenderer (cyclomatic 18) apps/admin/src/members/custom-fields/filter-renderer.tsx:44— filter-renderer.CustomFieldFilterRenderer 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, 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.
products-section.FreeProductCard (cyclomatic 18) apps/portal/src/components/common/products-section.jsx:690— products-section.FreeProductCard 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.
recommendations-page.RecommendationsPage (cyclomatic 18) apps/portal/src/components/pages/recommendations-page.jsx:324— recommendations-page.RecommendationsPage has cyclomatic complexity 18 (threshold 15). Of this number, 17 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.
filters.FilterDatePicker (cyclomatic 18) REDACTED:693— filters.FilterDatePicker has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to 5 function items inside it that branch (handleInputBlur, handleSelect, a function literal at line 722, …). 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.
CacheManager._doGet (cyclomatic 18) ghost/core/shared/settings-cache/cache-manager.js:121— CacheManager._doGet 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.
PostsExporter.filterToString (cyclomatic 18) ghost/core/server/services/posts/posts-exporter.js:389— PostsExporter.filterToString 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.
MailgunClient.#fetchEventsFromDomain (cyclomatic 18) ghost/core/server/lib/mailgun/mailgun-client.js:261— MailgunClient.#fetchEventsFromDomain has cyclomatic complexity 18 (threshold 15). Of this number, 17 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.
ReferrerTranslator.getReferrerDetails (cyclomatic 18) ghost/core/server/services/member-attribution/referrer-translator.js:38— ReferrerTranslator.getReferrerDetails 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.
OEmbedService.fetchOembedData (cyclomatic 18) REDACTED:740— OEmbedService.fetchOembedData 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.
og-image.getOgImage (cyclomatic 18) ghost/core/frontend/meta/og-image.js:6— og-image.getOgImage 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.
twitter-image.getTwitterImage (cyclomatic 18) ghost/core/frontend/meta/twitter-image.js:6— twitter-image.getTwitterImage 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.
pagination.pagination (cyclomatic 18) ghost/core/frontend/helpers/pagination.js:20— pagination.pagination 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.
upload.mediaValidation.mediaUploadValidation (cyclomatic 18) ghost/core/server/web/api/middleware/upload.js:340— upload.mediaValidation.mediaUploadValidation 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.
Mention.create (cyclomatic 18) ghost/core/server/services/mentions/mention.js:264— Mention.create 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.
MembersCSVImporterStripeUtils.forceStripeSubscriptionToProduct (cyclomatic 18) ghost/core/server/services/members/import-export/import/stripe-utils.js:54— MembersCSVImporterStripeUtils.forceStripeSubscriptionToProduct has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 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.
lexical-to-mobiledoc.buildMarkers (cyclomatic 18) koenig/kg-converters/src/lexical-to-mobiledoc.ts:249— lexical-to-mobiledoc.buildMarkers has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 262, 316, 270, …). 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.
_createSubscriptionCheckoutSession (cyclomatic 18) ghost/core/server/services/members/members-api/controllers/router-controller.js:593— _createSubscriptionCheckoutSession 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.
mediaValidation::mediaUploadValidation (cyclomatic 18) ghost/core/server/web/api/middleware/upload.js:340— mediaValidation::mediaUploadValidation 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.
use-activity-pub-queries.useFollowMutationForUser (cyclomatic 17) apps/activitypub/src/hooks/use-activity-pub-queries.ts:1233— use-activity-pub-queries.useFollowMutationForUser 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 8 function literals inside it that branch (lines 1290, 1419, 1253, …). 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.
import-account.ImportAccount (cyclomatic 17) apps/activitypub/src/views/preferences/components/account-migration/import-account.tsx:25— import-account.ImportAccount has cyclomatic complexity 17 (threshold 15). 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: 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.
components.Toolbar (cyclomatic 17) apps/admin-toolbar/src/components.ts:163— components.Toolbar 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 7 function items inside it that branch (a function literal at line 187, a function literal at line 207, a function literal at line 227, …). 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.
automations.spliceAction (cyclomatic 17) apps/admin-x-framework/src/api/automations.ts:478— automations.spliceAction 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.
members.membersCountString (cyclomatic 17) apps/admin-x-framework/src/api/members.ts:365— members.membersCountString 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.
editor-status.StatusBody (cyclomatic 17) apps/admin/src/editor/editor-status.tsx:155— editor-status.StatusBody 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.
restore-screen.RestoreScreen (cyclomatic 17) apps/admin/src/editor/restore/restore-screen.tsx:61— restore-screen.RestoreScreen has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 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 143, restore, 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.
global-settings.GlobalSettings (cyclomatic 17) apps/admin/src/settings/site/design-and-branding/global-settings.tsx:103— global-settings.GlobalSettings has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (global-settings.GlobalSettings::fontClassName) 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.
theme-setting.ThemeSetting (cyclomatic 17) apps/admin/src/settings/site/design-and-branding/theme-setting.tsx:35— theme-setting.ThemeSetting has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
theme-file-tree.ThemeFileTree::renderTreeNode (cyclomatic 17) apps/admin/src/settings/site/theme/theme-file-tree.tsx:113— theme-file-tree.ThemeFileTree::renderTreeNode 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.
change-password-form.ChangePasswordForm::validate (cyclomatic 17) apps/admin/src/settings/general/users/change-password-form.tsx:73— change-password-form.ChangePasswordForm::validate 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.
newsletter-detail-modal.NewsletterDetailModalContent (cyclomatic 17) apps/admin/src/settings/email/newsletters/newsletter-detail-modal.tsx:917— newsletter-detail-modal.NewsletterDetailModalContent has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 956, 940). 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.
offers-index.OffersIndexModal (cyclomatic 17) apps/admin/src/settings/growth/offers/offers-index.tsx:335— offers-index.OffersIndexModal 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 6 function items inside it that branch (a function literal at line 363, a function literal at line 473, handleOfferEdit, …). 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.
signin.Signin (cyclomatic 17) apps/admin/src/auth/signin.tsx:22— signin.Signin 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 3 function items inside it that branch (signIn, sendPasswordReset, a function literal at line 133). 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.
bridge-host.bindAppFrame.onMessage (cyclomatic 17) apps/admin/src/apps/lib/bridge-host.ts:217— bridge-host.bindAppFrame.onMessage 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, 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.
comments.CommentsPage (cyclomatic 17) apps/admin/src/comments/comments.tsx:25— comments.CommentsPage has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 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.
newsletter-filter-fields.newsletterAddressing.matchCompound (cyclomatic 17) apps/admin/src/members/newsletter-filter-fields.ts:66— newsletter-filter-fields.newsletterAddressing.matchCompound 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.
member-custom-fields-field.MemberCustomFieldEditModal (cyclomatic 17) apps/admin/src/members/detail/member-custom-fields-field.tsx:481— member-custom-fields-field.MemberCustomFieldEditModal has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 7 function items inside it that branch (onSave, a function literal at line 564, a function literal at line 506, …). 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.
member-add-comp-modal.MemberAddCompModal (cyclomatic 17) apps/admin/src/members/detail/member-add-comp-modal.tsx:45— member-add-comp-modal.MemberAddCompModal 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 5 function items inside it that branch (onSubmit, a function literal at line 57, a function literal at line 73, …). 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.
member-location-map.MemberLocationMap (cyclomatic 17) apps/admin/src/members/detail/member-location-map.tsx:138— member-location-map.MemberLocationMap has cyclomatic complexity 17 (threshold 15). Of this number, 14 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.
relative-date-filter.RelativeDateFilter (cyclomatic 17) apps/admin/src/shared/filters/relative-date-filter.tsx:27— relative-date-filter.RelativeDateFilter has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 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.
list-options-editor.ListOptionsEditor (cyclomatic 17) apps/admin/src/shared/member-custom-fields/list-options-editor.tsx:213— list-options-editor.ListOptionsEditor has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to 4 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.
chip-picker.ChipPicker::handleKeyDown (cyclomatic 17) apps/admin/src/shared/pickers/chip-picker.tsx:371— chip-picker.ChipPicker::handleKeyDown 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. This shape REPEATS in the file: one other method here (chip-picker.ChipPicker) 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.
content.Content (cyclomatic 17) apps/comments-ui/src/components/content/content.tsx:33— content.Content has cyclomatic complexity 17 (threshold 15). Of this number, 14 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.
build-docs.formatImports (cyclomatic 17) REDACTED:492— build-docs.formatImports 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.
MailgunClient.send (cyclomatic 17) ghost/core/server/lib/mailgun/mailgun-client.js:40— MailgunClient.send 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.
automations-api-2.createAutomationsApi2.notify (cyclomatic 17) ghost/core/server/services/automations/automations-api-2.ts:50— automations-api-2.createAutomationsApi2.notify 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.
MemberBREADService.attachSubscriptionsToMember (cyclomatic 17) ghost/core/server/services/members/members-api/services/member-bread-service.js:124— MemberBREADService.attachSubscriptionsToMember 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.
settings.validateNavigationItems (cyclomatic 17) ghost/core/server/api/endpoints/utils/validators/input/settings.js:71— settings.validateNavigationItems 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 one function literal inside it that branches (line 74). 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.
PostsImporter.beforeImport (cyclomatic 17) ghost/core/server/data/importer/importers/data/posts-importer.js:247— PostsImporter.beforeImport has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 253, 290, 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.
post_class.post_class (cyclomatic 17) ghost/core/frontend/helpers/post_class.js:9— post_class.post_class 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.
middleware.tokenPermissionCheck (cyclomatic 17) ghost/core/server/web/api/endpoints/admin/middleware.js:17— middleware.tokenPermissionCheck 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.
http.http.Http (cyclomatic 17) REDACTED:57— http.http.Http has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
retryDb (cyclomatic 17) ghost/core/server/services/email-service/batch-sending-service.js:1741— retryDb 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.
getMemberStatusText (cyclomatic 17) ghost/core/server/services/email-service/email-renderer.js:897— getMemberStatusText 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.
onSaving (cyclomatic 17) REDACTED:225— onSaving has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 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.
handleDonationEvent (cyclomatic 17) ghost/core/server/services/stripe/services/webhook/checkout-session-event-service.js:272— handleDonationEvent 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.
_getImageSizeFromUrl (cyclomatic 17) ghost/core/server/lib/image/image-size.js:183— _getImageSizeFromUrl 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 literals inside it that branch (lines 211, 202). 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.
step-1.Step1 (cyclomatic 16) apps/activitypub/src/components/layout/onboarding/step-1.tsx:14— step-1.Step1 has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: 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.
notifications.Notifications::handleNotificationClick (cyclomatic 16) apps/activitypub/src/views/notifications/notifications.tsx:359— notifications.Notifications::handleNotificationClick has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (notifications.Notifications) 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.
paid-subscription-change-chart.fillMissingDataPoints (cyclomatic 16) apps/admin/src/analytics/views/stats/growth/components/paid-subscription-change-chart.tsx:50— paid-subscription-change-chart.fillMissingDataPoints 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.
content-text.renderedTextOf (cyclomatic 16) apps/admin/src/editor/session/content-text.ts:127— content-text.renderedTextOf has cyclomatic complexity 16 (threshold 15). 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: 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.
preview-navigation.followPreviewLinks (cyclomatic 16) apps/admin/src/settings/site/design-and-branding/preview-navigation.ts:25— preview-navigation.followPreviewLinks has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 34). 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.
invite-user-modal.InviteUserModal::handleSubmit (cyclomatic 16) apps/admin/src/settings/general/invite-user-modal.tsx:120— invite-user-modal.InviteUserModal::handleSubmit has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (invite-user-modal.InviteUserModal) 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.
stripe-connect-modal.Connect (cyclomatic 16) apps/admin/src/settings/membership/stripe/stripe-connect-modal.tsx:67— stripe-connect-modal.Connect 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 2 function items inside it that branch (saveTier, onSubmit). 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.
testimonials-modal.TestimonialsModal (cyclomatic 16) apps/admin/src/settings/growth/explore/testimonials-modal.tsx:34— testimonials-modal.TestimonialsModal has cyclomatic complexity 16 (threshold 15). Of this number, 12 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.
confirmation-modal.ConfirmationModalContent (cyclomatic 16) apps/admin/src/settings/components/confirmation-modal.tsx:40— confirmation-modal.ConfirmationModalContent 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, 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.
design-panel.DesignPanelContent (cyclomatic 16) apps/admin/src/settings/site/design-panel.tsx:27— design-panel.DesignPanelContent 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 4 function items inside it that branch (a function literal at line 90, a function literal at line 66, 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.
signup.SignupForm (cyclomatic 16) apps/admin/src/auth/signup.tsx:42— signup.SignupForm 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 2 function items inside it that branch (submit, problemWith). 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.
screen-transition-provider.ScreenTransitionProvider (cyclomatic 16) apps/admin/src/layout/screen-transition-provider.tsx:56— screen-transition-provider.ScreenTransitionProvider 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 3 function literals inside it that branch (lines 81, 160, 169). 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.
automations-list.AutomationsList (cyclomatic 16) apps/admin/src/automations/components/automations-list.tsx:117— automations-list.AutomationsList 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 2 function literals inside it that branch (lines 188, 127). 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.
mapping.detectFieldTypes (cyclomatic 16) apps/admin/src/members/components/bulk-action-modals/import-members/mapping.ts:191— mapping.detectFieldTypes 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.
member-activity-feed.MemberActivityFeed (cyclomatic 16) apps/admin/src/members/detail/member-activity-feed.tsx:224— member-activity-feed.MemberActivityFeed 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: member-activity-feed.EventIcon (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.
member-location-map.LocationMap (cyclomatic 16) apps/admin/src/members/detail/member-location-map.tsx:13— member-location-map.LocationMap 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, 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.
label-filter-renderer.LabelFilterRenderer (cyclomatic 16) apps/admin/src/members/label-picker/label-filter-renderer.tsx:19— label-filter-renderer.LabelFilterRenderer 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 5 function literals inside it that branch (lines 53, 33, 114, …). 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.
feedback.Feedback (cyclomatic 16) apps/admin/src/posts/analytics/newsletter/components/feedback.tsx:47— feedback.Feedback has cyclomatic complexity 16 (threshold 15). Of this number, 12 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.
tag-detail-edit.buildTagSavePayload (cyclomatic 16) apps/admin/src/tags/detail/tag-detail-edit.ts:190— tag-detail-edit.buildTagSavePayload 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.
change-tracker.createChangeTracker.saveAcknowledged (cyclomatic 16) apps/admin/src/editor/engine/change-tracker.ts:453— change-tracker.createChangeTracker.saveAcknowledged 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.
vite-front-door.ghostFrontDoorPlugin.configureServer (cyclomatic 16) REDACTED:108— vite-front-door.ghostFrontDoorPlugin.configureServer 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 6 function items inside it that branch (a function literal at line 210, a function literal at line 169, a function literal at line 182, …). 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.
comment.PublishedComment (cyclomatic 16) apps/comments-ui/src/components/content/comment.tsx:145— comment.PublishedComment has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 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.
bottom-sheet.BottomSheet (cyclomatic 16) apps/portal/src/components/common/bottom-sheet.tsx:123— bottom-sheet.BottomSheet 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 6 function literals inside it that branch (lines 138, 180, 130, …). 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.
account-email-page.AccountEmailPage (cyclomatic 16) apps/portal/src/components/pages/account-email-page.jsx:8— account-email-page.AccountEmailPage has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 5 function items inside it that branch (HeaderNotification, a function literal at line 30, a function literal at line 126, …). 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.
validate-password.validatePassword (cyclomatic 16) ghost/core/server/lib/validate-password.ts:36— validate-password.validatePassword 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.
GiftService.reassignRedeemer (cyclomatic 16) ghost/core/server/services/gifts/gift-service.ts:1063— GiftService.reassignRedeemer 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 one function item inside it that branches (run). 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.
get-discount-window.getDiscountWindow (cyclomatic 16) ghost/core/server/services/members/members-api/utils/get-discount-window.ts:71— get-discount-window.getDiscountWindow 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.
database-automations-repository.createDatabaseAutomationsRepository.edit (cyclomatic 16) ghost/core/server/services/automations/database-automations-repository.ts:406— database-automations-repository.createDatabaseAutomationsRepository.edit has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 407, 435). 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.
Base.replaceIdentifiers::handleObject (cyclomatic 16) ghost/core/server/data/importer/importers/data/base.js:195— Base.replaceIdentifiers::handleObject 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.
ProductsImporter.populatePriceData (cyclomatic 16) ghost/core/server/data/importer/importers/data/products-importer.js:33— ProductsImporter.populatePriceData has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 35). 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.
EmailAnalyticsServiceWrapper._logJobCompletion (cyclomatic 16) ghost/core/server/services/email-analytics/email-analytics-service-wrapper.ts:80— EmailAnalyticsServiceWrapper._logJobCompletion 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.
structured-data.getStructuredData (cyclomatic 16) ghost/core/frontend/meta/structured-data.js:3— structured-data.getStructuredData 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, 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.
asset-url.getAssetUrl (cyclomatic 16) ghost/core/frontend/meta/asset-url.js:104— asset-url.getAssetUrl 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.
get.querySimplePath (cyclomatic 16) ghost/core/frontend/helpers/get.js:93— get.querySimplePath has cyclomatic complexity 16 (threshold 15). 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
tags.tags (cyclomatic 16) ghost/core/frontend/helpers/tags.js:14— tags.tags has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: 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.
SiteMapManager.constructor (cyclomatic 16) ghost/core/frontend/services/sitemap/site-map-manager.js:36— SiteMapManager.constructor has cyclomatic complexity 16 (threshold 15). 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, 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.
MilestonesService.#runARRQueries (cyclomatic 16) ghost/core/server/services/milestones/milestones-service.js:197— MilestonesService.#runARRQueries has cyclomatic complexity 16 (threshold 15). 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
mobiledoc-to-lexical.populateLexicalNodeWithMarkers (cyclomatic 16) koenig/kg-converters/src/mobiledoc-to-lexical.ts:226— mobiledoc-to-lexical.populateLexicalNodeWithMarkers has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 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.
edit (cyclomatic 16) REDACTED:586— edit 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.
setupGhostApi::checkoutGift (cyclomatic 16) apps/portal/src/utils/api.js:736— setupGhostApi::checkoutGift 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.
#addTagsToPosts (cyclomatic 16) ghost/core/server/services/posts/posts-service.js:326— #addTagsToPosts has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 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.
D1 · Cyclomatic Complexity· get (cyclomatic 16) · ×1
get (cyclomatic 16) ghost/core/server/adapters/lib/redis/AdapterCacheRedis.js:278— get has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs 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.
browse (cyclomatic 16) ghost/core/server/services/notifications/notifications.js:85— browse has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 90). 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.
linkSubscription (cognitive 191) ghost/core/server/services/members/members-api/repositories/member-repository.js:1503— linkSubscription has cognitive complexity 191 (threshold 15). Drivers by points: if/else 56 (113 pts), boolean chains 28, ternaries 9 (15 pts), error handling 5 (14 pts), other 13, loops 4 (8 pts) (nesting depth added 76). Of this number, 179 points are the body's own statements and 12 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.
onSaving (cognitive 137) ghost/core/server/models/post.js:572— onSaving has cognitive complexity 137 (threshold 15). Drivers by points: if/else 50 (73 pts), boolean chains 50, loops 3 (6 pts), error handling 2 (4 pts), ternaries 1 (3 pts), other 1 (nesting depth added 30). Of this number, 125 points are the body's own statements and 12 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.
MembersCSVImporter.writeRows (cognitive 105) ghost/core/server/services/members/import-export/import/importer.ts:445— MembersCSVImporter.writeRows has cognitive complexity 105 (threshold 15). Drivers by points: if/else 28 (70 pts), ternaries 6 (17 pts), error handling 4 (11 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 61). Of this number, 101 points are the body's own statements and 4 belong to one function literal 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.
floating-sidebar.FloatingSidebar (cognitive 93) apps/shade/src/components/ui/floating-sidebar.tsx:239— floating-sidebar.FloatingSidebar has cognitive complexity 93 (threshold 15). Drivers by points: ternaries 32 (35 pts), if/else 32, boolean chains 26 (nesting depth added 3). Of this number, 44 points are the body's own statements and 49 belong to 21 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.
newsletter-preview-content.NewsletterPreviewContent (cognitive 92) REDACTED:56— newsletter-preview-content.NewsletterPreviewContent has cognitive complexity 92 (threshold 15). Drivers by points: boolean chains 79, if/else 7, ternaries 6. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
filters.FilterValueSelector (cognitive 89) REDACTED:2024— filters.FilterValueSelector has cognitive complexity 89 (threshold 15). Drivers by points: boolean chains 37, if/else 19 (24 pts), ternaries 11 (24 pts), match/switch 2 (4 pts) (nesting depth added 20). Of this number, 76 points are the body's own statements and 13 belong to 9 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.
editor.AutomationEditorContent (cognitive 87) apps/admin/src/automations/editor.tsx:111— editor.AutomationEditorContent has cognitive complexity 87 (threshold 15). Drivers by points: ternaries 22 (32 pts), boolean chains 26, if/else 15, match/switch 9 (12 pts), error handling 1 (2 pts) (nesting depth added 14). Of this number, 38 points are the body's own statements and 49 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, 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.
new-note-modal.NewNoteModal (cognitive 86) apps/activitypub/src/components/modals/new-note-modal.tsx:44— new-note-modal.NewNoteModal has cognitive complexity 86 (threshold 15). Drivers by points: if/else 31 (44 pts), boolean chains 22, ternaries 13 (14 pts), match/switch 1 (3 pts), error handling 2, loops 1 (nesting depth added 16). Of this number, 22 points are the body's own statements and 64 belong to 15 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.
domain.Domain (cognitive 84) apps/activitypub/src/views/preferences/components/domain.tsx:88— domain.Domain has cognitive complexity 84 (threshold 15). Drivers by points: ternaries 20 (37 pts), boolean chains 34, if/else 9, error handling 4 (nesting depth added 17). Of this number, 66 points are the body's own statements and 18 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.
automation-canvas.AutomationCanvas (cognitive 84) apps/admin/src/automations/components/canvas/automation-canvas.tsx:421— automation-canvas.AutomationCanvas has cognitive complexity 84 (threshold 15). Drivers by points: if/else 34 (38 pts), boolean chains 31, ternaries 11 (14 pts), loops 1 (nesting depth added 7). Of this number, 27 points are the body's own statements and 57 belong to 27 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.
feed-item.FeedItem (cognitive 80) apps/activitypub/src/components/feed/feed-item.tsx:506— feed-item.FeedItem has cognitive complexity 80 (threshold 15). Drivers by points: boolean chains 41, if/else 20 (23 pts), ternaries 13 (16 pts) (nesting depth added 6). Of this number, 46 points are the body's own statements and 34 belong to 15 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.
post-preview-modal.PostPreviewModal (cognitive 80) apps/admin/src/editor/preview/post-preview-modal.tsx:99— post-preview-modal.PostPreviewModal has cognitive complexity 80 (threshold 15). Drivers by points: boolean chains 42, if/else 16 (23 pts), ternaries 10 (14 pts), error handling 1 (nesting depth added 11). Of this number, 58 points are the body's own statements and 22 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.
tag-detail.TagDetail (cognitive 80) apps/admin/src/tags/detail/tag-detail.tsx:52— tag-detail.TagDetail has cognitive complexity 80 (threshold 15). Drivers by points: if/else 34 (36 pts), boolean chains 34, ternaries 7 (9 pts), loops 1 (nesting depth added 4). Of this number, 38 points are the body's own statements and 42 belong to 13 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.
update (cognitive 79) ghost/core/server/services/members/members-api/repositories/member-repository.js:850— update has cognitive complexity 79 (threshold 15). Drivers by points: if/else 30 (53 pts), boolean chains 13, loops 6 (9 pts), other 2, ternaries 2 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
list-picker.ListPicker (cognitive 78) apps/portal/src/components/common/list-picker.tsx:448— list-picker.ListPicker has cognitive complexity 78 (threshold 15). Drivers by points: boolean chains 36, if/else 28 (31 pts), ternaries 9 (11 pts) (nesting depth added 5). Of this number, 24 points are the body's own statements and 54 belong to 21 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.
reader.Reader (cognitive 77) REDACTED:535— reader.Reader has cognitive complexity 77 (threshold 15). Drivers by points: boolean chains 42, if/else 26 (30 pts), ternaries 3, error handling 1, loops 1 (nesting depth added 4). Of this number, 39 points are the body's own statements and 38 belong to 17 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.
tier-detail-modal.TierDetailModalContent (cognitive 77) apps/admin/src/settings/membership/tiers/tier-detail-modal.tsx:56— tier-detail-modal.TierDetailModalContent has cognitive complexity 77 (threshold 15). Drivers by points: boolean chains 33, ternaries 16 (23 pts), if/else 17 (21 pts) (nesting depth added 11). Of this number, 37 points are the body's own statements and 40 belong to 17 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.
build-docs.convertMdx (cognitive 76) REDACTED:841— build-docs.convertMdx has cognitive complexity 76 (threshold 15). Drivers by points: if/else 30 (77 pts), loops 6 (11 pts), boolean chains 10, error handling 1 (4 pts), ternaries 1 (2 pts) (nesting depth added 56). To reduce it, split the body into named stages: move each independent 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 (build-docs.convertMdx::inline) 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.
member-detail.MemberDetailPage (cognitive 75) apps/admin/src/members/detail/member-detail.tsx:74— member-detail.MemberDetailPage has cognitive complexity 75 (threshold 15). Drivers by points: boolean chains 36, if/else 21 (23 pts), ternaries 13 (16 pts) (nesting depth added 5). Of this number, 46 points are the body's own statements and 29 belong to 11 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.
ghost_head (cognitive 75) ghost/core/frontend/helpers/ghost_head.js:394— ghost_head has cognitive complexity 75 (threshold 15). Drivers by points: if/else 32 (54 pts), boolean chains 12, ternaries 6, error handling 2, other 1 (nesting depth added 22). Of this number, 74 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.
member-activity.ActivityPage (cognitive 74) apps/admin/src/members/activity/member-activity.tsx:54— member-activity.ActivityPage has cognitive complexity 74 (threshold 15). Drivers by points: ternaries 13 (37 pts), boolean chains 27, if/else 5 (10 pts) (nesting depth added 29). Of this number, 55 points are the body's own statements and 19 belong to 6 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.
posts.default (cognitive 73) ghost/core/server/api/endpoints/utils/serializers/output/mappers/posts.js:25— posts.default has cognitive complexity 73 (threshold 15). Drivers by points: if/else 31 (47 pts), boolean chains 23, ternaries 3 (nesting depth added 16). Of this number, 51 points are the body's own statements and 22 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.
add-offer-modal.AddOfferModal (cognitive 72) apps/admin/src/settings/growth/offers/add-offer-modal.tsx:450— add-offer-modal.AddOfferModal has cognitive complexity 72 (threshold 15). Drivers by points: boolean chains 37, if/else 23 (25 pts), ternaries 9, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 9 of the 72 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 536, a function literal at line 744, a function literal at line 813, …). 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.
filters.ResolvedSelectOptionsPopover (cognitive 70) REDACTED:1657— filters.ResolvedSelectOptionsPopover has cognitive complexity 70 (threshold 15). Drivers by points: if/else 29 (48 pts), boolean chains 10, ternaries 5 (10 pts), loops 1 (2 pts) (nesting depth added 25). Of this number, 16 points are the body's own statements and 54 belong to 11 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.
App.fetchLinkData (cognitive 69) REDACTED:669— App.fetchLinkData has cognitive complexity 69 (threshold 15). Drivers by points: if/else 18 (28 pts), ternaries 11 (24 pts), boolean chains 17 (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.
ProductRepository.update (cognitive 69) ghost/core/server/services/members/members-api/repositories/product-repository.js:374— ProductRepository.update has cognitive complexity 69 (threshold 15). Drivers by points: if/else 27 (47 pts), boolean chains 10, loops 2 (6 pts), ternaries 1 (4 pts), error handling 1 (2 pts) (nesting depth added 28). Of this number, 68 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.
user-detail-modal.UserDetailModalContent (cognitive 68) apps/admin/src/settings/general/user-detail-modal.tsx:122— user-detail-modal.UserDetailModalContent has cognitive complexity 68 (threshold 15). Drivers by points: boolean chains 25, ternaries 17 (18 pts), if/else 14 (17 pts), error handling 5 (6 pts), match/switch 2 (nesting depth added 5). Of this number, 30 points are the body's own statements and 38 belong to 13 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.
new-subscribers-cadence.NewSubscribersCadence (cognitive 64) apps/admin/src/analytics/views/stats/growth/components/new-subscribers-cadence.tsx:66— new-subscribers-cadence.NewSubscribersCadence has cognitive complexity 64 (threshold 15). Drivers by points: ternaries 22 (42 pts), boolean chains 12, if/else 9 (10 pts) (nesting depth added 21). Of this number, 48 points are the body's own statements and 16 belong to 11 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.
edit-retention-offer-modal.EditRetentionOfferModal (cognitive 64) apps/admin/src/settings/growth/offers/edit-retention-offer-modal.tsx:502— edit-retention-offer-modal.EditRetentionOfferModal has cognitive complexity 64 (threshold 15). Drivers by points: boolean chains 30, if/else 21 (26 pts), ternaries 7, error handling 1 (nesting depth added 5). Most of this is not in the body itself: 8 of the 64 points are its own statements and the rest belongs to 18 function items inside it that branch (a function literal at line 585, a function literal at line 674, handleSaveError, …). 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.
member-event.getAction (cognitive 61) apps/admin/src/members/detail/member-event.ts:246— member-event.getAction has cognitive complexity 61 (threshold 15). Drivers by points: if/else 30 (38 pts), ternaries 8 (18 pts), boolean chains 5 (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.
filters.Filters (cognitive 61) REDACTED:2767— filters.Filters has cognitive complexity 61 (threshold 15). Drivers by points: boolean chains 31, if/else 24 (28 pts), ternaries 2 (nesting depth added 4). Of this number, 16 points are the body's own statements and 45 belong to 18 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.
profile.ProfileCard (cognitive 59) apps/activitypub/src/views/preferences/components/profile.tsx:54— profile.ProfileCard has cognitive complexity 59 (threshold 15). Drivers by points: ternaries 25 (36 pts), boolean chains 17, if/else 3, match/switch 2, error handling 1 (nesting depth added 11). Of this number, 51 points are the body's own statements and 8 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
paid-subscription-change-chart.PaidMembersChangeChart (cognitive 59) apps/admin/src/analytics/views/stats/growth/components/paid-subscription-change-chart.tsx:182— paid-subscription-change-chart.PaidMembersChangeChart has cognitive complexity 59 (threshold 15). Drivers by points: boolean chains 24, if/else 11 (18 pts), ternaries 8 (16 pts), match/switch 1 (nesting depth added 15). Most of this is not in the body itself: 13 of the 59 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 222, 484, 260, …). 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.
post-editor.PostEditor (cognitive 59) apps/admin/src/editor/post-editor.tsx:184— post-editor.PostEditor has cognitive complexity 59 (threshold 15). Drivers by points: boolean chains 31, if/else 18 (22 pts), ternaries 4, loops 2 (nesting depth added 4). Most of this is not in the body itself: 15 of the 59 points are its own statements and the rest belongs to 13 function items inside it that branch (onTitleKeyDown, onExcerptKeyDown, moveIntoEditor, …). 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.
fetch-api.useFetchApi (cognitive 58) apps/admin-x-framework/src/utils/api/fetch-api.ts:269— fetch-api.useFetchApi has cognitive complexity 58 (threshold 15). Drivers by points: if/else 15 (38 pts), ternaries 5 (11 pts), boolean chains 6, error handling 1 (2 pts), loops 1 (nesting depth added 30). None of this is in the body itself: all 58 points belong to 4 function literals inside it that branch (lines 275, 366, 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.
newsletter-detail-modal.Sidebar (cognitive 58) apps/admin/src/settings/email/newsletters/newsletter-detail-modal.tsx:127— newsletter-detail-modal.Sidebar has cognitive complexity 58 (threshold 15). Drivers by points: boolean chains 38, if/else 8 (10 pts), ternaries 6, error handling 2 (4 pts) (nesting depth added 4). Of this number, 27 points are the body's own statements and 31 belong to 8 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.
PostsExporter.filterToString (cognitive 58) ghost/core/server/services/posts/posts-exporter.js:389— PostsExporter.filterToString has cognitive complexity 58 (threshold 15). Drivers by points: if/else 19 (54 pts), loops 2 (4 pts) (nesting depth added 37). 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.
lexical-to-mobiledoc.buildMarkers (cognitive 58) koenig/kg-converters/src/lexical-to-mobiledoc.ts:249— lexical-to-mobiledoc.buildMarkers has cognitive complexity 58 (threshold 15). Drivers by points: if/else 20 (56 pts), boolean chains 2 (nesting depth added 36). Most of this is not in the body itself: 2 of the 58 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 262, 316, 270, …). 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.
admin-layout.AdminLayout (cognitive 57) apps/admin/src/layout/admin-layout.tsx:132— admin-layout.AdminLayout has cognitive complexity 57 (threshold 15). Drivers by points: boolean chains 32, if/else 12 (13 pts), ternaries 10 (11 pts), loops 1 (nesting depth added 2). Of this number, 43 points are the body's own statements and 14 belong to 6 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
authors.extendModel (cognitive 57) ghost/core/server/models/relations/authors.js:32— authors.extendModel has cognitive complexity 57 (threshold 15). Drivers by points: if/else 30 (34 pts), boolean chains 19, loops 2, error handling 1, ternaries 1 (nesting depth added 4). None of this is in the body itself: all 57 points belong to 15 function literals inside it that branch (lines 354, 141, 40, …). 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.
create (cognitive 57) ghost/core/server/services/members/members-api/repositories/member-repository.js:585— create has cognitive complexity 57 (threshold 15). Drivers by points: if/else 24 (33 pts), boolean chains 12, loops 4 (6 pts), error handling 1 (3 pts), other 2, ternaries 1 (nesting depth added 13). Of this number, 55 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.
permissible (cognitive 57) REDACTED:913— permissible has cognitive complexity 57 (threshold 15). Drivers by points: if/else 24 (40 pts), boolean chains 17 (nesting depth added 16). Of this number, 35 points are the body's own statements and 22 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.
newsletter.Newsletter (cognitive 56) apps/admin/src/posts/analytics/newsletter/newsletter.tsx:100— newsletter.Newsletter has cognitive complexity 56 (threshold 15). Drivers by points: boolean chains 35, if/else 12 (15 pts), ternaries 4 (6 pts) (nesting depth added 5). Of this number, 37 points are the body's own statements and 19 belong to 8 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.
mapping-step.MappingStep (cognitive 56) apps/admin/src/members/components/bulk-action-modals/import-members/mapping-step.tsx:103— mapping-step.MappingStep has cognitive complexity 56 (threshold 15). Drivers by points: boolean chains 24, ternaries 14 (19 pts), if/else 12 (13 pts) (nesting depth added 6). Of this number, 21 points are the body's own statements and 35 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, 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.
source-utils.processSources (cognitive 54) apps/admin-x-framework/src/utils/source-utils.ts:297— source-utils.processSources has cognitive complexity 54 (threshold 15). Drivers by points: boolean chains 25, if/else 13 (20 pts), ternaries 6 (9 pts) (nesting depth added 10). Most of this is not in the body itself: 15 of the 54 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 320, 403). 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.
reader.ArticleBody (cognitive 52) REDACTED:75— reader.ArticleBody has cognitive complexity 52 (threshold 15). Drivers by points: if/else 19 (20 pts), ternaries 15 (19 pts), boolean chains 13 (nesting depth added 5). Of this number, 24 points are the body's own statements and 28 belong to 12 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.
growth.Growth (cognitive 52) apps/admin/src/analytics/views/stats/growth/growth.tsx:74— growth.Growth has cognitive complexity 52 (threshold 15). Drivers by points: ternaries 9 (26 pts), boolean chains 19, if/else 7 (nesting depth added 17). Of this number, 25 points are the body's own statements and 27 belong to 5 function literals 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.
save-engine.createSaveEngine.run (cognitive 52) apps/admin/src/editor/engine/save-engine.ts:749— save-engine.createSaveEngine.run has cognitive complexity 52 (threshold 15). Drivers by points: if/else 26 (42 pts), boolean chains 4, ternaries 2 (4 pts), error handling 2 (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.
import-members-modal.ImportMembersModal (cognitive 51) apps/admin/src/members/components/bulk-action-modals/import-members/import-members-modal.tsx:70— import-members-modal.ImportMembersModal has cognitive complexity 51 (threshold 15). Drivers by points: boolean chains 22, if/else 16 (20 pts), ternaries 3 (6 pts), error handling 1, loops 1, match/switch 1 (nesting depth added 7). Most of this is not in the body itself: 13 of the 51 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 323, 172, 134, …). 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.
locale-validation.validateLocale (cognitive 51) apps/admin/src/settings/utils/locale-validation.ts:46— locale-validation.validateLocale has cognitive complexity 51 (threshold 15). Drivers by points: if/else 20 (32 pts), loops 6 (10 pts), boolean chains 9 (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.
App.fetchQueryStrData (cognitive 51) REDACTED:493— App.fetchQueryStrData has cognitive complexity 51 (threshold 15). Drivers by points: if/else 28 (33 pts), boolean chains 17, loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
getTemplateData (cognitive 51) ghost/core/server/services/email-service/email-renderer.js:1304— getTemplateData has cognitive complexity 51 (threshold 15). Drivers by points: ternaries 16 (29 pts), boolean chains 11, if/else 5 (8 pts), loops 1 (2 pts), other 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.
feed-item.renderFeedAttachment (cognitive 50) apps/activitypub/src/components/feed/feed-item.tsx:78— feed-item.renderFeedAttachment has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (22 pts), ternaries 8 (18 pts), boolean chains 9, match/switch 1 (nesting depth added 18). Of this number, 38 points are the body's own statements and 12 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
newsletters-kpis.NewsletterKPIs (cognitive 50) apps/admin/src/analytics/views/stats/newsletters/components/newsletters-kpis.tsx:128— newsletters-kpis.NewsletterKPIs has cognitive complexity 50 (threshold 15). Drivers by points: boolean chains 33, if/else 15, ternaries 2. Of this number, 33 points are the body's own statements and 17 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.
build-docs.exportOrigin (cognitive 50) REDACTED:386— build-docs.exportOrigin has cognitive complexity 50 (threshold 15). Drivers by points: if/else 13 (34 pts), ternaries 2 (7 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
route-settings-parser.serializeRouteSettings (cognitive 50) ghost/core/server/services/route-settings/route-settings-parser.ts:501— route-settings-parser.serializeRouteSettings has cognitive complexity 50 (threshold 15). Drivers by points: if/else 17 (45 pts), boolean chains 3, loops 2 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
profile-page.ProfilePage (cognitive 49) apps/activitypub/src/views/profile/components/profile-page.tsx:58— profile-page.ProfilePage has cognitive complexity 49 (threshold 15). Drivers by points: boolean chains 24, if/else 13, ternaries 11, error handling 1. Of this number, 34 points are the body's own statements and 15 belong to 9 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.
description.getDescription (cognitive 49) ghost/core/frontend/meta/description.js:5— description.getDescription has cognitive complexity 49 (threshold 15). Drivers by points: if/else 19 (25 pts), boolean chains 23, ternaries 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
newsletter-preview.NewsletterPreview (cognitive 48) apps/admin/src/settings/email/newsletters/newsletter-preview.tsx:9— newsletter-preview.NewsletterPreview has cognitive complexity 48 (threshold 15). Drivers by points: boolean chains 26, if/else 16, ternaries 6. Of this number, 25 points are the body's own statements and 23 belong to 8 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.
settings-modal.SettingsModal (cognitive 48) apps/shade/src/components/patterns/settings-modal.tsx:93— settings-modal.SettingsModal has cognitive complexity 48 (threshold 15). Drivers by points: boolean chains 32, if/else 12, ternaries 4. Of this number, 34 points are the body's own statements and 14 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.
getTopPostsViews (cognitive 47) ghost/core/server/services/stats/posts-stats-service.js:1321— getTopPostsViews has cognitive complexity 47 (threshold 15). Drivers by points: ternaries 15 (24 pts), boolean chains 11, if/else 7 (11 pts), error handling 1 (nesting depth added 13). Most of this is not in the body itself: 15 of the 47 points are its own statements and the rest belongs to 18 function literals inside it that branch (lines 1406, 1515, 1383, …). 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.
edit-profile.EditProfile (cognitive 46) apps/activitypub/src/views/preferences/components/edit-profile.tsx:63— edit-profile.EditProfile has cognitive complexity 46 (threshold 15). Drivers by points: boolean chains 20, if/else 9 (14 pts), match/switch 2 (6 pts), ternaries 4, error handling 2 (nesting depth added 9). Most of this is not in the body itself: 12 of the 46 points are its own statements and the rest belongs to 7 function items inside it that branch (handleProfileImageUpload, handleCoverImageUpload, onSubmit, …). 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.
update-flow-modal.KeyedUpdateFlowModal (cognitive 46) apps/admin/src/editor/publish/update-flow-modal.tsx:57— update-flow-modal.KeyedUpdateFlowModal has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 18 (25 pts), boolean chains 13, if/else 6 (7 pts), error handling 1 (nesting depth added 8). Of this number, 37 points are the body's own statements and 9 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.
api.setupGhostApi (cognitive 46) apps/comments-ui/src/utils/api.ts:3— api.setupGhostApi has cognitive complexity 46 (threshold 15). Drivers by points: if/else 36 (37 pts), boolean chains 6, loops 1 (2 pts), ternaries 1 (nesting depth added 2). Of this number, 16 points are the body's own statements and 30 belong to 17 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.
renderBody (cognitive 46) ghost/core/server/services/email-service/email-renderer.js:591— renderBody has cognitive complexity 46 (threshold 15). Drivers by points: if/else 20 (32 pts), boolean chains 7, ternaries 4 (6 pts), loops 1 (nesting depth added 14). Of this number, 22 points are the body's own statements and 24 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.
member-activity-pagination.loadMemberActivityPage (cognitive 45) apps/admin-x-framework/src/api/member-activity-pagination.ts:71— member-activity-pagination.loadMemberActivityPage has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 9, ternaries 4 (9 pts), loops 1 (nesting depth added 19). Of this number, 42 points are the body's own statements and 3 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.
editor-header-actions.PublishActions (cognitive 45) apps/admin/src/editor/editor-header-actions.tsx:371— editor-header-actions.PublishActions has cognitive complexity 45 (threshold 15). Drivers by points: if/else 15 (16 pts), ternaries 11 (16 pts), boolean chains 13 (nesting depth added 6). Of this number, 23 points are the body's own statements and 22 belong to 12 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.
date-time-picker.DateTimePicker (cognitive 45) apps/admin/src/editor/date-time-picker.tsx:75— date-time-picker.DateTimePicker has cognitive complexity 45 (threshold 15). Drivers by points: if/else 21 (22 pts), ternaries 11 (12 pts), boolean chains 11 (nesting depth added 2). Most of this is not in the body itself: 12 of the 45 points are its own statements and the rest belongs to 12 function items inside it that branch (commitTime, showError, onDateKeyDown, …). 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.
comments.commentMapper (cognitive 45) ghost/core/server/api/endpoints/utils/serializers/output/mappers/comments.js:51— comments.commentMapper has cognitive complexity 45 (threshold 15). Drivers by points: if/else 20 (24 pts), boolean chains 15, ternaries 4 (6 pts) (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.
handleSubscriptionEvent (cognitive 45) ghost/core/server/services/stripe/services/webhook/checkout-session-event-service.js:389— handleSubscriptionEvent has cognitive complexity 45 (threshold 15). Drivers by points: if/else 10 (19 pts), other 12, boolean chains 6, error handling 2 (6 pts), loops 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
#mapPosts (cognitive 45) ghost/core/server/services/posts/posts-exporter.js:192— #mapPosts has cognitive complexity 45 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 9, ternaries 9, other 7, loops 2 (5 pts) (nesting depth added 8). Of this number, 21 points are the body's own statements and 24 belong to 4 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.
search.Search (cognitive 44) apps/activitypub/src/components/modals/search.tsx:53— search.Search has cognitive complexity 44 (threshold 15). Drivers by points: if/else 19 (23 pts), boolean chains 20, ternaries 1 (nesting depth added 4). Most of this is not in the body itself: 14 of the 44 points are its own statements and the rest belongs to 6 function items inside it that branch (handleKeyDown, a function literal at line 117, a function literal at line 152, …). 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.
email-content-modal.EmailContentModal (cognitive 44) apps/admin/src/automations/components/email-modal/email-content-modal.tsx:132— email-content-modal.EmailContentModal has cognitive complexity 44 (threshold 15). Drivers by points: boolean chains 21, if/else 14 (16 pts), ternaries 5, loops 2 (nesting depth added 2). Of this number, 19 points are the body's own statements and 25 belong to 9 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.
notification.NotificationText (cognitive 44) apps/portal/src/components/notification.jsx:31— notification.NotificationText has cognitive complexity 44 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 16, ternaries 4 (9 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.
signup-options.SignupOptions (cognitive 43) apps/admin/src/settings/membership/portal/signup-options.tsx:44— signup-options.SignupOptions has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 18, ternaries 2 (5 pts) (nesting depth added 10). Most of this is not in the body itself: 14 of the 43 points are its own statements and the rest belongs to 7 function items inside it that branch (togglePlan, a function literal at line 120, a function literal at line 74, …). 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.
route-settings-parser.parseRouteSettings (cognitive 43) ghost/core/server/services/route-settings/route-settings-parser.ts:389— route-settings-parser.parseRouteSettings has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (34 pts), loops 3 (6 pts), boolean chains 3 (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.
notifications.Notifications (cognitive 42) apps/activitypub/src/views/notifications/notifications.tsx:306— notifications.Notifications has cognitive complexity 42 (threshold 15). Drivers by points: boolean chains 44, if/else 10 (15 pts), ternaries 2 (6 pts), match/switch 1 (nesting depth added 9). 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 (notifications.Notifications::handleNotificationClick) 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.
editor-screen.EditorContent (cognitive 42) apps/admin/src/editor/editor-screen.tsx:179— editor-screen.EditorContent has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17 (18 pts), boolean chains 14, ternaries 8 (10 pts) (nesting depth added 3). Of this number, 19 points are the body's own statements and 23 belong to 11 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.
editor-screen.EditorLoader (cognitive 42) apps/admin/src/editor/editor-screen.tsx:685— editor-screen.EditorLoader has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 14, ternaries 9 (10 pts) (nesting depth added 3). Of this number, 32 points are the body's own statements and 10 belong to 6 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.
global-settings.GlobalSettings::fontClassName (cognitive 42) apps/admin/src/settings/site/design-and-branding/global-settings.tsx:151— global-settings.GlobalSettings::fontClassName has cognitive complexity 42 (threshold 15). Drivers by points: boolean chains 21, if/else 21. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
comment-likes-modal.CommentLikesModal (cognitive 41) REDACTED:33— comment-likes-modal.CommentLikesModal has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 16 (34 pts), boolean chains 7 (nesting depth added 18). Of this number, 30 points are the body's own statements and 11 belong to 3 function literals 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.
posts-list-screen.PostsListScreen (cognitive 41) apps/admin/src/posts/list/posts-list-screen.tsx:71— posts-list-screen.PostsListScreen has cognitive complexity 41 (threshold 15). Drivers by points: boolean chains 21, ternaries 9 (18 pts), if/else 2 (nesting depth added 9). Of this number, 38 points are the body's own statements and 3 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.
billing-frame.BillingAppFrame (cognitive 40) apps/admin/src/billing/billing-frame.tsx:71— billing-frame.BillingAppFrame has cognitive complexity 40 (threshold 15). Drivers by points: if/else 21 (23 pts), boolean chains 11, error handling 2 (3 pts), ternaries 3 (nesting depth added 3). Most of this is not in the body itself: 4 of the 40 points are its own statements and the rest belongs to 10 function items inside it that branch (handleMessage, sendToken, sendForceUpgradeInfo, …). 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.
unsubscribe-page.UnsubscribePage (cognitive 40) apps/portal/src/components/pages/unsubscribe-page.jsx:83— unsubscribe-page.UnsubscribePage has cognitive complexity 40 (threshold 15). Drivers by points: if/else 21, boolean chains 11, ternaries 4 (7 pts), error handling 1 (nesting depth added 3). Most of this is not in the body itself: 7 of the 40 points are its own statements and the rest belongs to 5 function items inside it that branch (HeaderNotification, a function literal at line 200, updateMemberPreference, …). 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.
MembersStripeCustomersSubscriptionsImporter.generate (cognitive 40) ghost/core/server/data/seeders/importers/members-stripe-customers-subscriptions-importer.js:100— MembersStripeCustomersSubscriptionsImporter.generate has cognitive complexity 40 (threshold 15). Drivers by points: if/else 21 (32 pts), ternaries 4 (5 pts), boolean chains 3 (nesting depth added 12). Of this number, 39 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.
UnsplashSearchModal.UnsplashSearchModal (cognitive 40) koenig/kg-unsplash-selector/src/UnsplashSearchModal.tsx:18— UnsplashSearchModal.UnsplashSearchModal has cognitive complexity 40 (threshold 15). Drivers by points: if/else 24 (31 pts), boolean chains 9 (nesting depth added 7). Most of this is not in the body itself: 1 of the 40 points is its own statement and the rest belongs to 13 function items inside it that branch (a function literal at line 82, a function literal at line 112, selectImg, …). 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.
moderation.Moderation (cognitive 39) apps/activitypub/src/views/preferences/components/moderation.tsx:41— moderation.Moderation has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 16 (34 pts), boolean chains 4, if/else 1 (nesting depth added 18). Most of this is not in the body itself: 8 of the 39 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 181, a function literal at line 266, handleShowSensitiveMediaChange). 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.
app.App (cognitive 39) apps/comments-ui/src/app.tsx:41— app.App has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 12, error handling 4, ternaries 3, loops 1 (nesting depth added 4). 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 items inside it that branch (initSetup, initAdminAuth, paginateToComment, …). 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.
paid-subscription-change-chart.fillMissingDataPoints (cognitive 38) apps/admin/src/analytics/views/stats/growth/components/paid-subscription-change-chart.tsx:50— paid-subscription-change-chart.fillMissingDataPoints has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 3 (6 pts), ternaries 2 (6 pts), boolean chains 2 (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.
ghost-updates.GhostUpdates (cognitive 38) apps/admin/src/settings/general/ghost-updates/ghost-updates.tsx:172— ghost-updates.GhostUpdates has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 21, if/else 6 (8 pts), ternaries 6 (8 pts), error handling 1 (nesting depth added 4). Of this number, 23 points are the body's own statements and 15 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.
.lintstagedrc.expandPattern (cognitive 37) .lintstagedrc.cjs:42— .lintstagedrc.expandPattern has cognitive complexity 37 (threshold 15). Drivers by points: if/else 5 (17 pts), ternaries 3 (13 pts), loops 3 (7 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
profile.Profile (cognitive 37) apps/activitypub/src/views/preferences/components/profile.tsx:242— profile.Profile has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 16, if/else 11 (13 pts), ternaries 4, error handling 2, match/switch 2 (nesting depth added 2). Most of this is not in the body itself: 12 of the 37 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 255, handleCopy, getGradient, …). 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.
latest-post.LatestPost (cognitive 37) apps/admin/src/analytics/views/stats/overview/components/latest-post.tsx:52— latest-post.LatestPost has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 24, ternaries 6 (10 pts), if/else 2 (3 pts) (nesting depth added 5). Of this number, 32 points are the body's own statements and 5 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.
locations-card.LocationsCard (cognitive 37) apps/admin/src/analytics/views/stats/locations/components/locations-card.tsx:96— locations-card.LocationsCard has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 18, ternaries 7 (14 pts), if/else 5 (nesting depth added 7). Most of this is not in the body itself: 6 of the 37 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 298, a function literal at line 110, a function literal at line 152, …). 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.
design-and-theme-modal.DesignAndThemeModal (cognitive 37) apps/admin/src/settings/site/design-and-theme-modal.tsx:12— design-and-theme-modal.DesignAndThemeModal has cognitive complexity 37 (threshold 15). Drivers by points: if/else 28 (33 pts), boolean chains 4 (nesting depth added 5). Of this number, 18 points are the body's own statements and 19 belong to 7 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.
top-level-group.TopLevelGroup (cognitive 37) apps/admin/src/settings/components/top-level-group.tsx:42— top-level-group.TopLevelGroup has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 23, ternaries 6 (10 pts), if/else 4 (nesting depth added 4). Of this number, 25 points are the body's own statements and 12 belong to 6 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
build-docs.loadStories (cognitive 37) REDACTED:227— build-docs.loadStories has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 10, loops 3 (7 pts), ternaries 2 (3 pts) (nesting depth added 13). Of this number, 36 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.
build-docs.storySnippet (cognitive 37) REDACTED:567— build-docs.storySnippet has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 8, loops 6 (7 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
createCheckoutSession (cognitive 37) ghost/core/server/services/members/members-api/controllers/router-controller.js:781— createCheckoutSession has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 5, error handling 2 (4 pts), other 2 (nesting depth added 12). Most of this is not in the body itself: 3 of the 37 points are its own statements and the rest belongs to one function literal inside it that branches (line 783). 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.
unblock-dialog.UnblockDialog (cognitive 36) apps/activitypub/src/views/profile/components/unblock-dialog.tsx:31— unblock-dialog.UnblockDialog has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 11, ternaries 9 (nesting depth added 1). Most of this is not in the body itself: 4 of the 36 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 43, a function literal at line 69, handleDialogClose, …). 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.
reauth-dialog.ReauthForm (cognitive 36) apps/admin/src/editor/session/reauth-dialog.tsx:67— reauth-dialog.ReauthForm has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (18 pts), ternaries 9 (14 pts), boolean chains 2, error handling 2 (nesting depth added 9). Of this number, 16 points are the body's own statements and 20 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tiers.Tiers (cognitive 36) apps/admin/src/settings/membership/tiers.tsx:101— tiers.Tiers has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 21, if/else 6 (8 pts), ternaries 4 (5 pts), error handling 1 (2 pts) (nesting depth added 4). Of this number, 25 points are the body's own statements and 11 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.
PostMediaInliner.inlineLexicalChildren (cognitive 36) ghost/core/server/services/content-import/import/media.ts:198— PostMediaInliner.inlineLexicalChildren has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 5 (10 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ContentCSVImporter.processRows (cognitive 36) ghost/core/server/services/content-import/import/importer.ts:231— ContentCSVImporter.processRows has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (20 pts), error handling 5 (9 pts), ternaries 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foreach.foreach (cognitive 36) ghost/core/frontend/helpers/foreach.js:22— foreach.foreach has cognitive complexity 36 (threshold 15). Drivers by points: if/else 17 (20 pts), boolean chains 16 (nesting depth added 3). Of this number, 31 points are the body's own statements and 5 belong to 2 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.
generate-img-attrs.generateImgSrcAttrs (cognitive 36) koenig/kg-default-cards/src/utils/generate-img-attrs.ts:64— generate-img-attrs.generateImgSrcAttrs has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (30 pts), boolean chains 6 (nesting depth added 17). Of this number, 35 points are the body's own statements and 1 belongs to one function literal 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.
onUpdated (cognitive 36) ghost/core/server/models/post.js:420— onUpdated has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (32 pts), boolean chains 4 (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.
email-preview.EmailPreview (cognitive 35) apps/admin/src/editor/preview/email-preview.tsx:140— email-preview.EmailPreview has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 15 (28 pts), boolean chains 7 (nesting depth added 13). Of this number, 34 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.
post-analytics-header.PostAnalyticsHeader (cognitive 35) apps/admin/src/posts/analytics/components/post-analytics-header.tsx:82— post-analytics-header.PostAnalyticsHeader has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 20, if/else 9 (10 pts), ternaries 4, error handling 1 (nesting depth added 1). Of this number, 22 points are the body's own statements and 13 belong to 4 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.
actions.updateProfile (cognitive 35) apps/portal/src/actions.js:1007— actions.updateProfile has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 12 (25 pts), if/else 6 (8 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
title.getTitle (cognitive 35) ghost/core/frontend/meta/title.js:11— title.getTitle has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 19, if/else 13 (14 pts), ternaries 2 (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.
MentionsAPI.#updateWebmention (cognitive 35) ghost/core/server/services/mentions/mentions-api.js:189— MentionsAPI.#updateWebmention has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (29 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AutomationRunStepsImporter.import (cognitive 35) ghost/core/server/data/seeders/importers/automation-run-steps-importer.ts:55— AutomationRunStepsImporter.import has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 6 (16 pts), if/else 6 (10 pts), loops 5 (7 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
profile-preview-hover-card.ProfilePreviewHoverCard (cognitive 34) apps/activitypub/src/components/global/profile-preview-hover-card.tsx:36— profile-preview-hover-card.ProfilePreviewHoverCard has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 19, ternaries 7 (8 pts), if/else 7 (nesting depth added 1). Of this number, 27 points are the body's own statements and 7 belong to 4 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.
OEmbedService.#fetchOembedDataFromUrl (cognitive 34) REDACTED:860— OEmbedService.#fetchOembedDataFromUrl has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 5, ternaries 2, error handling 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.
use-activity-pub-queries.useDeleteMutationForUser (cognitive 33) apps/activitypub/src/hooks/use-activity-pub-queries.ts:2191— use-activity-pub-queries.useDeleteMutationForUser has cognitive complexity 33 (threshold 15). Drivers by points: if/else 22 (26 pts), ternaries 3 (5 pts), boolean chains 2 (nesting depth added 6). None of this is in the body itself: all 33 points belong to 16 function literals inside it that branch (lines 2201, 2520, 2454, …). 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.
export-account.ExportAccount (cognitive 33) apps/activitypub/src/views/preferences/components/account-migration/export-account.tsx:29— export-account.ExportAccount has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 9 (16 pts), if/else 8, boolean chains 7, error handling 2 (nesting depth added 7). Of this number, 25 points are the body's own statements and 8 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.
options-step.OptionsStep (cognitive 33) apps/admin/src/editor/publish/components/options-step.tsx:103— options-step.OptionsStep has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 16 (22 pts), boolean chains 9, if/else 1 (2 pts) (nesting depth added 7). Of this number, 30 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.
use-editor-session.useEditorSession (cognitive 33) apps/admin/src/editor/session/use-editor-session.ts:208— use-editor-session.useEditorSession has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (16 pts), ternaries 8 (9 pts), boolean chains 6, error handling 1, loops 1 (nesting depth added 2). Most of this is not in the body itself: 4 of the 33 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 454, a function literal at line 443, a function literal at line 278, …). 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.
welcome-email-customize-modal.WelcomeEmailCustomizeModal (cognitive 33) apps/admin/src/settings/membership/member-emails/welcome-email-customize-modal.tsx:297— welcome-email-customize-modal.WelcomeEmailCustomizeModal has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 13, ternaries 5, loops 1 (nesting depth added 3). Most of this is not in the body itself: 11 of the 33 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 411, 345, 371, …). 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.
form.FormEditor (cognitive 33) apps/comments-ui/src/components/content/forms/form.tsx:27— form.FormEditor has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 11, ternaries 2 (3 pts), error handling 1 (nesting depth added 6). Most of this is not in the body itself: 8 of the 33 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 110, 80, 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.
validator.validateSchema (cognitive 33) REDACTED:44— validator.validateSchema has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 8 (nesting depth added 11). Most of this is not in the body itself: 2 of the 33 points are its own statements and the rest belongs to one function literal inside it that branches (line 50). 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.
getNewsletterBasicStats (cognitive 33) ghost/core/server/services/stats/posts-stats-service.js:835— getNewsletterBasicStats has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 6 (9 pts), boolean chains 7, other 3, error handling 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
handleDataAttributes (cognitive 33) apps/portal/src/data-attributes.js:234— handleDataAttributes has cognitive complexity 33 (threshold 15). Drivers by points: if/else 26 (30 pts), error handling 2, boolean chains 1 (nesting depth added 4). Most of this is not in the body itself: 2 of the 33 points are its own statements and the rest belongs to 33 function items inside it that branch (a function literal at line 488, a function literal at line 546, a function literal at line 276, …). 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.
side-panel.SidePanel (cognitive 32) apps/admin/src/layout/side-panel/side-panel.tsx:32— side-panel.SidePanel has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 9, ternaries 5 (6 pts) (nesting depth added 3). Most of this is not in the body itself: 6 of the 32 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 65, 137, 122, …). 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.
history-modal.HistoryActionDescription (cognitive 32) apps/admin/src/settings/advanced/history-modal.tsx:342— history-modal.HistoryActionDescription has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 7 (16 pts), if/else 8 (11 pts), boolean chains 5 (nesting depth added 12). Of this number, 28 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.
web.Web (cognitive 32) apps/admin/src/posts/analytics/web/web.tsx:45— web.Web has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 15, if/else 10, ternaries 5 (7 pts) (nesting depth added 2). Most of this is not in the body itself: 10 of the 32 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 105, 157, 68, …). 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.
tag-detail-form.TagDetailForm (cognitive 32) apps/admin/src/tags/detail/tag-detail-form.tsx:74— tag-detail-form.TagDetailForm has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 21, boolean chains 11. 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.
paid-account-actions.PaidAccountActions (cognitive 32) apps/portal/src/components/pages/AccountHomePage/components/paid-account-actions.jsx:21— paid-account-actions.PaidAccountActions has cognitive complexity 32 (threshold 15). Drivers by points: if/else 17 (19 pts), boolean chains 12, ternaries 1 (nesting depth added 2). Most of this is not in the body itself: 7 of the 32 points are its own statements and the rest belongs to 7 function items inside it that branch (PlanLabel, PlanUpdateButton, a function literal at line 183, …). 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.
data-attributes.formSubmitHandler (cognitive 32) apps/portal/src/data-attributes.js:19— data-attributes.formSubmitHandler has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 9, error handling 3 (7 pts), loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
multi-select-combobox.MultiSelectCombobox (cognitive 32) apps/shade/src/components/ui/multi-select-combobox.tsx:171— multi-select-combobox.MultiSelectCombobox has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 12, ternaries 7 (9 pts), if/else 6 (8 pts), loops 2 (3 pts) (nesting depth added 5). Most of this is not in the body itself: 12 of the 32 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 262, a function literal at line 231, handleSelectMulti, …). 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.
pagemenu.PageMenu (cognitive 32) apps/shade/src/components/ui/pagemenu.tsx:39— pagemenu.PageMenu has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 11, if/else 9 (10 pts), ternaries 7 (9 pts), loops 2 (nesting depth added 3). Most of this is not in the body itself: 9 of the 32 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 83, 59, 76, …). 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.
MemberBREADService.attachSubscriptionsToMember (cognitive 32) ghost/core/server/services/members/members-api/services/member-bread-service.js:124— MemberBREADService.attachSubscriptionsToMember has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (18 pts), ternaries 2 (6 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 14). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SettingsImporter.beforeImport (cognitive 32) ghost/core/server/data/importer/importers/data/settings-importer.js:99— SettingsImporter.beforeImport has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 8, ternaries 1 (4 pts), error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 11). Most of this is not in the body itself: 14 of the 32 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 226, 147, 119, …). 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.
createSessionFromMagicLink (cognitive 32) REDACTED:467— createSessionFromMagicLink has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 8, error handling 3 (4 pts), ternaries 1 (3 pts) (nesting depth added 9). Of this number, 27 points are the body's own statements and 5 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.
exports (cognitive 32) ghost/core/server/models/base/plugins/crud.js:58— exports has cognitive complexity 32 (threshold 15). Drivers by points: if/else 26 (28 pts), boolean chains 3, error handling 1 (nesting depth added 2). None of this is in the body itself: all 32 points belong to 19 function items inside it that branch (findPage, edit, findAll, …). 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.
note.Note (cognitive 31) apps/activitypub/src/views/feed/note.tsx:25— note.Note has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 15, if/else 11, ternaries 3 (4 pts), error handling 1 (nesting depth added 1). Most of this is not in the body itself: 8 of the 31 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 287, a function literal at line 65, loadMoreForChain, …). 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.
bluesky-sharing.BlueskySharing (cognitive 31) apps/activitypub/src/views/preferences/components/bluesky-sharing.tsx:35— bluesky-sharing.BlueskySharing has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 11, if/else 8 (9 pts), ternaries 5 (9 pts), error handling 1 (2 pts) (nesting depth added 6). Of this number, 19 points are the body's own statements and 12 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.
edit-offer-modal.EditOfferModal (cognitive 31) apps/admin/src/settings/growth/offers/edit-offer-modal.tsx:272— edit-offer-modal.EditOfferModal has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 16, if/else 6 (11 pts), error handling 1 (2 pts), ternaries 2 (nesting depth added 6). Most of this is not in the body itself: 5 of the 31 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 336, 384, 299). 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.
feedback.Feedback (cognitive 31) apps/admin/src/posts/analytics/newsletter/components/feedback.tsx:47— feedback.Feedback has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 8 (26 pts), boolean chains 5 (nesting depth added 18). Of this number, 20 points are the body's own statements and 11 belong to 2 function literals 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.
publication-language.PublicationLanguage (cognitive 31) apps/admin/src/settings/general/publication-language.tsx:33— publication-language.PublicationLanguage has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 14, ternaries 5 (9 pts), if/else 7 (8 pts) (nesting depth added 5). Of this number, 19 points are the body's own statements and 12 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.
access.Access (cognitive 31) apps/admin/src/settings/membership/access.tsx:136— access.Access has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 23, ternaries 5, if/else 2, error handling 1. Of this number, 27 points are the body's own statements and 4 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.
use-scroll-restoration.useScrollRestoration (cognitive 31) apps/admin/src/shared/virtual-list/use-scroll-restoration.tsx:126— use-scroll-restoration.useScrollRestoration has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 6). None of this is in the body itself: all 31 points belong to 10 function literals inside it that branch (lines 260, 299, 190, …). 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.
gift-redemption-page.GiftRedemptionPage (cognitive 31) apps/portal/src/components/pages/gift-redemption-page.jsx:58— gift-redemption-page.GiftRedemptionPage has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 19, if/else 9 (10 pts), ternaries 2 (nesting depth added 1). Of this number, 20 points are the body's own statements and 11 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.
MemberController.updateSubscription (cognitive 31) REDACTED:100— MemberController.updateSubscription has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 7, error handling 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
fetch-from-app.createAppFetcher.fetchFromApp (cognitive 31) ghost/core/server/services/app-installations/fetch-from-app.ts:120— fetch-from-app.createAppFetcher.fetchFromApp has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 9, ternaries 2, error handling 1 (nesting depth added 5). Of this number, 16 points are the body's own statements and 15 belong to 7 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.
get.get (cognitive 31) ghost/core/frontend/helpers/get.js:405— get.get has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 10, error handling 2 (4 pts), ternaries 2 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
DockerAnalyticsManager.generateSession (cognitive 31) REDACTED:557— DockerAnalyticsManager.generateSession has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (19 pts), ternaries 3 (6 pts), boolean chains 5, 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.
bulkEdit (cognitive 31) ghost/core/server/services/posts/posts-service.js:178— bulkEdit has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 12). Of this number, 29 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
actions.getLinkTarget (cognitive 30) apps/admin-x-framework/src/api/actions.ts:134— actions.getLinkTarget has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (23 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
newsletter-overview.NewsletterOverview (cognitive 30) apps/admin/src/posts/analytics/overview/components/newsletter-overview.tsx:40— newsletter-overview.NewsletterOverview has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 9 (18 pts), boolean chains 12 (nesting depth added 9). Of this number, 18 points are the body's own statements and 12 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.
overview.Overview (cognitive 30) apps/admin/src/posts/analytics/overview/overview.tsx:50— overview.Overview has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 25, if/else 5. Of this number, 23 points are the body's own statements and 7 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.
scroll-section-provider.ScrollSectionProvider (cognitive 30) apps/admin/src/settings/hooks/scroll-section-provider.tsx:181— scroll-section-provider.ScrollSectionProvider has cognitive complexity 30 (threshold 15). Drivers by points: if/else 19 (22 pts), boolean chains 7, ternaries 1 (nesting depth added 3). None of this is in the body itself: all 30 points belong to 8 function literals inside it that branch (lines 297, 322, 246, …). 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.
get-portal-preview-url.getPortalPreviewUrl (cognitive 30) apps/admin/src/settings/utils/get-portal-preview-url.ts:19— get-portal-preview-url.getPortalPreviewUrl has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 15, ternaries 9, if/else 6. Of this number, 29 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.
pack-local.main (cognitive 30) apps/shade/scripts/pack-local.ts:318— pack-local.main has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 3 (5 pts), ternaries 2 (5 pts), boolean chains 4, loops 3 (nesting depth added 10). Most of this is not in the body itself: 7 of the 30 points are its own statements and the rest belongs to 5 function items inside it that branch (pass, a function literal at line 378, a function literal at line 414, …). 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.
filter.createMetafieldsFilterTransformer (cognitive 30) ghost/core/server/services/members-metafields/filter.ts:107— filter.createMetafieldsFilterTransformer has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18 (24 pts), ternaries 3 (4 pts), loops 2 (nesting depth added 7). None of this is in the body itself: all 30 points belong to 6 function items inside it that branch (toElemMatch, transform, buildElemMatch, …). 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.
clean.post (cognitive 30) ghost/core/server/api/endpoints/utils/serializers/output/utils/clean.js:81— clean.post has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 7 (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.
extra-attrs.forPost (cognitive 30) ghost/core/server/api/endpoints/utils/serializers/output/utils/extra-attrs.js:10— extra-attrs.forPost has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17 (28 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MilestonesService.#runARRQueries (cognitive 30) ghost/core/server/services/milestones/milestones-service.js:197— MilestonesService.#runARRQueries has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (19 pts), boolean chains 7, loops 1 (4 pts) (nesting depth added 15). Of this number, 29 points are the body's own statements and 1 belongs to one function literal 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.
NewslettersService.prepAttrsForEmailVerification (cognitive 30) ghost/core/server/services/newsletters/newsletters-service.js:305— NewslettersService.prepAttrsForEmailVerification has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 8, 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.
clean-basic-html.cleanBasicHtml (cognitive 30) koenig/kg-clean-basic-html/src/clean-basic-html.ts:12— clean-basic-html.cleanBasicHtml has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 8 (nesting depth added 10). Of this number, 16 points are the body's own statements and 14 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.
add-offer-modal.Sidebar (cognitive 29) apps/admin/src/settings/growth/offers/add-offer-modal.tsx:131— add-offer-modal.Sidebar has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 23, ternaries 5, if/else 1. Of this number, 28 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.
activity-email-preview.ActivityEmailPreview (cognitive 29) apps/admin/src/members/activity/activity-email-preview.tsx:31— activity-email-preview.ActivityEmailPreview has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 8 (14 pts), boolean chains 12, if/else 3 (nesting depth added 6). Of this number, 23 points are the body's own statements and 6 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.
newsletter-radial-chart.NewsletterRadialChart (cognitive 29) apps/admin/src/posts/analytics/newsletter/components/newsletter-radial-chart.tsx:27— newsletter-radial-chart.NewsletterRadialChart has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 13 (18 pts), boolean chains 7, if/else 3, match/switch 1 (nesting depth added 5). Most of this is not in the body itself: 10 of the 29 points are its own statements and the rest belongs to 3 function items inside it that branch (getSizeConfig, a function literal at line 150, normalizePercentageValue). 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.
App.fetchOfferQueryStrData (cognitive 29) REDACTED:435— App.fetchOfferQueryStrData has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 13, 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.
build-docs.formatImports (cognitive 29) REDACTED:492— build-docs.formatImports has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 4 (9 pts), boolean chains 3, loops 2 (nesting depth added 11). Of this number, 28 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.
GiftDeliveryService.send (cognitive 29) ghost/core/server/services/gifts/gift-delivery-service.ts:229— GiftDeliveryService.send has cognitive complexity 29 (threshold 15). Drivers by points: error handling 7 (12 pts), if/else 10, boolean chains 5, 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.
route-settings-parser.parseDataEntry (cognitive 29) ghost/core/server/services/route-settings/route-settings-parser.ts:127— route-settings-parser.parseDataEntry has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (24 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
TableImporter.batchInsert (cognitive 29) ghost/core/server/data/seeders/importers/table-importer.ts:101— TableImporter.batchInsert has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (9 pts), ternaries 1 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
create (cognitive 29) ghost/core/server/services/offers/domain/models/offer.js:288— create has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 8, ternaries 3, other 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.
use-growth-stats.useGrowthStats (cognitive 28) apps/admin/src/analytics/hooks/use-growth-stats.ts:181— use-growth-stats.useGrowthStats has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 6 (10 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 11). Most of this is not in the body itself: 2 of the 28 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 234, 210). 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.
collect-settings.MultiPicker (cognitive 28) apps/admin/src/settings/membership/checkout/collect-settings.tsx:70— collect-settings.MultiPicker has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 11 (14 pts), boolean chains 9, if/else 5 (nesting depth added 3). Of this number, 14 points are the body's own statements and 14 belong to 5 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.
edit-offer-modal.Sidebar (cognitive 28) apps/admin/src/settings/growth/offers/edit-offer-modal.tsx:54— edit-offer-modal.Sidebar has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 13, ternaries 8, error handling 2 (4 pts), if/else 3 (nesting depth added 2). Of this number, 21 points are the body's own statements and 7 belong to 4 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.
manage-view-popover.ManageViewPopoverContent (cognitive 28) apps/admin/src/members/components/manage-view-popover.tsx:21— manage-view-popover.ManageViewPopoverContent has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 6 (7 pts), boolean chains 3, error handling 2 (nesting depth added 9). Of this number, 15 points are the body's own statements and 13 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
email-sending-status-provider.EmailSendingStatusProvider (cognitive 28) apps/admin/src/posts/analytics/email-sending-status/email-sending-status-provider.tsx:25— email-sending-status-provider.EmailSendingStatusProvider has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 15, if/else 6, ternaries 3 (5 pts), error handling 2 (nesting depth added 2). Of this number, 16 points are the body's own statements and 12 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.
member-emails.MemberEmails (cognitive 28) apps/admin/src/settings/membership/member-emails.tsx:173— member-emails.MemberEmails has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 9, error handling 3 (4 pts), ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 7 of the 28 points are its own statements and the rest belongs to 4 function items inside it that branch (handleEditClick, handleToggle, a function literal at line 229, …). 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.
gift-page.GiftPage (cognitive 28) apps/portal/src/components/pages/gift-page.tsx:80— gift-page.GiftPage has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 28, if/else 24 (27 pts), ternaries 15, 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, 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 (gift-page.GiftPage::handlePurchase) 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.
tabs.renderTabsTriggerLabel (cognitive 28) apps/shade/src/components/ui/tabs.tsx:151— tabs.renderTabsTriggerLabel has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 12, if/else 9 (10 pts), ternaries 3 (6 pts) (nesting depth added 4). Most of this is not in the body itself: 4 of the 28 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 160, a function literal at line 210, flushLabel). 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.
filters.FilterInput (cognitive 28) REDACTED:472— filters.FilterInput has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 14, if/else 9 (10 pts), ternaries 2 (3 pts), match/switch 1 (nesting depth added 2). Most of this is not in the body itself: 6 of the 28 points are its own statements and the rest belongs to 4 function items inside it that branch (handleBlur, getValidationMessage, handleKeyDown, …). 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.
post-data.buildPostData (cognitive 28) ghost/core/server/services/content-import/import/post-data.ts:82— post-data.buildPostData has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (18 pts), error handling 3 (7 pts), loops 2, boolean chains 1 (nesting depth added 8). 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.
poll.processStep (cognitive 28) ghost/core/server/services/automations/poll.ts:192— poll.processStep has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (15 pts), error handling 3 (6 pts), ternaries 2 (4 pts), boolean chains 1, loops 1, match/switch 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.
mobiledoc-to-lexical.populateLexicalNodeWithMarkers (cognitive 28) koenig/kg-converters/src/mobiledoc-to-lexical.ts:226— mobiledoc-to-lexical.populateLexicalNodeWithMarkers has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 13). Of this number, 18 points are the body's own statements and 10 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.
#run (cognitive 28) ghost/core/server/data/seeders/data-generator.js:251— #run has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (16 pts), loops 4 (5 pts), error handling 1 (2 pts), other 2, ternaries 1 (2 pts), boolean chains 1 (nesting depth added 7). Of this number, 26 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
editor-session.createEditorSession.prepare (cognitive 27) apps/admin/src/editor/session/editor-session.ts:664— editor-session.createEditorSession.prepare has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 8, ternaries 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
access-section.AccessSection (cognitive 27) apps/admin/src/editor/settings/access-section.tsx:56— access-section.AccessSection has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 10 (18 pts), boolean chains 5, if/else 4 (nesting depth added 8). Of this number, 16 points are the body's own statements and 11 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.
theme-modal.ChangeThemeModal (cognitive 27) apps/admin/src/settings/site/theme-modal.tsx:318— theme-modal.ChangeThemeModal has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 7, error handling 2 (5 pts) (nesting depth added 9). Most of this is not in the body itself: 6 of the 27 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 346, performInstallation, a function literal at line 393, …). 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.
stripe-connect-modal.Connect (cognitive 27) apps/admin/src/settings/membership/stripe/stripe-connect-modal.tsx:67— stripe-connect-modal.Connect has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 6, error handling 2 (5 pts), loops 1 (2 pts), ternaries 2 (nesting depth added 9). Most of this is not in the body itself: 6 of the 27 points are its own statements and the rest belongs to 2 function items inside it that branch (saveTier, onSubmit). 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.
tag-image-field.TagImageField (cognitive 27) apps/admin/src/tags/detail/tag-image-field.tsx:45— tag-image-field.TagImageField has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 6 (8 pts), boolean chains 5, error handling 1 (nesting depth added 9). Of this number, 18 points are the body's own statements and 9 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
welcome-email-modal.WelcomeEmailModal (cognitive 27) apps/admin/src/settings/membership/member-emails/welcome-email-modal.tsx:115— welcome-email-modal.WelcomeEmailModal has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 20, if/else 6, ternaries 1. Of this number, 18 points are the body's own statements and 9 belong to 4 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.
create-custom-field-popover.CreateCustomFieldPopover (cognitive 27) apps/admin/src/shared/member-custom-fields/create-custom-field-popover.tsx:76— create-custom-field-popover.CreateCustomFieldPopover has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 12, if/else 8, ternaries 7. Most of this is not in the body itself: 11 of the 27 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 188, a function literal at line 155, a function literal at line 96, …). 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.
App.getPageFromLinkPath (cognitive 27) REDACTED:1176— App.getPageFromLinkPath has cognitive complexity 27 (threshold 15). Drivers by points: if/else 25 (26 pts), boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
chart.ChartTooltipContent (cognitive 27) REDACTED:108— chart.ChartTooltipContent has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 14, ternaries 6 (9 pts), if/else 4 (nesting depth added 3). Most of this is not in the body itself: 4 of the 27 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 170, 128). 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.
knex-adapter.createCustomAdapter.<returned closure>.applyCondition (cognitive 27) ghost/core/server/auth/better-auth/knex-adapter.ts:100— knex-adapter.createCustomAdapter.<returned closure>.applyCondition has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 12 (23 pts), boolean chains 3, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Base.replaceIdentifiers::handleObject (cognitive 27) ghost/core/server/data/importer/importers/data/base.js:195— Base.replaceIdentifiers::handleObject has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (25 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.
ExternalMediaInliner.getRemoteMedia (cognitive 27) REDACTED:227— ExternalMediaInliner.getRemoteMedia has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 5, ternaries 2 (3 pts), error handling 1 (2 pts), loops 1 (nesting depth added 9). Of this number, 26 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.
markdown.renderEntryMarkdown (cognitive 27) ghost/core/frontend/services/llms/markdown.js:152— markdown.renderEntryMarkdown has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 10 (13 pts), if/else 6 (9 pts), boolean chains 3, 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.
retryDb (cognitive 27) ghost/core/server/services/email-service/batch-sending-service.js:1741— retryDb has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 3 (7 pts), boolean chains 4, other 2, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
complete-step.CompleteStep (cognitive 26) apps/admin/src/editor/publish/components/complete-step.tsx:58— complete-step.CompleteStep has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 13 (25 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
post-settings-sidebar.PostSettingsSidebar (cognitive 26) apps/admin/src/editor/settings/post-settings-sidebar.tsx:158— post-settings-sidebar.PostSettingsSidebar has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 15, boolean chains 8, if/else 3. Of this number, 17 points are the body's own statements and 9 belong to 4 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.
preview-frame.EmailPreviewFrame (cognitive 26) apps/admin/src/automations/components/email-modal/preview-frame.tsx:10— preview-frame.EmailPreviewFrame has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 14, if/else 8 (9 pts), ternaries 2 (3 pts) (nesting depth added 2). Most of this is not in the body itself: 8 of the 26 points are its own statements and the rest belongs to 5 function items inside it that branch (syncPreviewHeight, handlePreviewLoad, cleanupPreviewMeasurement, …). 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.
preview-modal.PreviewModalContent (cognitive 26) apps/admin/src/settings/components/preview-modal.tsx:103— preview-modal.PreviewModalContent has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 12, ternaries 1 (nesting depth added 4). Of this number, 19 points are the body's own statements and 7 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.
welcome-email-preview-frame.WelcomeEmailPreviewFrame (cognitive 26) apps/admin/src/settings/membership/member-emails/welcome-email-preview-frame.tsx:10— welcome-email-preview-frame.WelcomeEmailPreviewFrame has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 14, if/else 8 (9 pts), ternaries 2 (3 pts) (nesting depth added 2). Most of this is not in the body itself: 8 of the 26 points are its own statements and the rest belongs to 5 function items inside it that branch (syncPreviewHeight, handlePreviewLoad, cleanupPreviewMeasurement, …). 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.
format-url.formatUrl (cognitive 26) apps/admin/src/settings/utils/format-url.ts:3— format-url.formatUrl has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 5, 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.
gift-success-page.GiftSuccessPage (cognitive 26) apps/portal/src/components/pages/gift-success-page.jsx:139— gift-success-page.GiftSuccessPage has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 10 (14 pts), boolean chains 10, if/else 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PopupContent.render (cognitive 26) REDACTED:160— PopupContent.render has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 12, if/else 10 (12 pts), match/switch 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
EmailAddressService.getAddress (cognitive 26) ghost/core/server/services/email-address/email-address-service.ts:103— EmailAddressService.getAddress has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 5 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
link-replacer.replace (cognitive 26) ghost/core/server/lib/link-replacer.ts:7— link-replacer.replace has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (17 pts), error handling 2 (5 pts), boolean chains 3, 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.
ProductRepository.create (cognitive 26) ghost/core/server/services/members/members-api/repositories/product-repository.js:174— ProductRepository.create has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 4, loops 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OEmbedService.fetchOembedData (cognitive 26) REDACTED:740— OEmbedService.fetchOembedData has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 8, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
body_class.body_class (cognitive 26) ghost/core/frontend/helpers/body_class.js:19— body_class.body_class has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 10, ternaries 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
add (cognitive 26) ghost/core/server/services/members/members-api/services/member-bread-service.js:527— add has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 8, ternaries 2 (3 pts), error handling 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
querySimplePath (cognitive 26) ghost/core/frontend/helpers/get.js:93— querySimplePath has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 4 (10 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 12). Of this number, 19 points are the body's own statements and 7 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.
suggested-profiles.SuggestedProfiles (cognitive 25) apps/activitypub/src/views/feed/components/suggested-profiles.tsx:12— suggested-profiles.SuggestedProfiles has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 16, ternaries 5, if/else 4. Most of this is not in the body itself: 7 of the 25 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 130, updateScrollButtons, scrollLeft, …). 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.
handle-response.handleResponse (cognitive 25) apps/admin-x-framework/src/utils/api/handle-response.ts:26— handle-response.handleResponse has cognitive complexity 25 (threshold 15). Drivers by points: if/else 21 (24 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
growth-sources.GrowthSources (cognitive 25) apps/admin/src/analytics/views/stats/growth/components/growth-sources.tsx:111— growth-sources.GrowthSources has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7, ternaries 5 (7 pts), loops 1 (2 pts) (nesting depth added 6). Most of this is not in the body itself: 11 of the 25 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 141, 168, 161). 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.
save-engine.createSaveEngine.decideLeave (cognitive 25) apps/admin/src/editor/engine/save-engine.ts:1200— save-engine.createSaveEngine.decideLeave has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 5, ternaries 1 (3 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run-list.RunList (cognitive 25) apps/admin/src/automations/components/canvas/run-list.tsx:150— run-list.RunList has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 18, ternaries 5, if/else 2. Of this number, 22 points are the body's own statements and 3 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.
newsletter-filter-fields.newsletterAddressing.matchCompound (cognitive 25) apps/admin/src/members/newsletter-filter-fields.ts:66— newsletter-filter-fields.newsletterAddressing.matchCompound has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 5, ternaries 2 (4 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BookshelfPostRelationsResolver.resolveAuthors (cognitive 25) ghost/core/server/services/content-import/import/relations.ts:85— BookshelfPostRelationsResolver.resolveAuthors has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 2, loops 1 (nesting depth added 12). 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.
EmailAnalyticsService.#fetchEventsForJob (cognitive 25) ghost/core/server/services/email-analytics/email-analytics-service.ts:453— EmailAnalyticsService.#fetchEventsForJob has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 5, error handling 3 (nesting depth added 3). Of this number, 19 points are the body's own statements and 6 belong to 2 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.
handle-image-sizes.handleImageSizes (cognitive 25) ghost/core/frontend/web/middleware/handle-image-sizes.js:16— handle-image-sizes.handleImageSizes has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18 (19 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 2). Of this number, 15 points are the body's own statements and 10 belong to 6 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.
D2 · Cognitive Complexity· get (cognitive 25) · ×1
get (cognitive 25) ghost/core/server/adapters/lib/redis/AdapterCacheRedis.js:278— get has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (13 pts), error handling 5 (10 pts), boolean chains 1, ternaries 1 (nesting depth added 9). Of this number, 23 points are the body's own statements and 2 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.
web.Web (cognitive 24) apps/admin/src/analytics/views/stats/web/web.tsx:26— web.Web has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 8, ternaries 3 (4 pts) (nesting depth added 4). Most of this is not in the body itself: 6 of the 24 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 64, 52, 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.
newsletters.Newsletters (cognitive 24) apps/admin/src/analytics/views/stats/newsletters/newsletters.tsx:291— newsletters.Newsletters has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 13, if/else 5, ternaries 3 (4 pts), loops 1 (2 pts) (nesting depth added 2). 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 377, 343, 351, …). 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.
editor-status.StatusBody (cognitive 24) apps/admin/src/editor/editor-status.tsx:155— editor-status.StatusBody has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 7 (18 pts), boolean chains 3, if/else 1 (2 pts), match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
restore-screen.RestoreScreen (cognitive 24) apps/admin/src/editor/restore/restore-screen.tsx:61— restore-screen.RestoreScreen has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 8 (13 pts), if/else 4 (6 pts), boolean chains 4, error handling 1 (nesting depth added 7). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 4 function items inside it that branch (a function literal at line 143, restore, a function literal at line 191, …). 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.
tier-detail-preview.TierDetailPreview (cognitive 24) apps/admin/src/settings/membership/tiers/tier-detail-preview.tsx:81— tier-detail-preview.TierDetailPreview has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 17, ternaries 7. 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.
embed-signup-sidebar.EmbedSignupSidebar (cognitive 24) apps/admin/src/settings/growth/embed-signup/embed-signup-sidebar.tsx:45— embed-signup-sidebar.EmbedSignupSidebar has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 10, ternaries 2, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 7 of the 24 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 73, 97, 146, …). 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.
edit-retention-offer-modal.RetentionOfferSidebar (cognitive 24) apps/admin/src/settings/growth/offers/edit-retention-offer-modal.tsx:254— edit-retention-offer-modal.RetentionOfferSidebar has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 19, ternaries 5. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
members-actions.MembersActions (cognitive 24) apps/admin/src/members/components/members-actions.tsx:39— members-actions.MembersActions has cognitive complexity 24 (threshold 15). Drivers by points: error handling 6 (7 pts), boolean chains 5, if/else 5, ternaries 4 (5 pts), loops 2 (nesting depth added 2). Most of this is not in the body itself: 6 of the 24 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 134, 84, 109, …). 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.
addressing.customFieldAddressing.matchCompound (cognitive 24) apps/admin/src/members/custom-fields/addressing.ts:155— addressing.customFieldAddressing.matchCompound has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 5, loops 1 (nesting depth added 8). Of this number, 22 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
members.MembersPage (cognitive 24) apps/admin/src/members/members.tsx:47— members.MembersPage has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 12, ternaries 4 (10 pts), if/else 2 (nesting depth added 6). Of this number, 22 points are the body's own statements and 2 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.
member-event.getIcon (cognitive 24) apps/admin/src/members/detail/member-event.ts:119— member-event.getIcon has cognitive complexity 24 (threshold 15). Drivers by points: if/else 18 (19 pts), boolean chains 5 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
use-post-bulk-actions.usePostBulkActions.patchCaches (cognitive 24) apps/admin/src/posts/list/hooks/use-post-bulk-actions.ts:156— use-post-bulk-actions.usePostBulkActions.patchCaches has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 4 (10 pts), boolean chains 3, loops 1 (nesting depth added 11). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 178, 190, 243, …). 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.
yaml-file-editor-modal.YamlFileEditorModal (cognitive 24) apps/admin/src/settings/advanced/labs/yaml-file-editor-modal.tsx:34— yaml-file-editor-modal.YamlFileEditorModal has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (9 pts), ternaries 2 (4 pts), error handling 2 (nesting depth added 4). Most of this is not in the body itself: 6 of the 24 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 61, handleSave, a function literal at line 119). 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.
default-recipients.DefaultRecipients (cognitive 24) apps/admin/src/settings/email/default-recipients.tsx:83— default-recipients.DefaultRecipients has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17, boolean chains 4, ternaries 2 (3 pts) (nesting depth added 1). Most of this is not in the body itself: 2 of the 24 points are its own statements and the rest belongs to 13 function items inside it that branch (setDefaultRecipientValue, updateSelectedSegments, requestSegmentOptions, …). 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.
MetafieldDefinitionsService.edit (cognitive 24) ghost/core/server/services/members-metafields/definitions-service.ts:577— MetafieldDefinitionsService.edit has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 7, ternaries 2 (3 pts), error handling 1 (2 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 595, 584). 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.
get-discount-window.getDiscountWindow (cognitive 24) ghost/core/server/services/members/members-api/utils/get-discount-window.ts:71— get-discount-window.getDiscountWindow has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BookshelfPostRelationsResolver.resolveTags (cognitive 24) ghost/core/server/services/content-import/import/relations.ts:156— BookshelfPostRelationsResolver.resolveTags has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (17 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 14). Of this number, 19 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
context.setResponseContext (cognitive 24) ghost/core/frontend/services/rendering/context.js:19— context.setResponseContext has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 7, ternaries 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.
unsubscribe.unsubscribeController (cognitive 24) ghost/core/frontend/services/routing/controllers/unsubscribe.js:10— unsubscribe.unsubscribeController has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (17 pts), ternaries 1 (4 pts), error handling 1 (2 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.
SlackPingService.ping (cognitive 24) ghost/core/server/services/slack-ping/slack-ping-service.ts:122— SlackPingService.ping has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 2 (5 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Mention.create (cognitive 24) ghost/core/server/services/mentions/mention.js:264— Mention.create has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17 (19 pts), ternaries 4, boolean chains 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.
defaultRelations (cognitive 24) ghost/core/server/models/comment.js:254— defaultRelations has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (20 pts), ternaries 1 (3 pts), boolean chains 1 (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.
exports (cognitive 24) ghost/core/server/models/base/plugins/bulk-operations.js:90— exports has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 6, error handling 3 (4 pts), loops 2, other 2 (nesting depth added 5). None of this is in the body itself: all 24 points belong to 11 function items inside it that branch (transactionLockingLinked, bulkEdit, bulkDestroy, …). 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.
use-limiter.useLimiter (cognitive 23) apps/admin-x-framework/src/hooks/use-limiter.ts:38— use-limiter.useLimiter has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12, boolean chains 10, ternaries 1. Most of this is not in the body itself: 3 of the 23 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 78, 102, 70, …). 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.
manage-post-view-popover.PopoverBody (cognitive 23) apps/admin/src/posts/list/components/manage-post-view-popover.tsx:57— manage-post-view-popover.PopoverBody has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 7 (12 pts), boolean chains 5, if/else 4, error handling 2 (nesting depth added 5). Most of this is not in the body itself: 11 of the 23 points are its own statements and the rest belongs to 3 function items inside it that branch (handleSave, handleDelete, a function literal at line 133). 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.
upcoming-run-steps.mapUpcomingRunSteps (cognitive 23) apps/admin/src/automations/utils/upcoming-run-steps.ts:9— upcoming-run-steps.mapUpcomingRunSteps has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 5, match/switch 1 (2 pts), loops 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
api.setupGhostApi (cognitive 23) apps/portal/src/utils/api.js:5— api.setupGhostApi has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 18, if/else 4, ternaries 1. Of this number, 17 points are the body's own statements and 6 belong to 30 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.
commands.addTableColumn (cognitive 23) ghost/core/server/data/schema/commands.js:28— commands.addTableColumn has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 8 (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.
email-design.getEmailDesign (cognitive 23) ghost/core/server/lib/email-rendering/email-design.js:71— email-design.getEmailDesign has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11, ternaries 6, match/switch 4, boolean chains 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
EmailRenderer.buildReplacementDefinitions (cognitive 23) ghost/core/server/services/email-service/email-renderer.js:976— EmailRenderer.buildReplacementDefinitions has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 2 (5 pts), loops 3, boolean chains 2 (nesting depth added 9). Of this number, 19 points are the body's own statements and 4 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.
RouterController._setAttributionMetadata (cognitive 23) ghost/core/server/services/members/members-api/controllers/router-controller.js:394— RouterController._setAttributionMetadata has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (23 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.
MppAdapter.#run (cognitive 23) ghost/core/server/services/machine-payments/adapters/mpp-adapter.ts:141— MppAdapter.#run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 8, ternaries 5, 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.
video.handleVideoPlayer (cognitive 23) ghost/core/frontend/src/cards/js/video.js:2— video.handleVideoPlayer has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 2, ternaries 1 (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 9 function items inside it that branch (a function literal at line 143, showRangeProgress, a function literal at line 109, …). 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.
comment-counts.renderCounts (cognitive 23) ghost/core/frontend/src/comment-counts/comment-counts.js:26— comment-counts.renderCounts has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 1 (nesting depth added 12). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to one function literal inside it that branches (line 29). 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.
prune.prune (cognitive 23) ghost/scripts/prune.mts:191— prune.prune has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (20 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
all.validate (cognitive 23) packages/api-framework/src/validators/input/all.ts:46— all.validate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 2 (5 pts), boolean chains 3 (nesting depth added 11). None of this is in the body itself: all 23 points belong to 2 function literals inside it that branch (lines 62, 49). 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.
getMemberStatusText (cognitive 23) ghost/core/server/services/email-service/email-renderer.js:897— getMemberStatusText has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 3, other 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
limitImageWidth (cognitive 23) ghost/core/server/services/email-service/email-renderer.js:1568— limitImageWidth has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 1 (3 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
onSaving (cognitive 23) REDACTED:225— onSaving has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 6 (nesting depth added 7). Of this number, 19 points are the body's own statements and 4 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.
_createSubscriptionCheckoutSession (cognitive 23) ghost/core/server/services/members/members-api/controllers/router-controller.js:593— _createSubscriptionCheckoutSession has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, error handling 1 (4 pts), other 3, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
getAdminToolbarHelper (cognitive 23) ghost/core/frontend/helpers/ghost_head.js:269— getAdminToolbarHelper has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 10, ternaries 9 (10 pts), if/else 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
beforeImport (cognitive 23) ghost/core/server/data/importer/importers/data/posts-importer.js:247— beforeImport has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 6, error handling 1 (2 pts) (nesting depth added 6). None of this is in the body itself: all 23 points belong to 3 function literals inside it that branch (lines 253, 290, 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.
use-keyboard-shortcuts.useKeyboardShortcuts (cognitive 22) apps/activitypub/src/hooks/use-keyboard-shortcuts.tsx:11— use-keyboard-shortcuts.useKeyboardShortcuts has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 5, match/switch 1 (nesting depth added 7). None of this is in the body itself: all 22 points belong to one function literal inside it that branches (line 16). 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.
use-publish-flow.usePublishFlow.checkLimits (cognitive 22) apps/admin/src/editor/publish/use-publish-flow.ts:381— use-publish-flow.usePublishFlow.checkLimits has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 3 (6 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 9). Of this number, 21 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.
image-field.ImageField (cognitive 22) apps/admin/src/editor/image-field.tsx:74— image-field.ImageField has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 12 (17 pts), boolean chains 3, if/else 2 (nesting depth added 5). Of this number, 19 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.
invite-user-modal.InviteUserModal::handleSubmit (cognitive 22) apps/admin/src/settings/general/invite-user-modal.tsx:120— invite-user-modal.InviteUserModal::handleSubmit has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 3, ternaries 1 (2 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (invite-user-modal.InviteUserModal) 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.
history-modal.HistoryFilter (cognitive 22) apps/admin/src/settings/advanced/history-modal.tsx:99— history-modal.HistoryFilter has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (13 pts), ternaries 4 (5 pts), boolean chains 3, error handling 1 (nesting depth added 2). 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 literals inside it that branch (lines 115, 132, 168, …). 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.
add-recommendation-modal.AddRecommendationModal (cognitive 22) apps/admin/src/settings/growth/recommendations/add-recommendation-modal.tsx:45— add-recommendation-modal.AddRecommendationModal has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11, boolean chains 6, ternaries 3 (4 pts), error handling 1 (nesting depth added 1). Most of this is not in the body itself: 7 of the 22 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 131, 75, 157, …). 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.
sidebar.Sidebar (cognitive 22) apps/admin/src/settings/layout/sidebar.tsx:320— sidebar.Sidebar has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 14, if/else 6 (7 pts), ternaries 1 (nesting depth added 1). Of this number, 11 points are the body's own statements and 11 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.
tier-scope-picker.TierScopePicker (cognitive 22) apps/admin/src/automations/components/canvas/tier-scope-picker.tsx:42— tier-scope-picker.TierScopePicker has cognitive complexity 22 (threshold 15). Drivers by points: if/else 24 (30 pts), boolean chains 20, ternaries 7 (10 pts), loops 1 (2 pts) (nesting depth added 10). 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 (tier-scope-picker.TierScopePicker::handleKeyDown) 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.
wait-duration-field.WaitDurationField (cognitive 22) apps/admin/src/automations/components/canvas/wait-duration-field.tsx:39— wait-duration-field.WaitDurationField has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 8 (13 pts), boolean chains 5, if/else 4 (nesting depth added 5). Of this number, 19 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.
automation-sidebar.AutomationSidebar (cognitive 22) apps/admin/src/automations/components/canvas/automation-sidebar.tsx:264— automation-sidebar.AutomationSidebar has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 14, ternaries 4, if/else 3, match/switch 1. Of this number, 19 points are the body's own statements and 3 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.
comments-list.CommentsList (cognitive 22) apps/admin/src/comments/components/comments-list.tsx:42— comments-list.CommentsList has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, if/else 7 (8 pts), ternaries 3 (nesting depth added 1). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 4 function items inside it that branch (a function literal at line 125, a function literal at line 86, handleCloseSidebar, …). 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.
members-list.MembersList (cognitive 22) apps/admin/src/members/components/members-list.tsx:57— members-list.MembersList has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12, boolean chains 6, ternaries 4. 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 (a function literal at line 117, a function literal at line 133, a function literal at line 146, …). 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.
member-value-semantics.subscriptionSemantics.parseClauses (cognitive 22) apps/admin/src/members/member-value-semantics.ts:46— member-value-semantics.subscriptionSemantics.parseClauses has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 3 (6 pts), boolean chains 5 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
gift-page.GiftPage::handlePurchase (cognitive 22) apps/portal/src/components/pages/gift-page.tsx:450— gift-page.GiftPage::handlePurchase has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 5, ternaries 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: one other method here (gift-page.GiftPage) 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.
automation-member-search.browseMemberSearch (cognitive 22) ghost/core/server/services/automations/automation-member-search.ts:98— automation-member-search.browseMemberSearch has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 3 (5 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). Of this number, 21 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.
MemberRepository.setComplimentarySubscription (cognitive 22) ghost/core/server/services/members/members-api/repositories/member-repository.js:2772— MemberRepository.setComplimentarySubscription has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 9). Of this number, 21 points are the body's own statements and 1 belongs 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.
knex-adapter.createCustomAdapter.<returned closure>.groupJoinedRows (cognitive 22) ghost/core/server/auth/better-auth/knex-adapter.ts:235— knex-adapter.createCustomAdapter.<returned closure>.groupJoinedRows has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 4 (8 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NewsletterEmailAnalyticsBatchProcessor.#processEvent (cognitive 22) ghost/core/server/services/email-analytics/newsletter-email-analytics-batch-processor.js:144— NewsletterEmailAnalyticsBatchProcessor.#processEvent has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (22 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.
image-dimensions.getImageDimensions (cognitive 22) ghost/core/frontend/meta/image-dimensions.js:13— image-dimensions.getImageDimensions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 3 (nesting depth added 10). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to one function literal inside it that branches (line 40). 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.
navigation.navigation (cognitive 22) ghost/core/frontend/helpers/navigation.js:98— navigation.navigation has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 14, if/else 5, ternaries 3. Of this number, 16 points are the body's own statements and 6 belong to 4 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.
error-handler.themeErrorRenderer (cognitive 22) REDACTED:46— error-handler.themeErrorRenderer has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 7 (nesting depth added 4). 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, split the body into named stages: move each independent 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.createLlmsService.appendBoundedSectionPaginated (cognitive 22) ghost/core/frontend/services/llms/service.js:129— service.createLlmsService.appendBoundedSectionPaginated has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
upload.mediaValidation.mediaUploadValidation (cognitive 22) ghost/core/server/web/api/middleware/upload.js:340— upload.mediaValidation.mediaUploadValidation has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 9 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mediaValidation::mediaUploadValidation (cognitive 22) ghost/core/server/web/api/middleware/upload.js:340— mediaValidation::mediaUploadValidation has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 9 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
createLlmsService.appendBoundedSectionPaginated (cognitive 22) ghost/core/frontend/services/llms/service.js:129— createLlmsService.appendBoundedSectionPaginated has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
use-activity-pub-queries.updateLikeCache (cognitive 21) apps/activitypub/src/hooks/use-activity-pub-queries.ts:113— use-activity-pub-queries.updateLikeCache has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (12 pts), ternaries 2 (6 pts), boolean chains 2, loops 1 (nesting depth added 11). Most of this is not in the body itself: 6 of the 21 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 134, 124, 158, …). 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.
inbox-list.InboxList (cognitive 21) apps/activitypub/src/views/inbox/components/inbox-list.tsx:34— inbox-list.InboxList has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, ternaries 3 (6 pts) (nesting depth added 4). Most of this is not in the body itself: 10 of the 21 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 59, 182, 105, …). 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.
email-recipients-options.EmailRecipientsOptions (cognitive 21) apps/admin/src/editor/publish/components/email-recipients-options.tsx:43— email-recipients-options.EmailRecipientsOptions has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 8 (11 pts), boolean chains 7, if/else 3 (nesting depth added 3). Most of this is not in the body itself: 7 of the 21 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 83, 99, 68, …). 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.
theme-modal.ThemeToolbar (cognitive 21) apps/admin/src/settings/site/theme-modal.tsx:70— theme-modal.ThemeToolbar has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 7, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 3 of the 21 points are its own statements and the rest belongs to 4 function items inside it that branch (handleThemeUpload, handleUpload, a function literal at line 89, …). 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.
webhook-modal.WebhookModal (cognitive 21) apps/admin/src/settings/advanced/integrations/webhook-modal.tsx:32— webhook-modal.WebhookModal has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 12, if/else 7, ternaries 2. Of this number, 13 points are the body's own statements and 8 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.
install-dialog.InstallDialog (cognitive 21) apps/admin/src/apps/components/install-dialog/install-dialog.tsx:61— install-dialog.InstallDialog has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 4, ternaries 2, error handling 1 (nesting depth added 3). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to 3 function items inside it that branch (confirmReviewed, a function literal at line 159, a function literal at line 71). 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.
label-picker.ComboboxPicker (cognitive 21) apps/admin/src/members/label-picker/label-picker.tsx:399— label-picker.ComboboxPicker has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 10, if/else 10, ternaries 1. Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to 8 function items inside it that branch (handleInputKeyDown, pointAtAddedLabel, a function literal at line 460, …). 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.
post-context-menu-items.getPostContextMenuItems (cognitive 21) apps/admin/src/posts/list/post-context-menu-items.ts:71— post-context-menu-items.getPostContextMenuItems has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (18 pts), ternaries 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
input-field.InputField (cognitive 21) apps/portal/src/components/common/input-field.jsx:179— input-field.InputField has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 8 (13 pts), boolean chains 4, if/else 3, match/switch 1 (nesting depth added 5). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
share-modal.ShareModal (cognitive 21) apps/portal/src/components/pages/share/share-modal.jsx:16— share-modal.ShareModal has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 13, if/else 4, ternaries 4. Of this number, 14 points are the body's own statements and 7 belong to 4 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.
service.assertTargets (cognitive 21) ghost/core/server/services/stripe-checkout-config/service.ts:527— service.assertTargets has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 3 (5 pts), loops 3, boolean chains 2 (nesting depth added 7). Of this number, 19 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.
MemberRepository.applyOfferToSubscription (cognitive 21) ghost/core/server/services/members/members-api/repositories/member-repository.js:2539— MemberRepository.applyOfferToSubscription has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, boolean chains 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
BookshelfPostsRepository.write (cognitive 21) ghost/core/server/services/content-import/import/post-repository.ts:52— BookshelfPostsRepository.write has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 3 (5 pts), boolean chains 2 (nesting depth added 7). None of this is in the body itself: all 21 points belong to one function literal inside it that branches (line 57). 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.
NewsletterEmailAnalyticsBatchProcessor.processBatch (cognitive 21) ghost/core/server/services/email-analytics/newsletter-email-analytics-batch-processor.js:34— NewsletterEmailAnalyticsBatchProcessor.processBatch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (8 pts), error handling 2 (5 pts), boolean chains 4, loops 2 (4 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.
resolve.resolve (cognitive 21) ghost/core/server/services/remote-flags/resolve.ts:55— resolve.resolve has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MembersCSVImporterStripeUtils.forceStripeSubscriptionToProduct (cognitive 21) ghost/core/server/services/members/import-export/import/stripe-utils.js:54— MembersCSVImporterStripeUtils.forceStripeSubscriptionToProduct has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (12 pts), error handling 2 (5 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 5). 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, 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.
http.http.Http (cognitive 21) REDACTED:57— http.http.Http has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 4, error handling 1, ternaries 1 (nesting depth added 4). Of this number, 19 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
permissible (cognitive 21) ghost/core/server/models/post.js:1530— permissible has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 12, if/else 8 (9 pts) (nesting depth added 1). Of this number, 19 points are the body's own statements and 2 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.
add (cognitive 21) REDACTED:663— add has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 6, ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 5 of the 21 points are its own statements and the rest belongs to 8 function items inside it that branch (resolveRole, a function literal at line 767, getAuthorRole, …). 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.
browse (cognitive 21) ghost/core/server/services/notifications/notifications.js:85— browse has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 6 (nesting depth added 7). None of this is in the body itself: all 21 points belong to one function literal inside it that branches (line 90). 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.
feed-item-stats.FeedItemStats (cognitive 20) apps/activitypub/src/components/feed/feed-item-stats.tsx:28— feed-item-stats.FeedItemStats has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 7, ternaries 3. Of this number, 13 points are the body's own statements and 7 belong to 4 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.
use-activity-pub-queries.useFollowMutationForUser (cognitive 20) apps/activitypub/src/hooks/use-activity-pub-queries.ts:1233— use-activity-pub-queries.useFollowMutationForUser has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (16 pts), ternaries 3 (4 pts) (nesting depth added 3). Most of this is not in the body itself: 6 of the 20 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 1290, 1419, 1253, …). 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.
notifications.Notifications::handleNotificationClick (cognitive 20) apps/activitypub/src/views/notifications/notifications.tsx:359— notifications.Notifications::handleNotificationClick has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 2 (6 pts), boolean chains 2, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This shape REPEATS in the file: one other method here (notifications.Notifications) 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.
use-newsletter-period-stats.fetchNewsletterPeriodStats (cognitive 20) apps/admin/src/analytics/hooks/use-newsletter-period-stats.ts:48— use-newsletter-period-stats.fetchNewsletterPeriodStats has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
invite-user-modal.InviteUserModal (cognitive 20) apps/admin/src/settings/general/invite-user-modal.tsx:48— invite-user-modal.InviteUserModal has cognitive complexity 20 (threshold 15). Drivers by points: if/else 23 (30 pts), boolean chains 18, ternaries 3 (4 pts), error handling 2 (nesting depth added 8). 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 (invite-user-modal.InviteUserModal::handleSubmit) 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.
portal-modal.PortalModal (cognitive 20) apps/admin/src/settings/membership/portal/portal-modal.tsx:99— portal-modal.PortalModal has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 7, ternaries 3, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 121, a function literal at line 170, onSelectURL, …). 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.
history-modal.HistoryModal (cognitive 20) apps/admin/src/settings/advanced/history-modal.tsx:429— history-modal.HistoryModal has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, ternaries 5 (9 pts), if/else 1 (nesting depth added 4). Of this number, 14 points are the body's own statements and 6 belong to 4 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.
unsubscribe-modal.UnsubscribeModal (cognitive 20) apps/admin/src/members/components/bulk-action-modals/unsubscribe-modal.tsx:30— unsubscribe-modal.UnsubscribeModal has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, if/else 6, ternaries 5 (6 pts) (nesting depth added 1). Of this number, 11 points are the body's own statements and 9 belong to 9 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.
mapping.detectFieldTypes (cognitive 20) apps/admin/src/members/components/bulk-action-modals/import-members/mapping.ts:191— mapping.detectFieldTypes has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
post-list-row.PostListRowComponent (cognitive 20) apps/admin/src/posts/list/components/post-list-row.tsx:136— post-list-row.PostListRowComponent has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 11 (13 pts), boolean chains 7 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
slug-machine.reduceSlug (cognitive 20) apps/admin/src/editor/engine/slug-machine.ts:383— slug-machine.reduceSlug has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
post-list-row-email-status.PostListRowEmailStatus (cognitive 20) apps/admin/src/posts/list/components/post-list-row-email-status.tsx:22— post-list-row-email-status.PostListRowEmailStatus has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6, ternaries 2 (4 pts) (nesting depth added 3). Of this number, 11 points are the body's own statements and 9 belong to 3 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.
export-all-modal.ExportAllModal (cognitive 20) apps/admin/src/settings/advanced/migration-tools/export-all-modal.tsx:81— export-all-modal.ExportAllModal has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (5 pts), error handling 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 3). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 6 function items inside it that branch (startExport, handleOpenChange, a function literal at line 96, …). 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.
color-picker-field.ColorPickerField (cognitive 20) apps/admin/src/settings/components/color-picker-field.tsx:63— color-picker-field.ColorPickerField has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8, boolean chains 6, ternaries 6. 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 (a function literal at line 146, a function literal at line 85, 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.
relative-date-filter.RelativeDateFilter (cognitive 20) apps/admin/src/shared/filters/relative-date-filter.tsx:27— relative-date-filter.RelativeDateFilter has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (9 pts), if/else 5 (7 pts), boolean chains 4 (nesting depth added 5). Of this number, 11 points are the body's own statements and 9 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.
popover.Popover (cognitive 20) apps/portal/src/components/common/popover.tsx:134— popover.Popover has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9, boolean chains 8, ternaries 3. Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 152, 201, 212, …). 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.
App.componentDidUpdate (cognitive 20) REDACTED:126— App.componentDidUpdate has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, error handling 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.
code-editor-view.CodeEditorView (cognitive 20) apps/shade/src/components/ui/code-editor-view.tsx:54— code-editor-view.CodeEditorView has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9, boolean chains 7, ternaries 4. Of this number, 10 points are the body's own statements and 10 belong to 6 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.
app.App (cognitive 20) apps/sodo-search/src/app.tsx:43— app.App has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10, boolean chains 7, error handling 2, ternaries 1. Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 8 function literals inside it that branch (lines 171, 149, 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.
utils.mergeInto (cognitive 20) ghost/core/shared/config/utils.ts:92— utils.mergeInto has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 3 (9 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.
LazyUrlService.getRequiredRelations (cognitive 20) ghost/core/server/services/url/lazy-url-service.ts:259— LazyUrlService.getRequiredRelations has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 2, 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.
RouterController._getSubscriptionCheckoutData (cognitive 20) ghost/core/server/services/members/members-api/controllers/router-controller.js:468— RouterController._getSubscriptionCheckoutData has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SettingsBREADService.edit (cognitive 20) ghost/core/server/services/settings/settings-bread-service.js:201— SettingsBREADService.edit has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4 (nesting depth added 7). Of this number, 14 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.
parse.parseWithSource (cognitive 20) ghost/core/server/services/content-import/csv/parse.ts:52— parse.parseWithSource has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (3 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.
resolve.checkAdminApiRequest (cognitive 20) packages/app-contracts/src/bridge/resolve.ts:61— resolve.checkAdminApiRequest has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sendBatches (cognitive 20) ghost/core/server/services/email-service/batch-sending-service.js:1169— sendBatches has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, loops 1, other 1 (nesting depth added 6). Most of this is not in the body itself: 9 of the 20 points are its own statements and the rest belongs to 4 function items inside it that branch (runWorker, a function literal at line 1225, a function literal at line 1234, …). 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.
edit (cognitive 20) REDACTED:586— edit has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
#addTagsToPosts (cognitive 20) ghost/core/server/services/posts/posts-service.js:326— #addTagsToPosts has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (5 pts), boolean chains 2, other 2, ternaries 2 (nesting depth added 5). Of this number, 18 points are the body's own statements and 2 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.
actions.getActionTitle (cognitive 19) apps/admin-x-framework/src/api/actions.ts:184— actions.getActionTitle has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 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.
members.membersCountString (cognitive 19) apps/admin-x-framework/src/api/members.ts:365— members.membersCountString has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7, ternaries 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.
overview.Overview (cognitive 19) apps/admin/src/analytics/views/stats/overview/overview.tsx:84— overview.Overview has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 5, ternaries 5. Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 145, 171, 200, …). 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.
growth-kpis.GrowthKPIs (cognitive 19) apps/admin/src/analytics/views/stats/growth/components/growth-kpis.tsx:158— growth-kpis.GrowthKPIs has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 7, ternaries 6, if/else 4, match/switch 2. Of this number, 13 points are the body's own statements and 6 belong to 3 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.
use-publish-flow.usePublishFlow (cognitive 19) apps/admin/src/editor/publish/use-publish-flow.ts:134— use-publish-flow.usePublishFlow has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 12, if/else 6, ternaries 1. Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 291, 358, 316, …). 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.
editor-header-actions.EditorHeaderActions (cognitive 19) apps/admin/src/editor/editor-header-actions.tsx:192— editor-header-actions.EditorHeaderActions has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (8 pts), if/else 6, boolean chains 5 (nesting depth added 2). Of this number, 12 points are the body's own statements and 7 belong to 4 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.
signup.SignupForm (cognitive 19) apps/admin/src/auth/signup.tsx:42— signup.SignupForm has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 7, ternaries 1 (2 pts), error handling 1 (nesting depth added 2). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 2 function items inside it that branch (submit, problemWith). 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.
editable-email-card.EditableEmailCard (cognitive 19) apps/admin/src/automations/components/canvas/editable-email-card.tsx:108— editable-email-card.EditableEmailCard has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 12, ternaries 4, if/else 2 (3 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.
comments.CommentsPage (cognitive 19) apps/admin/src/comments/comments.tsx:25— comments.CommentsPage has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (11 pts), boolean chains 5, if/else 3 (nesting depth added 6). Of this number, 16 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.
growth-sources.GrowthSources (cognitive 19) apps/admin/src/posts/analytics/growth/components/growth-sources.tsx:147— growth-sources.GrowthSources has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (12 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.
post-debug.DebugContent (cognitive 19) apps/admin/src/posts/debug/post-debug.tsx:34— post-debug.DebugContent has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (11 pts), boolean chains 8 (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.
field-picker.FieldPicker (cognitive 19) apps/admin/src/members/components/bulk-action-modals/import-members/field-picker.tsx:88— field-picker.FieldPicker has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 12, ternaries 4 (5 pts), if/else 2 (nesting depth added 1). Of this number, 16 points are the body's own statements and 3 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.
use-member-filter-fields.useMemberFilterFields (cognitive 19) apps/admin/src/members/use-member-filter-fields.ts:284— use-member-filter-fields.useMemberFilterFields has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (7 pts), if/else 4, loops 2 (4 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 5). None of this is in the body itself: all 19 points belong to 6 function literals inside it that branch (lines 320, 321, 345, …). 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.
gift-link-modal.GiftLinkModal (cognitive 19) apps/admin/src/posts/analytics/modals/gift-link-modal.tsx:44— gift-link-modal.GiftLinkModal has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, boolean chains 6, ternaries 2, error handling 1. Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 74, 127, 143, …). 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.
universal-import-modal.UniversalImportModal::importFile (cognitive 19) apps/admin/src/settings/advanced/migration-tools/universal-import-modal.tsx:51— universal-import-modal.UniversalImportModal::importFile has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, error handling 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (universal-import-modal.UniversalImportModal) 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.
universal-import-modal.UniversalImportModal (cognitive 19) apps/admin/src/settings/advanced/migration-tools/universal-import-modal.tsx:22— universal-import-modal.UniversalImportModal has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 12 (20 pts), if/else 8 (14 pts), boolean chains 6, error handling 3 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (universal-import-modal.UniversalImportModal::importFile) 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.
use-pintura-editor.usePinturaEditor (cognitive 19) apps/admin/src/settings/hooks/use-pintura-editor.ts:49— use-pintura-editor.usePinturaEditor has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, boolean chains 5, error handling 2. Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 108, 66, 67, …). 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.
chip-picker.ChipPicker::handleKeyDown (cognitive 19) apps/admin/src/shared/pickers/chip-picker.tsx:371— chip-picker.ChipPicker::handleKeyDown has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6, ternaries 1 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (chip-picker.ChipPicker) 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.
vite-front-door.ghostFrontDoorPlugin.configureServer (cognitive 19) REDACTED:108— vite-front-door.ghostFrontDoorPlugin.configureServer has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2, loops 2 (nesting depth added 5). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 6 function items inside it that branch (a function literal at line 182, a function literal at line 210, a function literal at line 135, …). 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.
admin-api.setupAdminAPI (cognitive 19) apps/comments-ui/src/utils/admin-api.ts:1— admin-api.setupAdminAPI has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 3, error handling 1 (nesting depth added 1). Of this number, 15 points are the body's own statements and 4 belong 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.
products-section.FreeProductCard (cognitive 19) apps/portal/src/components/common/products-section.jsx:690— products-section.FreeProductCard has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 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, 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.
account-welcome.AccountWelcome (cognitive 19) apps/portal/src/components/pages/AccountHomePage/components/account-welcome.jsx:16— account-welcome.AccountWelcome has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
filters.FilterDatePicker (cognitive 19) REDACTED:693— filters.FilterDatePicker has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 3, ternaries 2 (nesting depth added 2). 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 items inside it that branch (handleInputBlur, handleSelect, a function literal at line 722, …). 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.
sentry.beforeSend (cognitive 19) ghost/core/shared/sentry.js:11— sentry.beforeSend has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, 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.
LazyUrlService.getRequiredFields (cognitive 19) ghost/core/server/services/url/lazy-url-service.ts:290— LazyUrlService.getRequiredFields has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). Of this number, 17 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.
CheckoutSessionEventService.handleSetupEvent (cognitive 19) ghost/core/server/services/stripe/services/webhook/checkout-session-event-service.js:318— CheckoutSessionEventService.handleSetupEvent has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 2 (5 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StripeCoupon.create (cognitive 19) ghost/core/server/services/offers/domain/models/stripe-coupon.js:48— StripeCoupon.create has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 9. 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.
MemberRepository.updateSubscription (cognitive 19) ghost/core/server/services/members/members-api/repositories/member-repository.js:2427— MemberRepository.updateSubscription has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 1, ternaries 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.
og-image.getOgImage (cognitive 19) ghost/core/frontend/meta/og-image.js:6— og-image.getOgImage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 5, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
renderer.renderer (cognitive 19) ghost/core/frontend/services/rendering/renderer.js:17— renderer.renderer has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 5). Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 45). 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.
twitter-image.getTwitterImage (cognitive 19) ghost/core/frontend/meta/twitter-image.js:6— twitter-image.getTwitterImage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 5, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
has.has (cognitive 19) ghost/core/frontend/helpers/has.js:129— has.has has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 17, if/else 2. Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 145, 148, 151, …). 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.
DataGenerator.importData (cognitive 19) ghost/core/server/data/seeders/data-generator.js:198— DataGenerator.importData has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3 (5 pts), ternaries 1 (2 pts) (nesting depth added 7). Of this number, 17 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.
StaffService.handleEvent (cognitive 19) ghost/core/server/services/staff/staff-service.js:106— StaffService.handleEvent has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), error handling 2 (6 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
createTable (cognitive 19) ghost/core/server/data/schema/commands.js:678— createTable has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5, other 1 (nesting depth added 4). None of this is in the body itself: all 19 points belong to 7 function literals inside it that branch (lines 685, 704, 679, …). 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.
buildBookmarkData (cognitive 19) REDACTED:683— buildBookmarkData has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 3 (9 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.
edit (cognitive 19) ghost/core/server/models/settings.js:280— edit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 2 (nesting depth added 7). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 2 function items inside it that branch ((anonymous)::then, a function literal at line 289). 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.
extendModel::permissible (cognitive 19) ghost/core/server/models/relations/authors.js:354— extendModel::permissible has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 12, if/else 7. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity· single (cognitive 19) · ×1
single (cognitive 19) ghost/core/server/web/api/middleware/upload.js:115— single has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 3 (nesting depth added 8). None of this is in the body itself: all 19 points belong to 3 function items inside it that branch (a function literal at line 119, singleUploadFunction::(anonymous)::deleteFiles, singleUploadFunction). 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.
.pnpmfile.beforePacking (cognitive 18) .pnpmfile.mjs:27— .pnpmfile.beforePacking has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
url-helpers.generateTitleFromPath (cognitive 18) apps/admin/src/analytics/utils/url-helpers.ts:33— url-helpers.generateTitleFromPath has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 6, boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
confirm-step.ConfirmStep (cognitive 18) apps/admin/src/editor/publish/components/confirm-step.tsx:42— confirm-step.ConfirmStep has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 11 (16 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
use-publish-flow.usePublishFlow.confirmPublish (cognitive 18) apps/admin/src/editor/publish/use-publish-flow.ts:532— use-publish-flow.usePublishFlow.confirmPublish has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), error handling 2, boolean chains 1 (nesting depth added 4). Of this number, 17 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.
publish-flow-modal.PublishFlowDialog (cognitive 18) apps/admin/src/editor/publish/publish-flow-modal.tsx:157— publish-flow-modal.PublishFlowDialog has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (10 pts), boolean chains 4, if/else 4 (nesting depth added 4). Of this number, 11 points are the body's own statements and 7 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
save-engine.createSaveEngine.reauthSucceeded (cognitive 18) apps/admin/src/editor/engine/save-engine.ts:1070— save-engine.createSaveEngine.reauthSucceeded has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
use-leave-guard.useEditorLeaveGuard (cognitive 18) apps/admin/src/editor/session/use-leave-guard.ts:35— use-leave-guard.useEditorLeaveGuard has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 2, ternaries 2 (nesting depth added 1). None of this is in the body itself: all 18 points belong to 9 function literals inside it that branch (lines 131, 99, 149, …). 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.
custom-integration-modal.CustomIntegrationModalContent (cognitive 18) apps/admin/src/settings/advanced/integrations/custom-integration-modal.tsx:30— custom-integration-modal.CustomIntegrationModalContent has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 3 (4 pts), ternaries 4, error handling 2 (nesting depth added 1). Of this number, 9 points are the body's own statements and 9 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.
signin.Signin (cognitive 18) apps/admin/src/auth/signin.tsx:22— signin.Signin has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8, boolean chains 7, error handling 2, ternaries 1. Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 3 function items inside it that branch (signIn, sendPasswordReset, a function literal at line 133). 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.
member-activity-feed.MemberActivityFeed (cognitive 18) apps/admin/src/members/detail/member-activity-feed.tsx:224— member-activity-feed.MemberActivityFeed has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (8 pts), boolean chains 6, loops 1 (3 pts), if/else 1 (nesting depth added 5). Of this number, 14 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.
member-detail-sidebar.MemberDetailSidebar (cognitive 18) apps/admin/src/members/detail/member-detail-sidebar.tsx:49— member-detail-sidebar.MemberDetailSidebar has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 17, ternaries 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.
analytics-sync.AnalyticsSync (cognitive 18) apps/admin/src/posts/debug/analytics-sync.tsx:112— analytics-sync.AnalyticsSync has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, error handling 3 (4 pts), if/else 4 (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.
emails.EmailsGroup (cognitive 18) apps/admin/src/settings/email/emails.tsx:82— emails.EmailsGroup has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, if/else 5 (6 pts), ternaries 4, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 115, 104, 98). 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.
chip-picker.ChipPicker (cognitive 18) apps/admin/src/shared/pickers/chip-picker.tsx:141— chip-picker.ChipPicker has cognitive complexity 18 (threshold 15). Drivers by points: if/else 20 (24 pts), boolean chains 17, ternaries 12 (16 pts) (nesting depth added 8). 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 (chip-picker.ChipPicker::handleKeyDown) 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.
content.Content (cognitive 18) apps/comments-ui/src/components/content/content.tsx:33— content.Content has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, ternaries 5 (8 pts), if/else 1 (nesting depth added 3). Of this number, 15 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.
errors.chooseBestErrorMessage (cognitive 18) apps/portal/src/utils/errors.js:83— errors.chooseBestErrorMessage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 4, ternaries 1 (nesting depth added 1). Of this number, 10 points are the body's own statements and 8 belong to 4 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.
recommendations-page.RecommendationsPage (cognitive 18) apps/portal/src/components/pages/recommendations-page.jsx:324— recommendations-page.RecommendationsPage has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (7 pts), ternaries 2 (nesting depth added 1). Of this number, 17 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.
loader.loadAdapterClass (cognitive 18) ghost/core/kernel/adapter-manager/loader.ts:135— loader.loadAdapterClass 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.
MailgunClient.#fetchEventsFromDomain (cognitive 18) ghost/core/server/lib/mailgun/mailgun-client.js:261— MailgunClient.#fetchEventsFromDomain has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 2 (4 pts), ternaries 4, error handling 1, loops 1 (nesting depth added 2). Of this number, 17 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.
GiftService.startCheckout (cognitive 18) ghost/core/server/services/gifts/gift-service.ts:330— GiftService.startCheckout has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, ternaries 4, error handling 2 (3 pts), boolean chains 1 (nesting depth added 1). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
StripeAPI.getCustomerIdByEmail (cognitive 18) ghost/core/server/services/stripe/stripe-api.js:505— StripeAPI.getCustomerIdByEmail has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (5 pts), boolean chains 2, 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.
RouterController.getMemberOffers (cognitive 18) ghost/core/server/services/members/members-api/controllers/router-controller.js:1252— RouterController.getMemberOffers has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, boolean chains 5, error handling 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
EmailAnalyticsServiceWrapper._logJobCompletion (cognitive 18) ghost/core/server/services/email-analytics/email-analytics-service-wrapper.ts:80— EmailAnalyticsServiceWrapper._logJobCompletion has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 10 (12 pts), if/else 3 (4 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
url.getUrl (cognitive 18) ghost/core/frontend/meta/url.js:23— url.getUrl has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 2 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
upload.single.singleUploadFunction (cognitive 18) ghost/core/server/web/api/middleware/upload.js:116— upload.single.singleUploadFunction has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2 (nesting depth added 8). None of this is in the body itself: all 18 points belong to 2 function literals inside it that branch (lines 119, 151). 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.
MemberWelcomeEmailRenderer.render (cognitive 18) ghost/core/server/services/member-welcome-emails/member-welcome-email-renderer.js:121— MemberWelcomeEmailRenderer.render has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 13, if/else 2, ternaries 2, error handling 1. Of this number, 14 points are the body's own statements and 4 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.
PostsStatsService._generateTitleFromPath (cognitive 18) ghost/core/server/services/stats/posts-stats-service.js:271— PostsStatsService._generateTitleFromPath has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 6, boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
moderateComment (cognitive 18) ghost/core/server/services/comments/comments-service.js:648— moderateComment has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, 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.
nav-content.NavContent (cognitive 17) apps/admin/src/layout/app-sidebar/nav-content.tsx:77— nav-content.NavContent has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 15, if/else 1, ternaries 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.
content-text.renderedTextOf (cognitive 17) apps/admin/src/editor/session/content-text.ts:127— content-text.renderedTextOf has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, ternaries 2 (nesting depth added 2). 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: 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.
use-writing-focus.useWritingFocus (cognitive 17) apps/admin/src/editor/use-writing-focus.ts:41— use-writing-focus.useWritingFocus has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 8, ternaries 1. Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 70, 61, 48, …). 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.
url-suggestion-input.UrlSuggestionInput::handleKeyDown (cognitive 17) apps/admin/src/settings/site/navigation/url-suggestion-input.tsx:157— url-suggestion-input.UrlSuggestionInput::handleKeyDown has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 3 (7 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
change-password-form.ChangePasswordForm::validate (cognitive 17) apps/admin/src/settings/general/users/change-password-form.tsx:73— change-password-form.ChangePasswordForm::validate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 3, loops 2, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
profile-tab.BasicInputs (cognitive 17) apps/admin/src/settings/general/users/profile-tab.tsx:19— profile-tab.BasicInputs has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 13, ternaries 4. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
portal-links.PortalLinks (cognitive 17) apps/admin/src/settings/membership/portal/portal-links.tsx:46— portal-links.PortalLinks has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 13, boolean chains 3, if/else 1. Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
stripe-connect-modal.StripeConnectModal (cognitive 17) apps/admin/src/settings/membership/stripe/stripe-connect-modal.tsx:372— stripe-connect-modal.StripeConnectModal has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 6, error handling 1 (2 pts), ternaries 1 (nesting depth added 3). Of this number, 9 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
add-newsletter-modal.AddNewsletterModal (cognitive 17) apps/admin/src/settings/email/newsletters/add-newsletter-modal.tsx:29— add-newsletter-modal.AddNewsletterModal has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6, ternaries 4 (6 pts), boolean chains 5 (nesting depth added 2). Of this number, 11 points are the body's own statements and 6 belong to 4 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.
offers-container-modal.OffersRouteHandler (cognitive 17) apps/admin/src/settings/growth/offers/offers-container-modal.tsx:21— offers-container-modal.OffersRouteHandler has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 3 (6 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tier-scope-picker.TierScopePicker::handleKeyDown (cognitive 17) apps/admin/src/automations/components/canvas/tier-scope-picker.tsx:208— tier-scope-picker.TierScopePicker::handleKeyDown has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 6, ternaries 1 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (tier-scope-picker.TierScopePicker) 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.
status-cards.StatusCards (cognitive 17) apps/admin/src/automations/components/canvas/status-cards.tsx:39— status-cards.StatusCards has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 14 (17 pts) (nesting depth added 3). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 44). 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.
members-header-search.MembersHeaderSearch (cognitive 17) apps/admin/src/members/components/members-header-search.tsx:16— members-header-search.MembersHeaderSearch has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 5 (6 pts), ternaries 5 (nesting depth added 1). Of this number, 9 points are the body's own statements and 8 belong to 4 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.
label-picker.LabelListItems (cognitive 17) apps/admin/src/members/label-picker/label-picker.tsx:116— label-picker.LabelListItems has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 5, ternaries 3 (4 pts), error handling 1, loops 1 (nesting depth added 1). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 7 function items inside it that branch (handleCreate, a function literal at line 135, a function literal at line 184, …). 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.
activity-row.ActivityRow (cognitive 17) apps/admin/src/members/activity/activity-row.tsx:26— activity-row.ActivityRow has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, ternaries 6 (7 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.
comment.PublishedComment (cognitive 17) apps/comments-ui/src/components/content/comment.tsx:145— comment.PublishedComment has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 3 (4 pts), ternaries 4 (nesting depth added 1). Of this number, 11 points are the body's own statements and 6 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.
main-form.MainForm (cognitive 17) apps/comments-ui/src/components/content/forms/main-form.tsx:11— main-form.MainForm has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, loops 1, ternaries 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 4 function literals inside it that branch (lines 49, 15, 42, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
actions.signup (cognitive 17) apps/portal/src/actions.js:228— actions.signup has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, ternaries 1 (2 pts), error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
build-docs.convertMdx::inline (cognitive 17) REDACTED:889— build-docs.convertMdx::inline has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 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. This shape REPEATS in the file: one other method here (build-docs.convertMdx) 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.
popup-modal.Search (cognitive 17) apps/sodo-search/src/components/popup-modal.tsx:582— popup-modal.Search has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, ternaries 2 (nesting depth added 2). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 620, 614, 656). 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.
actions.default (cognitive 17) ghost/core/server/models/base/plugins/actions.js:12— actions.default has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (8 pts) (nesting depth added 1). Of this number, 9 points are the body's own statements and 8 belong to 4 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.
CacheManager._doGet (cognitive 17) ghost/core/shared/settings-cache/cache-manager.js:121— CacheManager._doGet has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 8, error handling 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.
members.serializeMember (cognitive 17) ghost/core/server/api/endpoints/utils/serializers/output/members.js:96— members.serializeMember has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SettingsBREADService.prepSettingsForEmailVerification (cognitive 17) ghost/core/server/services/settings/settings-bread-service.js:416— SettingsBREADService.prepSettingsForEmailVerification has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (16 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.
Base.handleError (cognitive 17) ghost/core/server/data/importer/importers/data/base.js:111— Base.handleError has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 1 (nesting depth added 5). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 120). 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.
extract-metadata.searchSchema (cognitive 17) ghost/core/server/services/oembed/extract-metadata.ts:334— extract-metadata.searchSchema has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 4). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
GiftEmailAnalyticsBatchProcessor.processBatch (cognitive 17) ghost/core/server/services/email-analytics/gift-email-analytics-batch-processor.ts:29— GiftEmailAnalyticsBatchProcessor.processBatch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
middleware.tokenPermissionCheck (cognitive 17) ghost/core/server/web/api/endpoints/admin/middleware.js:17— middleware.tokenPermissionCheck has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (8 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
MilestonesService.#runMemberQueries (cognitive 17) ghost/core/server/services/milestones/milestones-service.js:295— MilestonesService.#runMemberQueries has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
boot.bootGhost (cognitive 17) ghost/core/boot.js:700— boot.bootGhost has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (15 pts), error handling 2 (nesting depth added 3). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: 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.
CustomThemeSettingsService._syncRepositoryWithTheme (cognitive 17) ghost/core/server/services/custom-theme-settings/custom-theme-settings-service.js:230— CustomThemeSettingsService._syncRepositoryWithTheme has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 5, ternaries 1 (3 pts), loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NewslettersService.add (cognitive 17) ghost/core/server/services/newsletters/newsletters-service.js:150— NewslettersService.add has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 4, ternaries 2 (4 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PostsStatsService._buildFreeMembersSubquery (cognitive 17) ghost/core/server/services/stats/posts-stats-service.js:475— PostsStatsService._buildFreeMembersSubquery has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 4 (nesting depth added 2). Of this number, 13 points are the body's own statements and 4 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, 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.
_getImageSizeFromUrl (cognitive 17) ghost/core/server/lib/image/image-size.js:183— _getImageSizeFromUrl has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6, error handling 1 (nesting depth added 3). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 211, 202). 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.
use-activity-pub-queries.useUnfollowMutationForUser (cognitive 16) apps/activitypub/src/hooks/use-activity-pub-queries.ts:989— use-activity-pub-queries.useUnfollowMutationForUser has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (13 pts), ternaries 3 (nesting depth added 1). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 1009, 1028, 1094, …). 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.
components.Toolbar (cognitive 16) apps/admin-toolbar/src/components.ts:163— components.Toolbar has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, boolean chains 5, ternaries 3. Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 187, a function literal at line 207, a function literal at line 227, …). 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.
use-growth-stats.calculateTotals (cognitive 16) apps/admin/src/analytics/hooks/use-growth-stats.ts:18— use-growth-stats.calculateTotals has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 3 (6 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
theme-preview.ThemePreview (cognitive 16) apps/admin/src/settings/site/design-and-branding/theme-preview.tsx:88— theme-preview.ThemePreview has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 4, ternaries 4 (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 127, 104). 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.
theme-file-tree.ThemeFileTree (cognitive 16) apps/admin/src/settings/site/theme/theme-file-tree.tsx:100— theme-file-tree.ThemeFileTree has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, ternaries 4 (7 pts), if/else 1 (nesting depth added 3). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 3 function items inside it that branch (renderTreeNode, a function literal at line 151, a function literal at line 178). 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.
theme-code-editor-modal.ThemeCodeEditorModal (cognitive 16) apps/admin/src/settings/site/theme/theme-code-editor-modal.tsx:298— theme-code-editor-modal.ThemeCodeEditorModal has cognitive complexity 16 (threshold 15). Drivers by points: if/else 55 (70 pts), ternaries 21 (28 pts), boolean chains 24, loops 3, error handling 2 (nesting depth added 22). 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 (theme-code-editor-modal.ThemeCodeEditorModal::handleRenameSelected, theme-code-editor-modal.ThemeCodeEditorModal::handleSave) 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.
user-detail-modal.UserDetailModal (cognitive 16) apps/admin/src/settings/general/user-detail-modal.tsx:655— user-detail-modal.UserDetailModal has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 5, ternaries 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, 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.
offers-index.OffersIndexModal (cognitive 16) apps/admin/src/settings/growth/offers/offers-index.tsx:335— offers-index.OffersIndexModal has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 7, ternaries 1. 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 items inside it that branch (a function literal at line 363, a function literal at line 426, 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.
automations-list.AutomationsList (cognitive 16) apps/admin/src/automations/components/automations-list.tsx:117— automations-list.AutomationsList has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, ternaries 5 (6 pts), if/else 3 (nesting depth added 1). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 188, 127). 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.
member-subscriptions-section.MemberSubscriptionsSection (cognitive 16) apps/admin/src/members/detail/member-subscriptions-section.tsx:196— member-subscriptions-section.MemberSubscriptionsSection has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7 (10 pts), boolean chains 5, if/else 1 (nesting depth added 3). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
label-filter-renderer.LabelFilterRenderer (cognitive 16) apps/admin/src/members/label-picker/label-filter-renderer.tsx:19— label-filter-renderer.LabelFilterRenderer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, ternaries 4, boolean chains 3, error handling 1. Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 53, 33, 114, …). 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.
use-post-selection.usePostSelection (cognitive 16) apps/admin/src/posts/list/hooks/use-post-selection.ts:47— use-post-selection.usePostSelection has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 8. Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 91, 131, 83, …). 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.
history-email-preview.emailTextExcerpt (cognitive 16) apps/admin/src/automations/utils/history-email-preview.ts:24— history-email-preview.emailTextExcerpt has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (3 pts), match/switch 1, ternaries 1 (nesting depth added 5). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to one function item inside it that branches (read). 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.
local-revisions.writeLocalRevision (cognitive 16) apps/admin/src/editor/local-revisions.ts:127— local-revisions.writeLocalRevision has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (13 pts), error handling 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
post-row-copy.getPostStatusDetail (cognitive 16) apps/admin/src/posts/list/post-row-copy.ts:156— post-row-copy.getPostStatusDetail has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
iframe-buffering.IframeBuffering (cognitive 16) apps/admin/src/settings/utils/iframe-buffering.tsx:19— iframe-buffering.IframeBuffering has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 3, error handling 1 (2 pts), boolean chains 1 (nesting depth added 3). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 53, 91, 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.
filter-addressing.composeCodec (cognitive 16) apps/admin/src/shared/filters/filter-addressing.ts:136— filter-addressing.composeCodec has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), ternaries 2 (3 pts) (nesting depth added 9). 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 204, 188). 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.
helpers.getScrollToPosition (cognitive 16) apps/comments-ui/src/utils/helpers.ts:178— helpers.getScrollToPosition has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (8 pts), loops 3 (7 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.
bottom-sheet.BottomSheet (cognitive 16) apps/portal/src/components/common/bottom-sheet.tsx:123— bottom-sheet.BottomSheet has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, boolean chains 5, ternaries 2. Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 180, 138, 130, …). 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.
account-plan-page.getRetentionOfferMessage (cognitive 16) apps/portal/src/components/pages/account-plan-page.jsx:331— account-plan-page.getRetentionOfferMessage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
recommendations-page.RecommendationItem (cognitive 16) apps/portal/src/components/pages/recommendations-page.jsx:195— recommendations-page.RecommendationItem has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 6, error handling 2 (nesting depth added 1). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 211, 243, 268, …). 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.
account-email-page.AccountEmailPage (cognitive 16) apps/portal/src/components/pages/account-email-page.jsx:8— account-email-page.AccountEmailPage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, boolean chains 5, ternaries 3 (4 pts) (nesting depth added 1). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 5 function items inside it that branch (HeaderNotification, a function literal at line 30, a function literal at line 126, …). 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.
plan-step.GiftPlanStep (cognitive 16) apps/portal/src/components/pages/gift/plan-step.tsx:74— plan-step.GiftPlanStep has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, ternaries 6. Of this number, 8 points are the body's own statements and 8 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.
build-docs.summarise (cognitive 16) REDACTED:1071— build-docs.summarise has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 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.
duplicate-deps.checkDuplicateDependencies (cognitive 16) ghost/bin/lib/duplicate-deps.ts:179— duplicate-deps.checkDuplicateDependencies has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BlogIcon.getIconUrl (cognitive 16) ghost/core/server/lib/image/blog-icon.js:107— BlogIcon.getIconUrl has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 4 (6 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.
MailgunClient.send (cognitive 16) ghost/core/server/lib/mailgun/mailgun-client.js:40— MailgunClient.send has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 3, ternaries 2, error handling 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MailgunEmailProvider.send (cognitive 16) ghost/core/server/services/email-service/mailgun-email-provider.js:104— MailgunEmailProvider.send has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, error handling 1, ternaries 1 (nesting depth added 2). 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: 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.
GhostMailer.send (cognitive 16) ghost/core/server/lib/mail/ghost-mailer.js:161— GhostMailer.send has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 1 (3 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReferrerTranslator.getReferrerDetails (cognitive 16) ghost/core/server/services/member-attribution/referrer-translator.js:38— ReferrerTranslator.getReferrerDetails has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 4 (7 pts), loops 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RouterController.sendMagicLink (cognitive 16) ghost/core/server/services/members/members-api/controllers/router-controller.js:953— RouterController.sendMagicLink has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 1, 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, 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.
members-api.MembersAPI.getMemberDataFromMagicLinkToken (cognitive 16) ghost/core/server/services/members/members-api/members-api.js:289— members-api.MembersAPI.getMemberDataFromMagicLinkToken has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 3, error handling 1 (2 pts), ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
PostsImporter.replaceIdentifiers (cognitive 16) ghost/core/server/data/importer/importers/data/posts-importer.js:134— PostsImporter.replaceIdentifiers has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 2 (nesting depth added 1). None of this is in the body itself: all 16 points belong to 4 function items inside it that branch (a function literal at line 147, run, a function literal at line 219, …). 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.
row.importableRowSchema (cognitive 16) ghost/core/server/services/content-import/import/row.ts:101— row.importableRowSchema has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 4, loops 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.
entry.entryController (cognitive 16) ghost/core/frontend/services/routing/controllers/entry.ts:55— entry.entryController has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 2, error handling 2, ternaries 2 (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.
asset-url.getAssetUrl (cognitive 16) ghost/core/frontend/meta/asset-url.js:104— asset-url.getAssetUrl has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 3, ternaries 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.
post_class.post_class (cognitive 16) ghost/core/frontend/helpers/post_class.js:9— post_class.post_class has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 4, ternaries 4. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
MachinePaymentsService.#handleFulfill (cognitive 16) ghost/core/server/services/machine-payments/service.ts:203— MachinePaymentsService.#handleFulfill has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), error handling 3 (5 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UpdateCheckService.createCustomNotification (cognitive 16) ghost/core/server/services/update-check/update-check-service.js:291— UpdateCheckService.createCustomNotification has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), boolean chains 3, error handling 1 (3 pts), 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.
rough-size.roughSize::walk (cognitive 16) ghost/core/server/adapters/cache/rough-size.ts:43— rough-size.roughSize::walk has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, loops 3 (5 pts), boolean chains 3, match/switch 1 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StaffServiceEmails.notifyPaidSubscriptionStarted (cognitive 16) ghost/core/server/services/staff/staff-service-emails.js:79— StaffServiceEmails.notifyPaidSubscriptionStarted has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), boolean chains 5, ternaries 1 (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.
ContentStatsService.enrichTopContentData (cognitive 16) ghost/core/server/services/stats/content-stats-service.js:238— ContentStatsService.enrichTopContentData has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, error handling 1 (2 pts) (nesting depth added 3). 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 249, 303). 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.
setupGhostApi::checkoutGift (cognitive 16) apps/portal/src/utils/api.js:736— setupGhostApi::checkoutGift has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 9, if/else 4 (5 pts), error handling 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.
handleDonationEvent (cognitive 16) ghost/core/server/services/stripe/services/webhook/checkout-session-event-service.js:272— handleDonationEvent has cognitive complexity 16 (threshold 15). Drivers by points: other 14, ternaries 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MembersAPI.getMemberDataFromMagicLinkToken (cognitive 16) ghost/core/server/services/members/members-api/members-api.js:289— MembersAPI.getMemberDataFromMagicLinkToken has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 3, error handling 1 (2 pts), ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
sortTableList (cognitive 16) ghost/core/server/data/seeders/data-generator.js:54— sortTableList has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (6 pts), boolean chains 5, loops 3 (5 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Anemic entity: SubscribeEvent ghost/core/server/services/recommendations/service/subscribe-event.ts:3— `SubscribeEvent` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
IC1 · Incompleteness & stubs· Guard cannot change the result · ×1
Guard cannot change the result — returns what the code already falls through to ghost/core/server/lib/image/blog-icon.js:83— The guard above `return 'png';` also returns `'png'`, so no input can make it matter. Implement the distinction that was intended, or delete the guard.
Duplication concentrated across 20 sibling directories (102 clone groups) apps/admin/src/members/detail/member-detail.tsx:82— 102 duplicated blocks under apps/admin/src/ have copies in at least two of the sibling directories analytics, apps, auth, automations, billing, comments (+14 more sibling(s) not listed) — 60 of them are reported below, and 42 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 102 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 102 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 102 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 10 sibling directories (60 clone groups) apps/admin/src/settings/components/code-editor-view.tsx:99— 60 duplicated blocks under apps/ have copies in at least two of the sibling directories activitypub, admin, admin-toolbar, admin-x-framework, announcement-bar, comments-ui (+4 more sibling(s) not listed) — 33 of them are reported below, and 27 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 60 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 60 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 60 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 41 sibling directories (59 clone groups) ghost/core/server/services/indexnow-ping/indexnow-ping-service.ts:61— 59 duplicated blocks under ghost/core/server/services/ have copies in at least two of the sibling directories app-installations, audience-feedback, automations, comments, content-import, donations (+35 more sibling(s) not listed) — 24 of them are reported below, and 35 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 59 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 59 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 59 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 8 sibling directories (56 clone groups) apps/admin/src/settings/advanced/history-modal.tsx:108— 56 duplicated blocks under apps/admin/src/settings/ have copies in at least two of the sibling directories advanced, components, email, email-design, general, growth (+2 more sibling(s) not listed) — 29 of them are reported below, and 27 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 56 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 56 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 56 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 43 sibling directories (32 clone groups) ghost/core/server/data/migrations/versions/5.3/2022-07-06-09-26-add-ghost-explore-integration-api-key.js:10— 32 duplicated blocks under ghost/core/server/data/migrations/versions/ have copies in at least two of the sibling directories 5.0, 5.10, 5.100, 5.102, 5.11, 5.113 (+37 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) apps/comments-ui/tailwind.config.js:1— 19 duplicated blocks under the repository root have copies in at least two of the sibling directories apps, ghost, koenig, packages, tools — 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 8 sibling directories (16 clone groups) ghost/core/server/data/importer/import-manager.js:30— 16 duplicated blocks under ghost/core/server/ have copies in at least two of the sibling directories adapters, api, auth, data, lib, models (+2 more sibling(s) not listed) — 4 of them are reported below, and 12 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 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 5 sibling directories (12 clone groups) apps/activitypub/src/views/feed/components/feed-list.tsx:34— 12 duplicated blocks under apps/activitypub/src/views/ have copies in at least two of the sibling directories feed, inbox, notifications, preferences, profile — 11 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 12 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 12 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 12 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 2 sibling directories (8 clone groups) apps/activitypub/src/components/global/suggested-profiles.tsx:22— 8 duplicated blocks under apps/activitypub/src/ have copies in at least two of the sibling directories components, views — 5 of them are reported below, and 3 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 8 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 8 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 8 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 3 sibling directories (6 clone groups) ghost/core/frontend/services/data/match-permalink-params.js:6— 6 duplicated blocks under ghost/core/ have copies in at least two of the sibling directories frontend, server, shared — 4 of them are reported below, and 2 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 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 6 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 (5 clone groups) apps/admin/src/posts/analytics/newsletter/newsletter.tsx:588— 5 duplicated blocks under apps/admin/src/posts/analytics/ have copies in at least two of the sibling directories growth, newsletter, overview, web — 3 of them are reported below, and 2 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 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 5 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 2 sibling directories (5 clone groups) REDACTED:1697— 5 duplicated blocks under apps/shade/src/components/ have copies in at least two of the sibling directories patterns, ui — 1 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 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 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 5 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 (183 matched lines × 2 locations) · ×1
Duplicated block with local edits (183 matched lines × 2 locations) apps/admin/src/members/detail/member-detail.tsx:82— apps/admin/src/members/detail/member-detail.tsx:82 · apps/admin/src/tags/detail/tag-detail.tsx:58 — the two spans are one implementation copied and then locally edited — 864 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 (182 matched lines × 2 locations) · ×1
Duplicated block with local edits (182 matched lines × 2 locations) apps/admin/src/automations/components/email-modal/email-content-modal.tsx:57— apps/admin/src/automations/components/email-modal/email-content-modal.tsx:57 · apps/admin/src/settings/membership/member-emails/welcome-email-modal.tsx:64 — the two spans are one implementation copied and then locally edited — 846 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 (144 matched lines × 2 locations) · ×1
Duplicated block with local edits (144 matched lines × 2 locations) apps/shade/src/components/ui/context-menu.tsx:8— apps/shade/src/components/ui/context-menu.tsx:8 · apps/shade/src/components/ui/dropdown-menu.tsx:8 — the two spans are one implementation copied and then locally edited — 875 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 (143 matched lines × 2 locations) · ×1
Duplicated block with local edits (143 matched lines × 2 locations) ghost/core/server/api/endpoints/utils/serializers/input/pages.js:15— ghost/core/server/api/endpoints/utils/serializers/input/pages.js:15 · ghost/core/server/api/endpoints/utils/serializers/input/posts.js:15 — the two spans are one implementation copied and then locally edited — 1026 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 (134 matched lines × 2 locations) · ×1
Duplicated block with local edits (134 matched lines × 2 locations) ghost/core/server/adapters/redirects/S3RedirectsStore.ts:30— ghost/core/server/adapters/redirects/S3RedirectsStore.ts:30 · ghost/core/server/adapters/route-settings/S3RouteSettingsStore.ts:38 — the two spans are one implementation copied and then locally edited — 878 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 (131 identical lines × 2 files) apps/comments-ui/tailwind.config.js:1— apps/comments-ui/tailwind.config.js:1 · koenig/kg-unsplash-selector/tailwind.config.cjs:1 — these 2 files are line-for-line copies of one another — 131 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 (123 matched lines × 2 locations) · ×1
Duplicated block with local edits (123 matched lines × 2 locations) apps/admin/src/layout/app-sidebar/sidebar-body-swap.tsx:22— apps/admin/src/layout/app-sidebar/sidebar-body-swap.tsx:22 · apps/admin/src/layout/sidebar-swap-transition.tsx:3 — the two spans are one implementation copied and then locally edited — 663 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 (120 matched lines × 2 locations) · ×1
Duplicated block with local edits (120 matched lines × 2 locations) apps/admin/src/settings/email/newsletters.tsx:21— apps/admin/src/settings/email/newsletters.tsx:21 · apps/admin/src/settings/email/newsletters/newsletters-tab-content.tsx:20 — the two spans are one implementation copied and then locally edited — 690 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 (99 matched lines × 2 locations) · ×1
Duplicated block with local edits (99 matched lines × 2 locations) apps/admin-x-framework/src/utils/source-utils.ts:56— apps/admin-x-framework/src/utils/source-utils.ts:56 · ghost/core/server/services/stats/referrers-stats-service.js:7 — the two spans are one implementation copied and then locally edited — 580 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 (94 matched lines × 2 locations) · ×1
Duplicated block with local edits (94 matched lines × 2 locations) apps/admin/src/settings/growth/offers/add-offer-modal.tsx:245— apps/admin/src/settings/growth/offers/add-offer-modal.tsx:245 · apps/admin/src/settings/growth/offers/edit-retention-offer-modal.tsx:369 — the two spans are one implementation copied and then locally edited — 553 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 (90 identical lines × 2 files) apps/admin/src/automations/components/email-modal/preview-frame.tsx:1— apps/admin/src/automations/components/email-modal/preview-frame.tsx:1 · apps/admin/src/settings/membership/member-emails/welcome-email-preview-frame.tsx:1 — these 2 files are line-for-line copies of one another — 90 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 (86 matched lines × 2 locations) · ×1
Duplicated block with local edits (86 matched lines × 2 locations) apps/admin/src/analytics/views/stats/web/components/sources-card.tsx:83— apps/admin/src/analytics/views/stats/web/components/sources-card.tsx:83 · apps/admin/src/posts/analytics/web/components/sources.tsx:76 — the two spans are one implementation copied and then locally edited — 427 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 (76 lines × 2 locations) apps/comments-ui/src/actions.ts:310— apps/comments-ui/src/actions.ts:310 · apps/comments-ui/src/actions.ts:418 — 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 (72 lines × 2 locations) ghost/core/server/api/endpoints/labels.js:36— ghost/core/server/api/endpoints/labels.js:36 · ghost/core/server/api/endpoints/tags.js:20 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication· Duplicated block with local edits (71 matched lines × 2 locations) · ×1
Duplicated block with local edits (71 matched lines × 2 locations) apps/admin/src/settings/growth/offers/offers-index.tsx:108— apps/admin/src/settings/growth/offers/offers-index.tsx:108 · apps/admin/src/settings/growth/offers/offers-index.tsx:202 — the two spans are one implementation copied and then locally edited — 299 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.
Wholesale file copy (70 identical lines × 2 files) apps/comments-ui/src/components/popups/delete-popup.tsx:1— apps/comments-ui/src/components/popups/delete-popup.tsx:1 · apps/comments-ui/src/components/popups/report-popup.tsx:1 — these 2 files are line-for-line copies of one another — 70 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.
Duplicated block (68 lines × 2 locations) apps/admin/src/settings/general/seo-meta.tsx:252— apps/admin/src/settings/general/seo-meta.tsx:252 · apps/admin/src/settings/general/seo-meta.tsx:333 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Wholesale file copy (64 identical lines × 2 files) apps/admin/src/automations/components/email-modal/test-email-dropdown.tsx:1— apps/admin/src/automations/components/email-modal/test-email-dropdown.tsx:1 · apps/admin/src/settings/membership/member-emails/test-email-dropdown.tsx:1 — these 2 files are line-for-line copies of one another — 64 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 (62 matched lines × 2 locations) · ×1
Duplicated block with local edits (62 matched lines × 2 locations) apps/admin/src/analytics/views/stats/web/web.tsx:29— apps/admin/src/analytics/views/stats/web/web.tsx:29 · apps/admin/src/posts/analytics/web/web.tsx:49 — the two spans are one implementation copied and then locally edited — 479 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Complex function linkSubscription (cyclomatic 123, cognitive 179) ghost/core/server/services/members/members-api/repositories/member-repository.js:1503— linkSubscription has cyclomatic complexity 123 and cognitive complexity 179; 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 onSaving (cyclomatic 114, cognitive 125) ghost/core/server/models/post.js:572— onSaving has cyclomatic complexity 114 and cognitive complexity 125; 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 98, cognitive 99) REDACTED:56— (anonymous) has cyclomatic complexity 98 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 FeedItem (cyclomatic 85, cognitive 105) apps/activitypub/src/components/feed/feed-item.tsx:506— FeedItem has cyclomatic complexity 85 and cognitive complexity 105; 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 PostPreviewModal (cyclomatic 74, cognitive 60) apps/admin/src/editor/preview/post-preview-modal.tsx:99— PostPreviewModal has cyclomatic complexity 74 and cognitive complexity 60; 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 MemberDetailPage (cyclomatic 69, cognitive 62) apps/admin/src/members/detail/member-detail.tsx:74— MemberDetailPage has cyclomatic complexity 69 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 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 Domain (cyclomatic 66, cognitive 57) apps/activitypub/src/views/preferences/components/domain.tsx:88— Domain has cyclomatic complexity 66 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 getDescription (cyclomatic 61, cognitive 56) ghost/core/frontend/meta/description.js:5— getDescription has cyclomatic complexity 61 and cognitive complexity 56; 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 NewsletterKPIs (cyclomatic 60, cognitive 49) apps/admin/src/analytics/views/stats/newsletters/components/newsletters-kpis.tsx:128— NewsletterKPIs has cyclomatic complexity 60 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 update (cyclomatic 56, cognitive 79) ghost/core/server/services/members/members-api/repositories/member-repository.js:850— update has cyclomatic complexity 56 and cognitive complexity 79; 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 TagDetail (cyclomatic 55, cognitive 41) apps/admin/src/tags/detail/tag-detail.tsx:52— TagDetail has cyclomatic complexity 55 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 AdminLayout (cyclomatic 53, cognitive 44) apps/admin/src/layout/admin-layout.tsx:132— AdminLayout has cyclomatic complexity 53 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 (anonymous) (cyclomatic 52, cognitive 43) apps/activitypub/src/views/notifications/notifications.tsx:414— (anonymous) has cyclomatic complexity 52 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 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 ghost_head (cyclomatic 51, cognitive 74) ghost/core/frontend/helpers/ghost_head.js:394— ghost_head has cyclomatic complexity 51 and cognitive complexity 74; 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 fetchLinkData (cyclomatic 50, cognitive 70) REDACTED:669— fetchLinkData has cyclomatic complexity 50 and cognitive complexity 70; 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 fetchQueryStrData (cyclomatic 50, cognitive 57) REDACTED:493— fetchQueryStrData has cyclomatic complexity 50 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 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 getAction (cyclomatic 49, cognitive 63) apps/admin/src/members/detail/member-event.ts:246— getAction has cyclomatic complexity 49 and cognitive complexity 63; 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 48, cognitive 45) apps/shade/src/components/ui/floating-sidebar.tsx:239— (anonymous) has cyclomatic complexity 48 and cognitive complexity 45; 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 ActivityPage (cyclomatic 48, cognitive 43) apps/admin/src/members/activity/member-activity.tsx:54— ActivityPage has cyclomatic complexity 48 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 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 AutomationEditorContent (cyclomatic 48, cognitive 34) apps/admin/src/automations/editor.tsx:111— AutomationEditorContent has cyclomatic complexity 48 and cognitive complexity 34; 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 47, cognitive 34) apps/shade/src/components/patterns/settings-modal.tsx:93— (anonymous) has cyclomatic complexity 47 and cognitive complexity 34; 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 ProfilePage (cyclomatic 46, cognitive 40) apps/activitypub/src/views/profile/components/profile-page.tsx:58— ProfilePage has cyclomatic complexity 46 and cognitive complexity 40; 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 45, cognitive 42) apps/activitypub/src/views/preferences/components/profile.tsx:54— (anonymous) has cyclomatic complexity 45 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 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 toggleCodeBlock (cyclomatic 44, cognitive 118) koenig/kg-simplemde/src/js/simplemde.js:265— toggleCodeBlock has cyclomatic complexity 44 and cognitive complexity 118; 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 TagDetailForm (cyclomatic 44, cognitive 40) apps/admin/src/tags/detail/tag-detail-form.tsx:74— TagDetailForm has cyclomatic complexity 44 and cognitive complexity 40; 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 commentMapper (cyclomatic 42, cognitive 50) ghost/core/server/api/endpoints/utils/serializers/output/mappers/comments.js:51— commentMapper has cyclomatic complexity 42 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 Reader (cyclomatic 42, cognitive 40) REDACTED:535— Reader has cyclomatic complexity 42 and cognitive complexity 40; 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 create (cyclomatic 41, cognitive 55) ghost/core/server/services/members/members-api/repositories/member-repository.js:585— create has cyclomatic complexity 41 and cognitive complexity 55; 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 MemberDetailSidebar (cyclomatic 41, cognitive 30) apps/admin/src/members/detail/member-detail-sidebar.tsx:49— MemberDetailSidebar has cyclomatic complexity 41 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 exports (cyclomatic 40, cognitive 55) ghost/core/server/api/endpoints/utils/serializers/output/mappers/posts.js:25— exports has cyclomatic complexity 40 and cognitive complexity 55; 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 getTitle (cyclomatic 40, cognitive 37) ghost/core/frontend/meta/title.js:11— getTitle has cyclomatic complexity 40 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 Newsletter (cyclomatic 40, cognitive 35) apps/admin/src/posts/analytics/newsletter/newsletter.tsx:100— Newsletter has cyclomatic complexity 40 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 RunList (cyclomatic 40, cognitive 27) apps/admin/src/automations/components/canvas/run-list.tsx:150— RunList has cyclomatic complexity 40 and cognitive complexity 27; 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 update (cyclomatic 39, cognitive 68) ghost/core/server/services/members/members-api/repositories/product-repository.js:374— update has cyclomatic complexity 39 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 reactAppConfig (cyclomatic 39, cognitive 43) tools/configs/eslint-react/index.mjs:161— reactAppConfig 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 verifyService (cyclomatic 38, cognitive 54) REDACTED:201— verifyService has cyclomatic complexity 38 and cognitive complexity 54; 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 NotificationText (cyclomatic 38, cognitive 44) apps/portal/src/components/notification.jsx:31— NotificationText has cyclomatic complexity 38 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 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 EditorLoader (cyclomatic 38, cognitive 34) apps/admin/src/editor/editor-screen.tsx:685— EditorLoader has cyclomatic complexity 38 and cognitive complexity 34; 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 LatestPost (cyclomatic 38, cognitive 32) apps/admin/src/analytics/views/stats/overview/components/latest-post.tsx:52— LatestPost has cyclomatic complexity 38 and cognitive complexity 32; 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 Overview (cyclomatic 38, cognitive 27) apps/admin/src/posts/analytics/overview/overview.tsx:50— Overview has cyclomatic complexity 38 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files· apps/activitypub/src/views/preferences/components/dots-pattern.tsx · ×1
apps/activitypub/src/views/preferences/components/dots-pattern.tsx: 3371 lines of code apps/activitypub/src/views/preferences/components/dots-pattern.tsx:1— apps/activitypub/src/views/preferences/components/dots-pattern.tsx has 3371 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: 3108 lines of code REDACTED:1— REDACTED has 3108 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· ghost/core/server/services/members/members-api/repositories/member-repository.js · ×1
ghost/core/server/services/members/members-api/repositories/member-repository.js: 2716 lines of code ghost/core/server/services/members/members-api/repositories/member-repository.js:1— ghost/core/server/services/members/members-api/repositories/member-repository.js has 2716 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· apps/activitypub/src/hooks/use-activity-pub-queries.ts · ×1
apps/activitypub/src/hooks/use-activity-pub-queries.ts: 2692 lines of code apps/activitypub/src/hooks/use-activity-pub-queries.ts:1— apps/activitypub/src/hooks/use-activity-pub-queries.ts has 2692 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· koenig/kg-simplemde/src/js/simplemde.js · ×1
koenig/kg-simplemde/src/js/simplemde.js: 1897 lines of code koenig/kg-simplemde/src/js/simplemde.js:1— koenig/kg-simplemde/src/js/simplemde.js has 1897 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· ghost/core/server/services/email-service/batch-sending-service.js · ×1
ghost/core/server/services/email-service/batch-sending-service.js: 1752 lines of code ghost/core/server/services/email-service/batch-sending-service.js:1— ghost/core/server/services/email-service/batch-sending-service.js has 1752 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· ghost/core/server/services/automations/database-automations-repository.ts · ×1
ghost/core/server/services/automations/database-automations-repository.ts: 1646 lines of code ghost/core/server/services/automations/database-automations-repository.ts:1— ghost/core/server/services/automations/database-automations-repository.ts has 1646 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· ghost/core/server/services/stats/posts-stats-service.js · ×1
ghost/core/server/services/stats/posts-stats-service.js: 1558 lines of code ghost/core/server/services/stats/posts-stats-service.js:1— ghost/core/server/services/stats/posts-stats-service.js has 1558 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· ghost/core/server/models/post.js · ×1
ghost/core/server/models/post.js: 1493 lines of code ghost/core/server/models/post.js:1— ghost/core/server/models/post.js has 1493 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· ghost/core/server/services/email-service/email-renderer.js · ×1
ghost/core/server/services/email-service/email-renderer.js: 1478 lines of code ghost/core/server/services/email-service/email-renderer.js:1— ghost/core/server/services/email-service/email-renderer.js has 1478 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: 1398 lines of code REDACTED:1— REDACTED has 1398 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· ghost/core/server/services/gifts/gift-service.ts · ×1
ghost/core/server/services/gifts/gift-service.ts: 1360 lines of code ghost/core/server/services/gifts/gift-service.ts:1— ghost/core/server/services/gifts/gift-service.ts has 1360 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· ghost/core/server/services/stripe/stripe-api.js · ×1
ghost/core/server/services/stripe/stripe-api.js: 1294 lines of code ghost/core/server/services/stripe/stripe-api.js:1— ghost/core/server/services/stripe/stripe-api.js has 1294 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· apps/activitypub/src/components/feed/feed-item.tsx · ×1
apps/activitypub/src/components/feed/feed-item.tsx: 1253 lines of code apps/activitypub/src/components/feed/feed-item.tsx:1— apps/activitypub/src/components/feed/feed-item.tsx has 1253 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· apps/portal/src/components/frame.styles.js · ×1
apps/portal/src/components/frame.styles.js: 1224 lines of code apps/portal/src/components/frame.styles.js:1— apps/portal/src/components/frame.styles.js has 1224 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· ghost/core/server/services/members/members-api/controllers/router-controller.js · ×1
ghost/core/server/services/members/members-api/controllers/router-controller.js: 1212 lines of code ghost/core/server/services/members/members-api/controllers/router-controller.js:1— ghost/core/server/services/members/members-api/controllers/router-controller.js has 1212 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: 1182 lines of code REDACTED:1— REDACTED has 1182 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· apps/admin/src/editor/engine/save-engine.ts · ×1
apps/admin/src/editor/engine/save-engine.ts: 1178 lines of code apps/admin/src/editor/engine/save-engine.ts:1— apps/admin/src/editor/engine/save-engine.ts has 1178 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· apps/admin/src/editor/session/editor-session.ts · ×1
apps/admin/src/editor/session/editor-session.ts: 1160 lines of code apps/admin/src/editor/session/editor-session.ts:1— apps/admin/src/editor/session/editor-session.ts has 1160 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: 1157 lines of code REDACTED:1— REDACTED has 1157 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· apps/portal/src/components/pages/gift-page.styles.js · ×1
apps/portal/src/components/pages/gift-page.styles.js: 1140 lines of code apps/portal/src/components/pages/gift-page.styles.js:1— apps/portal/src/components/pages/gift-page.styles.js has 1140 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
apps/portal/src/actions.js: 1139 lines of code apps/portal/src/actions.js:1— apps/portal/src/actions.js has 1139 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: 1138 lines of code REDACTED:1— REDACTED has 1138 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· ghost/core/server/services/members/members-api/repositories/event-repository.js · ×1
ghost/core/server/services/members/members-api/repositories/event-repository.js: 1128 lines of code ghost/core/server/services/members/members-api/repositories/event-repository.js:1— ghost/core/server/services/members/members-api/repositories/event-repository.js has 1128 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· apps/shade/src/components/patterns/filters.stories.tsx · ×1
apps/shade/src/components/patterns/filters.stories.tsx: 1113 lines of code apps/shade/src/components/patterns/filters.stories.tsx:1— apps/shade/src/components/patterns/filters.stories.tsx has 1113 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· apps/portal/src/components/common/products-section.jsx · ×1
apps/portal/src/components/common/products-section.jsx: 1106 lines of code apps/portal/src/components/common/products-section.jsx:1— apps/portal/src/components/common/products-section.jsx has 1106 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: 1059 lines of code REDACTED:1— REDACTED has 1059 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· apps/comments-ui/src/actions.ts · ×1
apps/comments-ui/src/actions.ts: 1022 lines of code apps/comments-ui/src/actions.ts:1— apps/comments-ui/src/actions.ts has 1022 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· apps/admin/src/settings/email/newsletters/newsletter-detail-modal.tsx · ×1
apps/admin/src/settings/email/newsletters/newsletter-detail-modal.tsx: 1005 lines of code apps/admin/src/settings/email/newsletters/newsletter-detail-modal.tsx:1— apps/admin/src/settings/email/newsletters/newsletter-detail-modal.tsx has 1005 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· apps/portal/src/utils/api.js · ×1
apps/portal/src/utils/api.js: 998 lines of code apps/portal/src/utils/api.js:1— apps/portal/src/utils/api.js has 998 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· apps/portal/src/utils/helpers.js · ×1
apps/portal/src/utils/helpers.js: 964 lines of code apps/portal/src/utils/helpers.js:1— apps/portal/src/utils/helpers.js has 964 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· apps/admin/src/automations/components/canvas/automation-canvas.tsx · ×1
apps/admin/src/automations/components/canvas/automation-canvas.tsx: 936 lines of code apps/admin/src/automations/components/canvas/automation-canvas.tsx:1— apps/admin/src/automations/components/canvas/automation-canvas.tsx has 936 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: 892 lines of code REDACTED:1— REDACTED has 892 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· ghost/core/server/services/comments/comments-service.js · ×1
ghost/core/server/services/comments/comments-service.js: 879 lines of code ghost/core/server/services/comments/comments-service.js:1— ghost/core/server/services/comments/comments-service.js has 879 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· apps/admin-x-framework/src/api/members.ts · ×1
apps/admin-x-framework/src/api/members.ts: 856 lines of code apps/admin-x-framework/src/api/members.ts:1— apps/admin-x-framework/src/api/members.ts has 856 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· apps/portal/src/components/pages/signup-page.jsx · ×1
apps/portal/src/components/pages/signup-page.jsx: 848 lines of code apps/portal/src/components/pages/signup-page.jsx:1— apps/portal/src/components/pages/signup-page.jsx has 848 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· apps/portal/src/components/pages/account-plan-page.jsx · ×1
apps/portal/src/components/pages/account-plan-page.jsx: 834 lines of code apps/portal/src/components/pages/account-plan-page.jsx:1— apps/portal/src/components/pages/account-plan-page.jsx has 834 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· apps/portal/src/components/common/list-picker.tsx · ×1
apps/portal/src/components/common/list-picker.tsx: 832 lines of code apps/portal/src/components/common/list-picker.tsx:1— apps/portal/src/components/common/list-picker.tsx has 832 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· apps/admin/src/editor/editor-screen.tsx · ×1
apps/admin/src/editor/editor-screen.tsx: 827 lines of code apps/admin/src/editor/editor-screen.tsx:1— apps/admin/src/editor/editor-screen.tsx has 827 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· ghost/core/server/services/member-welcome-emails/member-welcome-email-service.js · ×1
ghost/core/server/services/member-welcome-emails/member-welcome-email-service.js: 819 lines of code ghost/core/server/services/member-welcome-emails/member-welcome-email-service.js:1— ghost/core/server/services/member-welcome-emails/member-welcome-email-service.js has 819 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· The declared test suite includes a file that cannot be loaded · ×1
The declared test suite includes a file that cannot be loaded e2e/tests/fake-services/upgrade-host-protocol.test.ts:13— This repository declares test tooling, and the ✓ above records that declaration — but e2e/tests/fake-services/upgrade-host-protocol.test.ts and 2 other test file(s) in this workspace cannot be loaded at all: it imports a module that names no file in this repository, so the runner throws while collecting it and none of its cases execute. The wiring is present and the suite it points at does not run as written, which is why the tooling tick must not be read as a statement that the tests pass. Fix the unloadable file(s) — each one is reported with its failing import under Test Coverage — then the declared script exercises what it claims to.
Dead file (~269 LoC) ghost/core/frontend/src/cards/js/video.js— no import path from any entry point (875 application, 558 tooling, 2886 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 (~176 LoC) ghost/core/frontend/src/cards/js/audio.js— no import path from any entry point (875 application, 558 tooling, 2886 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 (~99 LoC) ghost/core/server/data/migrations/versions/6.2/2025-09-30-14-28-09-add-utm-fields.js— no import path from any entry point (875 application, 558 tooling, 2886 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) ghost/core/server/data/migrations/versions/6.52/2026-07-08-17-00-01-add-email-tracking-fields-to-automations.js— no import path from any entry point (875 application, 558 tooling, 2886 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 (~69 LoC) ghost/core/server/data/migrations/versions/6.37/2026-05-04-07-51-14-add-members-created-at-id-index.js— no import path from any entry point (875 application, 558 tooling, 2886 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 (~64 LoC) ghost/core/server/data/migrations/versions/5.89/2024-07-30-19-51-06-backfill-offer-redemptions.js— no import path from any entry point (875 application, 558 tooling, 2886 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) apps/admin/src/settings/hooks/use-check-theme-limit-error.tsx— no import path from any entry point (875 application, 558 tooling, 2886 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 (~56 LoC) ghost/core/frontend/apps/private-blogging/index.js— no import path from any entry point (875 application, 558 tooling, 2886 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 (~54 LoC) ghost/core/server/data/migrations/versions/5.14/2022-09-02-12-55-rename-members-bio-to-expertise.js— no import path from any entry point (875 application, 558 tooling, 2886 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) ghost/core/server/data/migrations/versions/5.79/2024-01-30-19-36-44-fix-discrepancy-in-free-tier-visibility.js— no import path from any entry point (875 application, 558 tooling, 2886 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 (~42 LoC) ghost/core/server/data/migrations/versions/5.90/2024-08-20-09-40-24-update-default-donations-suggested-amount.js— no import path from any entry point (875 application, 558 tooling, 2886 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 (~39 LoC) ghost/core/server/data/migrations/versions/6.19/2026-02-10-12-00-00-add-transistor-portal-settings.js— no import path from any entry point (875 application, 558 tooling, 2886 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 (~37 LoC) ghost/core/server/data/migrations/versions/5.122/2025-06-03-19-32-57-change-default-for-newsletters-button-color.js— no import path from any entry point (875 application, 558 tooling, 2886 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 (~36 LoC) ghost/core/server/data/migrations/versions/5.22/2022-10-31-12-03-backfill-new-product-columns.js— no import path from any entry point (875 application, 558 tooling, 2886 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 (~29 LoC) apps/admin/src/settings/utils/portal.tsx— no import path from any entry point (875 application, 558 tooling, 2886 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/admin/src/settings/components/selectors/unsplash-selector.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~27 LoC) ghost/core/server/data/migrations/versions/5.75/2023-11-27-15-55-add-members-newsletters-index.js— no import path from any entry point (875 application, 558 tooling, 2886 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) ghost/core/server/adapters/upgrade/NoopUpgradeAdapter.ts— no import path from any entry point (875 application, 558 tooling, 2886 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 (~21 LoC) ghost/core/server/data/migrations/versions/6.41/2026-05-13-12-00-00-rename-reset-all-passwords-permission.js— no import path from any entry point (875 application, 558 tooling, 2886 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
Unused dependency 'dependency-cruiser' — Declared in tools/gx/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Third-party script without Subresource Integrity apps/signup-form/preview.html:22— `http://localhost:2368/ghost/assets/signup-form/signup-form.min.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository. 6 such include(s) across the repository's markup.
`async` Promise executor apps/activitypub/src/views/preferences/components/profile.tsx:339— The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it.
Mock-dominated test: ensure default serializers are called with apiConfig and frame packages/api-framework/test/serializers/handle.test.ts:34— This test sets up 5 test doubles (for example `sinon.stub`) against 1 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: ensure serializers are called with apiConfig and frame if new shared serializer is added packages/api-framework/test/serializers/handle.test.ts:66— This test sets up 6 test doubles (for example `sinon.stub`) against 1 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: handles Enter without a selectable item when requested koenig/koenig-lexical/test/unit/KeyboardSelection.test.tsx:76— This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: does not prepare or upload an image when the target is not a card koenig/koenig-lexical/test/unit/utils/imageUploadHandler.test.ts:36— This test sets up 5 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 5 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: calls getVisibilityOptions with showWeb only when visibilitySettings is "web only" koenig/koenig-lexical/test/unit/hooks/useVisibilityToggle.test.ts:85— This test sets up 3 test doubles (for example `vi.spyOn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: calls getVisibilityOptions with showEmail only when visibilitySettings is "email only" koenig/koenig-lexical/test/unit/hooks/useVisibilityToggle.test.ts:94— This test sets up 3 test doubles (for example `vi.spyOn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: does not read or mutate visibility for a non-card node koenig/koenig-lexical/test/unit/hooks/useVisibilityToggle.test.ts:139— This test sets up 5 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: runs the matching limiter ghost/test/unit/server/web/shared/middleware/rate-limiting.test.ts:24— This test sets up 3 test doubles (for example `sinon.stub`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: skips checkoutSessionEmail without an email ghost/test/unit/server/web/shared/middleware/rate-limiting.test.ts:34— This test sets up 3 test doubles (for example `sinon.stub`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: resets contentApiKey once a request succeeds ghost/test/unit/server/web/shared/middleware/rate-limiting.test.ts:50— This test sets up 3 test doubles (for example `sinon.stub`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: does not reset contentApiKey after a failed request ghost/test/unit/server/web/shared/middleware/rate-limiting.test.ts:68— This test sets up 3 test doubles (for example `sinon.stub`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: frontendSSLRedirect passes getSiteRedirectUrl ghost/test/unit/server/web/shared/middleware/url-redirects.test.js:41— This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: adminSSLAndHostRedirect passes getAdminRedirectUrl ghost/test/unit/server/web/shared/middleware/url-redirects.test.js:49— This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: emits structured logs around the request lifecycle ghost/test/unit/server/services/update-check.test.js:194— This test sets up 3 test doubles (for example `sinon.stub`) against 1 real object(s) of its own, and its only verification is 5 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: not create a notification if the check response has no messages ghost/test/unit/server/services/update-check.test.js:470— This test sets up 3 test doubles (for example `sinon.stub`) against 1 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: Updates the settings key when verification is marked as required ghost/test/unit/server/services/verification-trigger.test.js:304— This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: Does not trigger when site is already verified ghost/test/unit/server/services/verification-trigger.test.js:356— This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 1 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: Does not trigger webhook when import count equals the calculated threshold ghost/test/unit/server/services/verification-trigger.test.js:414— This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: Does not trigger webhook when API count equals the effective threshold ghost/test/unit/server/services/verification-trigger.test.js:509— This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: Does not overcount when the source events query is already page-limited ghost/test/unit/server/services/verification-trigger.test.js:545— This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: Does not fetch events and trigger when threshold is Infinity ghost/test/unit/server/services/verification-trigger.test.js:561— This test sets up 3 test doubles (for example `sinon.stub`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: Does not trigger at the threshold ghost/test/unit/server/services/verification-trigger.test.js:607— This test sets up 4 test doubles (for example `sinon.stub`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: Skips the removed recipients query when total recipients are within the threshold ghost/test/unit/server/services/verification-trigger.test.js:619— This test sets up 3 test doubles (for example `sinon.stub`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: does not trigger payload handler when there are no hooks registered for an event ghost/test/unit/server/services/webhooks/trigger.test.js:79— This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: does not trigger payload handler when there are hooks registered for an event, but the custom integrations limit is active ghost/test/unit/server/services/webhooks/trigger.test.js:91— This test sets up 6 test doubles (for example `sinon.stub`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
redundant comment apps/activitypub/src/hooks/use-activity-pub-queries.ts:305— 5 comments in this file only repeat the code they sit on (lines 305, 1143, 1339, 1673, 1696), for example "Check if this is an account_follows query". Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment apps/activitypub/src/hooks/use-app-base-path.ts:12— "Find the first match with the handle 'activitypub-basepath'" repeats the code it sits on: 5 of its 6 words (find, match, handle, activitypub, basepath) are already in `const path = matches.find((match) => match.handle === 'activitypub-basepath')?.pathname ?? '';`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment apps/activitypub/src/hooks/use-current-page.ts:6— "Find the index of the activitypub base path route" repeats the code it sits on: 5 of its 6 words (find, index, activitypub, base, path) are already in `const basePathIndex = matches.findIndex((match) => match.handle === 'activitypub-basepath');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment apps/activitypub/test/acceptance/feed.test.ts:416— "Get all feed items" repeats the code it sits on: 3 of its 3 words (get, feed, items) are already in `const feedItems = page.getByTestId('feed-item');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment apps/activitypub/test/acceptance/feed.test.ts:467— "Get all feed items" repeats the code it sits on: 3 of its 3 words (get, feed, items) are already in `const feedItems = page.getByTestId('feed-item');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment apps/activitypub/test/acceptance/feed.test.ts:543— "Get all feed items" repeats the code it sits on: 3 of its 3 words (get, feed, items) are already in `const feedItems = page.getByTestId('feed-item');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment apps/activitypub/test/acceptance/my-profile.test.ts:265— "Get actor items" repeats the code it sits on: 3 of its 3 words (get, actor, items) are already in `const actorItems = page.getByTestId('actor-item');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment apps/activitypub/test/acceptance/my-profile.test.ts:352— "Get actor items" repeats the code it sits on: 3 of its 3 words (get, actor, items) are already in `const actorItems = page.getByTestId('actor-item');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment apps/activitypub/test/unit/utils/screenshot.test.ts:7— "Mock html2canvas" repeats the code it sits on: 3 of its 3 words (mock, html, canvas) are already in `vi.mock('html2canvas-pro');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment apps/activitypub/test/unit/utils/screenshot.test.ts:25— "Create mock element" repeats the code it sits on: 3 of its 3 words (create, mock, element) are already in `mockElement = document.createElement('div');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment apps/activitypub/test/unit/utils/screenshot.test.ts:28— "Create mock canvas" repeats the code it sits on: 3 of its 3 words (create, mock, canvas) are already in `mockCanvas = document.createElement('canvas');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment apps/activitypub/test/unit/utils/screenshot.test.ts:59— "Mock console.error" repeats the code it sits on: 3 of its 3 words (mock, console, error) are already in `vi.spyOn(console, 'error').mockImplementation(() =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment apps/admin-x-framework/src/test/acceptance.ts:86— "Try to parse the post data as JSON" repeats the code it sits on: 4 of its 5 words (parse, post, data, json) are already in `requestBody = JSON.parse(route.request().postData() || 'null');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment apps/admin-x-framework/src/utils/source-utils.ts:264— "Base interface for all source data types" repeats the code it sits on: 4 of its 5 words (base, interface, source, data) are already in `export interface BaseSourceData`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment apps/admin-x-framework/test/unit/hooks/use-permissions.test.ts:5— "Mock the currentUser API" repeats the code it sits on: 4 of its 4 words (mock, current, user, api) are already in `vi.mock('../../../src/api/current-user', () => ({`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment apps/admin-x-framework/test/unit/hooks/use-tinybird-token.test.tsx:8— "Mock the useTinybirdTokenQuery API" repeats the code it sits on: 6 of its 6 words (mock, use, tinybird, token, query, api) are already in `vi.mock('../../../src/api/tinybird', () => ({`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment apps/admin/src/analytics/hooks/use-growth-stats.ts:17— "Calculate totals from member data" repeats the code it sits on: 4 of its 4 words (calculate, totals, member, data) are already in `const calculateTotals = ({`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment apps/admin/src/analytics/hooks/use-growth-stats.ts:121— "Format chart data" repeats the code it sits on: 3 of its 3 words (format, chart, data) are already in `const formatChartData = (memberData: MemberStatusItem[], mrrData: MrrHistoryItem[]) =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment apps/admin/src/analytics/hooks/use-growth-stats.ts:326— "Format chart data" repeats the code it sits on: 3 of its 3 words (format, chart, data) are already in `const chartData = useMemo(() => formatChartData(memberData, mrrData), [memberData, mrrData]);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment apps/admin/src/analytics/utils/url-helpers.ts:59— "For other paths, just return the path itself" repeats the code it sits on: 3 of its 3 words (paths, return, path) are already in `return path;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment apps/admin/src/analytics/views/stats/growth/components/new-subscribers-cadence.test.tsx:16— "Mock date helpers from @/shared/analytics/chart-helpers" repeats the code it sits on: 5 of its 6 words (mock, helpers, shared, analytics, chart) are already in `vi.mock('@/shared/analytics/chart-helpers', async () =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment apps/admin/src/analytics/views/stats/growth/components/paid-subscription-change-chart.tsx:74— "Create a map of existing data by date" repeats the code it sits on: 4 of its 5 words (create, map, data, date) are already in `const dataMap = new Map(data.map((item) => [item.date, item]));`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment apps/admin/src/analytics/views/stats/growth/components/paid-subscription-change-chart.tsx:169— "Helper to get default resolution for a range" repeats the code it sits on: 4 of its 5 words (get, default, resolution, range) are already in `const getDefaultResolution = (range: number): ResolutionOption =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment apps/admin/src/analytics/views/stats/growth/components/paid-subscription-change-chart.tsx:201— "Get available resolutions for current range" repeats the code it sits on: 4 of its 5 words (get, available, resolutions, range) are already in `const availableResolutions = useMemo(() => getAvailableResolutions(range), [range]);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment apps/admin/src/analytics/views/stats/newsletters/newsletters.tsx:352— "Get total subscribers from the selected newsletter or all newsletters" repeats the code it sits on: 5 of its 6 words (total, subscribers, selected, newsletter, newsletters) are already in `const totalSubscribers =`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
Duplicated predicate apps/admin/src/editor/editor-screen.tsx:242— `!!currentUser && !isContributorUser(currentUser)` appears character-identically in 2 files — apps/admin/src/editor/editor-screen.tsx, apps/admin/src/editor/settings/post-settings-sidebar.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 apps/admin/src/editor/editor-screen.tsx:598— `!!currentUser && (isOwnerUser(currentUser) || isAdminUser(currentUser) || isEditorUser(currentUser))` appears character-identically in 2 files — apps/admin/src/editor/editor-screen.tsx, apps/admin/src/editor/preview/post-preview-modal.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 apps/portal/src/utils/validator.js:4— `!!email && re.test(String(email).toLowerCase())` appears character-identically in 2 files — apps/portal/src/utils/validator.js, apps/signup-form/src/utils/validator.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 koenig/koenig-lexical/src/plugins/AtLinkPlugin.tsx:88— `!$isRangeSelection(selection) || !selection.isCollapsed()` appears character-identically in 2 files — koenig/koenig-lexical/src/plugins/AtLinkPlugin.tsx, koenig/koenig-lexical/src/plugins/RestrictContentPlugin.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 koenig/koenig-lexical/src/plugins/EmEnDashPlugin.tsx:25— `!$isRangeSelection(selection) || !selection.type === 'text' || !selection.isCollapsed()` appears character-identically in 5 files — koenig/koenig-lexical/src/plugins/EmEnDashPlugin.tsx, koenig/koenig-lexical/src/plugins/HorizontalRulePlugin.tsx, koenig/koenig-lexical/src/plugins/PaywallPlugin.tsx, koenig/koenig-lexical/src/plugins/PlusCardMenuPlugin.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 apps/admin/src/editor/engine/change-tracker.ts:266— `!Number.isNaN(candidateTime) && !Number.isNaN(heldTime) && candidateTime < heldTime` appears character-identically in 2 files — apps/admin/src/editor/engine/change-tracker.ts, apps/admin/src/editor/session/editor-session.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 ghost/core/server/models/settings.js:469— `!Number.isSafeInteger(amount) || amount < 1` appears character-identically in 2 files — ghost/core/server/models/settings.js, ghost/core/server/services/machine-payments/pricing.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 ghost/core/server/api/endpoints/utils/serializers/input/pages.js:41— `!column.startsWith('@@') && !['lexical', 'mobiledoc'].includes(column)` appears character-identically in 2 files — ghost/core/server/api/endpoints/utils/serializers/input/pages.js, ghost/core/server/api/endpoints/utils/serializers/input/posts.js. 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 apps/admin/src/comments/components/comment-menu.tsx:37— `!comment.parent_id && comment.status !== 'deleted'` appears character-identically in 2 files — apps/admin/src/comments/components/comment-menu.tsx, apps/comments-ui/src/components/content/context-menus/admin-context-menu.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 koenig/koenig-lexical/src/nodes/BookmarkNode.tsx:41— `!dataset.captionEditor && dataset.caption` appears character-identically in 5 files — koenig/koenig-lexical/src/nodes/BookmarkNode.tsx, koenig/koenig-lexical/src/nodes/CodeBlockNode.tsx, koenig/koenig-lexical/src/nodes/EmbedNode.tsx, koenig/koenig-lexical/src/nodes/ImageNode.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 koenig/koenig-lexical/src/nodes/HeaderNode.tsx:64— `!dataset.headerTextEditor && dataset.header` appears character-identically in 2 files — koenig/koenig-lexical/src/nodes/HeaderNode.tsx, koenig/koenig-lexical/src/nodes/SignupNode.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 koenig/koenig-lexical/src/nodes/HeaderNode.tsx:67— `!dataset.subheaderTextEditor && dataset.subheader` appears character-identically in 2 files — koenig/koenig-lexical/src/nodes/HeaderNode.tsx, koenig/koenig-lexical/src/nodes/SignupNode.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 koenig/kg-default-cards/src/utils/srcset-attribute.ts:95— `!elem || !['IMG', 'SOURCE'].includes(elem.tagName) || !elem.getAttribute('src') || !image` appears character-identically in 2 files — koenig/kg-default-cards/src/utils/srcset-attribute.ts, koenig/kg-default-nodes/src/utils/srcset-attribute.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 apps/admin/src/analytics/views/stats/newsletters/components/newsletters-kpis.tsx:304— `!emailTrackClicksEnabled && !emailTrackOpensEnabled` appears character-identically in 2 files — apps/admin/src/analytics/views/stats/newsletters/components/newsletters-kpis.tsx, apps/admin/src/posts/analytics/newsletter/newsletter.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 apps/admin/src/analytics/views/stats/newsletters/components/newsletters-kpis.tsx:301— `!emailTrackClicksEnabled || !emailTrackOpensEnabled` appears character-identically in 2 files — apps/admin/src/analytics/views/stats/newsletters/components/newsletters-kpis.tsx, apps/admin/src/posts/analytics/newsletter/newsletter.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 koenig/kg-default-cards/src/cards/embed/twitter.ts:95— `!entity.display_url || entity.display_url.startsWith('pic.twitter.com')` appears character-identically in 2 files — koenig/kg-default-cards/src/cards/embed/twitter.ts, koenig/kg-default-nodes/src/nodes/embed/types/twitter.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 ghost/core/server/services/email-analytics/automation-email-analytics-batch-processor.ts:88— `!fetchData.lastEventTimestamp || event.timestamp > fetchData.lastEventTimestamp` appears character-identically in 2 files — ghost/core/server/services/email-analytics/automation-email-analytics-batch-processor.ts, ghost/core/server/services/email-analytics/gift-email-analytics-batch-processor.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 ghost/core/server/api/endpoints/utils/serializers/input/pages.js:38— `!frame.options.columns && !frame.options.selectRaw` appears character-identically in 2 files — ghost/core/server/api/endpoints/utils/serializers/input/pages.js, ghost/core/server/api/endpoints/utils/serializers/input/posts.js. 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 ghost/core/server/api/endpoints/utils/serializers/input/authors.js:12— `!frame.options.order && !frame.options.autoOrder` appears character-identically in 4 files — ghost/core/server/api/endpoints/utils/serializers/input/authors.js, ghost/core/server/api/endpoints/utils/serializers/input/pages.js, ghost/core/server/api/endpoints/utils/serializers/input/posts.js, ghost/core/server/api/endpoints/utils/serializers/input/tags.js. 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 ghost/core/server/api/endpoints/utils/serializers/input/authors.js:8— `!frame.options.order && frame.options.filter` appears character-identically in 4 files — ghost/core/server/api/endpoints/utils/serializers/input/authors.js, ghost/core/server/api/endpoints/utils/serializers/input/pages.js, ghost/core/server/api/endpoints/utils/serializers/input/posts.js, ghost/core/server/api/endpoints/utils/serializers/input/tags.js. 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 ghost/core/server/api/endpoints/utils/serializers/input/pages.js:63— `!frame.options.withRelated && !frame.options.columns` appears character-identically in 2 files — ghost/core/server/api/endpoints/utils/serializers/input/pages.js, ghost/core/server/api/endpoints/utils/serializers/input/posts.js. 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 koenig/koenig-lexical/src/components/ui/cards/HeaderCard/v2/HeaderCard.tsx:306— `!isEditing && isEditorEmpty(headerTextEditor)` appears character-identically in 2 files — koenig/koenig-lexical/src/components/ui/cards/HeaderCard/v2/HeaderCard.tsx, koenig/koenig-lexical/src/components/ui/cards/SignupCard.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 koenig/koenig-lexical/src/components/ui/cards/HeaderCard/v2/HeaderCard.tsx:334— `!isEditing && isEditorEmpty(subheaderTextEditor)` appears character-identically in 2 files — koenig/koenig-lexical/src/components/ui/cards/HeaderCard/v2/HeaderCard.tsx, koenig/koenig-lexical/src/components/ui/cards/SignupCard.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 apps/admin/src/settings/advanced/migration-tools/content-import/archive.ts:61— `!isMetadata(parts) && parts[0] !== wrapper` appears character-identically in 2 files — apps/admin/src/settings/advanced/migration-tools/content-import/archive.ts, ghost/core/server/services/content-import/import/source.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 ghost/core/frontend/services/routing/controllers/channel.js:47— `!isNaN(postsPerPage) && postsPerPage > 0` appears character-identically in 2 files — ghost/core/frontend/services/routing/controllers/channel.js, ghost/core/frontend/services/routing/controllers/collection.js. 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.
Deprecated: @otplib/plugin-crypto REDACTED:6497— @otplib/plugin-crypto 12.0.1 is resolved in REDACTED and is marked deprecated by its publisher: "Please upgrade to v13 of otplib. Refer to otplib docs for migration paths". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: @otplib/plugin-thirty-two REDACTED:6501— @otplib/plugin-thirty-two 12.0.1 is resolved in REDACTED and is marked deprecated by its publisher: "Please upgrade to v13 of otplib. Refer to otplib docs for migration paths". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: @otplib/preset-default REDACTED:6505— @otplib/preset-default 12.0.1 is resolved in REDACTED and is marked deprecated by its publisher: "Please upgrade to v13 of otplib. Refer to otplib docs for migration paths". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: @yuku-codegen/binding-darwin-arm64 REDACTED:9669— @yuku-codegen/binding-darwin-arm64 0.6.12 is resolved in REDACTED and is marked deprecated by its publisher: "yuku-codegen is pure JavaScript since 0.14". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: @yuku-codegen/binding-darwin-x64 REDACTED:9675— @yuku-codegen/binding-darwin-x64 0.6.12 is resolved in REDACTED and is marked deprecated by its publisher: "yuku-codegen is pure JavaScript since 0.14". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: @yuku-codegen/binding-freebsd-x64 REDACTED:9681— @yuku-codegen/binding-freebsd-x64 0.6.12 is resolved in REDACTED and is marked deprecated by its publisher: "yuku-codegen is pure JavaScript since 0.14". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: @yuku-codegen/binding-linux-arm-gnu REDACTED:9687— @yuku-codegen/binding-linux-arm-gnu 0.6.12 is resolved in REDACTED and is marked deprecated by its publisher: "yuku-codegen is pure JavaScript since 0.14". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: @yuku-codegen/binding-linux-arm-musl REDACTED:9694— @yuku-codegen/binding-linux-arm-musl 0.6.12 is resolved in REDACTED and is marked deprecated by its publisher: "yuku-codegen is pure JavaScript since 0.14". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: @yuku-codegen/binding-linux-arm64-gnu REDACTED:9701— @yuku-codegen/binding-linux-arm64-gnu 0.6.12 is resolved in REDACTED and is marked deprecated by its publisher: "yuku-codegen is pure JavaScript since 0.14". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: @yuku-codegen/binding-linux-arm64-musl REDACTED:9708— @yuku-codegen/binding-linux-arm64-musl 0.6.12 is resolved in REDACTED and is marked deprecated by its publisher: "yuku-codegen is pure JavaScript since 0.14". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: @yuku-codegen/binding-linux-x64-gnu REDACTED:9715— @yuku-codegen/binding-linux-x64-gnu 0.6.12 is resolved in REDACTED and is marked deprecated by its publisher: "yuku-codegen is pure JavaScript since 0.14". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: @yuku-codegen/binding-linux-x64-musl REDACTED:9722— @yuku-codegen/binding-linux-x64-musl 0.6.12 is resolved in REDACTED and is marked deprecated by its publisher: "yuku-codegen is pure JavaScript since 0.14". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: @yuku-codegen/binding-win32-arm64 REDACTED:9729— @yuku-codegen/binding-win32-arm64 0.6.12 is resolved in REDACTED and is marked deprecated by its publisher: "yuku-codegen is pure JavaScript since 0.14". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: @yuku-codegen/binding-win32-x64 REDACTED:9735— @yuku-codegen/binding-win32-x64 0.6.12 is resolved in REDACTED and is marked deprecated by its publisher: "yuku-codegen is pure JavaScript since 0.14". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: @yuku-parser/binding-darwin-arm64 REDACTED:9741— @yuku-parser/binding-darwin-arm64 0.6.12 is resolved in REDACTED and is marked deprecated by its publisher: "yuku-parser runs on yuku-core since 0.14". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: @yuku-parser/binding-darwin-x64 REDACTED:9747— @yuku-parser/binding-darwin-x64 0.6.12 is resolved in REDACTED and is marked deprecated by its publisher: "yuku-parser runs on yuku-core since 0.14". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: @yuku-parser/binding-freebsd-x64 REDACTED:9753— @yuku-parser/binding-freebsd-x64 0.6.12 is resolved in REDACTED and is marked deprecated by its publisher: "yuku-parser runs on yuku-core since 0.14". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: @yuku-parser/binding-linux-arm-gnu REDACTED:9759— @yuku-parser/binding-linux-arm-gnu 0.6.12 is resolved in REDACTED and is marked deprecated by its publisher: "yuku-parser runs on yuku-core since 0.14". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: @yuku-parser/binding-linux-arm-musl REDACTED:9766— @yuku-parser/binding-linux-arm-musl 0.6.12 is resolved in REDACTED and is marked deprecated by its publisher: "yuku-parser runs on yuku-core since 0.14". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: @yuku-parser/binding-linux-arm64-gnu REDACTED:9773— @yuku-parser/binding-linux-arm64-gnu 0.6.12 is resolved in REDACTED and is marked deprecated by its publisher: "yuku-parser runs on yuku-core since 0.14". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: @yuku-parser/binding-linux-arm64-musl REDACTED:9780— @yuku-parser/binding-linux-arm64-musl 0.6.12 is resolved in REDACTED and is marked deprecated by its publisher: "yuku-parser runs on yuku-core since 0.14". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: @yuku-parser/binding-linux-x64-gnu REDACTED:9787— @yuku-parser/binding-linux-x64-gnu 0.6.12 is resolved in REDACTED and is marked deprecated by its publisher: "yuku-parser runs on yuku-core since 0.14". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: @yuku-parser/binding-linux-x64-musl REDACTED:9794— @yuku-parser/binding-linux-x64-musl 0.6.12 is resolved in REDACTED and is marked deprecated by its publisher: "yuku-parser runs on yuku-core since 0.14". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: @yuku-parser/binding-win32-arm64 REDACTED:9801— @yuku-parser/binding-win32-arm64 0.6.12 is resolved in REDACTED and is marked deprecated by its publisher: "yuku-parser runs on yuku-core since 0.14". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: @yuku-parser/binding-win32-x64 REDACTED:9807— @yuku-parser/binding-win32-x64 0.6.12 is resolved in REDACTED and is marked deprecated by its publisher: "yuku-parser runs on yuku-core since 0.14". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Silent fallback default in catch apps/activitypub/src/utils/get-handle.ts:11— `getHandle` swallows every exception into `return '@unknown@unknown'` — 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 apps/activitypub/src/utils/accessibility.ts:19— `parseAccessibilitySettings` 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 apps/admin-x-framework/src/utils/feature-flag-overrides.ts:31— `getStoredFeatureFlagOverrides` 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 apps/admin/src/analytics/utils/url-helpers.ts:21— `getFrontendUrl` 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 apps/admin/src/editor/publish/draft-newsletter.ts:57— `readEntries` 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 apps/admin/src/editor/session/content-text.ts:253— `lexicalToText` 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 apps/admin/src/editor/settings/access-options.ts:66— `defaultTierIds` 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 apps/admin/src/editor/settings/meta-data-fields.ts:54— `seoUrl` 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 apps/admin/src/editor/use-post-link-suggestions.ts:74— `usePostLinkSuggestions.loadIndex` 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 apps/admin/src/editor/restore/restore-screen.tsx:39— `readCopies` 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 apps/admin/src/auth/signin-redirect.ts:25— `takeSigninRedirect` 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 apps/admin/src/settings/utils/link-to-github-releases.ts:49— `linkToGitHubReleases` 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 apps/admin/test-utils/acceptance/boot-composition.ts:19— `parseLabsSettingValue` 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 apps/comments-ui/src/app-context.ts:144— `useLabs` 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 apps/portal/src/components/common/date-picker.jsx:253— `getWeekStart` 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 apps/portal/src/components/common/date-picker.jsx:290— `DatePicker` swallows every exception into `return 'en'` — 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 e2e/helpers/pages/public/public-page.ts:129— `waitForMemberAttributionReady` 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 e2e/helpers/playwright/fixture.ts:171— `frameUrl` swallows every exception into `return 'no frame'` — 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 ghost/bin/lib/duplicate-deps.ts:83— `parsedScriptFiles` 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 ghost/bin/lib/duplicate-deps.ts:138— `readVersion` swallows every exception into `return 'unknown'` — 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 ghost/core/server/services/gifts/gift-email-service.ts:150— `siteDomain` 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 ghost/core/server/services/members/single-use-token-provider.js:94— `validate` 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 ghost/core/server/auth/better-auth/knex-adapter.ts:66— `createCustomAdapter.<returned closure>.virtualsFor` 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 ghost/core/server/services/settings/settings-bread-service.js:34— `parseLabsValue` 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 ghost/core/server/auth/session/session-service.ts:406— `createSessionService.getGeolocationFromIP` swallows every exception into `return 'Unknown'` — 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.
+ 6 more in this group — see findings.md.
P2 · Observability· Console output used as the logging channel · ×25
Console output used as the logging channel apps/admin/src/home-redirect.tsx:38— `apps/admin/src/home-redirect.tsx` reports through `console.*` at line 38 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 apps/admin/src/settings/growth/embed-signup/embed-signup-form-modal.tsx:87— `apps/admin/src/settings/growth/embed-signup/embed-signup-form-modal.tsx` reports through `console.*` at line 87 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 apps/admin/src/settings/components/confirmation-modal.tsx:80— `apps/admin/src/settings/components/confirmation-modal.tsx` reports through `console.*` at line 80 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 apps/admin/src/settings/components/error-boundary.tsx:39— `apps/admin/src/settings/components/error-boundary.tsx` reports through `console.*` at line 39 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 apps/admin/src/settings/components/error-boundary.tsx:41— `apps/admin/src/settings/components/error-boundary.tsx` 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 apps/admin/src/settings/components/koenig-editor-base.tsx:74— `apps/admin/src/settings/components/koenig-editor-base.tsx` reports through `console.*` at line 74 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 apps/admin/src/settings/components/koenig-editor-base.tsx:76— `apps/admin/src/settings/components/koenig-editor-base.tsx` reports through `console.*` at line 76 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 apps/admin/src/onboarding/onboarding-route.tsx:65— `apps/admin/src/onboarding/onboarding-route.tsx` reports through `console.*` at line 65 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 apps/admin/src/onboarding/hooks/use-onboarding.ts:83— `apps/admin/src/onboarding/hooks/use-onboarding.ts` 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 apps/admin/src/members/shared-views.ts:70— `apps/admin/src/members/shared-views.ts` reports through `console.*` at line 70 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 apps/admin/src/members/hooks/use-multiple-active-subscriptions-banner.ts:86— `apps/admin/src/members/hooks/use-multiple-active-subscriptions-banner.ts` reports through `console.*` at line 86 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 apps/admin/src/members/detail/map-data/generate-map.mjs:135— `apps/admin/src/members/detail/map-data/generate-map.mjs` reports through `console.*` at line 135 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 apps/admin/src/layout/app-sidebar/shared-views.ts:35— `apps/admin/src/layout/app-sidebar/shared-views.ts` reports through `console.*` at line 35 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 apps/admin/src/layout/app-sidebar/hooks/use-navigation-preferences.ts:107— `apps/admin/src/layout/app-sidebar/hooks/use-navigation-preferences.ts` reports through `console.*` at line 107 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 apps/admin/src/hooks/use-theme.ts:65— `apps/admin/src/hooks/use-theme.ts` reports through `console.*` at line 65 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 apps/admin/src/editor/report-error.ts:32— `apps/admin/src/editor/report-error.ts` reports through `console.*` at line 32 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 apps/admin/src/apps/lib/report-error.ts:9— `apps/admin/src/apps/lib/report-error.ts` reports through `console.*` at line 9 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 ghost/core/boot.js:744— `ghost/core/boot.js` reports through `console.*` at line 744 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 ghost/core/boot.js:867— `ghost/core/boot.js` reports through `console.*` at line 867 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 ghost/core/shared/labs.js:149— `ghost/core/shared/labs.js` reports through `console.*` at line 149 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 ghost/core/shared/config/report.ts:33— `ghost/core/shared/config/report.ts` reports through `console.*` at line 33 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 ghost/core/shared/config/report.ts:50— `ghost/core/shared/config/report.ts` reports through `console.*` at line 50 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 ghost/core/shared/config/utils.ts:110— `ghost/core/shared/config/utils.ts` reports through `console.*` at line 110 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 ghost/core/frontend/src/ghost-stats/ghost-stats.js:133— `ghost/core/frontend/src/ghost-stats/ghost-stats.js` reports through `console.*` at line 133 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 ghost/core/frontend/src/ghost-stats/ghost-stats.js:235— `ghost/core/frontend/src/ghost-stats/ghost-stats.js` reports through `console.*` at line 235 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 71 significant file(s) lose their only recent owner: apps/admin/src/editor/session/editor-session.ts, apps/admin/src/editor/engine/save-engine.ts, apps/admin/src/editor/session/use-editor-session.ts, apps/sodo-search/src/components/popup-modal.tsx, apps/admin/src/editor/engine/change-tracker.ts, apps/admin/src/editor/engine/slug-machine.ts, apps/admin/src/billing/billing-app-connection.ts, ghost/core/server/lib/image/image-size.js (+63 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 49 significant file(s) lose their only recent owner: packages/metafield-types/src/index.ts, ghost/core/server/services/members-metafields/values-service.ts, ghost/core/server/services/members-metafields/definitions-service.ts, apps/admin/src/members/components/bulk-action-modals/import-members/mapping-step.tsx, ghost/core/server/services/stripe-checkout-config/service.ts, apps/admin/src/settings/membership/checkout/checkout-modal.tsx, packages/metafield-types/src/structure.ts, ghost/core/server/services/members/import-export/export/exporter.ts (+41 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 22 significant file(s) lose their only recent owner: ghost/core/server/services/automations/database-automations-repository.ts, apps/admin-x-framework/src/api/automations.ts, ghost/core/server/services/automations/database-automations-repository-2.ts, apps/portal/src/components/common/inbox-link-button.jsx, ghost/core/server/services/automations/automations-api-2.ts, ghost/core/server/services/automations/tinybird-automation-stats.ts, ghost/core/server/adapters/scheduling/scheduling-default.ts, ghost/core/server/services/automations/automations-repository-2.ts (+14 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #4 — If anonymized user #4 becomes unavailable, 19 significant file(s) lose their only recent owner: apps/shade/src/components/ui/floating-sidebar.tsx, apps/admin/src/layout/app-sidebar/sidebar-body-swap.tsx, apps/admin/src/members/detail/member-location-map.tsx, apps/shade/src/components/ui/select.stories.tsx, apps/admin/src/layout/admin-frame-top-bar.tsx, apps/admin/src/members/detail/map-data/generate-map.mjs, apps/shade/src/components/ui/tooltip.stories.tsx, apps/admin/src/editor/publish/draft-newsletter.ts (+11 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #5 — If anonymized user #5 becomes unavailable, 16 significant file(s) lose their only recent owner: apps/admin/src/apps/app-page.tsx, packages/app-contracts/src/manifest/parse.ts, apps/admin/src/apps/components/install-dialog/install-dialog.tsx, apps/admin-x-framework/src/api/app-installations.ts, packages/app-contracts/src/manifest/url.ts, packages/app-contracts/src/manifest/schema.ts, apps/admin/src/apps/lib/install-failure.ts, ghost/core/server/services/app-installations/history.ts (+8 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #6 — If anonymized user #6 becomes unavailable, 16 significant file(s) lose their only recent owner: ghost/scripts/prune.mts, tools/scripts/lib/pnpm.ts, ghost/core/shared/config/validated.ts, tools/scripts/ci/e2e-shards.ts, packages/image-transform/src/index.ts, tools/scripts/ci/compare-image-report.ts, ghost/core/shared/config/schema.ts, .pnpmfile.mjs (+8 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #7 — If anonymized user #7 becomes unavailable, 7 significant file(s) lose their only recent owner: ghost/core/server/services/content-import/import/completion-email.ts, ghost/core/server/services/content-import/import/post-repository.ts, ghost/core/server/services/content-import/import/post-data.ts, ghost/core/server/services/content-import/import/row.ts, apps/admin/src/settings/advanced/migration-tools/content-import/mapping.ts, ghost/core/server/services/content-import/csv/parse.ts, ghost/core/server/services/content-import/import/local-media-url.ts. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #8 — If anonymized user #8 becomes unavailable, 5 significant file(s) lose their only recent owner: ghost/core/server/services/settings/settings-bread-service.js, packages/api-framework/src/validators/input/all.ts, tools/gx/cli.ts, ghost/core/server/services/explore-ping/explore-ping-service.ts, packages/api-framework/src/frame.ts. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #9 — If anonymized user #9 becomes unavailable, 5 significant file(s) lose their only recent owner: ghost/core/server/services/gifts/gift-delivery-service.ts, ghost/core/server/services/gifts/gift-delivery-bookshelf-repository.ts, ghost/core/server/adapters/scheduling/signed-flush-scheduler.ts, ghost/core/server/services/gifts/gift-checkout-offer.ts, apps/admin/src/posts/list/components/post-list-row-email-status.tsx. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #10 — If anonymized user #10 becomes unavailable, 5 significant file(s) lose their only recent owner: ghost/core/server/services/machine-payments/service.ts, ghost/core/server/services/machine-payments/adapters/mpp-adapter.ts, apps/activitypub/src/views/preferences/components/account-migration/export-account.tsx, ghost/core/server/services/machine-payments/index.js, apps/activitypub/src/views/preferences/components/account-migration/utils.ts. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #11 — If anonymized user #11 becomes unavailable, 6 significant file(s) lose their only recent owner: ghost/core/server/services/jobs-service/jobs-service.ts, packages/adapters/jobs-base/src/contract-test-suite.ts, ghost/core/server/adapters/jobs/InMemoryJobsBackend.ts, ghost/core/server/api/endpoints/utils/serializers/output/utils/url.js, ghost/core/frontend/services/routing/controllers/collection.js, packages/adapters/jobs-base/src/base.ts. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #12 — If anonymized user #12 becomes unavailable, 3 significant file(s) lose their only recent owner: ghost/core/server/services/route-settings/route-settings-parser.ts, ghost/core/frontend/services/routing/api-adapter.ts, ghost/core/server/services/route-settings/dynamic-routing-service.js. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #13 — If anonymized user #13 becomes unavailable, 3 significant file(s) lose their only recent owner: apps/portal/src/utils/use-card-tilt.js, ghost/core/frontend/helpers/price.js, apps/activitypub/src/utils/screenshot.ts. Pair on, review, or document these before any departure.
Outdated (npm): @dnd-kit/sortable apps/admin/package.json:30— @dnd-kit/sortable is pinned at 7.0.2; registry.npmjs.org publishes 10.0.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @sentry/node ghost/package.json:82— @sentry/node is pinned at 7.120.4; registry.npmjs.org publishes 11.12.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @sentry/react apps/admin-x-framework/package.json:104— @sentry/react is pinned at 7.120.4; registry.npmjs.org publishes 11.12.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): cache-manager ghost/package.json:149— cache-manager is pinned at 4.1.0; registry.npmjs.org publishes 7.2.9 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): entities ghost/package.json:167— entities is pinned at 4.5.0; registry.npmjs.org publishes 9.0.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): i18next packages/i18n/package.json:70— i18next is pinned at 23.16.8; registry.npmjs.org publishes 27.1.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): inquirer ghost/test/utils/fixtures/themes/casper/package.json:59— inquirer is pinned at 8.2.7; registry.npmjs.org publishes 14.3.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): intl-messageformat ghost/package.json:188— intl-messageformat is pinned at 5.4.3; registry.npmjs.org publishes 12.1.5 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): mailgun.js ghost/package.json:203— mailgun.js is pinned at 10.4.0; registry.npmjs.org publishes 14.1.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): mingo apps/admin/package.json:68— mingo is pinned at 2.5.3; registry.npmjs.org publishes 7.2.7 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): react-dropzone apps/shade/package.json:184— react-dropzone is pinned at 14.4.1; registry.npmjs.org publishes 20.2.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): stripe e2e/package.json:58— stripe is pinned at 8.222.0; registry.npmjs.org publishes 23.1.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Orphaned file ghost/core/server/services/members/emails/update-email.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file ghost/core/server/services/newsletters/emails/verify-email.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file ghost/core/server/data/importer/importers/data/base.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file ghost/core/server/services/notifications/notifications.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file ghost/core/server/services/recommendations/service/recommendation-controller.ts:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file ghost/core/frontend/services/theme-engine/i18n/i18n.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file ghost/core/frontend/services/routing/router-manager.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file ghost/core/server/services/members/stats/members-stats.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file ghost/core/server/lib/image/blog-icon.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file ghost/core/server/lib/image/cached-image-size-from-url.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
X7 · Silent fallback defaults· Pending state with no failure state · ×9
Pending state with no failure state apps/portal/src/components/pages/recommendations-page.jsx:310— The view draws `<span class="gh-portal-recommendations-loading-container">` under `! subscribed && loading`, but `subscribed` 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.
Pending state with no failure state apps/portal/src/components/pages/recommendations-page.jsx:370— The view draws `<LoadingPage/>` under `recommendations === null`, but `recommendations` 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.
Pending state with no failure state apps/portal/src/components/pages/unsubscribe-page.jsx:266— The view draws `<LoadingPage/>` 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.
Pending state with no failure state apps/admin/src/whats-new/components/whats-new-dialog.tsx:46— The view draws `<div class="flex flex-1 items-center justify-center py-12">` under `! changelog`, but `changelog` 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.
Pending state with no failure state apps/admin/src/posts/analytics/newsletter/newsletter.tsx:354— The view draws `<CardContent class="h-[25vw] p-6">` under `isLoading && ! isNewsletterDataHidden`, but `isNewsletterDataHidden` 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.
Pending state with no failure state REDACTED:68— The view draws `<div class="flex justify-center py-4">` under `isLoading`, but `isLoading` 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.
Pending state with no failure state REDACTED:1103— The view draws `<LoadingIndicator size="lg"/>` under `isLoadingContent`, but `isLoadingContent` 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.
Pending state with no failure state REDACTED:1232— The view draws `<div class="flex flex-col items-center justify-center text-center">` under `isLoadingMoreTopLevelReplies`, but `isLoadingMoreTopLevelReplies` 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.
Pending state with no failure state apps/activitypub/src/views/feed/note.tsx:397— The view draws `<div class="flex flex-col items-center justify-center text-center">` under `isLoadingMoreTopLevelReplies`, but `isLoadingMoreTopLevelReplies` 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.
Fat interface: EditorSession (37 required operations) apps/admin/src/editor/session/editor-session.ts:164— `EditorSession` declares 37 required operations: `getState`, `getView`, `subscribe`, `getSaveSnapshot`, `isDirty`, `hasUnsavedContent`, `patchTitle`, `patchExcerpt`, `patchFeatureImage`, `patchFields`, `getFields`, `editPublishedAt`, `getPublishedAt`, `commitField`, `commitSettings`, `getSlug`, `editSlug`, `patchLexical`, `restoreRevision`, `setBaseline`, `baselineFailed`, `commitTitle`, `dispatchAutosave`, `dispatchExplicit`, `retrySave`, `invalidField`, `dispatchPublish`, `dispatchSchedule`, `dispatchRevert`, `getLiveLexical`, `recordRefetched`, `recordReloaded`, `reauthSucceeded`, `reauthAbandoned`, `leaveRequested`, `flushLocalRevision`, `dispose`. 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: EditorSessionHandle (17 required operations) apps/admin/src/editor/session/use-editor-session.ts:82— `EditorSessionHandle` declares 17 required operations: `isDirty`, `hasUnsavedContent`, `contentText`, `reload`, `restoreRevision`, `editSettings`, `stageSettings`, `commitSettings`, `commitField`, `editPublishedAt`, `retrySave`, `saveExplicit`, `requestReauth`, `reauthSucceeded`, `reauthAbandoned`, `leaveRequested`, `dispose`. 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: ChangeTracker (17 required operations) apps/admin/src/editor/engine/change-tracker.ts:113— `ChangeTracker` declares 17 required operations: `load`, `setSaved`, `saveAcknowledged`, `setBaseline`, `baselineFailed`, `setLive`, `markSaveError`, `clearSaveError`, `revisionRestored`, `verdict`, `dirtyFields`, `bodyDivergence`, `isFieldDirty`, `holdsWrite`, `savedValue`, `hasChangedSinceRevision`, `dispose`. 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: GiftRepository (17 required operations) ghost/core/server/services/gifts/gift-bookshelf-repository.ts:61— `GiftRepository` declares 17 required operations: `existsByCheckoutSessionId`, `getById`, `getByToken`, `getByPaymentIntentId`, `findPendingConsumption`, `findPendingExpiration`, `findPendingReminder`, `findUnsentReminders`, `deleteAbandonedCheckouts`, `getActiveByMember`, `getActiveByMembers`, `browsePurchaseEvents`, `browseRedemptionEvents`, `create`, `update`, `deletePendingCheckout`, `transaction`. 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.
IC1 · Incompleteness & stubs· Empty method body · ×4
Empty method body apps/comments-ui/src/utils/nav-actions.ts:12— `requestFocusedThreadView` has an empty body — confirm it's an intentional no-op and not an unfinished method.
Empty method body apps/comments-ui/src/utils/nav-actions.ts:13— `requestInstantScroll` has an empty body — confirm it's an intentional no-op and not an unfinished method.
Empty method body apps/comments-ui/src/utils/nav-actions.ts:14— `navigateBackToParent` has an empty body — confirm it's an intentional no-op and not an unfinished method.
Empty method body ghost/core/server/services/content-import/import/source.ts:22— `noCleanup` has an empty body — confirm it's an intentional no-op and not an unfinished method.
Hand-rolled JSON/XML parsing via regex ghost/core/server/services/content-import/import/media.ts:328— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex ghost/core/server/lib/image/svg-sanitizer.ts:26— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
C2 · Access Controls· No named authorization policies · ×1
No named authorization policies apps/admin-x-framework/src/utils/api/handle-response.ts:40— Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) — this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 7 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (236 single-owned of 1709 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 1709 of the 4126 production source files in this repository met that bar). They are anonymized user #14 (2 file(s)), anonymized user #15 (2 file(s)), anonymized user #16 (1 file(s)), anonymized user #17 (1 file(s)), anonymized user #18 (1 file(s)), anonymized user #19 (1 file(s)) (+1 more) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: ghost/core/frontend/src/cards/js/audio.js, apps/admin/src/settings/utils/format-url.ts, ghost/core/server/services/stats/subscription-stats-service.js, ghost/core/server/data/migrations/versions/6.0/2025-06-24-09-19-42-use-object-id-for-hardcoded-user-id.js, apps/portal/src/utils/edge-challenge.js, apps/admin/src/automations/components/canvas/use-sticky-run-summary.ts, ghost/core/server/services/email-service/domain-warming-service.ts, REDACTED (+1 more).
No ADRs found packages/app-sdk/package.json:12— 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 `packages/app-sdk/package.json` makes this repository a deployable product (line 12).
D21 · Naming Consistency· `emailCTATemplate` spells `CTA` where 13 names in the project spell it `Cta` · ×1
`emailCTATemplate` spells `CTA` where 13 names in the project spell it `Cta` koenig/kg-default-nodes/src/nodes/call-to-action/calltoaction-renderer.ts:95— 13 of 14 names in project ghost-monorepo spell the token `Cta` (13 of 14; unit: names in project ghost-monorepo containing `Cta`). Peers: PostPage.accessCtaContent (e2e/helpers/pages/public/post-page.ts:17); PostPage.accessCtaHeading (e2e/helpers/pages/public/post-page.ts:18); koenig.kg-default-nodes.src.nodes.email-cta.EmailCtaNode.EmailCtaNode (koenig/kg-default-nodes/src/nodes/email-cta/EmailCtaNode.ts:16); EmailCtaNode.$createEmailCtaNode (koenig/kg-default-nodes/src/nodes/email-cta/EmailCtaNode.ts:23); EmailCtaNode.$isEmailCtaNode (koenig/kg-default-nodes/src/nodes/email-cta/EmailCtaNode.ts:27). Rename to `emailCtaTemplate`. [rule N6]
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 6 of 50 project(s) overshoot their size bounds, lowering Project Cohesion to 7.6/10. The most over is `ghost` (169115 LoC, 1656 module-visible types across 312 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
Pass-through layer ghost/core/server/services/members/commenting/member-commenting.ts:15— MemberCommenting: all 2 public methods forward their arguments unchanged to MemberCommenting and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call MemberCommenting directly, or give the layer a job.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 10 of 1716 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 1716 of the 4126 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: ghost/core/server/services/members/emails/update-email.js, ghost/core/server/services/newsletters/emails/verify-email.js, ghost/core/server/services/notifications/notifications.js, ghost/core/server/services/recommendations/service/recommendation-controller.ts, ghost/core/frontend/services/theme-engine/i18n/i18n.js, ghost/core/frontend/services/routing/router-manager.js, ghost/core/server/services/members/stats/members-stats.js, ghost/core/server/data/importer/importers/data/base.js (and 2 more). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
DM9 · Scattered domain decisions· Rule about [children, type] decided in 2 places · ×1
Rule about [children, type] decided in 2 places — apps.admin.src.automations.utils.LexicalNode's [children, type] are judged in apps.admin.src.automations.utils, apps.admin.src.utils.is-empty-lexical — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions· Rule about [displayName, email, status] decided in 2 places · ×1
Rule about [displayName, email, status] decided in 2 places — apps.admin.src.editor.publish.flow-post.PublishFlowPost's [displayName, email, status] are judged in apps.admin.src.editor.publish.update-flow-modal, apps.admin.src.editor.publish.use-publish-flow — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
ED3 · Event naming· Event not named in past tense · ×1
Event not named in past tense: OfferCodeChangeEvent ghost/core/server/services/offers/domain/events/offer-code-change-event.js:10— `OfferCodeChangeEvent` reads as an instruction, not a fact that happened: events describe something that already occurred. Name new events for the fact that occurred (e.g. `OrderPlaced`). Do not rename this one if it is already stored or published: its type name is written with every event recorded under it, so a rename can break replay of the stored stream and every subscriber that reads it, and a clearer name does not pay for that. If it has never been written or sent, renaming it now is safe.
Disabled test apps/portal/test/app-frames.test.jsx:27— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
No SAST REDACTED:3— 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 25 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.
R8 · Dependency Hygiene· Type-only dependency 'type-fest' in production deps · ×1
Type-only dependency 'type-fest' in production deps ghost/core/frontend/meta/og-type.ts:1— Every import is type-only — move it to devDependencies.
R8 · Dependency Hygiene· Test-only dependency 'lexical' in production deps · ×1
Test-only dependency 'lexical' in production deps koenig/kg-default-nodes/package.json:80— Only test files import it (first: koenig/kg-default-nodes/test/generate-decorator-node.test.ts:3) — move it to devDependencies.
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 9/26 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.
X5 · Nullable reference types· Strict null checking is not enabled everywhere the repository type-checks · ×1
Strict null checking is not enabled everywhere the repository type-checks — 45/99 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
Null assertions (`!`) override strict null checking — ~0.6 `!` null assertions per 1k TypeScript source lines — 196 assertion(s) across the 309284 source line(s) of the 2452 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: REDACTED (28), koenig/kg-converters/src/lexical-to-mobiledoc.ts (8), apps/activitypub/src/views/profile/profile.tsx (6). 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.
Outdated (npm): @aws-sdk/client-s3 — @aws-sdk/client-s3 is pinned at 3.1161.0; registry.npmjs.org publishes 3.1168.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @eslint/js — @eslint/js is pinned at 9.39.5; registry.npmjs.org publishes 10.0.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @headlessui/react — @headlessui/react is pinned at 1.7.19; registry.npmjs.org publishes 2.2.10 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @hookform/resolvers — @hookform/resolvers is pinned at 5.9.2; registry.npmjs.org publishes 7.0.6 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @lexical/clipboard — @lexical/clipboard is pinned at 0.13.1; registry.npmjs.org publishes 0.53.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @lexical/headless — @lexical/headless is pinned at 0.13.1; registry.npmjs.org publishes 0.53.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @lexical/html — @lexical/html is pinned at 0.13.1; registry.npmjs.org publishes 0.53.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @lexical/link — @lexical/link is pinned at 0.13.1; registry.npmjs.org publishes 0.53.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @lexical/list — @lexical/list is pinned at 0.13.1; registry.npmjs.org publishes 0.53.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @lexical/rich-text — @lexical/rich-text is pinned at 0.13.1; registry.npmjs.org publishes 0.53.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @lexical/selection — @lexical/selection is pinned at 0.13.1; registry.npmjs.org publishes 0.53.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @lexical/utils — @lexical/utils is pinned at 0.13.1; registry.npmjs.org publishes 0.53.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @radix-ui/react-accordion — @radix-ui/react-accordion is pinned at 1.2.15; registry.npmjs.org publishes 1.3.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @radix-ui/react-alert-dialog — @radix-ui/react-alert-dialog is pinned at 1.1.18; registry.npmjs.org publishes 1.2.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @radix-ui/react-avatar — @radix-ui/react-avatar is pinned at 1.2.1; registry.npmjs.org publishes 1.3.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @radix-ui/react-checkbox — @radix-ui/react-checkbox is pinned at 1.3.6; registry.npmjs.org publishes 1.4.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @radix-ui/react-context-menu — @radix-ui/react-context-menu is pinned at 2.3.2; registry.npmjs.org publishes 2.4.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @radix-ui/react-dialog — @radix-ui/react-dialog is pinned at 1.1.18; registry.npmjs.org publishes 1.3.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @radix-ui/react-dropdown-menu — @radix-ui/react-dropdown-menu is pinned at 2.1.19; registry.npmjs.org publishes 2.2.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @radix-ui/react-focus-guards — @radix-ui/react-focus-guards is pinned at 1.1.4; registry.npmjs.org publishes 1.2.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @radix-ui/react-focus-scope — @radix-ui/react-focus-scope is pinned at 1.1.11; registry.npmjs.org publishes 1.3.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @radix-ui/react-form — @radix-ui/react-form is pinned at 0.1.11; registry.npmjs.org publishes 0.3.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @radix-ui/react-hover-card — @radix-ui/react-hover-card is pinned at 1.1.18; registry.npmjs.org publishes 1.2.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @radix-ui/react-label — @radix-ui/react-label is pinned at 2.1.11; registry.npmjs.org publishes 2.1.17 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @radix-ui/react-popover — @radix-ui/react-popover is pinned at 1.1.18; registry.npmjs.org publishes 1.3.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Skipped (documented): (unnamed test) packages/app-sdk/test/cli.test.ts:180— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/app-sdk/test/tooling.test.ts:82— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): renders koenig/koenig-lexical/test/unit/KoenigComposer.test.tsx:4— Skipped with a documented reason — a deferral, not lazy debt: declared with it.todo — a placeholder that registers a name and runs nothing
Skipped (documented): accepts initialState prop koenig/koenig-lexical/test/unit/KoenigComposer.test.tsx:5— Skipped with a documented reason — a deferral, not lazy debt: declared with it.todo — a placeholder that registers a name and runs nothing
Skipped (documented): accepts onChange prop koenig/koenig-lexical/test/unit/KoenigComposer.test.tsx:6— Skipped with a documented reason — a deferral, not lazy debt: declared with it.todo — a placeholder that registers a name and runs nothing
Skipped (documented): is included for absolute images when siteUrl has trailing slash koenig/kg-default-nodes/test/renderers/image-renderer.test.ts:236— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): is omitted when no contentImageSizes are passed as options koenig/kg-default-nodes/test/renderers/image-renderer.test.ts:237— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): is omitted when `srcsets: false` is passed in as an option koenig/kg-default-nodes/test/renderers/image-renderer.test.ts:238— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): is omitted when canTransformImages is provided and returns false koenig/kg-default-nodes/test/renderers/image-renderer.test.ts:239— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): is omitted when no width is provided koenig/kg-default-nodes/test/renderers/image-renderer.test.ts:240— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): is omitted when image is smaller than minimum responsive width koenig/kg-default-nodes/test/renderers/image-renderer.test.ts:241— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): omits sizes larger than image width and includes origin image width if smaller than largest responsive width koenig/kg-default-nodes/test/renderers/image-renderer.test.ts:242— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): works correctly with subdirectories koenig/kg-default-nodes/test/renderers/image-renderer.test.ts:243— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): works correctly with absolute subdirectories koenig/kg-default-nodes/test/renderers/image-renderer.test.ts:244— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): has same size omission behaviour for Unsplash as local files koenig/kg-default-nodes/test/renderers/image-renderer.test.ts:245— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): is omitted when srcset is not added koenig/kg-default-nodes/test/renderers/image-renderer.test.ts:261— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): is omitted when width is missing koenig/kg-default-nodes/test/renderers/image-renderer.test.ts:262— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): is included when only height is missing koenig/kg-default-nodes/test/renderers/image-renderer.test.ts:263— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): is omitted for standard images when width is less than 720 koenig/kg-default-nodes/test/renderers/image-renderer.test.ts:264— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): is omitted for wide images when width is less than 1200 koenig/kg-default-nodes/test/renderers/image-renderer.test.ts:265— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): is omitted for full images koenig/kg-default-nodes/test/renderers/image-renderer.test.ts:266— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): adds width/height and uses resized unsplash image koenig/kg-default-nodes/test/renderers/image-renderer.test.ts:314— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): adds width/height and uses original src when local image can't be transformed koenig/kg-default-nodes/test/renderers/image-renderer.test.ts:315— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): uses original image if size is smaller than "retina" size koenig/kg-default-nodes/test/renderers/image-renderer.test.ts:316— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): uses original image width/height if image is smaller than 600px wide koenig/kg-default-nodes/test/renderers/image-renderer.test.ts:317— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
doc comments repeat the names tools/scripts/ci/boot-modules.ts:25— 0 of 22 documented parameters and 1 of 79 summaries in `@internal/scripts` only repeat the member or parameter name (e.g. "Returns the modules that are loaded." for `findLoadedModules`). Delete the restating tags, or add what the name does not say.
doc comments repeat the names e2e/helpers/services/members-import/members-import-service.ts:192— 0 of 20 documented parameters and 1 of 307 summaries in `@tryghost/e2e` only repeat the member or parameter name (e.g. "Get current member count" for `getMemberCount`). Delete the restating tags, or add what the name does not say.
doc comments repeat the names REDACTED:935— 1 of 13 documented parameters and 1 of 154 summaries in `@tryghost/portal` only repeat the member or parameter name (e.g. "Setup Sentry" for `setupSentry`). Delete the restating tags, or add what the name does not say.
doc comments repeat the names ghost/core/frontend/helpers/get.js:70— 51 of 983 documented parameters and 38 of 2187 summaries in `ghost` only repeat the member or parameter name (e.g. "The API options" for `apiOptions`). 2 documentation tag(s) are empty. Delete the restating tags, or add what the name does not say.
Off the main sequence: @tryghost/app-contracts — @tryghost/app-contracts: abstractness 0.08, instability 0.00, distance 0.92 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
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.
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 01a1d602-7dc6-74a7-9787-2d3be0d835c3 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 175 · Warnings: 4155 · Recommendations: 668 · Info: 178 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 13-11-2026 @ 17:44 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.