Public report of iOfficeAI/AionUi, published 7 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.2). 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, 7 November 2026, 20:46 UTC · Survey ID cd_451bc3fcc9c94d359e97a6745f227e13
iOfficeAI/AionUi
Measured 7 November 2026, 20:43 UTC, at code version e108b6b
Test reliability is not measured: The JS/TS suite's lockfile was refused.
CAI scoreAt riskDown 1 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 146,645 lines of product code in 5 projects, tests not counted · Estimated rebuild effort: about 1.5 person-years · Weakest lens: Production Readiness, 40
Findings by how serious they are
323 critical1494 serious480 minor
5 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
7 November 2026, 20:43 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
87of 87 dimensions measured by tools.
2189of 2297 findings point to an exact file and line, so you can open each one in the code. The other 108 concern the repository as a whole, such as missing documentation.
87dimensions across 7 lenses, read from 146,645 lines of product code in 5 projects.
iOfficeAI/AionUi is rated At risk because critical security findings are open. Its score is held back because we found no automated security scanning of the code, its secrets or its dependencies, and it has packages under a licence on your banned list. It scores 43 out of 100, which the At risk rating leaves unchanged.
Production Readiness, at 40, is the weakest lens by a small margin, and the weakest lens counts most in the score. The best first step for the work it takes is making the tests check their results, worth about 2 points. Replacing the 15 packages under a banned licence would lift Production Readiness itself, worth about 3 points.
Ninety-six known security holes in the packages the code depends on can be used by attackers. Ninety-two pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with, and thirty-seven controls can't be used without a mouse. Updating the vulnerable packages, pinning each tool to an exact version and making the controls work with a keyboard would close these risks. Limiting each secret to its own step would fix the 15 secrets exposed to more of the pipeline than needed, and the 11 places where the code runs text as code or as a command need a direct call instead. The 22 buttons or links with no name need a name, even when they only show an icon.
The product code is 146,645 lines, about €220,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.
The weakest lenses score close to each other, so improving any of them moves the score.
Code composition: what the lines of code are
Product code 59%Tests 41%
New since the last survey: 114 findings
These 114 critical or serious findings weren't in the previous survey, on 21 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
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: 732 findings
These 732 critical or serious findings were in the previous survey, on 21 October 2026, and are gone from this one. The first 100 are listed here.
€72,000 to €360,000, for 1,205 to 3,823 hours of work, about 1.5 person-years for 1 to 3 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.7 at a score of 43. 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: 146,645 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 1 No assertions (empty test) finding(s) in Test Quality — start with equivalence.test.ts.
Raises the score by about 2 points · Low effort · Test Quality
2
Resolve the 15 Banned license finding(s) in License Compliance — start with REDACTED (15).
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 €220,000 to build again, about 1.5 person-years of work. Its weakest lens is Production Readiness, at 40 (Weak). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 1 No assertions (empty test) finding(s) in Test Quality. Of all the actions in this report, it raises the score most for the work it takes: about 2 points for low effort, because it clears the 1 Test Quality findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 4.7 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 8% to 19% on every change. The history of the code shows how much it changes: about 43,478 lines over the last 90 days, which is about 176,327 lines a year. At that pace, the extra work comes to an estimated 36.7 to 220.4 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.
469 modules, with 280 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; 429 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.
common.api.OpenAI2GeminiConverter uses common.api.OpenAI2AnthropicConverter, so a change to common.api.OpenAI2AnthropicConverter can break common.api.OpenAI2GeminiConverter, while a change to common.api.OpenAI2GeminiConverter can't break common.api.OpenAI2AnthropicConverter.
Position
Below the diagonal: common.api.OpenAI2GeminiConverter uses a module listed above it, which is the healthy direction.
common.chat uses common.adapter.ipcBridge, so a change to common.adapter.ipcBridge can break common.chat, while a change to common.chat can't break common.adapter.ipcBridge.
Position
Below the diagonal: common.chat uses a module listed above it, which is the healthy direction.
common.chat uses common.chat.chatLib, so a change to common.chat.chatLib can break common.chat, while a change to common.chat can't break common.chat.chatLib.
Position
Below the diagonal: common.chat uses a module listed above it, which is the healthy direction.
common.chat uses common.types.platform.acpTypes, so a change to common.types.platform.acpTypes can break common.chat, while a change to common.chat can't break common.types.platform.acpTypes.
Position
Below the diagonal: common.chat uses a module listed above it, which is the healthy direction.
common.config uses common.config.storage, so a change to common.config.storage can break common.config, while a change to common.config can't break common.config.storage.
Position
Below the diagonal: common.config uses a module listed above it, which is the healthy direction.
common.types.team.database uses common.config.storage, so a change to common.config.storage can break common.types.team.database, while a change to common.types.team.database can't break common.config.storage.
Position
Below the diagonal: common.types.team.database uses a module listed above it, which is the healthy direction.
common.utils uses common.config.storage, so a change to common.config.storage can break common.utils, while a change to common.utils can't break common.config.storage.
Position
Below the diagonal: common.utils uses a module listed above it, which is the healthy direction.
process.bridge uses common.adapter.ipcBridge, so a change to common.adapter.ipcBridge can break process.bridge, while a change to process.bridge can't break common.adapter.ipcBridge.
Position
Below the diagonal: process.bridge uses a module listed above it, which is the healthy direction.
process.bridge uses common.update.updateTypes, so a change to common.update.updateTypes can break process.bridge, while a change to process.bridge can't break common.update.updateTypes.
Position
Below the diagonal: process.bridge uses a module listed above it, which is the healthy direction.
process.utils uses common.adapter.ipcBridge, so a change to common.adapter.ipcBridge can break process.utils, while a change to process.utils can't break common.adapter.ipcBridge.
Position
Below the diagonal: process.utils uses a module listed above it, which is the healthy direction.
process.utils uses common.config.storage, so a change to common.config.storage can break process.utils, while a change to process.utils can't break common.config.storage.
Position
Below the diagonal: process.utils uses a module listed above it, which is the healthy direction.
process.utils uses common.types.agent.assistantTypes, so a change to common.types.agent.assistantTypes can break process.utils, while a change to process.utils can't break common.types.agent.assistantTypes.
Position
Below the diagonal: process.utils uses a module listed above it, which is the healthy direction.
renderer.components.settings uses common.update.updateTypes, so a change to common.update.updateTypes can break renderer.components.settings, while a change to renderer.components.settings can't break common.update.updateTypes.
Position
Below the diagonal: renderer.components.settings uses a module listed above it, which is the healthy direction.
renderer.components.settings.SettingsModal.contents.channels uses common.types.agent.assistantTypes, so a change to common.types.agent.assistantTypes can break renderer.components.settings.SettingsModal.contents.channels, while a change to renderer.components.settings.SettingsModal.contents.channels can't break common.types.agent.assistantTypes.
Position
Below the diagonal: renderer.components.settings.SettingsModal.contents.channels uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in renderer.components.settings.SettingsModal.contents.channels uses a type in renderer.pages.conversation.platforms.gemini.useGoogleModelSelection.
renderer.components.settings.SettingsModal.contents.channels uses renderer.pages.conversation.platforms.gemini.useGoogleModelSelection, so a change to renderer.pages.conversation.platforms.gemini.useGoogleModelSelection can break renderer.components.settings.SettingsModal.contents.channels, while a change to renderer.components.settings.SettingsModal.contents.channels can't break renderer.pages.conversation.platforms.gemini.useGoogleModelSelection.
Position
Below the diagonal: renderer.components.settings.SettingsModal.contents.channels uses a module listed above it, which is the healthy direction.
renderer.hooks.agent uses common.config.storage, so a change to common.config.storage can break renderer.hooks.agent, while a change to renderer.hooks.agent can't break common.config.storage.
Position
Below the diagonal: renderer.hooks.agent uses a module listed above it, which is the healthy direction.
renderer.hooks.agent uses common.types.agent.assistantTypes, so a change to common.types.agent.assistantTypes can break renderer.hooks.agent, while a change to renderer.hooks.agent can't break common.types.agent.assistantTypes.
Position
Below the diagonal: renderer.hooks.agent uses a module listed above it, which is the healthy direction.
renderer.hooks.agent uses common.types.platform.acpTypes, so a change to common.types.platform.acpTypes can break renderer.hooks.agent, while a change to renderer.hooks.agent can't break common.types.platform.acpTypes.
Position
Below the diagonal: renderer.hooks.agent uses a module listed above it, which is the healthy direction.
renderer.hooks.file uses renderer.hooks.file.useUploadState, so a change to renderer.hooks.file.useUploadState can break renderer.hooks.file, while a change to renderer.hooks.file can't break renderer.hooks.file.useUploadState.
Position
Below the diagonal: renderer.hooks.file uses a module listed above it, which is the healthy direction.
renderer.pages.conversation.Messages uses common.chat.chatLib, so a change to common.chat.chatLib can break renderer.pages.conversation.Messages, while a change to renderer.pages.conversation.Messages can't break common.chat.chatLib.
Position
Below the diagonal: renderer.pages.conversation.Messages uses a module listed above it, which is the healthy direction.
renderer.pages.conversation.Preview.components.PreviewPanel uses common.types.chatFile, so a change to common.types.chatFile can break renderer.pages.conversation.Preview.components.PreviewPanel, while a change to renderer.pages.conversation.Preview.components.PreviewPanel can't break common.types.chatFile.
Position
Below the diagonal: renderer.pages.conversation.Preview.components.PreviewPanel uses a module listed above it, which is the healthy direction.
renderer.pages.conversation.Preview.context.PreviewContext uses common.types.chatFile, so a change to common.types.chatFile can break renderer.pages.conversation.Preview.context.PreviewContext, while a change to renderer.pages.conversation.Preview.context.PreviewContext can't break common.types.chatFile.
Position
Below the diagonal: renderer.pages.conversation.Preview.context.PreviewContext uses a module listed above it, which is the healthy direction.
renderer.pages.conversation.Preview.context.PreviewContext uses common.types.office.preview, so a change to common.types.office.preview can break renderer.pages.conversation.Preview.context.PreviewContext, while a change to renderer.pages.conversation.Preview.context.PreviewContext can't break common.types.office.preview.
Position
Below the diagonal: renderer.pages.conversation.Preview.context.PreviewContext uses a module listed above it, which is the healthy direction.
renderer.pages.settings.AgentSettings uses common.types.agent.assistantTypes, so a change to common.types.agent.assistantTypes can break renderer.pages.settings.AgentSettings, while a change to renderer.pages.settings.AgentSettings can't break common.types.agent.assistantTypes.
Position
Below the diagonal: renderer.pages.settings.AgentSettings uses a module listed above it, which is the healthy direction.
renderer.pages.settings.AgentSettings uses common.types.platform.acpTypes, so a change to common.types.platform.acpTypes can break renderer.pages.settings.AgentSettings, while a change to renderer.pages.settings.AgentSettings can't break common.types.platform.acpTypes.
Position
Below the diagonal: renderer.pages.settings.AgentSettings uses a module listed above it, which is the healthy direction.
renderer.utils.chat uses common.chat.chatLib, so a change to common.chat.chatLib can break renderer.utils.chat, while a change to renderer.utils.chat can't break common.chat.chatLib.
Position
Below the diagonal: renderer.utils.chat uses a module listed above it, which is the healthy direction.
renderer.utils.chat uses common.config.storage, so a change to common.config.storage can break renderer.utils.chat, while a change to renderer.utils.chat can't break common.config.storage.
Position
Below the diagonal: renderer.utils.chat uses a module listed above it, which is the healthy direction.
renderer.utils.file uses common.types.chatFile, so a change to common.types.chatFile can break renderer.utils.file, while a change to renderer.utils.file can't break common.types.chatFile.
Position
Below the diagonal: renderer.utils.file uses a module listed above it, which is the healthy direction.
renderer.utils.file uses common.types.office.preview, so a change to common.types.office.preview can break renderer.utils.file, while a change to renderer.utils.file can't break common.types.office.preview.
Position
Below the diagonal: renderer.utils.file uses a module listed above it, which is the healthy direction.
renderer.utils.model uses common.config.storage, so a change to common.config.storage can break renderer.utils.model, while a change to renderer.utils.model can't break common.config.storage.
Position
Below the diagonal: renderer.utils.model uses a module listed above it, which is the healthy direction.
renderer.utils.model uses common.types.agent.assistantTypes, so a change to common.types.agent.assistantTypes can break renderer.utils.model, while a change to renderer.utils.model can't break common.types.agent.assistantTypes.
Position
Below the diagonal: renderer.utils.model uses a module listed above it, which is the healthy direction.
renderer.utils.model uses common.types.platform.acpTypes, so a change to common.types.platform.acpTypes can break renderer.utils.model, while a change to renderer.utils.model can't break common.types.platform.acpTypes.
Position
Below the diagonal: renderer.utils.model uses a module listed above it, which is the healthy direction.
common.adapter uses common.adapter.ipcBridge, so a change to common.adapter.ipcBridge can break common.adapter, while a change to common.adapter can't break common.adapter.ipcBridge.
Position
Below the diagonal: common.adapter uses a module listed above it, which is the healthy direction.
common.adapter uses common.types.team.teamTypes, so a change to common.types.team.teamTypes can break common.adapter, while a change to common.adapter can't break common.types.team.teamTypes.
Position
Below the diagonal: common.adapter uses a module listed above it, which is the healthy direction.
common.adapter uses common.types.team.database, so a change to common.types.team.database can break common.adapter, while a change to common.adapter can't break common.types.team.database.
Position
Below the diagonal: common.adapter uses a module listed above it, which is the healthy direction.
common.api.GeminiRotatingClient uses common.api.OpenAI2AnthropicConverter, so a change to common.api.OpenAI2AnthropicConverter can break common.api.GeminiRotatingClient, while a change to common.api.GeminiRotatingClient can't break common.api.OpenAI2AnthropicConverter.
Position
Below the diagonal: common.api.GeminiRotatingClient uses a module listed above it, which is the healthy direction.
common.api.GeminiRotatingClient uses common.api.RotatingApiClient, so a change to common.api.RotatingApiClient can break common.api.GeminiRotatingClient, while a change to common.api.GeminiRotatingClient can't break common.api.RotatingApiClient.
Position
Below the diagonal: common.api.GeminiRotatingClient uses a module listed above it, which is the healthy direction.
common.api.GeminiRotatingClient uses common.api.OpenAI2GeminiConverter, so a change to common.api.OpenAI2GeminiConverter can break common.api.GeminiRotatingClient, while a change to common.api.GeminiRotatingClient can't break common.api.OpenAI2GeminiConverter.
Position
Below the diagonal: common.api.GeminiRotatingClient uses a module listed above it, which is the healthy direction.
process.services.database.IConversationRepository uses common.chat.chatLib, so a change to common.chat.chatLib can break process.services.database.IConversationRepository, while a change to process.services.database.IConversationRepository can't break common.chat.chatLib.
Position
Below the diagonal: process.services.database.IConversationRepository uses a module listed above it, which is the healthy direction.
process.services.database.IConversationRepository uses common.config.storage, so a change to common.config.storage can break process.services.database.IConversationRepository, while a change to process.services.database.IConversationRepository can't break common.config.storage.
Position
Below the diagonal: process.services.database.IConversationRepository uses a module listed above it, which is the healthy direction.
process.services.database.IConversationRepository uses common.types.team.database, so a change to common.types.team.database can break process.services.database.IConversationRepository, while a change to process.services.database.IConversationRepository can't break common.types.team.database.
Position
Below the diagonal: process.services.database.IConversationRepository uses a module listed above it, which is the healthy direction.
renderer.pages.conversation.Preview.context uses common.types.chatFile, so a change to common.types.chatFile can break renderer.pages.conversation.Preview.context, while a change to renderer.pages.conversation.Preview.context can't break common.types.chatFile.
Position
Below the diagonal: renderer.pages.conversation.Preview.context uses a module listed above it, which is the healthy direction.
renderer.pages.conversation.Preview.context uses common.types.office.preview, so a change to common.types.office.preview can break renderer.pages.conversation.Preview.context, while a change to renderer.pages.conversation.Preview.context can't break common.types.office.preview.
Position
Below the diagonal: renderer.pages.conversation.Preview.context uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in renderer.pages.conversation.Preview.context uses a type in renderer.pages.conversation.Preview.context.PreviewContext.
renderer.pages.conversation.Preview.context uses renderer.pages.conversation.Preview.context.PreviewContext, so a change to renderer.pages.conversation.Preview.context.PreviewContext can break renderer.pages.conversation.Preview.context, while a change to renderer.pages.conversation.Preview.context can't break renderer.pages.conversation.Preview.context.PreviewContext.
Position
Below the diagonal: renderer.pages.conversation.Preview.context uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 55% · Adequate · gated by D1, D2 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
171
High / Critical
A03:2025 — Software Supply Chain Failures
155
High / Critical
A02:2025 — Security Misconfiguration
5
High / Critical
A07:2025 — Authentication Failures
3
High / Critical
Roadmap
Top priorities: Resolve the 15 Banned license finding(s) in License Compliance — start with REDACTED (15); Resolve the 13 Outdated (npm) finding(s) in Dependency Hygiene — start with REDACTED (13); 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.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 No assertions (empty test) finding(s) in Test Quality — start with equivalence.test.ts.
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.
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.
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 — 323
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 — 1494
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 — 480
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 5
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 87 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 — 87 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, 2189 of 2297 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the dependency install for the repository root failed in the analyzer sandbox (npm error code EUNSUPPORTEDPROTOCOL), so the suite never ran. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo — a Codecov configuration (codecov.yml, target 50%) and a coverage step in CI (`codecov/codecov-action`) shows coverage is measured in your own CI. Commit the lcov/Cobertura report it produces and the real number is read on the next scan. You can widen what we reach: optional: commit the lcov/Cobertura report your CI produces, and the real number is read on the next scan.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the vitest suite in the repository root was NOT MEASURED: the dependency install for the repository root failed in the analyzer sandbox (npm error code EUNSUPPORTEDPROTOCOL), 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 — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the vitest suite in packages/shared-scripts/ was NOT MEASURED: the dependency install for packages/shared-scripts/ failed in the analyzer sandbox (npm error code EUNSUPPORTEDPROTOCOL), 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 — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the vitest suite in packages/web-cli/ was NOT MEASURED: the dependency install for packages/web-cli/ failed in the analyzer sandbox (npm error code EUNSUPPORTEDPROTOCOL), 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 — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the vitest suite in packages/web-host/ was NOT MEASURED: the dependency install for packages/web-host/ failed in the analyzer sandbox (npm error code EUNSUPPORTEDPROTOCOL), 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 deterministic naming 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. Until then its declarations carry no naming verdict this run — this says nothing about whether its 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 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is an ADMISSION gap, not an environment fault: it declares a published package (REDACTED), but no published-package marker D22 reads admitted any project here. D22 DOES collect the public API of every language in this tree, and admits a project only when its manifest makes that ecosystem's publication act in a form the marker recognises — so what is missing is not a collector but an admission rule for the publication act this repository makes, if it makes one. The remedy is a better discriminator for that marker — not a collector, and no change to the scan image can close it. The marker's rules are measured to refuse applications, so one refused repository is the rule working as calibrated; several are the evidence that it is too strict. For npm the surface is what a published REDACTED's entry points (exports, main, module, types) export, followed through the source; an entry that names build output the tree does not commit (dist/, build/) is not followed back to source, because only a tsconfig outDir/rootDir pair states that mapping and a bundler's input lives in executable configuration this engine does not evaluate.
D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `packages/desktop/src/common/adapter/ipcBridge.ts`, `packages/desktop/src/common/config/configMigration.ts`, `packages/desktop/src/common/config/storage.ts`, `packages/desktop/src/common/types/feedbackDiagnostics.ts`, `packages/desktop/src/process/bridge/updateBridge.ts`, … (+6 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
AC2 Forms & labels — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 50 further occurrence(s) are not listed individually; the score already reflects all 90.
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. 85 further occurrence(s) are not listed individually; the score already reflects all 125.
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. 1 further occurrence(s) are not listed individually; the score already reflects all 41.
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 REDACTED (REDACTED). docker build failed (exit -1) — #10 3.141 Setting up libicu76:amd64 (76.1-4) ... #10 3.142 Setting up libc-dev-bin (2.41-12+deb13u4) ... #10 3.142 Setting up icu-devtools (76.1-4) ... #10 3.142 Setting up libc6-dev:amd64 (2.41-12+deb13u4) ... #10 3.142 Setting up libicu-dev:amd64 (76.1-4) ... #10 3.142 Processing triggers for libc-bin (2.41-12+deb13u4) ... #10 DONE 3.2s #11 [builder 3/9] RUN npm install -g bun; 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.
IC1 Incompleteness & stubs — 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. 220 further occurrence(s) are not listed individually; the score already reflects all 260.
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.
P2 Observability — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 534 further occurrence(s) are not listed individually; the score already reflects all 574.
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. 278 further occurrence(s) are not listed individually; the score already reflects all 318.
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. 43 further occurrence(s) are not listed individually; the score already reflects all 83.
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. 54 further occurrence(s) are not listed individually; the score already reflects all 94.
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. 85 further occurrence(s) are not listed individually; the score already reflects all 125.
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. 179 further occurrence(s) are not listed individually; the score already reflects all 219.
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. 1 further occurrence(s) are not listed individually; the score already reflects all 41.
Repo exclusion declarations: 1 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.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
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.
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.
AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
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.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
231 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was index.SendBox at 302. A further 1 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being SpeechStreamClient.startSpeechStream at 19 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: packages/desktop/src/renderer/services/speech/SpeechStreamClient.ts (SpeechStreamClient.startSpeechStream at 19). 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.
+ 225 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 index.SendBox (cyclomatic 302), ChannelModalContent.ChannelModalContent (cyclomatic 122). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cyclomatic Complexity from 2.0 to about 2.6/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
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.
+ 235 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 3 bodies over 120 down to 120 or less in Cognitive Complexity — start with PasteServiceClass.handlePaste (cognitive 170), ChannelModalContent.ChannelModalContent (cognitive 158), main.BackendStartupFailureDialog (cognitive 128). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 3 together lifts Cognitive Complexity from 2.0 to about 2.3/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes4.9 / 10Weak✓ 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 146 FunctionTooLong finding(s) in God Classes — start with index.tsx (10), useResizableSplit.tsx (3), useAssistantEditor.ts (2). — One of this dimension's main actionable groups (146 warning-level).
Resolve the 36 FileTooLong finding(s) in God Classes — start with ipcBridge.ts, index.tsx, migrations.ts. — One of this dimension's main actionable groups (36 warning-level).
Resolve the 24 ClassTooLong finding(s) in God Classes — start with SkillsHubSettings.tsx, REDACTED, ChannelModalContent.tsx. — One of this dimension's main actionable groups (24 warning-level).
Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling8.4 / 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.
5 production modules (npm), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 1 module(s) off the main sequence, with abstractness counted on 4 of the 5 (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: @aionui/web-host
What to do
Resolve the 1 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
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.
D9 · Test Distribution8.4 / 10Strong✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
5320 test methods: 4639 unit, 9 integration, 0 BDD, 672 e2e. The JavaScript/TypeScript suite contributes 5320 `it`/`test` case(s) across 655 test file(s) declaring at least one; its tier split is read from package names and paths only.
What to do
Improve Test Distribution — currently 8.4/10. — 5320 test methods: 4639 unit, 9 integration, 0 BDD, 672 e2e. The JavaScript/TypeScript suite contributes 5320 `it`/`test` case(s) across 655 test file(s) declaring at least one; its tier split is read from package names and paths only.
Detailed fixes: d9_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality9.0 / 10Adequategated by 1 critical finding✓ 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.
246 skipped (3 with a documented reason), 27 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 5320 tests.
No assertions (empty test): placeholder - equivalence test to be recreated if neededpackages/web-host/tests/equivalence.test.ts:13
Skipped test: skipped: fixture files not available · ×243tests/integration/migrateAssistants.realFixture.test.ts:263
No assertions: emit is a no-op function · ×26tests/unit/common-adapter/httpBridge.test.ts:413
Mock-dominated test: captures and flushes a dedicated backend startup failure with diagnostics · ×71tests/unit/sentry.test.ts:139
Skipped (documented): Backend port conflict: throws and does not leak resources · ×3packages/web-host/tests/start-web-host.test.ts:64
What to do
Resolve the 1 No assertions (empty test) finding(s) in Test Quality — start with equivalence.test.ts. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 243 Skipped test finding(s) in Test Quality — start with conversation-full-cycle.e2e.ts (40), assistant-settings-conversation-defaults.e2e.ts (18), ext-settings-tab.e2e.ts (9). — One of this dimension's main actionable groups (243 warning-level).
Resolve the 26 No assertions finding(s) in Test Quality — start with httpBridge.test.ts (3), navigation.e2e.ts (3), ext-acp.e2e.ts (2). — One of this dimension's main actionable groups (26 warning-level).
Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
95 outdated direct production npm dependency(ies) of 131 graded, 2 pinning defect(s), across 6 REDACTED (6 of them the product) and 2 committed lockfile(s). Development dependencies are deliberately not graded for currency: that grade is about what SHIPS. 0 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.
One package at two majors across the workspace: i18next · ×2
Outdated (npm): expo · ×13REDACTED:39
Outdated (npm): @agentclientprotocol/sdk · ×82
What to do
Resolve the 13 Outdated (npm) finding(s) in Dependency Hygiene — start with REDACTED (13). — One of this dimension's main actionable groups (13 recommendation-level).
Resolve the 2 One package at two majors across the workspace finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (2 warning-level).
Enforce Dependency Hygiene in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
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.
15 of 1496 shipped npm package(s) use a banned license. Licences were resolved from registry.npmjs.org over the 1496 package(s) this repository's committed lockfile installs for a consumer — its 133 production, optional and peer dependency(ies), across 6 product REDACTED manifest(s), and everything those install in turn. Its 67 `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. 1 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 Apache-2.0, which is its own choice and is not judged here.
Resolve the 15 Banned license finding(s) in License Compliance — start with REDACTED (15). — One of this dimension's main actionable groups (15 issue-level).
Enforce License Compliance in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
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.
Resolve the 59 Hotspot finding(s) in Churn × Complexity Hotspots — start with index.tsx (5), PreviewPanel.tsx, ExplorerPanel.tsx. — One of this dimension's main actionable groups (59 warning-level).
Resolve the 1 Repeated repair finding(s) in Churn × Complexity Hotspots — start with ShadowView.tsx. — One of this dimension's main actionable groups (1 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 Factor9.5 / 10Exemplary✓ 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.
30 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is packages/desktop/src/renderer/pages/conversation/explorer/ExplorerContainer.tsx. Counted over 564 of the 870 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1 · ×4
Further sole-owners (lower concentration)
✓ On the Gold path — maintain.
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.
3 deducted task-comment markers across 141428 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 3 TodoComment finding(s) in Explicit Debt — start with useSendBoxDraft.ts (2), chatAionrs.ts. — One of this dimension's main actionable groups (3 warning-level).
Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
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. 82 document(s) read across 5 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.
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.
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.
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 · ×2packages/desktop/src/common/config/storage.ts:435
What to do
Resolve the 77 redundant comment finding(s) in Comment Value — start with boards-rendering.e2e.ts (4), search.e2e.ts (4), REDACTED (3). — One of this dimension's main actionable groups (77 recommendation-level).
Detailed fixes: d24_recommendation.md · top locations in Appendix A, every location in findings.md.
2 of 5 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.
30 % of calls cross a namespace and 0 % go through an interface, but 99 % 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.
2 finding(s): 0 critical, 2 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
REDACTED
What to do
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 REDACTED 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).
171 finding(s): 0 critical, 128 high, 43 medium, 0 low. 87 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 14 file(s) — `packages/desktop/src/common/adapter/ipcBridge.ts`, `packages/desktop/src/common/config/configMigration.ts` (line 442), `packages/desktop/src/common/config/storage.ts` (line 284), `packages/desktop/src/common/types/feedbackDiagnostics.ts` (line 89), `packages/desktop/src/process/bridge/updateBridge.ts` (line 654), … (+9 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 8 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
+ 12 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 3 REDACTED finding(s) charged to Static Analysis (SAST) — the other 87 are reported here at file:line but scored by D36 (supply-chain provenance), which charges them once. — One of this dimension's main actionable groups (90 issue-level, 3 of them charged here).
Resolve the 11 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (5), REDACTED (3), REDACTED (2). — One of this dimension's main actionable groups (11 issue-level).
Resolve the 10 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (6), REDACTED (2), REDACTED. — One of this dimension's main actionable groups (10 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 89 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (75), REDACTED (14). — One of this dimension's main actionable groups (89 issue-level).
Resolve the 43 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (41), REDACTED (2). — One of this dimension's main actionable groups (43 warning-level).
Resolve the 7 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (7). — One of this dimension's main actionable groups (7 issue-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 1 High IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 3 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (3). — One of this dimension's main actionable groups (3 warning-level).
Resolve the 1 Low IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
64 of 564 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is REDACTED. Counted over 564 of the 870 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Orphaned knowledge · ×2REDACTED:1
Orphaned file · ×62REDACTED:1
Further orphaned files (smaller)
What to do
Resolve the 2 Orphaned knowledge finding(s) in Knowledge Freshness — start with REDACTED, benchmark-startup.ts. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 62 Orphaned file finding(s) in Knowledge Freshness — start with index.tsx (3), REDACTED, protocolDetector.ts. — One of this dimension's main actionable groups (62 recommendation-level).
Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
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 10 Change coupling finding(s) in Change Coupling — start with AcpModelSelector.tsx (2), migrations.ts, electron.ts. — One of this dimension's main actionable groups (10 warning-level).
Resolve the 2 Change-coupling hub finding(s) in Change Coupling — start with InstallationIntegrityDialog.tsx, ipcBridge.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.
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
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 — 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 — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 104 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
✓ On the Gold path — maintain.
Detailed fixes: d44_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives6.2 / 10Adequate✓ Tool-verified
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
A <object> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content. — packages/desktop/src/renderer/pet/pet.html:29
What to do
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Do you agree with this assessment?
AC2 · Forms & labels4.3 / 10Weak✓ Tool-verified
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
This 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. (×12) — mobile/app/connect.tsx:139, mobile/src/components/chat/ChatInputBar.tsx:37, mobile/src/components/chat/ChatSidebar.tsx:214, …
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. (×2) — mobile/src/components/chat/ChatSidebar.tsx:164, packages/desktop/src/renderer/components/settings/ScaleControl.tsx:110
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. (×13) — packages/desktop/src/renderer/components/Markdown/MermaidBlock.tsx:382, REDACTED:480, packages/desktop/src/renderer/components/chat/MobileActionSheet/MobileActionSheet.tsx:133, …
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). (×7) — packages/desktop/src/renderer/components/base/ModalWrapper.tsx:26, REDACTED:647, REDACTED:777, …
This <span> 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. — packages/desktop/src/renderer/components/layout/Sider/SiderItem.tsx:132
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. — packages/desktop/src/renderer/components/media/WebviewHost.tsx:758
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. (×3) — packages/desktop/src/renderer/components/settings/SettingsModal/contents/FeedbackReportModal.tsx:401, packages/desktop/src/renderer/components/settings/SettingsModal/contents/FeedbackReportModal.tsx:420, packages/desktop/src/renderer/components/settings/SettingsModal/contents/FeedbackReportModal.tsx:441
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. — packages/desktop/src/renderer/components/settings/SettingsModal/contents/ToolsModalContent.tsx:602
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.9 / 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"). (×4) — packages/desktop/src/renderer/index.html:2, packages/desktop/src/renderer/pet/pet-confirm.html:2, packages/desktop/src/renderer/pet/pet-hit.html:2, …
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="root">, so there is no content here to wrap — render the <main> from the component mounted into it. — packages/desktop/src/renderer/index.html:2
An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label. — packages/desktop/src/renderer/pages/conversation/Preview/components/renderers/HTMLRenderer.tsx:749
A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>. (×3) — packages/desktop/src/renderer/pet/pet-confirm.html:2, packages/desktop/src/renderer/pet/pet-hit.html:2, packages/desktop/src/renderer/pet/pet.html:2
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×3) — packages/desktop/src/renderer/pet/pet-confirm.html:2, packages/desktop/src/renderer/pet/pet.html:2, public/pet-states/preview.html:2
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="hit">, so there is no content here to wrap — render the <main> from the component mounted into it. — packages/desktop/src/renderer/pet/pet-hit.html:2
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".
A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. (×32) — REDACTED:244, packages/desktop/src/renderer/components/Markdown/MermaidBlock.tsx:382, REDACTED:480, …
This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. (×2) — REDACTED:213, packages/desktop/src/renderer/components/chat/MobileActionSheet/MobileActionSheet.tsx:134
This <span> 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) — packages/desktop/src/renderer/components/ShimmerText.tsx:63, packages/desktop/src/renderer/components/agent/MarqueePillLabel.tsx:81
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}. (×3) — packages/desktop/src/renderer/components/chat/SendBox/index.tsx:2057, packages/desktop/src/renderer/components/layout/Layout.tsx:379, packages/desktop/src/renderer/components/layout/Layout.tsx:401
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. — packages/desktop/src/renderer/components/settings/SettingsModal/contents/ToolsModalContent.tsx:577
What to do
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.
Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
<span> 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:. — packages/desktop/src/renderer/components/agent/RuntimeSelectorPill.tsx:32
<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) — packages/desktop/src/renderer/components/chat/SlashCommandMenu.tsx:92, packages/desktop/src/renderer/pages/conversation/GroupedHistory/ConversationSearchPopover.tsx:387, packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillsHubSettings.tsx:578, …
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. — packages/desktop/src/renderer/components/settings/SettingsModal/contents/FeedbackReportModal.tsx:476
<div> moves — its inline style sets `animation: message-list-skeleton-shimmer 1.4s ease-in-out infinite` — 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:. — packages/desktop/src/renderer/pages/conversation/Messages/MessageList.tsx:195
<div> 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). — packages/desktop/src/renderer/pages/conversation/components/ChatTitleEditor.tsx:100
<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). — packages/desktop/src/renderer/pages/team/components/TeamTabs.tsx:152
`::selection` sets color: white on background-color: #22d3ee — 1.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — examples/hello-world-extension/themes/ocean-breeze.css:474
`::selection` sets color: white on background-color: #fb923c — 2.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — examples/hello-world-extension/themes/sunset-glow.css:465
`.wsDropdownSearchInput` 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. — packages/desktop/src/renderer/pages/guid/index.module.css:262
`.conversation-search-modal__search-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — packages/desktop/src/renderer/pages/conversation/GroupedHistory/ConversationSearchPopover.css:198
`.conversation-search-modal__search-input: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. — packages/desktop/src/renderer/pages/conversation/GroupedHistory/ConversationSearchPopover.css:238
`.send-button-custom` 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. — packages/desktop/src/renderer/components/chat/SendBox/sendbox.css:14
`.input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — packages/desktop/src/renderer/components/base/AionInlineSearchInput.module.css:30, packages/desktop/src/renderer/components/base/AionSearchInput.module.css:53
`.input: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. (×2) — packages/desktop/src/renderer/components/base/AionInlineSearchInput.module.css:43, packages/desktop/src/renderer/components/base/AionSearchInput.module.css:62
`.loading` moves (`animation: loading 1s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/desktop/src/renderer/styles/themes/base.css:33
`.team-warmup-sweep` moves (`animation: team-warmup-sweep 1.4s ease-in-out infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/desktop/src/renderer/styles/themes/base.css:98
`.login-page__background-circle` moves (`animation: login-float 20s infinite ease-in-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/desktop/src/renderer/pages/login/LoginPage.css:27
`.login-page__card` moves (`animation: login-slide-up 0.6s ease-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/desktop/src/renderer/pages/login/LoginPage.css:80
`.login-page__logo svg` moves (`animation: login-pulse 3s infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/desktop/src/renderer/pages/login/LoginPage.css:146
`.login-page__spinner` moves (`animation: login-spin 1s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/desktop/src/renderer/pages/login/LoginPage.css:306
`.login-page__message--visible` moves (`animation: login-fade-in 0.3s ease-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/desktop/src/renderer/pages/login/LoginPage.css:329
`.plusButtonRotate` moves (`animation: rotate-animation 0.3s ease-in-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/desktop/src/renderer/pages/guid/index.module.css:325
`.skeleton` moves (`animation: guid-shimmer 1.5s ease-in-out infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/desktop/src/renderer/pages/guid/index.module.css:350
`.skeletonPill` moves (`animation: guid-shimmer 1.5s ease-in-out infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/desktop/src/renderer/pages/guid/index.module.css:357
`.agentItemSelected` moves (`animation: agentSelectPop 0.4s ease-out forwards`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/desktop/src/renderer/pages/guid/index.module.css:463
`.assistantOverflowPanel` moves (`animation: assistantOverflowPanelIn 0.16s cubic-bezier(0.2, 0.8, 0.3, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/desktop/src/renderer/pages/guid/index.module.css:480
`.arrow` moves (`transition: transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/desktop/src/renderer/pages/conversation/Messages/components/MessageThinking.module.css:40
`.tool-group-summary__arrow` moves (`transition: transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/desktop/src/renderer/pages/conversation/Messages/components/MessageToolGroupSummary.css:57
`.tick` moves (`transition: width 120ms ease,
background-color 120ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/desktop/src/renderer/pages/conversation/Messages/anchorRail/MessageAnchorRail.module.css:124
`.conversation-search-modal__recent-chip` moves (`transition: color 0.16s ease,
border-color 0.16s ease,
background-color 0.16s ease,
transform 0.16s ease,
box-shadow 0.16s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/desktop/src/renderer/pages/conversation/GroupedHistory/ConversationSearchPopover.css:298
`.app-titlebar__migration-capsule` moves (`transition: filter 0.2s ease,
transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/desktop/src/renderer/components/layout/Titlebar/titlebar.css:204
`.speech-input-feedback__bar` moves (`transition: height 120ms ease,
background-color 120ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/desktop/src/renderer/components/chat/SendBox/sendbox.css:347
`.speech-loader-spinner` moves (`animation: speech-loader-spin 0.9s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/desktop/src/renderer/components/chat/SendBox/sendbox.css:414
`.pill-marquee-track` moves (`animation-name: pill-marquee`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/desktop/src/renderer/components/chat/SendBox/sendbox.css:538
`.sheet` moves (`transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/desktop/src/renderer/components/chat/MobileActionSheet/MobileActionSheet.module.css:27
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.
Do you agree with this assessment?
AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified
Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.
Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.
Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.
No accessibility enforcement found — your oxlint config does not list the `jsx-a11y` plugin (its a11y rules are off until it does) and there's no axe/pa11y/Lighthouse in tests or CI. Start by enabling that plugin to catch issues at author time. What was searched, so you can tell an absence from a miss: the 348 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here. — REDACTED:183
What to do
Enforce accessibility in the toolchain you already use: add `jsx-a11y` to the `plugins` array in your oxlint config (its a11y rules are off until the plugin is listed), then assert with vitest-axe in tests, then gate axe/pa11y/Lighthouse in CI.
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.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
`PreviewContextValue` declares 20 required operations: `openPreview`, `openBrowserTab`, `closePreview`, `toggleMaximized`, `clearPreviewForScope`, `closeTab`, `switchTab`, `updateContent`, `updateTab`, `saveContent`, `reloadTabContent`, `clearTabUpdate`, `findPreviewTab`, `closePreviewByIdentity`, `closePreviewIfScopeChanged`, `addToSendBox`, `setSendBoxHandler`, `addDomSnippet`, `removeDomSnippet`, `clearDomSnippets`. 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. — packages/desktop/src/renderer/pages/conversation/Preview/context/PreviewContext.tsx:102
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
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. — packages/desktop/src/common/adapter/browser.ts:31
Only 1 place(s) refuse an unauthorized caller — too few to demonstrate default-deny across handlers.
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.
Enforce authorization at every handler — a guard on each route, or a global authentication guard/middleware with explicit public opt-outs, so protected-by-default is demonstrable.
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.
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.
`ensureAssistantDirs` 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/desktop/src/process/utils/initStorage.ts:331
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. (×3) — packages/desktop/src/renderer/components/layout/Layout.tsx:384, packages/desktop/src/renderer/pages/team/components/memberPicker/TeamAssistantPicker.tsx:82, REDACTED:33
`onEditServer` 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. (×2) — packages/desktop/src/renderer/components/settings/SettingsModal/contents/ToolsModalContent.tsx:230, packages/desktop/src/renderer/pages/settings/ToolsSettings/McpManagement.tsx:197
`onDeleteServer` 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. (×2) — packages/desktop/src/renderer/components/settings/SettingsModal/contents/ToolsModalContent.tsx:231, packages/desktop/src/renderer/pages/settings/ToolsSettings/McpManagement.tsx:198
The guard above `return null;` also returns `null`, so no input can make it matter. Implement the distinction that was intended, or delete the guard. — packages/desktop/src/renderer/components/settings/SettingsModal/index.tsx:317
`clearCookie` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — packages/desktop/src/renderer/hooks/context/AuthContext.tsx:7
`resolveAcpDefaultModel` 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/desktop/src/renderer/pages/team/components/teamCreateModelResolver.ts:84
`resolveAntigravityDefaultModel` 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/desktop/src/renderer/pages/team/components/teamCreateModelResolver.ts:88
`resolveGeminiDefaultModel` 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/desktop/src/renderer/pages/team/components/teamCreateModelResolver.ts:97
`resolveAionrsDefaultModel` 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/desktop/src/renderer/pages/team/components/teamCreateModelResolver.ts:103
`runStartupLogReport` 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/desktop/src/sentry.ts:473
`disposeAllTeamSessions` has an empty body — confirm it's an intentional no-op and not an unfinished method. — packages/desktop/src/process/bridge/index.ts:40
`restorePackageVersionOverride` has an empty body — confirm it's an intentional no-op and not an unfinished method. — REDACTED:701
A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something. (×23) — tests/e2e/cases/teams/team-agent-lifecycle.e2e.ts:91, tests/e2e/cases/teams/team-agent-lifecycle.e2e.ts:103, tests/e2e/cases/teams/team-agent-lifecycle.e2e.ts:123, …
What to do
Finish or delete the unfinished stubs (functions that throw "not implemented", or whose body is empty or a bare constant) — they are dead surface that looks live.
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 repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Add a README to the 4 of 5 project(s) that lack one — worth up to 1.6 pts.
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 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.
packages/desktop/src/renderer/pages/conversation/Preview/README.cn.md links to `../Workspace/README.cn.md`, but `packages/desktop/src/renderer/pages/conversation/Workspace/README.cn.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — packages/desktop/src/renderer/pages/conversation/Preview/README.cn.md:515
packages/desktop/src/renderer/pages/conversation/Preview/README.en.md links to `../Workspace/README.en.md`, but `packages/desktop/src/renderer/pages/conversation/Workspace/README.en.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — packages/desktop/src/renderer/pages/conversation/Preview/README.en.md:516
What to do
Reconcile the README with reality: packages/desktop/src/renderer/pages/conversation/Preview/README.cn.md links to `../Workspace/README.cn.md`, but `packages/desktop/src/renderer/pages/conversation/Workspace/README.cn.md` does not exist; packages/desktop/src/renderer/pages/conversation/Preview/README.en.md links to `../Workspace/README.en.md`, but `packages/desktop/src/renderer/pages/conversation/Workspace/README.en.md` does not exist.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Do you agree with this assessment?
P2 · Observability5.0 / 10Adequate✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 1/3 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `packages/web-cli`, `packages/web-host`.
`packages/desktop/src/sentry.ts` reports through `console.*` at line 479 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/sentry.ts:479
`packages/desktop/src/sentry.ts` reports through `console.*` at line 486 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/sentry.ts:486
`packages/desktop/src/sentry.ts` reports through `console.*` at line 536 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/sentry.ts:536
`packages/desktop/src/sentry.ts` reports through `console.*` at line 555 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/sentry.ts:555
`packages/desktop/src/renderer/main.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. — packages/desktop/src/renderer/main.tsx:87
`packages/desktop/src/renderer/utils/navigation.ts` reports through `console.*` at line 30 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/utils/navigation.ts:30
`packages/desktop/src/renderer/utils/workspace/workspaceHistory.ts` reports through `console.*` at line 36 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/utils/workspace/workspaceHistory.ts:36
`packages/desktop/src/renderer/utils/ui/clipboard.ts` reports through `console.*` at line 24 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/utils/ui/clipboard.ts:24
`packages/desktop/src/renderer/utils/ui/createContext.tsx` reports through `console.*` at line 21 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/utils/ui/createContext.tsx:21
`packages/desktop/src/renderer/utils/theme/systemThemeWatcher.ts` reports through `console.*` at line 21 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/utils/theme/systemThemeWatcher.ts:21
`packages/desktop/src/renderer/services/FileService.ts` reports through `console.*` at line 348 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/services/FileService.ts:348
`packages/desktop/src/renderer/services/PasteService.ts` reports through `console.*` at line 240 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/services/PasteService.ts:240
`packages/desktop/src/renderer/services/PasteService.ts` reports through `console.*` at line 244 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/services/PasteService.ts:244
`packages/desktop/src/renderer/services/PasteService.ts` reports through `console.*` at line 292 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/services/PasteService.ts:292
`packages/desktop/src/renderer/services/PasteService.ts` reports through `console.*` at line 296 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/services/PasteService.ts:296
`packages/desktop/src/renderer/services/PasteService.ts` reports through `console.*` at line 342 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/services/PasteService.ts:342
`packages/desktop/src/renderer/services/PasteService.ts` reports through `console.*` at line 345 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/services/PasteService.ts:345
`packages/desktop/src/renderer/services/registerPwa.ts` reports through `console.*` at line 43 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/services/registerPwa.ts:43
`packages/desktop/src/renderer/services/speech/SpeechStreamClient.ts` reports through `console.*` at line 224 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/services/speech/SpeechStreamClient.ts:224
`packages/desktop/src/renderer/services/feedback/submitFeedbackReport.ts` reports through `console.*` at line 102 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/services/feedback/submitFeedbackReport.ts:102
`packages/desktop/src/renderer/services/feedback/submitFeedbackReport.ts` reports through `console.*` at line 104 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/services/feedback/submitFeedbackReport.ts:104
`packages/desktop/src/renderer/services/feedback/submitFeedbackReport.ts` reports through `console.*` at line 106 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/services/feedback/submitFeedbackReport.ts:106
`packages/desktop/src/renderer/pages/team/TeamPage.tsx` reports through `console.*` at line 1005 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/pages/team/TeamPage.tsx:1005
`packages/desktop/src/renderer/pages/team/hooks/useTeamRunView.ts` reports through `console.*` at line 48 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/pages/team/hooks/useTeamRunView.ts:48
`packages/desktop/src/renderer/pages/team/hooks/useTeamRunView.ts` reports through `console.*` at line 64 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/pages/team/hooks/useTeamRunView.ts:64
`packages/desktop/src/renderer/pages/team/hooks/useTeamRunView.ts` reports through `console.*` at line 126 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/pages/team/hooks/useTeamRunView.ts:126
`packages/desktop/src/renderer/pages/team/components/teamSendRuntime.ts` reports through `console.*` at line 165 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/pages/team/components/teamSendRuntime.ts:165
`packages/desktop/src/renderer/pages/team/components/TeamChatView.tsx` reports through `console.*` at line 209 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/pages/team/components/TeamChatView.tsx:209
`REDACTED` 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. — REDACTED:74
`packages/desktop/src/renderer/pages/settings/components/JsonImportModal.tsx` reports through `console.*` at line 403 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/pages/settings/components/JsonImportModal.tsx:403
`packages/desktop/src/renderer/pages/settings/components/OneClickImportModal.tsx` reports through `console.*` at line 188 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/pages/settings/components/OneClickImportModal.tsx:188
`packages/desktop/src/renderer/pages/settings/components/OneClickImportModal.tsx` reports through `console.*` at line 211 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/pages/settings/components/OneClickImportModal.tsx:211
`packages/desktop/src/renderer/pages/settings/components/SettingsSider.tsx` 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. — packages/desktop/src/renderer/pages/settings/components/SettingsSider.tsx:235
`packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillDetailPage.tsx` reports through `console.*` at line 159 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillDetailPage.tsx:159
`packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillFileBrowser.tsx` reports through `console.*` at line 69 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillFileBrowser.tsx:69
`packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillFileBrowser.tsx` reports through `console.*` at line 96 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillFileBrowser.tsx:96
`packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillsHubSettings.tsx` reports through `console.*` at line 214 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillsHubSettings.tsx:214
`packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillsHubSettings.tsx` reports through `console.*` at line 279 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillsHubSettings.tsx:279
`packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillsHubSettings.tsx` reports through `console.*` at line 290 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillsHubSettings.tsx:290
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Route service-code `console.*` output through the module's structured logger (with named fields), so delivery outcomes and failures reach the log pipeline with a level.
Consider OpenTelemetry tracing/metrics (@opentelemetry/sdk-node) and a health-check endpoint (@godaddy/terminus or a /health route) for operability.
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 129914 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:4
`REDACTED` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — REDACTED:77
What to do
Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
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. — packages/web-host/src/backend-launcher.ts:952
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 · 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 `runLegacyDatabaseMigrations` 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/desktop/src/process/services/database/runLegacyDatabaseMigrations.ts:53
`existsSync` in `copyDirectoryRecursively` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×3) — packages/desktop/src/process/utils/utils.ts:310, packages/desktop/src/process/utils/utils.ts:321, packages/desktop/src/process/utils/utils.ts:327
`existsSync` in `verifyDirectoryFiles` 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/desktop/src/process/utils/utils.ts:338
`existsSync` in `copyFilesToDirectory` 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/desktop/src/process/utils/utils.ts:417
`fs.existsSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×11) — scripts/afterPack.js:55, scripts/afterPack.js:60, scripts/afterPack.js:65, …
`fs.readdirSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×5) — scripts/afterPack.js:56, scripts/afterPack.js:61, scripts/afterPack.js:66, …
`fs.rmSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×4) — scripts/afterPack.js:125, scripts/afterPack.js:132, scripts/afterPack.js:154, …
`fs.statSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×3) — scripts/afterPack.js:148, scripts/afterPack.js:153, scripts/afterPack.js:165
`fs.rmSync` in `process.on("beforeExit")` 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) — tests/e2e/fixtures.ts:364, tests/e2e/fixtures.ts:365
`fs.mkdirSync` in `takeScreenshot` 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. — tests/e2e/helpers/screenshots.ts:18
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 Safety9.9 / 10Exemplary✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
What to do
Migrate the remaining .js/.jsx files to TypeScript.
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.
65 duplicated blocks under packages/desktop/src/renderer/ have copies in at least two of the sibling directories components, hooks, pages, utils — 36 of them are reported below, and 29 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 65 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 65 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 65 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. — packages/desktop/src/renderer/components/settings/SettingsModal/contents/ToolsModalContent.tsx:68
29 duplicated blocks under packages/desktop/src/renderer/pages/ have copies in at least two of the sibling directories conversation, cron, guid, settings, team — 13 of them are reported below, and 16 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 29 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 29 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 29 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. — packages/desktop/src/renderer/pages/conversation/components/SingleChatEmptyState.tsx:34
18 duplicated blocks under packages/desktop/src/renderer/pages/conversation/platforms/ have copies in at least two of the sibling directories acp, aionrs, gemini — 17 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 18 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 18 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 18 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx:615
12 duplicated blocks under packages/desktop/src/renderer/pages/conversation/ have copies in at least two of the sibling directories GroupedHistory, Messages, Preview, SourceControl, components, explorer (+3 more sibling(s) not listed) — 6 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 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. — packages/desktop/src/renderer/pages/conversation/GroupedHistory/hooks/useConversationActions.ts:160
11 duplicated blocks under packages/desktop/src/ have copies in at least two of the sibling directories common, process, renderer — 4 of them are reported below, and 7 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 11 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 11 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 11 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. — packages/desktop/src/common/adapter/ipcBridge.ts:973
7 duplicated blocks under packages/desktop/src/renderer/pages/settings/ have copies in at least two of the sibling directories AgentSettings, AssistantSettings, SkillsSettings — 5 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 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 7 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — packages/desktop/src/renderer/pages/settings/AgentSettings/BoundAssistants.tsx:60
5 duplicated blocks under packages/desktop/src/renderer/components/ have copies in at least two of the sibling directories agent, chat, media, 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. — packages/desktop/src/renderer/components/chat/MobileActionSheet/useAttachEntry.tsx:48
packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DiscordConfigForm.tsx:7 · packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/SlackConfigForm.tsx:7 · packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/TelegramConfigForm.tsx:7 — these 3 files are line-for-line copies of one another — 366 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. — packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DiscordConfigForm.tsx:7
packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.tsx:29 · packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx:29 — the two spans are one implementation copied and then locally edited — 2438 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. — packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.tsx:29
packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx:615 · packages/desktop/src/renderer/pages/conversation/platforms/aionrs/AionrsSendBox.tsx:567 — the two spans are one implementation copied and then locally edited — 1423 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. — packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx:615
packages/desktop/src/renderer/pages/settings/components/AddPlatformModal.tsx:402 · packages/desktop/src/renderer/pages/settings/components/EditModeModal.tsx:130 — the two spans are one implementation copied and then locally edited — 1104 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. — packages/desktop/src/renderer/pages/settings/components/AddPlatformModal.tsx:402
packages/desktop/src/renderer/components/settings/SettingsModal/contents/ToolsModalContent.tsx:68 · packages/desktop/src/renderer/pages/settings/ToolsSettings/McpManagement.tsx:31 — 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. — packages/desktop/src/renderer/components/settings/SettingsModal/contents/ToolsModalContent.tsx:68
packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/SlackConfigForm.tsx:63 · packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WecomConfigForm.tsx:70 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/SlackConfigForm.tsx:63
scripts/smoke-installer-rstrtmgr-ui.js:8 · scripts/smoke-installer-self-lock.js:8 — the two spans are one implementation copied and then locally edited — 701 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. — scripts/smoke-installer-rstrtmgr-ui.js:8
packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/TelegramConfigForm.tsx:389 · packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WeixinConfigForm.tsx:389 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/TelegramConfigForm.tsx:389
packages/desktop/src/renderer/pages/settings/AssistantSettings/home/MyAssistantCard.tsx:40 · packages/desktop/src/renderer/pages/settings/AssistantSettings/home/OfficialAssistantsGrid.tsx:104 — the two spans are one implementation copied and then locally edited — 523 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. — packages/desktop/src/renderer/pages/settings/AssistantSettings/home/MyAssistantCard.tsx:40
packages/desktop/src/renderer/pages/conversation/components/SingleChatEmptyState.tsx:34 · packages/desktop/src/renderer/pages/team/components/TeamChatEmptyState.tsx:47 — the two spans are one implementation copied and then locally edited — 423 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. — packages/desktop/src/renderer/pages/conversation/components/SingleChatEmptyState.tsx:34
packages/desktop/src/renderer/components/Markdown/MermaidBlock.tsx:219 · REDACTED:317 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/desktop/src/renderer/components/Markdown/MermaidBlock.tsx:219
packages/desktop/src/renderer/components/Markdown/MermaidBlock.tsx:308 · REDACTED:406 — 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. — packages/desktop/src/renderer/components/Markdown/MermaidBlock.tsx:308
packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx:433 · packages/desktop/src/renderer/pages/conversation/platforms/aionrs/AionrsSendBox.tsx:381 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx:433
packages/desktop/src/renderer/pages/team/activity/MessageCard.tsx:32 · packages/desktop/src/renderer/pages/team/activity/TaskCard.tsx:85 — the two spans are one implementation copied and then locally edited — 438 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. — packages/desktop/src/renderer/pages/team/activity/MessageCard.tsx:32
packages/desktop/src/renderer/utils/chat/atFileQuery.ts:32 · packages/desktop/src/renderer/utils/chat/atSessionQuery.ts:57 — the two spans are one implementation copied and then locally edited — 521 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. — packages/desktop/src/renderer/utils/chat/atFileQuery.ts:32
packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.tsx:616 · packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx:736 · packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/TelegramConfigForm.tsx:525 · packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WecomConfigForm.tsx:583 — the 4 copies are spread across 4 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.tsx:616
packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DiscordConfigForm.tsx:521 · packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/SlackConfigForm.tsx:582 · packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WeixinConfigForm.tsx:513 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DiscordConfigForm.tsx:521
packages/desktop/src/renderer/pages/conversation/platforms/acp/useAcpMessage.ts:107 · packages/desktop/src/renderer/pages/conversation/platforms/aionrs/useAionrsMessage.ts:38 — the two spans are one implementation copied and then locally edited — 393 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. — packages/desktop/src/renderer/pages/conversation/platforms/acp/useAcpMessage.ts:107
packages/desktop/src/renderer/pages/conversation/platforms/aionrs/AionrsModelSelector.tsx:92 · packages/desktop/src/renderer/pages/guid/components/GuidModelSelector.tsx:122 — the two spans are one implementation copied and then locally edited — 340 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. — packages/desktop/src/renderer/pages/conversation/platforms/aionrs/AionrsModelSelector.tsx:92
packages/desktop/src/renderer/components/layout/Sider/SiderNav/SiderAssistantEntry.tsx:22 · packages/desktop/src/renderer/components/layout/Sider/SiderNav/SiderScheduledEntry.tsx:22 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — packages/desktop/src/renderer/components/layout/Sider/SiderNav/SiderAssistantEntry.tsx:22
packages/desktop/src/renderer/pages/settings/AssistantSettings/editor/DefaultsSection.tsx:266 · packages/desktop/src/renderer/pages/settings/AssistantSettings/editor/DefaultsSection.tsx:383 — 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. — packages/desktop/src/renderer/pages/settings/AssistantSettings/editor/DefaultsSection.tsx:266
packages/desktop/src/renderer/components/Markdown/MermaidBlock.tsx:83 · REDACTED:256 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/desktop/src/renderer/components/Markdown/MermaidBlock.tsx:83
packages/desktop/src/renderer/components/chat/AtFileMenu/index.tsx:7 · packages/desktop/src/renderer/components/chat/AtSessionMenu/index.tsx:13 — the two spans are one implementation copied and then locally edited — 258 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. — packages/desktop/src/renderer/components/chat/AtFileMenu/index.tsx:7
packages/desktop/src/renderer/hooks/ui/font/useFontFamilies.ts:44 · packages/desktop/src/renderer/hooks/ui/font/useFontSizes.ts:44 · packages/desktop/src/renderer/hooks/ui/font/useFontWeights.ts:44 — the 3 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — packages/desktop/src/renderer/hooks/ui/font/useFontFamilies.ts:44
REDACTED:99 · REDACTED:277 — the two spans are one implementation copied and then locally edited — 255 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — REDACTED:99
packages/desktop/src/renderer/pages/settings/AssistantSettings/home/MyAssistantsList.tsx:66 · packages/desktop/src/renderer/pages/settings/AssistantSettings/home/OfficialAssistantsGrid.tsx:46 — the two spans are one implementation copied and then locally edited — 248 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. — packages/desktop/src/renderer/pages/settings/AssistantSettings/home/MyAssistantsList.tsx:66
packages/desktop/src/renderer/pages/conversation/Messages/acp/MessageAcpToolCall.tsx:115 · packages/desktop/src/renderer/pages/conversation/Messages/components/MessageToolGroupSummary.tsx:38 — the two spans are one implementation copied and then locally edited — 221 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. — packages/desktop/src/renderer/pages/conversation/Messages/acp/MessageAcpToolCall.tsx:115
packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx:471 · packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx:515 — 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. — packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx:471
scripts/smoke-installer-failure-messagebox.js:124 · scripts/smoke-installer-rstrtmgr-ui.js:14 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — scripts/smoke-installer-failure-messagebox.js:124
packages/desktop/src/renderer/pages/conversation/platforms/useConversationCommandQueue.ts:916 · packages/desktop/src/renderer/pages/conversation/platforms/useConversationCommandQueue.ts:1111 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — packages/desktop/src/renderer/pages/conversation/platforms/useConversationCommandQueue.ts:916
packages/desktop/src/process/services/database/migrations.ts:1260 · packages/desktop/src/process/services/database/migrations.ts:1318 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — packages/desktop/src/process/services/database/migrations.ts:1260
packages/desktop/src/renderer/pages/conversation/Messages/components/MessageToolCall.tsx:74 · packages/desktop/src/renderer/pages/conversation/Messages/components/MessageToolGroupSummary.tsx:80 — the two spans are one implementation copied and then locally edited — 266 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. — packages/desktop/src/renderer/pages/conversation/Messages/components/MessageToolCall.tsx:74
packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx:67 · packages/desktop/src/renderer/pages/conversation/platforms/aionrs/AionrsSendBox.tsx:77 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx:67
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.
packages/desktop/src/process/services/autoUpdaterService.ts:11 imports electron-updater/out/providers/Provider, 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/desktop/src/process/services/autoUpdaterService.ts:11
packages/desktop/src/process/services/cdnGenericProvider.ts:8 imports electron-updater/out/providers/GenericProvider, 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/desktop/src/process/services/cdnGenericProvider.ts:8
packages/desktop/src/process/services/cdnGenericProvider.ts:9 imports electron-updater/out/providers/Provider, 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/desktop/src/process/services/cdnGenericProvider.ts:9
packages/desktop/src/process/services/cdnGenericProvider.ts:10 imports electron-updater/out/util, 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/desktop/src/process/services/cdnGenericProvider.ts:10
REDACTED:13 imports react-syntax-highlighter/dist/esm/styles/hljs, 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. — REDACTED:13
packages/desktop/src/renderer/components/Markdown/MermaidBlock.tsx:9 imports react-syntax-highlighter/dist/esm/styles/hljs, 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/desktop/src/renderer/components/Markdown/MermaidBlock.tsx:9
REDACTED:11 imports react-syntax-highlighter/dist/esm/styles/hljs, 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. — REDACTED:11
REDACTED:16 imports react-syntax-highlighter/dist/esm/styles/hljs, 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. — REDACTED:16
scripts/afterPack.js:11 reaches into another package with a relative path (../packages/shared-scripts/src/verify-bundled-aioncore-resources) — import the package by name instead. — scripts/afterPack.js:11
REDACTED:767 reaches into another package with a relative path (../packages/shared-scripts/src/prepare-aioncore.js) — import the package by name instead. — REDACTED:767
REDACTED:12 reaches into another package with a relative path (../packages/desktop/src/common/config/i18n-config.json) — import the package by name instead. — REDACTED:12
REDACTED:19 reaches into another package with a relative path (../packages/desktop/src/common/config/i18n-config.json) — import the package by name instead. — REDACTED:19
scripts/pack-web-cli.js:6 reaches into another package with a relative path (../packages/shared-scripts/src/prepare-aioncore.js) — import the package by name instead. — scripts/pack-web-cli.js:6
scripts/prepareAioncore.js:20 reaches into another package with a relative path (../packages/shared-scripts/src/prepare-aioncore.js) — import the package by name instead. — scripts/prepareAioncore.js:20
REDACTED:28 reaches into another package with a relative path (../packages/web-cli/src/browser.js) — import the package by name instead. — REDACTED:28
tests/unit/assets/verifyBundledAioncoreResources.test.ts:8 reaches past another workspace package's public entry into its internals with a relative path (../../../packages/shared-scripts/src/verify-bundled-aioncore-resources) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — tests/unit/assets/verifyBundledAioncoreResources.test.ts:8
tests/unit/bootstrap/backendLauncherParentPid.test.ts:2 reaches past another workspace package's public entry into its internals with a relative path (../../../packages/web-host/src/backend-launcher) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — tests/unit/bootstrap/backendLauncherParentPid.test.ts:2
tests/unit/web-cli/browser.test.ts:8 reaches past another workspace package's public entry into its internals with a relative path (../../../packages/web-cli/src/browser.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — tests/unit/web-cli/browser.test.ts:8
tests/unit/web-cli/ensureAdminPassword.test.ts:8 reaches past another workspace package's public entry into its internals with a relative path (../../../packages/web-cli/src/ensureAdminPassword.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — tests/unit/web-cli/ensureAdminPassword.test.ts:8
What to do
Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.
Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.
(anonymous) has cyclomatic complexity 101 and cognitive complexity 87; 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. — packages/desktop/src/renderer/components/chat/SendBox/index.tsx:300
composeMessageWithIndex has cyclomatic complexity 69 and cognitive complexity 109; 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. — packages/desktop/src/renderer/pages/conversation/Messages/hooks.ts:140
(anonymous) has cyclomatic complexity 64 and cognitive complexity 71; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/desktop/src/renderer/pages/conversation/platforms/acp/useAcpMessage.ts:255
LarkConfigForm 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. — packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx:69
(anonymous) has cyclomatic complexity 55 and cognitive complexity 48; 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. — packages/desktop/src/renderer/components/settings/updateNotificationState.ts:244
DingTalkConfigForm has cyclomatic complexity 55 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.tsx:69
WecomConfigForm has cyclomatic complexity 54 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. — packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WecomConfigForm.tsx:70
(anonymous) has cyclomatic complexity 53 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. — packages/desktop/src/common/chat/chatLib.ts:689
handlePaste has cyclomatic complexity 52 and cognitive complexity 170; 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. — packages/desktop/src/renderer/services/PasteService.ts:159
AgentModeSelector has cyclomatic complexity 51 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 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. — packages/desktop/src/renderer/components/agent/AgentModeSelector.tsx:81
(anonymous) has cyclomatic complexity 47 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. — packages/desktop/src/renderer/pages/conversation/platforms/aionrs/useAionrsMessage.ts:206
(anonymous) 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. — packages/desktop/src/renderer/pages/settings/components/AddPlatformModal.tsx:207
ChatLayout has cyclomatic complexity 42 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. — packages/desktop/src/renderer/pages/conversation/components/ChatLayout/index.tsx:66
MessageTips has cyclomatic complexity 41 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 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. — packages/desktop/src/renderer/pages/conversation/Messages/components/MessageTips.tsx:64
MessageText has cyclomatic complexity 41 and cognitive complexity 36; 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. — packages/desktop/src/renderer/pages/conversation/Messages/components/MessageText.tsx:106
afterPack has cyclomatic complexity 40 and cognitive complexity 81; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/afterPack.js:40
(anonymous) has cyclomatic complexity 39 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — packages/desktop/src/common/adapter/ipcBridge.ts:450
PreviewToolbar has cyclomatic complexity 38 and cognitive complexity 28; 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. — packages/desktop/src/renderer/pages/conversation/Preview/components/PreviewPanel/PreviewToolbar.tsx:172
(anonymous) has cyclomatic complexity 37 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/desktop/src/index.ts:680
handleSave has cyclomatic complexity 35 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. — packages/desktop/src/renderer/hooks/assistant/useAssistantEditor.ts:374
What to do
Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
Do you agree with this assessment?
R3 · Large Files6.2 / 10Adequate✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
packages/desktop/src/common/adapter/ipcBridge.ts has 2350 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/common/adapter/ipcBridge.ts:1
packages/desktop/src/renderer/components/chat/SendBox/index.tsx has 2092 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/renderer/components/chat/SendBox/index.tsx:1
packages/desktop/src/renderer/pages/conversation/Preview/context/PreviewContext.tsx has 1315 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/renderer/pages/conversation/Preview/context/PreviewContext.tsx:1
packages/desktop/src/process/services/database/migrations.ts has 1295 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/process/services/database/migrations.ts:1
packages/desktop/src/renderer/pages/conversation/Preview/components/PreviewPanel/PreviewPanel.tsx has 1208 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/renderer/pages/conversation/Preview/components/PreviewPanel/PreviewPanel.tsx:1
packages/desktop/src/index.ts has 1075 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/index.ts:1
packages/desktop/src/renderer/pages/conversation/platforms/useConversationCommandQueue.ts has 1052 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/renderer/pages/conversation/platforms/useConversationCommandQueue.ts:1
packages/desktop/src/common/chat/chatLib.ts has 1033 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/common/chat/chatLib.ts:1
packages/web-host/src/backend-launcher.ts has 1015 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/web-host/src/backend-launcher.ts:1
packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillsHubSettings.tsx has 987 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillsHubSettings.tsx:1
packages/desktop/src/renderer/pages/team/TeamPage.tsx has 985 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/renderer/pages/team/TeamPage.tsx:1
packages/desktop/src/renderer/pages/conversation/Messages/hooks.ts has 984 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/renderer/pages/conversation/Messages/hooks.ts:1
packages/desktop/src/renderer/pages/cron/ScheduledTasksPage/CreateTaskDialog.tsx has 929 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/renderer/pages/cron/ScheduledTasksPage/CreateTaskDialog.tsx:1
packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/ChannelModalContent.tsx has 909 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/ChannelModalContent.tsx:1
packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx has 907 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx:1
REDACTED has 881 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
packages/desktop/src/renderer/pages/conversation/platforms/aionrs/AionrsSendBox.tsx 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. — packages/desktop/src/renderer/pages/conversation/platforms/aionrs/AionrsSendBox.tsx:1
packages/desktop/src/process/services/autoUpdaterService.ts has 831 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/process/services/autoUpdaterService.ts:1
packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx has 793 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx:1
packages/desktop/src/process/bridge/updateBridge.ts has 759 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/process/bridge/updateBridge.ts:1
packages/desktop/src/renderer/components/media/WebviewHost.tsx has 745 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/renderer/components/media/WebviewHost.tsx:1
packages/desktop/src/renderer/pages/conversation/Messages/MessageList.tsx has 742 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/renderer/pages/conversation/Messages/MessageList.tsx:1
packages/desktop/src/renderer/pages/conversation/platforms/acp/useAcpMessage.ts has 723 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/renderer/pages/conversation/platforms/acp/useAcpMessage.ts:1
packages/desktop/src/renderer/pages/settings/components/AddPlatformModal.tsx has 718 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/renderer/pages/settings/components/AddPlatformModal.tsx:1
packages/desktop/src/renderer/hooks/system/useSpeechInput.ts has 704 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/renderer/hooks/system/useSpeechInput.ts:1
packages/desktop/src/renderer/pages/conversation/SourceControl/ScmPanel.tsx has 698 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/renderer/pages/conversation/SourceControl/ScmPanel.tsx:1
packages/desktop/src/renderer/pages/guid/GuidPage.tsx has 695 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/renderer/pages/guid/GuidPage.tsx:1
packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.tsx has 677 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.tsx:1
packages/desktop/src/renderer/pages/conversation/Preview/components/renderers/HTMLRenderer.tsx has 674 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/renderer/pages/conversation/Preview/components/renderers/HTMLRenderer.tsx:1
packages/desktop/src/renderer/pages/conversation/GroupedHistory/hooks/useConversationListSync.ts has 658 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/renderer/pages/conversation/GroupedHistory/hooks/useConversationListSync.ts:1
packages/desktop/src/renderer/pages/conversation/SourceControl/scmStore.ts has 650 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/renderer/pages/conversation/SourceControl/scmStore.ts:1
packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WecomConfigForm.tsx has 646 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WecomConfigForm.tsx:1
packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/SlackConfigForm.tsx has 644 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/SlackConfigForm.tsx:1
packages/desktop/src/renderer/components/settings/SettingsModal/contents/ModelModalContent.tsx has 643 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/renderer/components/settings/SettingsModal/contents/ModelModalContent.tsx:1
packages/desktop/src/common/config/storage.ts has 640 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/common/config/storage.ts:1
packages/desktop/src/renderer/pages/guid/components/GuidActionRow.tsx has 640 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/renderer/pages/guid/components/GuidActionRow.tsx:1
packages/desktop/src/renderer/pages/conversation/runtime/conversationRuntimeViewStore.ts has 634 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/renderer/pages/conversation/runtime/conversationRuntimeViewStore.ts:1
packages/desktop/src/renderer/pages/conversation/explorer/ExplorerContainer.tsx has 628 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/renderer/pages/conversation/explorer/ExplorerContainer.tsx:1
packages/desktop/src/renderer/components/chat/EmojiPicker.tsx has 627 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/renderer/components/chat/EmojiPicker.tsx:1
packages/desktop/src/process/utils/migrateAssistants.ts has 615 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop/src/process/utils/migrateAssistants.ts: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 Coverage8.8 / 10Strong✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×40) — packages/desktop/src/index.ts:1, packages/desktop/src/renderer/pages/conversation/GroupedHistory/index.tsx:1, packages/desktop/src/renderer/main.tsx: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.
Do you agree with this assessment?
R7 · Dead Code7.4 / 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.
7 file(s) (~960 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. — mobile
Unreachable from the 80 application, 30 tooling and 685 test entry point(s) detected in this repo. Gate removals on `bun run build` — an undetected custom entry would make these reachable.
no import path from any entry point (80 application, 30 tooling, 685 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/desktop/src/renderer/components/settings/SettingsModal/useSettingsModal.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 — packages/desktop/src/renderer/components/settings/SettingsModal/index.tsx
no import path from any entry point (80 application, 30 tooling, 685 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (scripts/afterPack.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 — REDACTED
no import path from any entry point (80 application, 30 tooling, 685 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) — packages/desktop/src/renderer/pages/conversation/components/ChatHistory.tsx, packages/desktop/src/common/chat/document/DocumentConverter.ts, packages/desktop/src/renderer/pages/settings/ToolsSettings/McpManagement.tsx, …
no import path from any entry point (80 application, 30 tooling, 685 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/desktop/src/common/chat/navigation/index.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — packages/desktop/src/common/chat/navigation/NavigationInterceptor.ts
no import path from any entry point (80 application, 30 tooling, 685 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/desktop/src/common/chat/approval/index.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — packages/desktop/src/common/chat/approval/ApprovalStore.ts
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
Imported but not declared in any reachable REDACTED — installs work only by hoisting accident. (×2) — REDACTED:55, packages/desktop/src/common/utils/shims/xterm-headless.ts:3
Declared in packages/web-cli/REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Every import is type-only — move it to devDependencies. — packages/desktop/src/renderer/pages/conversation/Preview/theme/markdownTheme.ts:8
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
Do you agree with this assessment?
R9 · Circular Imports2.5 / 10Weak✓ Tool-verified
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
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. 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. Its Node HTTP listeners were read for HTTPS enforcement alone — TLS served, a redirect to https:// or HSTS, or a TLS-terminating proxy configuration committed beside the server — each judged per server package.
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. — REDACTED:190
`httpServer.listen(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.) — REDACTED:381
`tcp_server.listen(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.) — REDACTED:257
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.
Enforce HTTPS on each listed server: serve TLS itself, or redirect plain requests to `https://` and send `Strict-Transport-Security` (`helmet()` does by default) behind the TLS-terminating proxy — and commit that proxy's configuration beside the service. A server only this machine reaches should bind `127.0.0.1`.
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X13 · Undrained process 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.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. 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.7 / 10Weak✓ Tool-verified
Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
`appendWorkspaceFilesToZip` is exported, takes a document from its caller (line 24) and hands it to `walk`, which calls itself at line 44 (`walk`) with a piece of `node` — 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. — packages/desktop/src/renderer/pages/conversation/GroupedHistory/utils/exportHelpers.ts:44
`mergeWithFallback` is exported and takes `fallback: Record<string, unknown>` from its caller, and it calls itself at line 79 (`mergeWithFallback`) with a piece of `fallback` — and nowhere in `mergeWithFallback` 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 `mergeWithFallback` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/desktop/src/common/config/i18n.ts:79
What to do
Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.
Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).
Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.
Only 9/20 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.
`resetPasswordVia` 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 })`. — scripts/resetpass.ts:136
`fetchAdminUsername` 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 })`. (×2) — REDACTED:191, packages/desktop/src/process/bridge/webuiBridge.ts:31
`waitForHealth` 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 })`. — packages/web-host/src/backend-launcher.ts:924
`runResetPassword` 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:278
`downloadFileFromRef` 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 })`. — packages/desktop/src/renderer/utils/file/download.ts:45
`ensureAdminUser` 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 })`. — packages/desktop/src/process/utils/ensureAdminUser.ts:25
`resetPasswordCLI` 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 })`. — packages/desktop/src/process/utils/resetPasswordCLI.ts:42
`maybeSeedInitialPassword` 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 })`. — packages/desktop/src/process/bridge/webuiBridge.ts:52
`fetchJson` 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 })`. — packages/desktop/src/common/config/configService.ts:21
`performRefresh` 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 })`. — packages/desktop/src/common/adapter/sessionRefresh.ts:80
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 a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back. Also whether a `finally` that gives the primitive back unconditionally can run in a state where the method does not hold it: after a timed wait whose result was discarded, after an acquire inside the `try` that can fail, after the body already released it, or never, because a `return` left between the acquire and the `try`.
Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. 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.0 / 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.
`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:85
`overlaySvg` 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:303
`svg` 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. (×4) — packages/desktop/src/renderer/components/Markdown/MermaidBlock.tsx:378, packages/desktop/src/renderer/components/Markdown/MermaidBlock.tsx:393, REDACTED:476, …
``
/* Shadow DOM CSS variable definitions */
:host {
${cssVarsDeclaration}
}
* {
line-height:${lineHe…` 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. — packages/desktop/src/renderer/components/Markdown/ShadowView.tsx:38
`title` 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:143
`diffHtmlContent` 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:168, REDACTED:204
What to do
Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
`.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. (×12) — scripts/benchmark-acp-startup.ts:239, scripts/benchmark-acp-startup.ts:241, scripts/benchmark-acp-startup.ts:507, …
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. (×28) — scripts/benchmark-acp-startup.ts:870, scripts/benchmark-startup.ts:236, scripts/benchmark-startup.ts:461, …
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.
2/4 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.4 `!` null assertions per 1k TypeScript source lines — 57 assertion(s) across the 155931 source line(s) of the 860 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: packages/desktop/src/common/adapter/httpBridge.ts (10), packages/desktop/src/renderer/pages/conversation/GroupedHistory/utils/sortOrderHelpers.ts (4), packages/desktop/src/renderer/pet/petConfirmRenderer.ts (4). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.
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 — 4 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.
P12 CI test-gate honesty — 1 observation(s) recorded · 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.
X10 Duplicated predicate — 25 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 evidenced — 1 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 48 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; 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).
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
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 — docker build failed (exit -1) — #10 3.141 Setting up libicu76:amd64 (76.1-4) ... #10 3.142 Setting up libc-dev-bin (2.41-12+deb13u4) ... #10 3.142 Setting up icu-devtools (76.1-4) ... #10 3.142 Setting up libc6-dev:amd64 (2.41-12+deb13u4) ... #10 3.142 Setting up libicu-dev:amd64 (76.1-4) ... #10 3.142 Processing triggers for libc-bin (2.41-12+deb13u4) ... #10 DONE 3.2s #11 [builder 3/9] RUN npm install -g bun; 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.
D11 Test Reliability — JavaScript/TypeScript suite in the repository root was not re-run
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 — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D25 ADR Conformance — no ADRs to check
D32 Data Compliance (PII/GDPR) — 11 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
D4 Code Duplication — This repository's production source (.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
D8 Code Coverage — Coverage not measured — JavaScript/TypeScript suite
DM1 Aggregate boundaries — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
DM10 One transaction, one aggregate — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
DM2 Strongly-typed ids — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
DM3 Integration-event coupling — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
DM4 Rich vs anemic model — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
DM5 Encapsulated state — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
DM6 Domain ↔ infrastructure boundary — this TypeScript/JavaScript repository maps no type to a persistence framework (TypeORM/Prisma/MikroORM/Sequelize/Mongoose), so DM6's domain↔infrastructure fusion read has no population to be taken over
DM7 Repository granularity — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
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
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `vitest --coverage`, `jest --coverage`, `bun test --coverage --coverage-reporter=lcov`, or `nyc`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for tinybench, mitata, benchmark.js, benny or vitest `bench(...)` calls in files that import them (or `*.bench.*` files), or one of those in a REDACTED, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
R5 Dependency Freshness — uses a bun 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.
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.
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.
AC4 · Keyboard semantics· Click handler on a non-interactive <div> · ×32
Click handler on a non-interactive <div> REDACTED:244— 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> packages/desktop/src/renderer/components/Markdown/MermaidBlock.tsx:382— 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:480— 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> packages/desktop/src/renderer/components/agent/AgentBadge.tsx:83— 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> packages/desktop/src/renderer/components/base/AionCollapse.tsx:193— 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> packages/desktop/src/renderer/components/base/FileChangesPanel.tsx:126— 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> packages/desktop/src/renderer/components/chat/MobileActionSheet/MobileActionSheet.tsx:133— 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> packages/desktop/src/renderer/components/chat/MobileActionSheet/MobileActionSheet.tsx:151— 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> packages/desktop/src/renderer/components/chat/MobileActionSheet/MobileActionSheet.tsx:199— 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> packages/desktop/src/renderer/components/chat/SendBox/index.tsx:2057— 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> packages/desktop/src/renderer/components/layout/Layout.tsx:379— 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> packages/desktop/src/renderer/components/layout/Layout.tsx:401— 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> packages/desktop/src/renderer/components/layout/ProjectPanelMobileOverlay.tsx:43— 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> packages/desktop/src/renderer/components/layout/Sider/SiderFooter.tsx:64— 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> packages/desktop/src/renderer/components/layout/Sider/SiderFooter.tsx:84— 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> packages/desktop/src/renderer/components/layout/Sider/SiderFooter.tsx:110— 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> packages/desktop/src/renderer/components/layout/Sider/SiderItem.tsx:57— 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> packages/desktop/src/renderer/components/layout/Sider/SiderNav/SiderAssistantEntry.tsx:34— 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> packages/desktop/src/renderer/components/layout/Sider/SiderNav/SiderAssistantEntry.tsx:55— 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> packages/desktop/src/renderer/components/layout/Sider/SiderNav/SiderScheduledEntry.tsx:34— 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> packages/desktop/src/renderer/components/layout/Sider/SiderNav/SiderScheduledEntry.tsx:55— 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> packages/desktop/src/renderer/components/layout/Sider/SiderNav/SiderToolbar.tsx:38— 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> packages/desktop/src/renderer/components/layout/Sider/SiderNav/SiderToolbar.tsx:61— 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> packages/desktop/src/renderer/components/layout/Sider/SiderNav/SiderToolbar.tsx:88— 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> packages/desktop/src/renderer/components/layout/Sider/TeamSiderSection.tsx:141— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Banned license: @img/sharp-libvips-darwin-arm64 REDACTED:596— `@img/sharp-libvips-darwin-arm64` 1.2.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-darwin-x64 REDACTED:598— `@img/sharp-libvips-darwin-x64` 1.2.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linux-arm REDACTED:600— `@img/sharp-libvips-linux-arm` 1.2.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linux-arm64 REDACTED:602— `@img/sharp-libvips-linux-arm64` 1.2.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linux-ppc64 REDACTED:604— `@img/sharp-libvips-linux-ppc64` 1.2.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linux-riscv64 REDACTED:606— `@img/sharp-libvips-linux-riscv64` 1.2.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linux-s390x REDACTED:608— `@img/sharp-libvips-linux-s390x` 1.2.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linux-x64 REDACTED:610— `@img/sharp-libvips-linux-x64` 1.2.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linuxmusl-arm64 REDACTED:612— `@img/sharp-libvips-linuxmusl-arm64` 1.2.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linuxmusl-x64 REDACTED:614— `@img/sharp-libvips-linuxmusl-x64` 1.2.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-wasm32 REDACTED:632— `@img/sharp-wasm32` 0.34.5 is published on registry.npmjs.org under `Apache-2.0 AND LGPL-3.0-or-later AND MIT`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-win32-arm64 REDACTED:634— `@img/sharp-win32-arm64` 0.34.5 is published on registry.npmjs.org under `Apache-2.0 AND LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-win32-ia32 REDACTED:636— `@img/sharp-win32-ia32` 0.34.5 is published on registry.npmjs.org under `Apache-2.0 AND LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-win32-x64 REDACTED:638— `@img/sharp-win32-x64` 0.34.5 is published on registry.npmjs.org under `Apache-2.0 AND LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: ua-parser-js REDACTED:1484— `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 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.
AC2 · Forms & labels· Custom control with no accessible name on <div> · ×13
Custom control with no accessible name on <div> packages/desktop/src/renderer/components/Markdown/MermaidBlock.tsx:382— 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> REDACTED:480— 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> packages/desktop/src/renderer/components/chat/MobileActionSheet/MobileActionSheet.tsx:133— 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> packages/desktop/src/renderer/components/chat/SendBox/index.tsx:2057— 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> packages/desktop/src/renderer/components/layout/Layout.tsx:401— 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> packages/desktop/src/renderer/components/layout/Sider/SiderNav/SiderAssistantEntry.tsx:34— 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> packages/desktop/src/renderer/components/layout/Sider/SiderNav/SiderScheduledEntry.tsx:34— 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> packages/desktop/src/renderer/components/layout/Sider/SiderNav/SiderToolbar.tsx:38— 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> packages/desktop/src/renderer/components/layout/Sider/SiderNav/SiderToolbar.tsx:88— 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> packages/desktop/src/renderer/components/layout/Sider/TeamSiderSection.tsx:200— 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> packages/desktop/src/renderer/components/media/FilePreview.tsx:128— 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> packages/desktop/src/renderer/components/media/FilePreview.tsx:156— 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> packages/desktop/src/renderer/components/settings/SettingsModal/contents/AboutModalContent.tsx:162— 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· <button> with no accessible text · ×7
<button> with no accessible text packages/desktop/src/renderer/components/base/ModalWrapper.tsx:26— 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 REDACTED:647— 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 REDACTED:777— 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 REDACTED:786— 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 packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.tsx:627— 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 packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx:747— 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 packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/TelegramConfigForm.tsx:536— 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).
<html> without a lang packages/desktop/src/renderer/index.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 packages/desktop/src/renderer/pet/pet-confirm.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 packages/desktop/src/renderer/pet/pet-hit.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 packages/desktop/src/renderer/pet/pet.html:2— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
AC2 · Forms & labels· <label> that labels no control · ×3
<label> that labels no control packages/desktop/src/renderer/components/settings/SettingsModal/contents/FeedbackReportModal.tsx:401— 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 packages/desktop/src/renderer/components/settings/SettingsModal/contents/FeedbackReportModal.tsx:420— 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 packages/desktop/src/renderer/components/settings/SettingsModal/contents/FeedbackReportModal.tsx:441— 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.
AC3 · Page structure· Document without a <title> · ×3
Document without a <title> packages/desktop/src/renderer/pet/pet-confirm.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> packages/desktop/src/renderer/pet/pet-hit.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> packages/desktop/src/renderer/pet/pet.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
AC4 · Keyboard semantics· Click handler on a non-interactive <span> · ×3
Click handler on a non-interactive <span> packages/desktop/src/renderer/components/base/FileChangesPanel.tsx:85— 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> packages/desktop/src/renderer/components/base/FileChangesPanel.tsx:104— 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> packages/desktop/src/renderer/components/layout/Sider/SiderItem.tsx:132— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
AC4 · Keyboard semantics· Hover-only interaction on <span> · ×2
Hover-only interaction on <span> packages/desktop/src/renderer/components/ShimmerText.tsx:63— This <span> 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 <span> packages/desktop/src/renderer/components/agent/MarqueePillLabel.tsx:81— This <span> 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.
Orphaned knowledge REDACTED:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge scripts/benchmark-startup.ts:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
AC2 · Forms & labels· Custom control with no accessible name on <span> · ×1
Custom control with no accessible name on <span> packages/desktop/src/renderer/components/layout/Sider/SiderItem.tsx:132— This <span> 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· <input> without a programmatic label · ×1
<input> without a programmatic label packages/desktop/src/renderer/components/media/WebviewHost.tsx:758— 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.
AC2 · Forms & labels· Link with no accessible name · ×1
Link with no accessible name packages/desktop/src/renderer/components/settings/SettingsModal/contents/ToolsModalContent.tsx:602— 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.
AC3 · Page structure· <iframe> without a title · ×1
<iframe> without a title packages/desktop/src/renderer/pages/conversation/Preview/components/renderers/HTMLRenderer.tsx:749— An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
D10 · Test Quality· No assertions (empty test) · ×1
No assertions (empty test): placeholder - equivalence test to be recreated if needed packages/web-host/tests/equivalence.test.ts:13— Test method has an empty body — it asserts nothing and exercises no code.
D11 · Test Reliability· Test suite cannot be installed from its own lockfile · ×1
Test suite cannot be installed from its own lockfile: mobile/ — The jest suite in mobile/ was never exercised because its dependency install refused the committed lockfile — the dependency install for mobile/ refused the committed lockfile (npm error code ERESOLVE), so the suite never ran. The suite is declared and committed but cannot be installed from what the repository ships, so neither this scan nor a new contributor can run it. The ask is the one the owner performs: run the install locally and commit the lockfile it writes.
Unlisted import '@xterm/headless' packages/desktop/src/common/utils/shims/xterm-headless.ts:3— Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
FunctionTooLong: SkillsHubSettings.SkillsHubSettings packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillsHubSettings.tsx:141— FunctionTooLong — SkillsHubSettings runs 705 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 605 over it, 7.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.
FunctionTooLong: WebuiModalContent.WebuiModalContent REDACTED:74— FunctionTooLong — WebuiModalContent runs 640 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 540 over it, 6.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: ChannelModalContent.ChannelModalContent packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/ChannelModalContent.tsx:142— FunctionTooLong — ChannelModalContent runs 623 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 523 over it, 6.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: LarkConfigForm.LarkConfigForm packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx:69— FunctionTooLong — LarkConfigForm runs 614 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 514 over it, 6.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: CreateTaskDialog.CreateTaskDialog packages/desktop/src/renderer/pages/cron/ScheduledTasksPage/CreateTaskDialog.tsx:234— FunctionTooLong — CreateTaskDialog runs 599 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 499 over it, 5.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.
FunctionTooLong: DingTalkConfigForm.DingTalkConfigForm packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.tsx:69— FunctionTooLong — DingTalkConfigForm runs 513 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 413 over it, 5.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: WebviewHost.WebviewHost packages/desktop/src/renderer/components/media/WebviewHost.tsx:60— FunctionTooLong — WebviewHost runs 495 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 395 over it, 4.95× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: WecomConfigForm.WecomConfigForm packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WecomConfigForm.tsx:70— FunctionTooLong — WecomConfigForm runs 493 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 393 over it, 4.93× 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: SlackConfigForm.SlackConfigForm packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/SlackConfigForm.tsx:63— FunctionTooLong — SlackConfigForm runs 484 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 384 over it, 4.84× 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: useAssistantEditor.useAssistantEditor packages/desktop/src/renderer/hooks/assistant/useAssistantEditor.ts:68— FunctionTooLong — useAssistantEditor runs 480 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 380 over it, 4.80× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: TaskDetailPage.TaskDetailPage packages/desktop/src/renderer/pages/cron/ScheduledTasksPage/TaskDetailPage.tsx:38— FunctionTooLong — TaskDetailPage runs 467 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 367 over it, 4.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: useAcpMessage.useAcpMessage packages/desktop/src/renderer/pages/conversation/platforms/acp/useAcpMessage.ts:103— FunctionTooLong — useAcpMessage runs 457 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 357 over it, 4.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: ModelModalContent.ModelModalContent packages/desktop/src/renderer/components/settings/SettingsModal/contents/ModelModalContent.tsx:109— FunctionTooLong — ModelModalContent runs 455 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 355 over it, 4.55× 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: GuidActionRow.GuidActionRow packages/desktop/src/renderer/pages/guid/components/GuidActionRow.tsx:120— FunctionTooLong — GuidActionRow runs 451 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 351 over it, 4.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.
FunctionTooLong: AssistantEditorSections.AssistantEditorSections packages/desktop/src/renderer/pages/settings/AssistantSettings/AssistantEditorSections.tsx:31— FunctionTooLong — AssistantEditorSections runs 446 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 346 over it, 4.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: TelegramConfigForm.TelegramConfigForm packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/TelegramConfigForm.tsx:63— FunctionTooLong — TelegramConfigForm runs 440 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 340 over it, 4.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: DiscordConfigForm.DiscordConfigForm packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DiscordConfigForm.tsx:63— FunctionTooLong — DiscordConfigForm runs 436 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 336 over it, 4.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: useConversationCommandQueue.useConversationCommandQueue packages/desktop/src/renderer/pages/conversation/platforms/useConversationCommandQueue.ts:595— FunctionTooLong — useConversationCommandQueue runs 428 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 328 over it, 4.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: WeixinConfigForm.WeixinConfigForm packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WeixinConfigForm.tsx:63— FunctionTooLong — WeixinConfigForm runs 423 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 323 over it, 4.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: PreviewContext.PreviewProvider packages/desktop/src/renderer/pages/conversation/Preview/context/PreviewContext.tsx:532— FunctionTooLong — PreviewProvider runs 421 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 321 over it, 4.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: index.WorkspaceGroupedHistory packages/desktop/src/renderer/pages/conversation/GroupedHistory/index.tsx:30— FunctionTooLong — WorkspaceGroupedHistory runs 417 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 317 over it, 4.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: index.ArchivedSettings packages/desktop/src/renderer/pages/settings/ArchivedSettings/index.tsx:78— FunctionTooLong — ArchivedSettings runs 375 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 275 over it, 3.75× 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: DefaultsSection.DefaultsSection packages/desktop/src/renderer/pages/settings/AssistantSettings/editor/DefaultsSection.tsx:73— FunctionTooLong — DefaultsSection runs 370 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 270 over it, 3.70× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: index.SystemModalContent packages/desktop/src/renderer/components/settings/SettingsModal/contents/SystemModalContent/index.tsx:41— FunctionTooLong — SystemModalContent runs 360 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 260 over it, 3.60× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: useSpeechInput.useSpeechInput packages/desktop/src/renderer/hooks/system/useSpeechInput.ts:252— FunctionTooLong — useSpeechInput runs 354 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 254 over it, 3.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Hotspot: packages/desktop/src/renderer/components/chat/SendBox/index.tsx packages/desktop/src/renderer/components/chat/SendBox/index.tsx:300— packages/desktop/src/renderer/components/chat/SendBox/index.tsx changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 302 in index.SendBox at line 300. 2 of those changes were fix/bug commits, and the other 3 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-07..2026-11-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-07 05:31:17 +00:00' --until='2026-11-05 05:31:17 +00:00' --full-history --no-merges -- packages/desktop/src/renderer/components/chat/SendBox/index.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: packages/desktop/src/renderer/pages/conversation/Preview/components/PreviewPanel/PreviewPanel.tsx packages/desktop/src/renderer/pages/conversation/Preview/components/PreviewPanel/PreviewPanel.tsx:87— packages/desktop/src/renderer/pages/conversation/Preview/components/PreviewPanel/PreviewPanel.tsx changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 132 in PreviewPanel.PreviewPanel at line 87. 3 of those changes were fix/bug commits, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-07..2026-11-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-07 05:31:17 +00:00' --until='2026-11-05 05:31:17 +00:00' --full-history --no-merges -- packages/desktop/src/renderer/pages/conversation/Preview/components/PreviewPanel/PreviewPanel.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: packages/desktop/src/renderer/pages/conversation/explorer/ExplorerPanel.tsx packages/desktop/src/renderer/pages/conversation/explorer/ExplorerPanel.tsx:91— packages/desktop/src/renderer/pages/conversation/explorer/ExplorerPanel.tsx changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 85 in ExplorerPanel.ExplorerPanel at line 91. 2 of those changes were fix/bug commits, and the other 6 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-07..2026-11-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-07 05:31:17 +00:00' --until='2026-11-05 05:31:17 +00:00' --full-history --no-merges -- packages/desktop/src/renderer/pages/conversation/explorer/ExplorerPanel.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: packages/desktop/src/renderer/pages/conversation/Messages/MessageList.tsx packages/desktop/src/renderer/pages/conversation/Messages/MessageList.tsx:334— packages/desktop/src/renderer/pages/conversation/Messages/MessageList.tsx changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 76 in MessageList.MessageList at line 334. 1 of those changes was a fix/bug commit, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-07..2026-11-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-07 05:31:17 +00:00' --until='2026-11-05 05:31:17 +00:00' --full-history --no-merges -- packages/desktop/src/renderer/pages/conversation/Messages/MessageList.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: packages/desktop/src/renderer/pages/conversation/explorer/ExplorerContainer.tsx packages/desktop/src/renderer/pages/conversation/explorer/ExplorerContainer.tsx:176— packages/desktop/src/renderer/pages/conversation/explorer/ExplorerContainer.tsx changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in ExplorerContainer.ExplorerContainer at line 176. 1 of those changes was a fix/bug commit, and the other 6 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-07..2026-11-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-07 05:31:17 +00:00' --until='2026-11-05 05:31:17 +00:00' --full-history --no-merges -- packages/desktop/src/renderer/pages/conversation/explorer/ExplorerContainer.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: packages/desktop/src/renderer/pages/conversation/GroupedHistory/ConversationRow.tsx packages/desktop/src/renderer/pages/conversation/GroupedHistory/ConversationRow.tsx:36— packages/desktop/src/renderer/pages/conversation/GroupedHistory/ConversationRow.tsx changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in ConversationRow.ConversationRow at line 36. 2 of those changes were fix/bug commits, and the other 5 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-07..2026-11-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-07 05:31:17 +00:00' --until='2026-11-05 05:31:17 +00:00' --full-history --no-merges -- packages/desktop/src/renderer/pages/conversation/GroupedHistory/ConversationRow.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: REDACTED REDACTED:74— REDACTED changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 105 in WebuiModalContent.WebuiModalContent at line 74. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-07..2026-11-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-07 05:31:17 +00:00' --until='2026-11-05 05:31:17 +00: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: packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx:69— packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 100 in LarkConfigForm.LarkConfigForm at line 69. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-07..2026-11-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-07 05:31:17 +00:00' --until='2026-11-05 05:31:17 +00:00' --full-history --no-merges -- packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.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: packages/desktop/src/renderer/pages/cron/ScheduledTasksPage/TaskDetailPage.tsx packages/desktop/src/renderer/pages/cron/ScheduledTasksPage/TaskDetailPage.tsx:38— packages/desktop/src/renderer/pages/cron/ScheduledTasksPage/TaskDetailPage.tsx changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 72 in TaskDetailPage.TaskDetailPage at line 38. 3 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-07..2026-11-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-07 05:31:17 +00:00' --until='2026-11-05 05:31:17 +00:00' --full-history --no-merges -- packages/desktop/src/renderer/pages/cron/ScheduledTasksPage/TaskDetailPage.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: packages/desktop/src/renderer/pages/guid/GuidPage.tsx packages/desktop/src/renderer/pages/guid/GuidPage.tsx:56— packages/desktop/src/renderer/pages/guid/GuidPage.tsx changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 70 in GuidPage.GuidPage at line 56. 1 of those changes was a fix/bug commit, and the other 3 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-07..2026-11-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-07 05:31:17 +00:00' --until='2026-11-05 05:31:17 +00:00' --full-history --no-merges -- packages/desktop/src/renderer/pages/guid/GuidPage.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: packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.tsx packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.tsx:69— packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.tsx changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 93 in DingTalkConfigForm.DingTalkConfigForm at line 69. 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-07..2026-11-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-07 05:31:17 +00:00' --until='2026-11-05 05:31:17 +00:00' --full-history --no-merges -- packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.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: packages/desktop/src/renderer/pages/conversation/GroupedHistory/index.tsx packages/desktop/src/renderer/pages/conversation/GroupedHistory/index.tsx:30— packages/desktop/src/renderer/pages/conversation/GroupedHistory/index.tsx changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in index.WorkspaceGroupedHistory at line 30. 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-07..2026-11-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-07 05:31:17 +00:00' --until='2026-11-05 05:31:17 +00:00' --full-history --no-merges -- packages/desktop/src/renderer/pages/conversation/GroupedHistory/index.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: packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WecomConfigForm.tsx packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WecomConfigForm.tsx:70— packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WecomConfigForm.tsx changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 88 in WecomConfigForm.WecomConfigForm 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-07..2026-11-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-07 05:31:17 +00:00' --until='2026-11-05 05:31:17 +00:00' --full-history --no-merges -- packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WecomConfigForm.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: packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx:116— packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 87 in AcpSendBox.AcpSendBox at line 116. 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-07..2026-11-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-07 05:31:17 +00:00' --until='2026-11-05 05:31:17 +00:00' --full-history --no-merges -- packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.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: packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/ChannelModalContent.tsx packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/ChannelModalContent.tsx:142— packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/ChannelModalContent.tsx changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 122 in ChannelModalContent.ChannelModalContent at line 142. 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-07..2026-11-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-07 05:31:17 +00:00' --until='2026-11-05 05:31:17 +00:00' --full-history --no-merges -- packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/ChannelModalContent.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: packages/desktop/src/renderer/pages/conversation/platforms/aionrs/AionrsSendBox.tsx packages/desktop/src/renderer/pages/conversation/platforms/aionrs/AionrsSendBox.tsx:126— packages/desktop/src/renderer/pages/conversation/platforms/aionrs/AionrsSendBox.tsx changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 79 in AionrsSendBox.AionrsSendBox at line 126. 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-07..2026-11-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-07 05:31:17 +00:00' --until='2026-11-05 05:31:17 +00:00' --full-history --no-merges -- packages/desktop/src/renderer/pages/conversation/platforms/aionrs/AionrsSendBox.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: packages/desktop/src/renderer/components/agent/AgentModeSelector.tsx packages/desktop/src/renderer/components/agent/AgentModeSelector.tsx:81— packages/desktop/src/renderer/components/agent/AgentModeSelector.tsx changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 73 in AgentModeSelector.AgentModeSelector at line 81. 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-07..2026-11-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-07 05:31:17 +00:00' --until='2026-11-05 05:31:17 +00:00' --full-history --no-merges -- packages/desktop/src/renderer/components/agent/AgentModeSelector.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: packages/desktop/src/renderer/pages/conversation/Messages/hooks.ts packages/desktop/src/renderer/pages/conversation/Messages/hooks.ts:140— packages/desktop/src/renderer/pages/conversation/Messages/hooks.ts changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 70 in hooks.composeMessageWithIndex at line 140. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-07..2026-11-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-07 05:31:17 +00:00' --until='2026-11-05 05:31:17 +00:00' --full-history --no-merges -- packages/desktop/src/renderer/pages/conversation/Messages/hooks.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: packages/desktop/src/renderer/components/layout/Layout.tsx packages/desktop/src/renderer/components/layout/Layout.tsx:121— packages/desktop/src/renderer/components/layout/Layout.tsx changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 51 in Layout.Layout at line 121. 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-07..2026-11-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-07 05:31:17 +00:00' --until='2026-11-05 05:31:17 +00:00' --full-history --no-merges -- packages/desktop/src/renderer/components/layout/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: packages/desktop/src/renderer/pages/conversation/Messages/components/MessageText.tsx packages/desktop/src/renderer/pages/conversation/Messages/components/MessageText.tsx:106— packages/desktop/src/renderer/pages/conversation/Messages/components/MessageText.tsx changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 51 in MessageText.MessageText at line 106. 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-07..2026-11-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-07 05:31:17 +00:00' --until='2026-11-05 05:31:17 +00:00' --full-history --no-merges -- packages/desktop/src/renderer/pages/conversation/Messages/components/MessageText.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: packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/SlackConfigForm.tsx packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/SlackConfigForm.tsx:63— packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/SlackConfigForm.tsx changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 68 in SlackConfigForm.SlackConfigForm at line 63. 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-07..2026-11-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-07 05:31:17 +00:00' --until='2026-11-05 05:31:17 +00:00' --full-history --no-merges -- packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/SlackConfigForm.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: packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillsHubSettings.tsx packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillsHubSettings.tsx:141— packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillsHubSettings.tsx changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 100 in SkillsHubSettings.SkillsHubSettings at line 141. 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-07..2026-11-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-07 05:31:17 +00:00' --until='2026-11-05 05:31:17 +00:00' --full-history --no-merges -- packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillsHubSettings.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: packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WeixinConfigForm.tsx packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WeixinConfigForm.tsx:63— packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WeixinConfigForm.tsx changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 65 in WeixinConfigForm.WeixinConfigForm at line 63. 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-07..2026-11-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-07 05:31:17 +00:00' --until='2026-11-05 05:31:17 +00:00' --full-history --no-merges -- packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WeixinConfigForm.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: packages/desktop/src/renderer/pages/cron/ScheduledTasksPage/CreateTaskDialog.tsx packages/desktop/src/renderer/pages/cron/ScheduledTasksPage/CreateTaskDialog.tsx:234— packages/desktop/src/renderer/pages/cron/ScheduledTasksPage/CreateTaskDialog.tsx changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 97 in CreateTaskDialog.CreateTaskDialog at line 234. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-07..2026-11-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-07 05:31:17 +00:00' --until='2026-11-05 05:31:17 +00:00' --full-history --no-merges -- packages/desktop/src/renderer/pages/cron/ScheduledTasksPage/CreateTaskDialog.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: packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DiscordConfigForm.tsx packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DiscordConfigForm.tsx:63— packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DiscordConfigForm.tsx changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 60 in DiscordConfigForm.DiscordConfigForm at line 63. 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-07..2026-11-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-07 05:31:17 +00:00' --until='2026-11-05 05:31:17 +00:00' --full-history --no-merges -- packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DiscordConfigForm.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.
+ 34 more in this group — see findings.md.
D30 · Dependency Vulnerabilities· Medium CVE · ×43
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 18 more in this group — see findings.md.
R4 · Test Coverage· No test reaches this file · ×40
No test reaches this file packages/desktop/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 packages/desktop/src/renderer/pages/conversation/GroupedHistory/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 packages/desktop/src/renderer/main.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/desktop/src/renderer/components/settings/SettingsModal/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 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 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 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 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 packages/desktop/src/process/utils/webuiConfig.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 packages/desktop/src/process/utils/configureChromium.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file REDACTED:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/desktop/src/renderer/pages/conversation/components/ChatHistory.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 packages/desktop/src/process/bridge/applicationBridge.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 packages/desktop/src/common/chat/navigation/NavigationInterceptor.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 packages/desktop/src/renderer/components/layout/Sider/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 scripts/resetpass.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 packages/desktop/src/common/chat/document/DocumentConverter.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 packages/desktop/src/renderer/pages/settings/ToolsSettings/McpManagement.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 packages/desktop/src/renderer/pages/conversation/GroupedHistory/hooks/useConversations.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 scripts/afterPack.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 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 scripts/dev-bootstrap.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 packages/desktop/src/renderer/pet/petConfirmRenderer.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 packages/desktop/src/process/resources/builtinMcp/browserServer.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 packages/desktop/src/renderer/pages/settings/AgentSettings/AgentHubModal.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.
Swallowed exception (empty catch) scripts/benchmark-acp-startup.ts:239— `.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) scripts/benchmark-acp-startup.ts:241— `.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) scripts/benchmark-acp-startup.ts:507— `.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) scripts/benchmark-acp-startup.ts:545— `.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) scripts/benchmark-acp-startup.ts:870— 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) scripts/benchmark-acp-startup.ts:873— `.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) scripts/benchmark-startup.ts:236— 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) scripts/benchmark-startup.ts:316— `.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) scripts/benchmark-startup.ts:317— `.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) scripts/benchmark-startup.ts:321— `.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) scripts/benchmark-startup.ts:371— `.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) scripts/benchmark-startup.ts:377— `.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) scripts/benchmark-startup.ts:390— `.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) scripts/benchmark-startup.ts:461— 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) scripts/benchmark-startup.ts:464— `.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) scripts/resetpass.ts:94— 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:301— 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:684— 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:151— 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:181— 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:238— 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:250— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) REDACTED:466— 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:258— 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:82— 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.
FileTooLong: adapter/ipcBridge.ts packages/desktop/src/common/adapter/ipcBridge.ts— FileTooLong — 1679 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1179 over it, 3.36× 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: SendBox/index.tsx packages/desktop/src/renderer/components/chat/SendBox/index.tsx— FileTooLong — 1570 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: SendBox (233-2246). The bar is 500 significant lines; this is 1070 over it, 3.14× 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: database/migrations.ts packages/desktop/src/process/services/database/migrations.ts— FileTooLong — 936 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 436 over it, 1.87× 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: platforms/useConversationCommandQueue.ts packages/desktop/src/renderer/pages/conversation/platforms/useConversationCommandQueue.ts— FileTooLong — 836 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 336 over it, 1.67× 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: team/TeamPage.tsx packages/desktop/src/renderer/pages/team/TeamPage.tsx— FileTooLong — 818 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 318 over it, 1.64× 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: SkillsSettings/SkillsHubSettings.tsx packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillsHubSettings.tsx— FileTooLong — 808 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: SkillsHubSettings (141-1040). The bar is 500 significant lines; this is 308 over it, 1.62× 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: PreviewPanel/PreviewPanel.tsx packages/desktop/src/renderer/pages/conversation/Preview/components/PreviewPanel/PreviewPanel.tsx— FileTooLong — 780 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 280 over it, 1.56× 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/backend-launcher.ts packages/web-host/src/backend-launcher.ts— FileTooLong — 779 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 279 over it, 1.56× 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: ScheduledTasksPage/CreateTaskDialog.tsx packages/desktop/src/renderer/pages/cron/ScheduledTasksPage/CreateTaskDialog.tsx— FileTooLong — 758 significant lines (blank, comment-only and punctuation-only lines excluded), about 79% of them inside a single declaration: CreateTaskDialog (234-1006). The bar is 500 significant lines; this is 258 over it, 1.52× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: chat/chatLib.ts packages/desktop/src/common/chat/chatLib.ts— FileTooLong — 753 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 253 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: acp/AcpSendBox.tsx packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx— FileTooLong — 706 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: AcpSendBox (108-959). The bar is 500 significant lines; this is 206 over it, 1.41× 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: channels/ChannelModalContent.tsx packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/ChannelModalContent.tsx— FileTooLong — 705 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: ChannelModalContent (142-986). The bar is 500 significant lines; this is 205 over it, 1.41× 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: Messages/hooks.ts packages/desktop/src/renderer/pages/conversation/Messages/hooks.ts— FileTooLong — 705 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 205 over it, 1.41× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 693 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: WebuiModalContent (74-955). The bar is 500 significant lines; this is 193 over it, 1.39× 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: aionrs/AionrsSendBox.tsx packages/desktop/src/renderer/pages/conversation/platforms/aionrs/AionrsSendBox.tsx— FileTooLong — 678 significant lines (blank, comment-only and punctuation-only lines excluded), about 86% of them inside a single declaration: AionrsSendBox (119-905). The bar is 500 significant lines; this is 178 over it, 1.36× 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 packages/desktop/src/index.ts— FileTooLong — 671 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 171 over it, 1.34× 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: channels/LarkConfigForm.tsx packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx— FileTooLong — 663 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: LarkConfigForm (69-841). The bar is 500 significant lines; this is 163 over it, 1.33× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: context/PreviewContext.tsx packages/desktop/src/renderer/pages/conversation/Preview/context/PreviewContext.tsx— FileTooLong — 626 significant lines (blank, comment-only and punctuation-only lines excluded), about 67% of them inside a single declaration: PreviewProvider (532-1421). The bar is 500 significant lines; this is 126 over it, 1.25× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: scripts/benchmark-acp-startup.ts scripts/benchmark-acp-startup.ts— FileTooLong — 624 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 124 over it, 1.25× 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: Messages/MessageList.tsx packages/desktop/src/renderer/pages/conversation/Messages/MessageList.tsx— FileTooLong — 590 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 90 over it, 1.18× 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 — 587 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 87 over it, 1.17× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: services/autoUpdaterService.ts packages/desktop/src/process/services/autoUpdaterService.ts— FileTooLong — 571 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: AutoUpdaterService (102-914). The bar is 500 significant lines; this is 71 over it, 1.14× 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: channels/DingTalkConfigForm.tsx packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.tsx— FileTooLong — 562 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: DingTalkConfigForm (69-721). The bar is 500 significant lines; this is 62 over it, 1.12× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: components/AddPlatformModal.tsx packages/desktop/src/renderer/pages/settings/components/AddPlatformModal.tsx— FileTooLong — 558 significant lines (blank, comment-only and punctuation-only lines excluded), about 76% of them inside a single declaration: AddPlatformModal (204-766). The bar is 500 significant lines; this is 58 over it, 1.12× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: bridge/updateBridge.ts packages/desktop/src/process/bridge/updateBridge.ts— FileTooLong — 552 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 52 over it, 1.10× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
Sync-over-async blocking packages/desktop/src/process/services/database/runLegacyDatabaseMigrations.ts:53— `existsSync` in `runLegacyDatabaseMigrations` 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/desktop/src/process/utils/utils.ts:310— `existsSync` in `copyDirectoryRecursively` 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/desktop/src/process/utils/utils.ts:321— `existsSync` in `copyDirectoryRecursively` 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/desktop/src/process/utils/utils.ts:327— `existsSync` in `copyDirectoryRecursively` 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/desktop/src/process/utils/utils.ts:338— `existsSync` in `verifyDirectoryFiles` 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/desktop/src/process/utils/utils.ts:417— `existsSync` in `copyFilesToDirectory` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/afterPack.js:55— `fs.existsSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/afterPack.js:56— `fs.readdirSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/afterPack.js:60— `fs.existsSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/afterPack.js:61— `fs.readdirSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/afterPack.js:65— `fs.existsSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/afterPack.js:66— `fs.readdirSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/afterPack.js:120— `fs.existsSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/afterPack.js:124— `fs.existsSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/afterPack.js:125— `fs.rmSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/afterPack.js:131— `fs.existsSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/afterPack.js:132— `fs.rmSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/afterPack.js:142— `fs.existsSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/afterPack.js:143— `fs.readdirSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/afterPack.js:148— `fs.existsSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/afterPack.js:148— `fs.statSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/afterPack.js:149— `fs.readdirSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/afterPack.js:153— `fs.existsSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/afterPack.js:153— `fs.statSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking scripts/afterPack.js:154— `fs.rmSync` in `afterPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
No assertions: emit is a no-op function tests/unit/common-adapter/httpBridge.test.ts:413— 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: applies transform function to subscribed callback tests/unit/common-adapter/httpBridge.test.ts:421— 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: emit is a no-op tests/unit/common-adapter/httpBridge.test.ts:443— 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: screenshot: agent settings tests/e2e/specs/acp-agent.e2e.ts:30— 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: disabled builtin assistant removed from guid page presets tests/e2e/specs/assistant-settings-crud.e2e.ts:368— 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: screenshot: channels settings tests/e2e/specs/channels.e2e.ts:104— 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: agent settings page loads with extension agents tests/e2e/specs/ext-acp.e2e.ts:18— 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: screenshot: agent settings with extensions tests/e2e/specs/ext-acp.e2e.ts:55— 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: channels page renders tests/e2e/specs/ext-channels.e2e.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: screenshot: channels with extensions tests/e2e/specs/ext-channels.e2e.ts:97— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: MCP tools page loads tests/e2e/specs/ext-mcp.e2e.ts:10— 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: screenshot: MCP tools with extensions tests/e2e/specs/ext-mcp.e2e.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: screenshot: extension settings tab tests/e2e/specs/ext-settings-tabs.e2e.ts:192— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: screenshot: skills area tests/e2e/specs/ext-skills.e2e.ts:28— 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: screenshot: display with extension themes tests/e2e/specs/ext-themes-stability.e2e.ts:32— 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: screenshot: assistants with extensions tests/e2e/specs/ext-themes-stability.e2e.ts:62— 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: extension agent appears in agent settings tests/e2e/specs/extension-contributed.e2e.ts:32— 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: extension assistant appears on guid page tests/e2e/specs/extension-contributed.e2e.ts:55— 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: navigates to guid page tests/e2e/specs/navigation.e2e.ts:13— 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: screenshot: guid page tests/e2e/specs/navigation.e2e.ts:33— 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: screenshot: settings pages tests/e2e/specs/navigation.e2e.ts:63— 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: webui settings page renders tests/e2e/specs/webui.e2e.ts:22— 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: screenshot: webui settings tests/e2e/specs/webui.e2e.ts:124— 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: maximize and unmaximize round-trip through the bridge tests/e2e/specs/window-controls.e2e.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: setup: create conversation with workspace panel tests/e2e/features/workspaces/workspace-file-ops.e2e.ts:36— 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.
ClassTooLong: SkillsHubSettings packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillsHubSettings.tsx:1— ClassTooLong — 705 significant lines (blank, comment-only and punctuation-only lines excluded), 8 methods. The bar is 400 significant lines; this is 305 over it, 1.76× 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: WebuiModalContent REDACTED:1— ClassTooLong — 640 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 240 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ChannelModalContent packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/ChannelModalContent.tsx:1— ClassTooLong — 623 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 223 over it, 1.56× 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: AcpSendBox packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx:1— ClassTooLong — 615 significant lines (blank, comment-only and punctuation-only lines excluded), 5 methods. The bar is 400 significant lines; this is 215 over it, 1.54× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: LarkConfigForm packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx:1— ClassTooLong — 614 significant lines (blank, comment-only and punctuation-only lines excluded), 3 methods. The bar is 400 significant lines; this is 214 over it, 1.54× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: CreateTaskDialog packages/desktop/src/renderer/pages/cron/ScheduledTasksPage/CreateTaskDialog.tsx:1— ClassTooLong — 599 significant lines (blank, comment-only and punctuation-only lines excluded), 8 methods. The bar is 400 significant lines; this is 199 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: AionrsSendBox packages/desktop/src/renderer/pages/conversation/platforms/aionrs/AionrsSendBox.tsx:1— ClassTooLong — 585 significant lines (blank, comment-only and punctuation-only lines excluded), 7 methods. The bar is 400 significant lines; this is 185 over it, 1.46× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: DingTalkConfigForm packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.tsx:1— ClassTooLong — 513 significant lines (blank, comment-only and punctuation-only lines excluded), 3 methods. The bar is 400 significant lines; this is 113 over it, 1.28× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: AutoUpdaterService packages/desktop/src/process/services/autoUpdaterService.ts:102— ClassTooLong — 511 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 400 significant lines; this is 111 over it, 1.28× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: WebviewHost packages/desktop/src/renderer/components/media/WebviewHost.tsx:1— ClassTooLong — 495 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 95 over it, 1.24× 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: WecomConfigForm packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WecomConfigForm.tsx:1— ClassTooLong — 493 significant lines (blank, comment-only and punctuation-only lines excluded), 3 methods. The bar is 400 significant lines; this is 93 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: GuidPage packages/desktop/src/renderer/pages/guid/GuidPage.tsx:1— ClassTooLong — 491 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 91 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: SlackConfigForm packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/SlackConfigForm.tsx:1— ClassTooLong — 484 significant lines (blank, comment-only and punctuation-only lines excluded), 3 methods. The bar is 400 significant lines; this is 84 over it, 1.21× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: useAssistantEditor packages/desktop/src/renderer/hooks/assistant/useAssistantEditor.ts:1— ClassTooLong — 480 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 80 over it, 1.20× 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: TaskDetailPage packages/desktop/src/renderer/pages/cron/ScheduledTasksPage/TaskDetailPage.tsx:1— ClassTooLong — 467 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 67 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: useAcpMessage packages/desktop/src/renderer/pages/conversation/platforms/acp/useAcpMessage.ts:1— ClassTooLong — 457 significant lines (blank, comment-only and punctuation-only lines excluded), 12 methods. The bar is 400 significant lines; this is 57 over it, 1.14× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ModelModalContent packages/desktop/src/renderer/components/settings/SettingsModal/contents/ModelModalContent.tsx:1— ClassTooLong — 455 significant lines (blank, comment-only and punctuation-only lines excluded), 7 methods. The bar is 400 significant lines; this is 55 over it, 1.14× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: GuidActionRow packages/desktop/src/renderer/pages/guid/components/GuidActionRow.tsx:1— ClassTooLong — 451 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 51 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: AssistantEditorSections packages/desktop/src/renderer/pages/settings/AssistantSettings/AssistantEditorSections.tsx:1— ClassTooLong — 446 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 46 over it, 1.12× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: TelegramConfigForm packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/TelegramConfigForm.tsx:1— ClassTooLong — 440 significant lines (blank, comment-only and punctuation-only lines excluded), 3 methods. The bar is 400 significant lines; this is 40 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: DiscordConfigForm packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DiscordConfigForm.tsx:1— ClassTooLong — 436 significant lines (blank, comment-only and punctuation-only lines excluded), 3 methods. The bar is 400 significant lines; this is 36 over it, 1.09× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: useConversationCommandQueue packages/desktop/src/renderer/pages/conversation/platforms/useConversationCommandQueue.ts:1— ClassTooLong — 428 significant lines (blank, comment-only and punctuation-only lines excluded), 47 methods. The bar is 400 significant lines; this is 28 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.
ClassTooLong: WeixinConfigForm packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WeixinConfigForm.tsx:1— ClassTooLong — 423 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 23 over it, 1.06× 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: AddPlatformModal packages/desktop/src/renderer/pages/settings/components/AddPlatformModal.tsx:1— ClassTooLong — 422 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 22 over it, 1.06× 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.
AC6 · Visual & motion safety· Animation without a prefers-reduced-motion guard · ×23
Animation without a prefers-reduced-motion guard packages/desktop/src/renderer/components/agent/RuntimeSelectorPill.tsx:32— <span> 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 packages/desktop/src/renderer/pages/conversation/Messages/MessageList.tsx:195— <div> moves — its inline style sets `animation: message-list-skeleton-shimmer 1.4s ease-in-out infinite` — 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 packages/desktop/src/renderer/styles/themes/base.css:33— `.loading` moves (`animation: loading 1s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard packages/desktop/src/renderer/styles/themes/base.css:98— `.team-warmup-sweep` moves (`animation: team-warmup-sweep 1.4s ease-in-out infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard packages/desktop/src/renderer/pages/login/LoginPage.css:27— `.login-page__background-circle` moves (`animation: login-float 20s infinite ease-in-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard packages/desktop/src/renderer/pages/login/LoginPage.css:80— `.login-page__card` moves (`animation: login-slide-up 0.6s ease-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard packages/desktop/src/renderer/pages/login/LoginPage.css:146— `.login-page__logo svg` moves (`animation: login-pulse 3s infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard packages/desktop/src/renderer/pages/login/LoginPage.css:306— `.login-page__spinner` moves (`animation: login-spin 1s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard packages/desktop/src/renderer/pages/login/LoginPage.css:329— `.login-page__message--visible` moves (`animation: login-fade-in 0.3s ease-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard packages/desktop/src/renderer/pages/guid/index.module.css:325— `.plusButtonRotate` moves (`animation: rotate-animation 0.3s ease-in-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard packages/desktop/src/renderer/pages/guid/index.module.css:350— `.skeleton` moves (`animation: guid-shimmer 1.5s ease-in-out infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard packages/desktop/src/renderer/pages/guid/index.module.css:357— `.skeletonPill` moves (`animation: guid-shimmer 1.5s ease-in-out infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard packages/desktop/src/renderer/pages/guid/index.module.css:463— `.agentItemSelected` moves (`animation: agentSelectPop 0.4s ease-out forwards`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard packages/desktop/src/renderer/pages/guid/index.module.css:480— `.assistantOverflowPanel` moves (`animation: assistantOverflowPanelIn 0.16s cubic-bezier(0.2, 0.8, 0.3, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard packages/desktop/src/renderer/pages/conversation/Messages/components/MessageThinking.module.css:40— `.arrow` moves (`transition: transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard packages/desktop/src/renderer/pages/conversation/Messages/components/MessageToolGroupSummary.css:57— `.tool-group-summary__arrow` moves (`transition: transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard packages/desktop/src/renderer/pages/conversation/Messages/anchorRail/MessageAnchorRail.module.css:124— `.tick` moves (`transition: width 120ms ease,
background-color 120ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard packages/desktop/src/renderer/pages/conversation/GroupedHistory/ConversationSearchPopover.css:298— `.conversation-search-modal__recent-chip` moves (`transition: color 0.16s ease,
border-color 0.16s ease,
background-color 0.16s ease,
transform 0.16s ease,
box-shadow 0.16s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard packages/desktop/src/renderer/components/layout/Titlebar/titlebar.css:204— `.app-titlebar__migration-capsule` moves (`transition: filter 0.2s ease,
transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard packages/desktop/src/renderer/components/chat/SendBox/sendbox.css:347— `.speech-input-feedback__bar` moves (`transition: height 120ms ease,
background-color 120ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard packages/desktop/src/renderer/components/chat/SendBox/sendbox.css:414— `.speech-loader-spinner` moves (`animation: speech-loader-spin 0.9s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard packages/desktop/src/renderer/components/chat/SendBox/sendbox.css:538— `.pill-marquee-track` moves (`animation-name: pill-marquee`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard packages/desktop/src/renderer/components/chat/MobileActionSheet/MobileActionSheet.module.css:27— `.sheet` moves (`transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Boundary violation [package:third-party-deep-import] packages/desktop/src/process/services/autoUpdaterService.ts:11— packages/desktop/src/process/services/autoUpdaterService.ts:11 imports electron-updater/out/providers/Provider, 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/desktop/src/process/services/cdnGenericProvider.ts:8— packages/desktop/src/process/services/cdnGenericProvider.ts:8 imports electron-updater/out/providers/GenericProvider, 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/desktop/src/process/services/cdnGenericProvider.ts:9— packages/desktop/src/process/services/cdnGenericProvider.ts:9 imports electron-updater/out/providers/Provider, 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/desktop/src/process/services/cdnGenericProvider.ts:10— packages/desktop/src/process/services/cdnGenericProvider.ts:10 imports electron-updater/out/util, 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] REDACTED:13— REDACTED:13 imports react-syntax-highlighter/dist/esm/styles/hljs, 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/desktop/src/renderer/components/Markdown/MermaidBlock.tsx:9— packages/desktop/src/renderer/components/Markdown/MermaidBlock.tsx:9 imports react-syntax-highlighter/dist/esm/styles/hljs, 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] REDACTED:11— REDACTED:11 imports react-syntax-highlighter/dist/esm/styles/hljs, 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] REDACTED:16— REDACTED:16 imports react-syntax-highlighter/dist/esm/styles/hljs, 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:relative-cross-package] scripts/afterPack.js:11— scripts/afterPack.js:11 reaches into another package with a relative path (../packages/shared-scripts/src/verify-bundled-aioncore-resources) — import the package by name instead.
Boundary violation [package:relative-cross-package] REDACTED:767— REDACTED:767 reaches into another package with a relative path (../packages/shared-scripts/src/prepare-aioncore.js) — import the package by name instead.
Boundary violation [package:relative-cross-package] REDACTED:12— REDACTED:12 reaches into another package with a relative path (../packages/desktop/src/common/config/i18n-config.json) — import the package by name instead.
Boundary violation [package:relative-cross-package] REDACTED:19— REDACTED:19 reaches into another package with a relative path (../packages/desktop/src/common/config/i18n-config.json) — import the package by name instead.
Boundary violation [package:relative-cross-package] scripts/pack-web-cli.js:6— scripts/pack-web-cli.js:6 reaches into another package with a relative path (../packages/shared-scripts/src/prepare-aioncore.js) — import the package by name instead.
Boundary violation [package:relative-cross-package] scripts/prepareAioncore.js:20— scripts/prepareAioncore.js:20 reaches into another package with a relative path (../packages/shared-scripts/src/prepare-aioncore.js) — import the package by name instead.
Boundary violation [package:relative-cross-package] REDACTED:28— REDACTED:28 reaches into another package with a relative path (../packages/web-cli/src/browser.js) — import the package by name instead.
Boundary violation [package:test-cross-package-internals] tests/unit/assets/verifyBundledAioncoreResources.test.ts:8— tests/unit/assets/verifyBundledAioncoreResources.test.ts:8 reaches past another workspace package's public entry into its internals with a relative path (../../../packages/shared-scripts/src/verify-bundled-aioncore-resources) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] tests/unit/bootstrap/backendLauncherParentPid.test.ts:2— tests/unit/bootstrap/backendLauncherParentPid.test.ts:2 reaches past another workspace package's public entry into its internals with a relative path (../../../packages/web-host/src/backend-launcher) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] tests/unit/web-cli/browser.test.ts:8— tests/unit/web-cli/browser.test.ts:8 reaches past another workspace package's public entry into its internals with a relative path (../../../packages/web-cli/src/browser.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] tests/unit/web-cli/ensureAdminPassword.test.ts:8— tests/unit/web-cli/ensureAdminPassword.test.ts:8 reaches past another workspace package's public entry into its internals with a relative path (../../../packages/web-cli/src/ensureAdminPassword.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
X2 · Cancellation propagation· Async function without AbortSignal · ×11
Async function without AbortSignal: resetPasswordVia scripts/resetpass.ts:136— `resetPasswordVia` 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: fetchAdminUsername REDACTED:191— `fetchAdminUsername` 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: waitForHealth packages/web-host/src/backend-launcher.ts:924— `waitForHealth` 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: runResetPassword REDACTED:278— `runResetPassword` 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: downloadFileFromRef packages/desktop/src/renderer/utils/file/download.ts:45— `downloadFileFromRef` 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: ensureAdminUser packages/desktop/src/process/utils/ensureAdminUser.ts:25— `ensureAdminUser` 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: resetPasswordCLI packages/desktop/src/process/utils/resetPasswordCLI.ts:42— `resetPasswordCLI` 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: fetchAdminUsername packages/desktop/src/process/bridge/webuiBridge.ts:31— `fetchAdminUsername` 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: maybeSeedInitialPassword packages/desktop/src/process/bridge/webuiBridge.ts:52— `maybeSeedInitialPassword` 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: fetchJson packages/desktop/src/common/config/configService.ts:21— `fetchJson` 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: performRefresh packages/desktop/src/common/adapter/sessionRefresh.ts:80— `performRefresh` 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 })`.
Change coupling: migrations.ts ↔ schema.ts packages/desktop/src/process/services/database/migrations.ts:1— `packages/desktop/src/process/services/database/migrations.ts` and `packages/desktop/src/process/services/database/schema.ts` change together 74% of the time (17 of the 23 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 17 shared commits counted here, the most recent 3 are `028694fb` fix(team): add file sending support to team mode pipeline (#2385) (at that commit the files were still `src/process/services/database/migrations.ts` and `src/process/services/database/schema.ts`); `6b050d3b` fix(cron): persist scheduled task descriptions (at that commit the files were still `src/process/services/database/migrations.ts` and `src/process/services/database/schema.ts`); `03e8034c` feat(cron): add hidden message support, prompt prepending, and skill … (at that commit the files were still `src/process/services/database/migrations.ts` and `src/process/services/database/schema.ts`) — run `git show` on any of them.
Change coupling: AcpModelSelector.tsx ↔ GuidModelSelector.tsx packages/desktop/src/renderer/components/agent/AcpModelSelector.tsx:1— `packages/desktop/src/renderer/components/agent/AcpModelSelector.tsx` and `packages/desktop/src/renderer/pages/guid/components/GuidModelSelector.tsx` change together 67% of the time (8 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 `756d544c` feat(conversation): rework model selector into a two-level menu (#3550); `f87d53dc` fix(agent): show ACP model descriptions (#3463); `f8e3566a` fix(model): disable provider focus revalidation (#2770) (at that commit the files were still `src/renderer/components/agent/AcpModelSelector.tsx` and `src/renderer/pages/guid/components/GuidModelSelector.tsx`) — run `git show` on any of them.
Change coupling: electron.ts ↔ main.ts packages/desktop/src/common/types/platform/electron.ts:1— `packages/desktop/src/common/types/platform/electron.ts` and `packages/desktop/src/preload/main.ts` change together 64% of the time (14 of the 22 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 `34299770` fix(startup): stop misreporting slow backend startup as broken instal…; `7b101c46` fix(startup): confirm corrupted database rebuild (#3502); `de6240ab` feat(desktop): report installation integrity diagnostics (#3333) — run `git show` on any of them.
Change coupling: chatLib.ts ↔ MessageToolGroupSummary.tsx packages/desktop/src/common/chat/chatLib.ts:1— `packages/desktop/src/common/chat/chatLib.ts` and `packages/desktop/src/renderer/pages/conversation/Messages/components/MessageToolGroupSummary.tsx` change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 `d1cd3491` 优化 Codex ACP 图片预览与下载 (#2935); `d91cab49` feat: unified tool call rendering via NormalizedToolCall layer (at that commit the files were still `src/common/chat/chatLib.ts` and `src/renderer/pages/conversation/Messages/components/MessageToolGroupSummary.tsx`); `99c1b00f` feat(acp): inline thinking display, plan dedup, and processing indica… (at that commit the files were still `src/common/chat/chatLib.ts` and `src/renderer/pages/conversation/Messages/components/MessageToolGroupSummary.tsx`) — run `git show` on any of them.
Change coupling: configKeys.ts ↔ storage.ts packages/desktop/src/common/config/configKeys.ts:1— `packages/desktop/src/common/config/configKeys.ts` and `packages/desktop/src/common/config/storage.ts` change together 62% of the time (8 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 `5de292e9` refactor(theme): drop legacy theme migration (#3918); `e67ac7c1` fix(config-migration): stop deleted providers/assistants from resurre…; `3fe80b7f` refactor(migration): remove flag-based skip, rely on idempotent backe… — run `git show` on any of them.
Change coupling: AcpChat.tsx ↔ AionrsChat.tsx packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpChat.tsx:1— `packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpChat.tsx` and `packages/desktop/src/renderer/pages/conversation/platforms/aionrs/AionrsChat.tsx` 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 — 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 `be944f4c` refactor(media): read image root from ConversationContext (#4105); `97fceb63` fix(conversation): restore team chat full width (#3464); `96eec36a` feat(conversation): add cursor message pagination (#3422) — run `git show` on any of them.
Change coupling: useAcpMessage.ts ↔ useAionrsMessage.ts packages/desktop/src/renderer/pages/conversation/platforms/acp/useAcpMessage.ts:1— `packages/desktop/src/renderer/pages/conversation/platforms/acp/useAcpMessage.ts` and `packages/desktop/src/renderer/pages/conversation/platforms/aionrs/useAionrsMessage.ts` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `20403d27` fix(conversation): persist ThoughtDisplay elapsed timer across conver…; `96eec36a` feat(conversation): add cursor message pagination (#3422); `52da6787` Stabilize conversation runtime view contract (#3224) — run `git show` on any of them.
Change coupling: Router.tsx ↔ SettingsSider.tsx packages/desktop/src/renderer/components/layout/Router.tsx:1— `packages/desktop/src/renderer/components/layout/Router.tsx` and `packages/desktop/src/renderer/pages/settings/components/SettingsSider.tsx` change together 50% of the time (11 of the 22 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 11 shared commits counted here, the most recent 3 are `2042101c` feat(assistant): promote assistants to a top-level sidebar entry; `c7011e59` refactor(settings): group sider and merge Skills Hub + Tools into Cap… (at that commit the files were still `src/renderer/components/layout/Router.tsx` and `src/renderer/pages/settings/components/SettingsSider.tsx`); `705e4177` feat(agent): unify Agent management UI with dual-tab structure (at that commit the files were still `src/renderer/components/layout/Router.tsx` and `src/renderer/pages/settings/components/SettingsSider.tsx`) — run `git show` on any of them.
Change coupling: AcpModelSelector.tsx ↔ GoogleModelSelector.tsx packages/desktop/src/renderer/components/agent/AcpModelSelector.tsx:1— `packages/desktop/src/renderer/components/agent/AcpModelSelector.tsx` and `packages/desktop/src/renderer/pages/conversation/platforms/gemini/GoogleModelSelector.tsx` change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 `3c339e45` refactor(sendbox): right-align config and drop context usage pill (#2…; `f8e3566a` fix(model): disable provider focus revalidation (#2770) (at that commit the files were still `src/renderer/components/agent/AcpModelSelector.tsx` and `src/renderer/pages/conversation/platforms/gemini/GoogleModelSelector.tsx`); `07c888c7` refactor(renderer): consolidate model utilities into utils/model/ (at that commit the files were still `src/renderer/components/agent/AcpModelSelector.tsx` and `src/renderer/pages/conversation/gemini/GeminiModelSelector.tsx`) — run `git show` on any of them.
Change coupling: OpenAIRotatingClient.ts ↔ ToolsModalContent.tsx packages/desktop/src/common/api/OpenAIRotatingClient.ts:1— `packages/desktop/src/common/api/OpenAIRotatingClient.ts` and `packages/desktop/src/renderer/components/settings/SettingsModal/contents/ToolsModalContent.tsx` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — 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 `caf18ff1` revert: roll back issue #6 (form-A adapter), keep issue #5; `047d3a8a` feat(image-gen): add form-A adapter + ImageProviderAdapter abstraction; `70d5f031` chore: Revert inline_data support for nano-banana-pro-preview (at that commit the files were still `src/common/adapters/OpenAIRotatingClient.ts` and `src/renderer/components/SettingsModal/contents/ToolsModalContent.tsx`) — run `git show` on any of them.
X24 · Document value interpolated into markup unescaped· Untrusted text written into markup unescaped · ×10
Untrusted text written into markup unescaped REDACTED:85— `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:303— `overlaySvg` 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 packages/desktop/src/renderer/components/Markdown/MermaidBlock.tsx:378— `svg` 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 packages/desktop/src/renderer/components/Markdown/MermaidBlock.tsx:393— `svg` 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 packages/desktop/src/renderer/components/Markdown/ShadowView.tsx:38— ``
/* Shadow DOM CSS variable definitions */
:host {
${cssVarsDeclaration}
}
* {
line-height:${lineHe…` 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:476— `svg` 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:491— `svg` 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:143— `title` 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:168— `diffHtmlContent` 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:204— `diffHtmlContent` 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.
AC6 · Visual & motion safety· Focus outline removed in CSS without a · ×8
Focus outline removed in CSS without a :focus replacement packages/desktop/src/renderer/pages/guid/index.module.css:262— `.wsDropdownSearchInput` 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 packages/desktop/src/renderer/pages/conversation/GroupedHistory/ConversationSearchPopover.css:198— `.conversation-search-modal__search-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement packages/desktop/src/renderer/pages/conversation/GroupedHistory/ConversationSearchPopover.css:238— `.conversation-search-modal__search-input: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 packages/desktop/src/renderer/components/chat/SendBox/sendbox.css:14— `.send-button-custom` 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 packages/desktop/src/renderer/components/base/AionInlineSearchInput.module.css:30— `.input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement packages/desktop/src/renderer/components/base/AionInlineSearchInput.module.css:43— `.input: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 packages/desktop/src/renderer/components/base/AionSearchInput.module.css:53— `.input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement packages/desktop/src/renderer/components/base/AionSearchInput.module.css:62— `.input: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.
AC2 · Forms & labels· <Input> field component without a label · ×7
<Input> field component without a label packages/desktop/src/renderer/components/chat/SendBox/index.tsx:878— 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 packages/desktop/src/renderer/components/layout/Sider/TeamSiderSection.tsx:314— 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 packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/ChannelModalContent.tsx:714— 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 packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.tsx:349— 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 packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.tsx:364— 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 packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx:360— 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 packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx:375— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
Focus outline removed inline packages/desktop/src/renderer/components/chat/SlashCommandMenu.tsx:92— <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 packages/desktop/src/renderer/pages/conversation/GroupedHistory/ConversationSearchPopover.tsx:387— <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 packages/desktop/src/renderer/pages/conversation/components/ChatTitleEditor.tsx:100— <div> 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 packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillsHubSettings.tsx:578— <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 packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillsHubSettings.tsx:875— <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 packages/desktop/src/renderer/pages/team/components/TeamTabs.tsx:152— <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).
Fake-async — async method never awaits packages/desktop/src/process/utils/initStorage.ts:331— `ensureAssistantDirs` 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/desktop/src/renderer/pages/team/components/teamCreateModelResolver.ts:84— `resolveAcpDefaultModel` 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/desktop/src/renderer/pages/team/components/teamCreateModelResolver.ts:88— `resolveAntigravityDefaultModel` 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/desktop/src/renderer/pages/team/components/teamCreateModelResolver.ts:97— `resolveGeminiDefaultModel` 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/desktop/src/renderer/pages/team/components/teamCreateModelResolver.ts:103— `resolveAionrsDefaultModel` 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/desktop/src/sentry.ts:473— `runStartupLogReport` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
AC3 · Page structure· Page without a main landmark · ×5
Page without a main landmark packages/desktop/src/renderer/index.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="root">, so there is no content here to wrap — render the <main> from the component mounted into it.
Page without a main landmark packages/desktop/src/renderer/pet/pet-confirm.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 packages/desktop/src/renderer/pet/pet-hit.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="hit">, so there is no content here to wrap — render the <main> from the component mounted into it.
Page without a main landmark packages/desktop/src/renderer/pet/pet.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 public/pet-states/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>.
AC2 · Forms & labels· <TextInput> field component without a label · ×4
<TextInput> field component without a label mobile/app/connect.tsx:139— 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.
<TextInput> field component without a label mobile/src/components/chat/ChatInputBar.tsx:37— 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.
<TextInput> field component without a label mobile/src/components/chat/ChatSidebar.tsx:164— 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.
<TextInput> field component without a label mobile/src/components/chat/ChatSidebar.tsx:214— 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.
IC1 · Incompleteness & stubs· Markup wires an event to an empty handler · ×4
Markup wires an event to an empty handler packages/desktop/src/renderer/components/settings/SettingsModal/contents/ToolsModalContent.tsx:230— `onEditServer` 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 packages/desktop/src/renderer/components/settings/SettingsModal/contents/ToolsModalContent.tsx:231— `onDeleteServer` 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 packages/desktop/src/renderer/pages/settings/ToolsSettings/McpManagement.tsx:197— `onEditServer` 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 packages/desktop/src/renderer/pages/settings/ToolsSettings/McpManagement.tsx:198— `onDeleteServer` 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.
TodoComment tests/e2e/helpers/chatAionrs.ts:432— // TODO: Implement actual folder attachment when UI flow is clarified — 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/desktop/src/renderer/hooks/chat/useSendBoxDraft.ts:123— // TODO import ts-pattern for exhaustive check — 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/desktop/src/renderer/hooks/chat/useSendBoxDraft.ts:155— // TODO import ts-pattern for exhaustive check — 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.
IC1 · Incompleteness & stubs· Both branches are identical · ×3
Both branches are identical — the condition decides nothing packages/desktop/src/renderer/components/layout/Layout.tsx:384— 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 packages/desktop/src/renderer/pages/team/components/memberPicker/TeamAssistantPicker.tsx:82— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing REDACTED:33— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Dead file (~41 LoC) packages/desktop/src/common/utils/appConfig.ts— no import path from any entry point (80 application, 30 tooling, 685 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 (~41 LoC) packages/desktop/src/renderer/components/IconParkHOC.tsx— no import path from any entry point (80 application, 30 tooling, 685 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 (~41 LoC) packages/desktop/src/renderer/hooks/ui/useDebounce.ts— no import path from any entry point (80 application, 30 tooling, 685 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· <Select> field component without a label · ×2
<Select> field component without a label packages/desktop/src/renderer/components/settings/SettingsModal/contents/FeedbackReportModal.tsx:423— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Select> field component without a label packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/ChannelModalContent.tsx:697— 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.
AC4 · Keyboard semantics· Modal dialog does not manage focus · ×2
Modal dialog does not manage focus REDACTED:213— This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
Modal dialog does not manage focus packages/desktop/src/renderer/components/chat/MobileActionSheet/MobileActionSheet.tsx:134— This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
D12 · Dependency Hygiene· One package at two majors across the workspace · ×2
One package at two majors across the workspace: i18next — `i18next` is maintained at 2 different major versions inside this one repository — major 23 in REDACTED; major 25 in REDACTED. Every major carries its own breaking changes, advisories and upgrade path, so the cost of keeping current is paid more than once; and where the packages are installed together, the resolver cannot dedupe them, so both copies ship.
One package at two majors across the workspace: react-i18next — `react-i18next` is maintained at 2 different major versions inside this one repository — major 14 in REDACTED; major 16 in REDACTED. Every major carries its own breaking changes, advisories and upgrade path, so the cost of keeping current is paid more than once; and where the packages are installed together, the resolver cannot dedupe them, so both copies ship.
Change-coupling hub: InstallationIntegrityDialog.tsx → electron.ts, REDACTED, backendStartupFailure.ts packages/desktop/src/renderer/components/layout/InstallationIntegrityDialog.tsx— `packages/desktop/src/renderer/components/layout/InstallationIntegrityDialog.tsx` changes together with 3 other files — `packages/desktop/src/common/types/platform/electron.ts`, `packages/desktop/src/index.ts`, `packages/desktop/src/process/startup/backendStartupFailure.ts` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
Change-coupling hub: ipcBridge.ts → REDACTED, systemSettingsBridge.ts, useModeModeList.ts, ChatSlider.tsx packages/desktop/src/common/adapter/ipcBridge.ts— `packages/desktop/src/common/adapter/ipcBridge.ts` changes together with 4 other files — `packages/desktop/src/process/bridge/index.ts`, `packages/desktop/src/process/bridge/systemSettingsBridge.ts`, `packages/desktop/src/renderer/hooks/agent/useModeModeList.ts`, `packages/desktop/src/renderer/pages/conversation/components/ChatSlider.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.
R10 · Code Duplication· Duplicated block with local edits (69 matched lines × 2 locations) · ×2
Duplicated block with local edits (69 matched lines × 2 locations) packages/desktop/src/renderer/pages/team/activity/MessageCard.tsx:32— packages/desktop/src/renderer/pages/team/activity/MessageCard.tsx:32 · packages/desktop/src/renderer/pages/team/activity/TaskCard.tsx:85 — the two spans are one implementation copied and then locally edited — 438 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 (69 matched lines × 2 locations) packages/desktop/src/renderer/utils/chat/atFileQuery.ts:32— packages/desktop/src/renderer/utils/chat/atFileQuery.ts:32 · packages/desktop/src/renderer/utils/chat/atSessionQuery.ts:57 — the two spans are one implementation copied and then locally edited — 521 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 (41 lines × 2 locations) packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx:471— packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx:471 · packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx:515 — 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 (41 lines × 2 locations) scripts/smoke-installer-failure-messagebox.js:124— scripts/smoke-installer-failure-messagebox.js:124 · scripts/smoke-installer-rstrtmgr-ui.js:14 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Dead file (~234 LoC) packages/desktop/src/common/chat/document/DocumentConverter.ts— no import path from any entry point (80 application, 30 tooling, 685 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 (~234 LoC) packages/desktop/src/renderer/pages/settings/ToolsSettings/McpManagement.tsx— no import path from any entry point (80 application, 30 tooling, 685 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~105 LoC) packages/desktop/src/renderer/pages/guid/components/SkillsMarketBanner.tsx— no import path from any entry point (80 application, 30 tooling, 685 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~105 LoC) scripts/codemods/assistantSnakeCase.ts— no import path from any entry point (80 application, 30 tooling, 685 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) packages/desktop/src/process/services/database/IConversationRepository.ts— no import path from any entry point (80 application, 30 tooling, 685 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) packages/desktop/src/renderer/components/layout/Sider/SortableSiderEntry.tsx— no import path from any entry point (80 application, 30 tooling, 685 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) packages/desktop/src/common/config/storageKeys.ts— no import path from any entry point (80 application, 30 tooling, 685 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) packages/desktop/src/renderer/pages/conversation/utils/detectPlatform.ts— no import path from any entry point (80 application, 30 tooling, 685 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~25 LoC) packages/desktop/src/renderer/pages/conversation/platforms/assertBridgeSuccess.ts— no import path from any entry point (80 application, 30 tooling, 685 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~25 LoC) packages/desktop/src/renderer/pages/guid/components/GuidSkeleton.tsx— no import path from any entry point (80 application, 30 tooling, 685 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 · ×2
Recursive walk over a caller-supplied document has no depth cap packages/desktop/src/renderer/pages/conversation/GroupedHistory/utils/exportHelpers.ts:44— `appendWorkspaceFilesToZip` is exported, takes a document from its caller (line 24) and hands it to `walk`, which calls itself at line 44 (`walk`) with a piece of `node` — 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 packages/desktop/src/common/config/i18n.ts:79— `mergeWithFallback` is exported and takes `fallback: Record<string, unknown>` from its caller, and it calls itself at line 79 (`mergeWithFallback`) with a piece of `fallback` — and nowhere in `mergeWithFallback` 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 `mergeWithFallback` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
AC1 · Text alternatives· <object> without a text alternative · ×1
<object> without a text alternative packages/desktop/src/renderer/pet/pet.html:29— A <object> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
AC2 · Forms & labels· <Slider> field component without a label · ×1
<Slider> field component without a label packages/desktop/src/renderer/components/settings/ScaleControl.tsx:110— 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.
AC4 · Keyboard semantics· Anchor without href · ×1
Anchor without href packages/desktop/src/renderer/components/settings/SettingsModal/contents/ToolsModalContent.tsx:577— 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.5:1) packages/desktop/src/renderer/components/settings/SettingsModal/contents/FeedbackReportModal.tsx:476— 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 in CSS (1.8:1) examples/hello-world-extension/themes/ocean-breeze.css:474— `::selection` sets color: white on background-color: #22d3ee — 1.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (2.3:1) examples/hello-world-extension/themes/sunset-glow.css:465— `::selection` sets color: white on background-color: #fb923c — 2.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC7 · A11y enforcement· Accessibility enforcement below the top rung · ×1
Accessibility enforcement below the top rung REDACTED:183— No accessibility enforcement found — your oxlint config does not list the `jsx-a11y` plugin (its a11y rules are off until it does) and there's no axe/pa11y/Lighthouse in tests or CI. Start by enabling that plugin to catch issues at author time. What was searched, so you can tell an absence from a miss: the 348 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
index.SendBox (cyclomatic 302) packages/desktop/src/renderer/components/chat/SendBox/index.tsx:300— index.SendBox has cyclomatic complexity 302 (threshold 15). Of this number, 92 points are the body's own statements and 210 belong to 70 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.
ChannelModalContent.ChannelModalContent (cyclomatic 122) packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/ChannelModalContent.tsx:142— ChannelModalContent.ChannelModalContent has cyclomatic complexity 122 (threshold 15). Most of this is not in the body itself: 2 of the 122 points are its own statements and the rest belongs to 22 function items inside it that branch (a function literal at line 612, a function literal at line 730, a function literal at line 197, …). 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.
PreviewContext.PreviewProvider (cyclomatic 108) packages/desktop/src/renderer/pages/conversation/Preview/context/PreviewContext.tsx:532— PreviewContext.PreviewProvider has cyclomatic complexity 108 (threshold 15). Most of this is not in the body itself: 1 of the 108 points is its own statement and the rest belongs to 41 function literals inside it that branch (lines 736, 586, 696, …). 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.
WebuiModalContent.WebuiModalContent (cyclomatic 105) REDACTED:74— WebuiModalContent.WebuiModalContent has cyclomatic complexity 105 (threshold 15). Of this number, 17 points are the body's own statements and 88 belong to 27 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.
LarkConfigForm.LarkConfigForm (cyclomatic 100) packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx:69— LarkConfigForm.LarkConfigForm has cyclomatic complexity 100 (threshold 15). Of this number, 61 points are the body's own statements and 39 belong to 14 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SkillsHubSettings.SkillsHubSettings (cyclomatic 100) packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillsHubSettings.tsx:141— SkillsHubSettings.SkillsHubSettings has cyclomatic complexity 100 (threshold 15). Of this number, 20 points are the body's own statements and 80 belong to 23 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CreateTaskDialog.CreateTaskDialog (cyclomatic 97) packages/desktop/src/renderer/pages/cron/ScheduledTasksPage/CreateTaskDialog.tsx:234— CreateTaskDialog.CreateTaskDialog has cyclomatic complexity 97 (threshold 15). Of this number, 31 points are the body's own statements and 66 belong to 24 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.
DingTalkConfigForm.DingTalkConfigForm (cyclomatic 93) packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.tsx:69— DingTalkConfigForm.DingTalkConfigForm has cyclomatic complexity 93 (threshold 15). Of this number, 56 points are the body's own statements and 37 belong to 14 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AddPlatformModal.AddPlatformModal (cyclomatic 91) packages/desktop/src/renderer/pages/settings/components/AddPlatformModal.tsx:207— AddPlatformModal.AddPlatformModal has cyclomatic complexity 91 (threshold 15). Of this number, 43 points are the body's own statements and 48 belong to 12 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WecomConfigForm.WecomConfigForm (cyclomatic 88) packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WecomConfigForm.tsx:70— WecomConfigForm.WecomConfigForm has cyclomatic complexity 88 (threshold 15). Of this number, 55 points are the body's own statements and 33 belong to 13 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.
AcpSendBox.AcpSendBox (cyclomatic 87) packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx:116— AcpSendBox.AcpSendBox has cyclomatic complexity 87 (threshold 15). Of this number, 23 points are the body's own statements and 64 belong to 22 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.
ExplorerPanel.ExplorerPanel (cyclomatic 85) packages/desktop/src/renderer/pages/conversation/explorer/ExplorerPanel.tsx:91— ExplorerPanel.ExplorerPanel has cyclomatic complexity 85 (threshold 15). Most of this is not in the body itself: 4 of the 85 points are its own statements and the rest belongs to 15 function items inside it that branch (a function literal at line 195, a function literal at line 345, a function literal at line 358, …). 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.
AionrsSendBox.AionrsSendBox (cyclomatic 79) packages/desktop/src/renderer/pages/conversation/platforms/aionrs/AionrsSendBox.tsx:126— AionrsSendBox.AionrsSendBox has cyclomatic complexity 79 (threshold 15). Of this number, 20 points are the body's own statements and 59 belong to 26 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.
MessageList.MessageList (cyclomatic 76) packages/desktop/src/renderer/pages/conversation/Messages/MessageList.tsx:334— MessageList.MessageList has cyclomatic complexity 76 (threshold 15). Most of this is not in the body itself: 7 of the 76 points are its own statements and the rest belongs to 19 function items inside it that branch (renderItem, a function literal at line 358, a function literal at line 497, …). 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.
AgentModeSelector.AgentModeSelector (cyclomatic 73) packages/desktop/src/renderer/components/agent/AgentModeSelector.tsx:81— AgentModeSelector.AgentModeSelector has cyclomatic complexity 73 (threshold 15). Of this number, 46 points are the body's own statements and 27 belong to 11 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.
TaskDetailPage.TaskDetailPage (cyclomatic 72) packages/desktop/src/renderer/pages/cron/ScheduledTasksPage/TaskDetailPage.tsx:38— TaskDetailPage.TaskDetailPage has cyclomatic complexity 72 (threshold 15). Of this number, 29 points are the body's own statements and 43 belong to 16 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.
hooks.composeMessageWithIndex (cyclomatic 70) packages/desktop/src/renderer/pages/conversation/Messages/hooks.ts:140— hooks.composeMessageWithIndex has cyclomatic complexity 70 (threshold 15). Of this number, 69 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.
GuidPage.GuidPage (cyclomatic 70) packages/desktop/src/renderer/pages/guid/GuidPage.tsx:56— GuidPage.GuidPage has cyclomatic complexity 70 (threshold 15). Most of this is not in the body itself: 9 of the 70 points are its own statements and the rest belongs to 19 function literals inside it that branch (lines 397, 522, 330, …). 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.
WebviewHost.WebviewHost (cyclomatic 69) packages/desktop/src/renderer/components/media/WebviewHost.tsx:60— WebviewHost.WebviewHost has cyclomatic complexity 69 (threshold 15). Most of this is not in the body itself: 10 of the 69 points are its own statements and the rest belongs to 24 function literals inside it that branch (lines 258, 299, 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.
SlackConfigForm.SlackConfigForm (cyclomatic 68) packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/SlackConfigForm.tsx:63— SlackConfigForm.SlackConfigForm has cyclomatic complexity 68 (threshold 15). 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: 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.
EditModeModal.EditModeModal (cyclomatic 68) packages/desktop/src/renderer/pages/settings/components/EditModeModal.tsx:13— EditModeModal.EditModeModal has cyclomatic complexity 68 (threshold 15). Of this number, 31 points are the body's own statements and 37 belong to 6 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.
HTMLRenderer.HTMLRenderer (cyclomatic 67) packages/desktop/src/renderer/pages/conversation/Preview/components/renderers/HTMLRenderer.tsx:266— HTMLRenderer.HTMLRenderer has cyclomatic complexity 67 (threshold 15). Most of this is not in the body itself: 8 of the 67 points are its own statements and the rest belongs to 23 function literals inside it that branch (lines 539, 385, 685, …). 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.
WeixinConfigForm.WeixinConfigForm (cyclomatic 65) packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WeixinConfigForm.tsx:63— WeixinConfigForm.WeixinConfigForm has cyclomatic complexity 65 (threshold 15). Of this number, 19 points are the body's own statements and 46 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.
index.Titlebar (cyclomatic 64) packages/desktop/src/renderer/components/layout/Titlebar/index.tsx:99— index.Titlebar has cyclomatic complexity 64 (threshold 15). Of this number, 32 points are the body's own statements and 32 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.
useAcpMessage.useAcpMessage.handleResponseMessage (cyclomatic 64) packages/desktop/src/renderer/pages/conversation/platforms/acp/useAcpMessage.ts:255— useAcpMessage.useAcpMessage.handleResponseMessage has cyclomatic complexity 64 (threshold 15). Of this number, 60 points are the body's own statements and 4 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.
InlineAgentEditor.InlineAgentEditor (cyclomatic 62) packages/desktop/src/renderer/pages/settings/AgentSettings/InlineAgentEditor.tsx:186— InlineAgentEditor.InlineAgentEditor has cyclomatic complexity 62 (threshold 15). Of this number, 17 points are the body's own statements and 45 belong to 9 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DiscordConfigForm.DiscordConfigForm (cyclomatic 60) packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DiscordConfigForm.tsx:63— DiscordConfigForm.DiscordConfigForm has cyclomatic complexity 60 (threshold 15). Of this number, 25 points are the body's own statements and 35 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.
TelegramConfigForm.TelegramConfigForm (cyclomatic 60) packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/TelegramConfigForm.tsx:63— TelegramConfigForm.TelegramConfigForm has cyclomatic complexity 60 (threshold 15). Of this number, 25 points are the body's own statements and 35 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.
useAionrsMessage.useAionrsMessage (cyclomatic 56) packages/desktop/src/renderer/pages/conversation/platforms/aionrs/useAionrsMessage.ts:26— useAionrsMessage.useAionrsMessage has cyclomatic complexity 56 (threshold 15). Most of this is not in the body itself: 3 of the 56 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 206, 400, 131, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
GuidActionRow.GuidActionRow (cyclomatic 56) packages/desktop/src/renderer/pages/guid/components/GuidActionRow.tsx:120— GuidActionRow.GuidActionRow has cyclomatic complexity 56 (threshold 15). Of this number, 20 points are the body's own statements and 36 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.
index.ArchivedSettings (cyclomatic 54) packages/desktop/src/renderer/pages/settings/ArchivedSettings/index.tsx:78— index.ArchivedSettings has cyclomatic complexity 54 (threshold 15). Most of this is not in the body itself: 6 of the 54 points are its own statements and the rest belongs to 19 function items inside it that branch (a function literal at line 115, renderRow, a function literal at line 141, …). 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.
ModelModalContent.ModelModalContent (cyclomatic 53) packages/desktop/src/renderer/components/settings/SettingsModal/contents/ModelModalContent.tsx:109— ModelModalContent.ModelModalContent has cyclomatic complexity 53 (threshold 15). Most of this is not in the body itself: 6 of the 53 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 514, performHealthCheck, updatePlatform, …). 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.
PasteServiceClass.handlePaste (cyclomatic 52) packages/desktop/src/renderer/services/PasteService.ts:159— PasteServiceClass.handlePaste has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Layout.Layout (cyclomatic 51) packages/desktop/src/renderer/components/layout/Layout.tsx:121— Layout.Layout has cyclomatic complexity 51 (threshold 15). Of this number, 30 points are the body's own statements and 21 belong to 10 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.
MessageText.MessageText (cyclomatic 51) packages/desktop/src/renderer/pages/conversation/Messages/components/MessageText.tsx:106— MessageText.MessageText has cyclomatic complexity 51 (threshold 15). Of this number, 40 points are the body's own statements and 11 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.
index.SystemModalContent (cyclomatic 49) packages/desktop/src/renderer/components/settings/SettingsModal/contents/SystemModalContent/index.tsx:41— index.SystemModalContent has cyclomatic complexity 49 (threshold 15). Most of this is not in the body itself: 10 of the 49 points are its own statements and the rest belongs to 17 function literals inside it that branch (lines 469, 122, 515, …). 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.
updateNotificationState.updateNotificationReducer (cyclomatic 49) packages/desktop/src/renderer/components/settings/updateNotificationState.ts:241— updateNotificationState.updateNotificationReducer 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.
ExplorerContainer.ExplorerContainer (cyclomatic 49) packages/desktop/src/renderer/pages/conversation/explorer/ExplorerContainer.tsx:176— ExplorerContainer.ExplorerContainer has cyclomatic complexity 49 (threshold 15). Of this number, 18 points are the body's own statements and 31 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.
ConversationRow.ConversationRow (cyclomatic 48) packages/desktop/src/renderer/pages/conversation/GroupedHistory/ConversationRow.tsx:36— ConversationRow.ConversationRow has cyclomatic complexity 48 (threshold 15). Of this number, 31 points are the body's own statements and 17 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.
chatLib.transformMessageInner (cyclomatic 47) packages/desktop/src/common/chat/chatLib.ts:689— chatLib.transformMessageInner has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AionModal.AionModal (cyclomatic 47) packages/desktop/src/renderer/components/base/AionModal.tsx:194— AionModal.AionModal has cyclomatic complexity 47 (threshold 15). Of this number, 19 points are the body's own statements and 28 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.
ConversationSearchPopover.ConversationSearchPopover (cyclomatic 46) packages/desktop/src/renderer/pages/conversation/GroupedHistory/ConversationSearchPopover.tsx:133— ConversationSearchPopover.ConversationSearchPopover has cyclomatic complexity 46 (threshold 15). Most of this is not in the body itself: 14 of the 46 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 332, 254, 177, …). 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.
OneClickImportModal.OneClickImportModal (cyclomatic 46) packages/desktop/src/renderer/pages/settings/components/OneClickImportModal.tsx:64— OneClickImportModal.OneClickImportModal has cyclomatic complexity 46 (threshold 15). Most of this is not in the body itself: 8 of the 46 points are its own statements and the rest belongs to 17 function items inside it that branch (a function literal at line 220, handleNextStep, renderFooter, …). 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.
ToolsModalContent.ToolsModalContent (cyclomatic 45) packages/desktop/src/renderer/components/settings/SettingsModal/contents/ToolsModalContent.tsx:269— ToolsModalContent.ToolsModalContent has cyclomatic complexity 45 (threshold 15). Most of this is not in the body itself: 13 of the 45 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 309, 441, 378, …). 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.
index.WorkspaceGroupedHistory (cyclomatic 45) packages/desktop/src/renderer/pages/conversation/GroupedHistory/index.tsx:30— index.WorkspaceGroupedHistory has cyclomatic complexity 45 (threshold 15). Of this number, 23 points are the body's own statements and 22 belong to 16 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.
TeamPage.TeamPageContent (cyclomatic 45) packages/desktop/src/renderer/pages/team/TeamPage.tsx:533— TeamPage.TeamPageContent has cyclomatic complexity 45 (threshold 15). Most of this is not in the body itself: 10 of the 45 points are its own statements and the rest belongs to 18 function literals inside it that branch (lines 886, 618, 663, …). 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.
usePresetAssistantInfo.usePresetAssistantInfo (cyclomatic 44) packages/desktop/src/renderer/hooks/agent/usePresetAssistantInfo.ts:276— usePresetAssistantInfo.usePresetAssistantInfo has cyclomatic complexity 44 (threshold 15). Most of this is not in the body itself: 3 of the 44 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 301, 357, 398, …). 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.
index.ChatLayout (cyclomatic 44) packages/desktop/src/renderer/pages/conversation/components/ChatLayout/index.tsx:66— index.ChatLayout has cyclomatic complexity 44 (threshold 15). Of this number, 40 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.
useMinimapPanel.useMinimapPanel (cyclomatic 43) packages/desktop/src/renderer/pages/conversation/components/ConversationTitleMinimap/useMinimapPanel.ts:56— useMinimapPanel.useMinimapPanel has cyclomatic complexity 43 (threshold 15). Most of this is not in the body itself: 1 of the 43 points is its own statement and the rest belongs to 15 function literals inside it that branch (lines 358, 291, 317, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
index.handleAppReady (cyclomatic 42) packages/desktop/src/index.ts:680— index.handleAppReady has cyclomatic complexity 42 (threshold 15). Of this number, 35 points are the body's own statements and 7 belong to 6 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
useResizableSplit.useResizableSplit.handleDragStart.<returned closure> (cyclomatic 42) packages/desktop/src/renderer/hooks/ui/useResizableSplit.tsx:109— useResizableSplit.useResizableSplit.handleDragStart.<returned closure> has cyclomatic complexity 42 (threshold 15). Most of this is not in the body itself: 13 of the 42 points are its own statements and the rest belongs to 8 function items inside it that branch (finishDrag, applyLiveRatio, computeRaw, …). 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.
chatLib.composeMessage (cyclomatic 41) packages/desktop/src/common/chat/chatLib.ts:941— chatLib.composeMessage has cyclomatic complexity 41 (threshold 15). Of this number, 35 points are the body's own statements and 6 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.
MessageTips.MessageTips (cyclomatic 41) packages/desktop/src/renderer/pages/conversation/Messages/components/MessageTips.tsx:64— MessageTips.MessageTips has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PreviewToolbar.PreviewToolbar (cyclomatic 41) packages/desktop/src/renderer/pages/conversation/Preview/components/PreviewPanel/PreviewToolbar.tsx:172— PreviewToolbar.PreviewToolbar has cyclomatic complexity 41 (threshold 15). 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.
MermaidBlock.MermaidBlock (cyclomatic 40) packages/desktop/src/renderer/components/Markdown/MermaidBlock.tsx:51— MermaidBlock.MermaidBlock has cyclomatic complexity 40 (threshold 15). Of this number, 21 points are the body's own statements and 19 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.
AssistantSelectionArea.AssistantSelectionArea (cyclomatic 40) packages/desktop/src/renderer/pages/guid/components/AssistantSelectionArea.tsx:67— AssistantSelectionArea.AssistantSelectionArea has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 9 of the 40 points are its own statements and the rest belongs to 14 function items inside it that branch (renderAssistantPill, a function literal at line 170, a function literal at line 124, …). 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.
index.createWindow (cyclomatic 39) packages/desktop/src/index.ts:455— index.createWindow has cyclomatic complexity 39 (threshold 15). Of this number, 21 points are the body's own statements and 18 belong to 10 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MobileActionSheet.MobileActionSheet (cyclomatic 39) packages/desktop/src/renderer/components/chat/MobileActionSheet/MobileActionSheet.tsx:16— MobileActionSheet.MobileActionSheet has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 15 of the 39 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 148, handleSubSelect, a function literal at line 52, …). 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.
UpdateNotificationCard.UpdateNotificationCard (cyclomatic 38) packages/desktop/src/renderer/components/settings/UpdateNotificationCard.tsx:24— UpdateNotificationCard.UpdateNotificationCard has cyclomatic complexity 38 (threshold 15). Of this number, 18 points are the body's own statements and 20 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.
afterPack.afterPack (cyclomatic 38) scripts/afterPack.js:40— afterPack.afterPack 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.
JsonImportModal.JsonImportModal (cyclomatic 37) packages/desktop/src/renderer/pages/settings/components/JsonImportModal.tsx:161— JsonImportModal.JsonImportModal has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 14 of the 37 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 197, handleSubmit, a function literal at line 173, …). 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.
BackendLifecycleManager.attemptStart (cyclomatic 37) packages/web-host/src/backend-launcher.ts:582— BackendLifecycleManager.attemptStart has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 13 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 805, a function literal at line 747, makeStartupError, …). 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.
WavedromBlock.WavedromBlock (cyclomatic 36) REDACTED:162— WavedromBlock.WavedromBlock has cyclomatic complexity 36 (threshold 15). Of this number, 17 points are the body's own statements and 19 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.
index.SettingsModal (cyclomatic 36) packages/desktop/src/renderer/components/settings/SettingsModal/index.tsx:135— index.SettingsModal has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 8 of the 36 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 188, renderBuiltinContent, a function literal at line 247, …). 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.
AcpModelSelector.AcpModelSelector (cyclomatic 35) packages/desktop/src/renderer/components/agent/AcpModelSelector.tsx:72— AcpModelSelector.AcpModelSelector has cyclomatic complexity 35 (threshold 15). Of this number, 18 points are the body's own statements and 17 belong to 6 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.
SpeechInputButton.SpeechInputButton (cyclomatic 35) packages/desktop/src/renderer/components/chat/SpeechInputButton.tsx:77— SpeechInputButton.SpeechInputButton has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 12 of the 35 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 168, a function literal at line 115, a function literal at line 147, …). 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.
webFsPicker.WebFsPicker (cyclomatic 35) packages/desktop/src/renderer/components/workspace/webFsPicker.tsx:33— webFsPicker.WebFsPicker has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 12 of the 35 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 93, 64, 136, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
useAssistantEditor.useAssistantEditor.handleSave (cyclomatic 35) packages/desktop/src/renderer/hooks/assistant/useAssistantEditor.ts:374— useAssistantEditor.useAssistantEditor.handleSave has cyclomatic complexity 35 (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.
MessageAnchorRail.MessageAnchorRail (cyclomatic 35) packages/desktop/src/renderer/pages/conversation/Messages/anchorRail/MessageAnchorRail.tsx:61— MessageAnchorRail.MessageAnchorRail has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 12 of the 35 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 141, 90, 110, …). 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.
AssistantEditorSections.AssistantEditorSections (cyclomatic 35) packages/desktop/src/renderer/pages/settings/AssistantSettings/AssistantEditorSections.tsx:31— AssistantEditorSections.AssistantEditorSections has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 9 of the 35 points are its own statements and the rest belongs to 15 function items inside it that branch (a function literal at line 163, renderAgentAvatar, handlePickAvatarImage, …). 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.
CodeBlock.CodeBlock (cyclomatic 34) REDACTED:39— CodeBlock.CodeBlock has cyclomatic complexity 34 (threshold 15). Of this number, 27 points are the body's own statements and 7 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.
useConversationCommandQueue.useConversationCommandQueue (cyclomatic 34) packages/desktop/src/renderer/pages/conversation/platforms/useConversationCommandQueue.ts:595— useConversationCommandQueue.useConversationCommandQueue 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 7 function literals inside it that branch (lines 629, 1080, 1111, …). 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.
AgentRepairPanel.AgentRepairPanel (cyclomatic 34) packages/desktop/src/renderer/pages/settings/AgentSettings/AgentRepairPanel.tsx:85— AgentRepairPanel.AgentRepairPanel has cyclomatic complexity 34 (threshold 15). Of this number, 16 points are the body's own statements and 18 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.
MessageToolGroup.MessageToolGroup (cyclomatic 33) packages/desktop/src/renderer/pages/conversation/Messages/components/MessageToolGroup.tsx:456— MessageToolGroup.MessageToolGroup has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 1 of the 33 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 485, 463, 475). 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.
DefaultsSection.DefaultsSection (cyclomatic 33) packages/desktop/src/renderer/pages/settings/AssistantSettings/editor/DefaultsSection.tsx:73— DefaultsSection.DefaultsSection has cyclomatic complexity 33 (threshold 15). Of this number, 19 points are the body's own statements and 14 belong to 12 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TeamTabs.TeamTabView (cyclomatic 33) packages/desktop/src/renderer/pages/team/components/TeamTabs.tsx:38— TeamTabs.TeamTabView has cyclomatic complexity 33 (threshold 15). Of this number, 26 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.
imageGenCore.executeImageGeneration (cyclomatic 32) packages/desktop/src/common/chat/imageGenCore.ts:214— imageGenCore.executeImageGeneration has cyclomatic complexity 32 (threshold 15). 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
applicationBridge.initApplicationBridge (cyclomatic 31) packages/desktop/src/process/bridge/applicationBridge.ts:100— applicationBridge.initApplicationBridge 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 13 function literals inside it that branch (lines 162, 225, 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.
useGuidSend.useGuidSend.handleSend (cyclomatic 31) packages/desktop/src/renderer/pages/guid/hooks/useGuidSend.ts:102— useGuidSend.useGuidSend.handleSend has cyclomatic complexity 31 (threshold 15). Of this number, 28 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.
updateBridge.initUpdateBridge (cyclomatic 30) packages/desktop/src/process/bridge/updateBridge.ts:661— updateBridge.initUpdateBridge 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 8 function literals inside it that branch (lines 726, 676, 801, …). 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.
useWorkspaceCollapse.useWorkspaceCollapse (cyclomatic 30) packages/desktop/src/renderer/pages/conversation/hooks/useWorkspaceCollapse.ts:55— useWorkspaceCollapse.useWorkspaceCollapse 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 10 function literals inside it that branch (lines 109, 86, 179, …). 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.
useTeamRunView.useTeamRunView (cyclomatic 30) packages/desktop/src/renderer/pages/team/hooks/useTeamRunView.ts:106— useTeamRunView.useTeamRunView 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 18 function literals inside it that branch (lines 119, 324, 296, …). 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.
backendStartupFailure.classifyIncompleteInstallation (cyclomatic 29) packages/desktop/src/process/startup/backendStartupFailure.ts:125— backendStartupFailure.classifyIncompleteInstallation has cyclomatic complexity 29 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
utils.readDirectoryRecursive (cyclomatic 29) packages/desktop/src/process/utils/utils.ts:157— utils.readDirectoryRecursive has cyclomatic complexity 29 (threshold 15). Of this number, 24 points are the body's own statements and 5 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.
runBackendMigrations.ensureBootstrapMcpServersInDb (cyclomatic 29) packages/desktop/src/process/utils/runBackendMigrations.ts:295— runBackendMigrations.ensureBootstrapMcpServersInDb 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.
PwaPullToRefresh.PwaPullToRefresh (cyclomatic 29) packages/desktop/src/renderer/components/layout/PwaPullToRefresh.tsx:16— PwaPullToRefresh.PwaPullToRefresh 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 7 function literals inside it that branch (lines 44, 32, 58, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
HTMLViewer.HTMLPreview (cyclomatic 29) REDACTED:31— HTMLViewer.HTMLPreview 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 8 function items inside it that branch (a function literal at line 61, a function literal at line 233, a function literal at line 40, …). 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.
ChatConversation.ChatConversation (cyclomatic 29) packages/desktop/src/renderer/pages/conversation/components/ChatConversation.tsx:271— ChatConversation.ChatConversation has cyclomatic complexity 29 (threshold 15). Of this number, 16 points are the body's own statements and 13 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.
CssThemeSettings.CssThemeSettings (cyclomatic 29) packages/desktop/src/renderer/pages/settings/AppearanceSettings/CssThemeSettings.tsx:241— CssThemeSettings.CssThemeSettings has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 3 of the 29 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 454, 278, 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.
ThoughtDisplay.ThoughtDisplay (cyclomatic 28) packages/desktop/src/renderer/components/chat/ThoughtDisplay.tsx:30— ThoughtDisplay.ThoughtDisplay has cyclomatic complexity 28 (threshold 15). Of this number, 19 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.
FeedbackReportModal.FeedbackReportModal (cyclomatic 28) packages/desktop/src/renderer/components/settings/SettingsModal/contents/FeedbackReportModal.tsx:82— FeedbackReportModal.FeedbackReportModal has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 4 of the 28 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 126, 153, 164, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
WorkspaceFolderSelect.WorkspaceFolderSelect (cyclomatic 28) packages/desktop/src/renderer/components/workspace/WorkspaceFolderSelect.tsx:44— WorkspaceFolderSelect.WorkspaceFolderSelect has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 11 of the 28 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 61, a function literal at line 204, a function literal at line 86, …). 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.
MessageToolGroupSummary.ToolItemDetail (cyclomatic 28) packages/desktop/src/renderer/pages/conversation/Messages/components/MessageToolGroupSummary.tsx:31— MessageToolGroupSummary.ToolItemDetail has cyclomatic complexity 28 (threshold 15). Of this number, 19 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.
useCronJobs.useCronJobsMap (cyclomatic 28) packages/desktop/src/renderer/pages/cron/useCronJobs.ts:279— useCronJobs.useCronJobsMap 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 13 function literals inside it that branch (lines 310, 440, 359, …). 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.
index.LoginPage (cyclomatic 28) packages/desktop/src/renderer/pages/login/index.tsx:34— index.LoginPage has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 10 of the 28 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 166, 134, 64, …). 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.
agentTypes.formatManagedAgentDiagnosticMessage (cyclomatic 28) packages/desktop/src/renderer/utils/model/agentTypes.ts:208— agentTypes.formatManagedAgentDiagnosticMessage has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
petManager.registerIpcHandlers (cyclomatic 27) packages/desktop/src/process/pet/petManager.ts:365— petManager.registerIpcHandlers has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 366, 421, 388, …). 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.
Diff2Html.Diff2Html (cyclomatic 27) REDACTED:23— Diff2Html.Diff2Html has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 7 of the 27 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 123, 66, 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.
useUpdateNotificationController.useUpdateNotificationController (cyclomatic 27) packages/desktop/src/renderer/components/settings/useUpdateNotificationController.ts:67— useUpdateNotificationController.useUpdateNotificationController has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 2 of the 27 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 271, 445, 209, …). 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.
useAcpMessage.useAcpMessage (cyclomatic 27) packages/desktop/src/renderer/pages/conversation/platforms/acp/useAcpMessage.ts:103— useAcpMessage.useAcpMessage has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to 9 function literals inside it that branch (lines 616, 704, 659, …). 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.
index.ConversationTitleMinimap (cyclomatic 27) packages/desktop/src/renderer/pages/conversation/components/ConversationTitleMinimap/index.tsx:19— index.ConversationTitleMinimap has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 7 of the 27 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 50, 163, 95, …). 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.
useGuidAssistantSelection.useGuidAssistantSelection (cyclomatic 27) packages/desktop/src/renderer/pages/guid/hooks/useGuidAssistantSelection.ts:119— useGuidAssistantSelection.useGuidAssistantSelection has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 2 of the 27 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 198, 177, 279, …). 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.
LocalAgents.LocalAgents (cyclomatic 27) packages/desktop/src/renderer/pages/settings/AgentSettings/LocalAgents.tsx:37— LocalAgents.LocalAgents has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 9 of the 27 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 128, 168, 65, …). 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.
TeamPage.AssistantChatSlot (cyclomatic 27) packages/desktop/src/renderer/pages/team/TeamPage.tsx:377— TeamPage.AssistantChatSlot has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
prepare-aioncore.prepareAioncore (cyclomatic 27) packages/shared-scripts/src/prepare-aioncore.js:443— prepare-aioncore.prepareAioncore 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.
benchmark-acp-startup.runBenchmark (cyclomatic 27) scripts/benchmark-acp-startup.ts:340— benchmark-acp-startup.runBenchmark has cyclomatic complexity 27 (threshold 15). Of this number, 22 points are the body's own statements and 5 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.
chatLib.normalizeAgentStreamError (cyclomatic 26) packages/desktop/src/common/chat/chatLib.ts:637— chatLib.normalizeAgentStreamError 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.
index.VoiceInputSection (cyclomatic 26) packages/desktop/src/renderer/components/settings/SettingsModal/contents/SystemModalContent/VoiceInputSection/index.tsx:49— index.VoiceInputSection has cyclomatic complexity 26 (threshold 15). Of this number, 16 points are the body's own statements and 10 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.
main.BackendStartupFailureDialog (cyclomatic 26) packages/desktop/src/renderer/main.tsx:373— main.BackendStartupFailureDialog 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.
index.ScheduledTasksPage (cyclomatic 26) packages/desktop/src/renderer/pages/cron/ScheduledTasksPage/index.tsx:28— index.ScheduledTasksPage 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 202, 103, 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.
AddModelModal.AddModelModal (cyclomatic 26) packages/desktop/src/renderer/pages/settings/components/AddModelModal.tsx:22— AddModelModal.AddModelModal has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 10 of the 26 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 52, 33, 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.
TeamSiderSection.TeamSiderSection (cyclomatic 25) packages/desktop/src/renderer/components/layout/Sider/TeamSiderSection.tsx:36— TeamSiderSection.TeamSiderSection 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 8 function literals inside it that branch (lines 76, 136, 220, …). 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.
DevSettings.DevSettings (cyclomatic 25) packages/desktop/src/renderer/components/settings/SettingsModal/contents/SystemModalContent/DevSettings.tsx:21— DevSettings.DevSettings has cyclomatic complexity 25 (threshold 15). Of this number, 14 points are the body's own statements and 11 belong to 8 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
OfficeWatchViewer.OfficeWatchViewer (cyclomatic 25) packages/desktop/src/renderer/pages/conversation/Preview/components/viewers/OfficeWatchViewer.tsx:161— OfficeWatchViewer.OfficeWatchViewer has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 10 of the 25 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 194, 188, 174, …). 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.
ScmResourceRow.ScmResourceRow (cyclomatic 25) packages/desktop/src/renderer/pages/conversation/SourceControl/ScmResourceRow.tsx:133— ScmResourceRow.ScmResourceRow 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, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
GuidWorkspaceFootnote.GuidWorkspaceFootnote (cyclomatic 25) packages/desktop/src/renderer/pages/guid/components/GuidWorkspaceFootnote.tsx:51— GuidWorkspaceFootnote.GuidWorkspaceFootnote has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 9 of the 25 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 119, 134, 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.
GuidModelSelector.GuidModelSelector (cyclomatic 25) packages/desktop/src/renderer/pages/guid/components/GuidModelSelector.tsx:46— GuidModelSelector.GuidModelSelector has cyclomatic complexity 25 (threshold 15). Of this number, 18 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.
TeamAssistantPicker.TeamAssistantPicker (cyclomatic 25) packages/desktop/src/renderer/pages/team/components/memberPicker/TeamAssistantPicker.tsx:25— TeamAssistantPicker.TeamAssistantPicker 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 2 function literals inside it that branch (lines 83, 41). 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.
smoke-installer-failure-messagebox.runHarness (cyclomatic 25) scripts/smoke-installer-failure-messagebox.js:452— smoke-installer-failure-messagebox.runHarness 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.
useMcpConnection.formatMcpErrorMessage (cyclomatic 24) packages/desktop/src/renderer/hooks/mcp/useMcpConnection.ts:43— useMcpConnection.formatMcpErrorMessage has cyclomatic complexity 24 (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.
hooks.normalizeDbTipsMessage (cyclomatic 24) packages/desktop/src/renderer/pages/conversation/Messages/hooks.ts:678— hooks.normalizeDbTipsMessage 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.
CreateTaskDialog.parseCronExpr (cyclomatic 24) packages/desktop/src/renderer/pages/cron/ScheduledTasksPage/CreateTaskDialog.tsx:161— CreateTaskDialog.parseCronExpr 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.
TeamChatView.TeamChatView (cyclomatic 24) packages/desktop/src/renderer/pages/team/components/TeamChatView.tsx:124— TeamChatView.TeamChatView has cyclomatic complexity 24 (threshold 15). Of this number, 16 points are the body's own statements and 8 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.
TeamActivityView.TeamActivityView (cyclomatic 24) packages/desktop/src/renderer/pages/team/activity/TeamActivityView.tsx:37— TeamActivityView.TeamActivityView has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 4 of the 24 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 70, 82, 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.
usePreviewLauncher.usePreviewLauncher.launchPreview (cyclomatic 23) packages/desktop/src/renderer/hooks/file/usePreviewLauncher.ts:63— usePreviewLauncher.usePreviewLauncher.launchPreview 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.
hooks.classifyPersistedSendFailure (cyclomatic 23) packages/desktop/src/renderer/pages/conversation/Messages/hooks.ts:565— hooks.classifyPersistedSendFailure 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.
ExtensionSettingsPage.ExtensionSettingsPage (cyclomatic 23) REDACTED:23— ExtensionSettingsPage.ExtensionSettingsPage has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 9 of the 23 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 54, 81, 31, …). 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.
normalizeToolCall.buildParamSummary (cyclomatic 22) packages/desktop/src/common/chat/normalizeToolCall.ts:102— normalizeToolCall.buildParamSummary 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.
index.Sider (cyclomatic 22) packages/desktop/src/renderer/components/layout/Sider/index.tsx:23— index.Sider 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 items inside it that branch (a function literal at line 150, handleSettingsClick, a function literal at line 116, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
useAssistantEditor.useAssistantEditor.handleEdit (cyclomatic 22) packages/desktop/src/renderer/hooks/assistant/useAssistantEditor.ts:227— useAssistantEditor.useAssistantEditor.handleEdit 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.
AuthContext.AuthProvider (cyclomatic 22) packages/desktop/src/renderer/hooks/context/AuthContext.tsx:131— AuthContext.AuthProvider 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 3 function literals inside it that branch (lines 168, 137, 271). 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.
MessageToolGroup.ImageDisplay (cyclomatic 22) packages/desktop/src/renderer/pages/conversation/Messages/components/MessageToolGroup.tsx:230— MessageToolGroup.ImageDisplay 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 literals inside it that branch (lines 269, 303, 239, …). 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.
CodeEditor.CodeEditor (cyclomatic 22) packages/desktop/src/renderer/pages/conversation/Preview/components/editors/CodeEditor.tsx:41— CodeEditor.CodeEditor has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 3 of the 22 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 96, 119, 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.
PreviewPanel.PreviewPanel::renderContent (cyclomatic 22) packages/desktop/src/renderer/pages/conversation/Preview/components/PreviewPanel/PreviewPanel.tsx:905— PreviewPanel.PreviewPanel::renderContent 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.
AionrsModelSelector.AionrsModelSelector (cyclomatic 22) packages/desktop/src/renderer/pages/conversation/platforms/aionrs/AionrsModelSelector.tsx:38— AionrsModelSelector.AionrsModelSelector has cyclomatic complexity 22 (threshold 15). Of this number, 17 points are the body's own statements and 5 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.
ChatHistory.ChatHistory (cyclomatic 22) packages/desktop/src/renderer/pages/conversation/components/ChatHistory.tsx:64— ChatHistory.ChatHistory has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 3 of the 22 points are its own statements and the rest belongs to 8 function items inside it that branch (renderConversation, handleEditSave, 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.
TeamWarmupOverlay.TeamWarmupOverlay (cyclomatic 22) packages/desktop/src/renderer/pages/team/components/TeamWarmupOverlay.tsx:54— TeamWarmupOverlay.TeamWarmupOverlay has cyclomatic complexity 22 (threshold 15). Of this number, 12 points are the body's own statements and 10 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.
TeamPage.TeamAgentActions (cyclomatic 22) packages/desktop/src/renderer/pages/team/TeamPage.tsx:231— TeamPage.TeamAgentActions 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 5 function literals inside it that branch (lines 274, 248, 266, …). 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.
OpenAI2GeminiConverter.convertRequest (cyclomatic 21) packages/desktop/src/common/api/OpenAI2GeminiConverter.ts:122— OpenAI2GeminiConverter.convertRequest has cyclomatic complexity 21 (threshold 15). Of this number, 17 points are the body's own statements and 4 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.
migrateAssistants.migrateAssistantsToBackend (cyclomatic 21) packages/desktop/src/process/utils/migrateAssistants.ts:554— migrateAssistants.migrateAssistantsToBackend 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, 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.
DiagramZoomOverlay.DiagramZoomOverlay (cyclomatic 21) REDACTED:89— DiagramZoomOverlay.DiagramZoomOverlay has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 109, endPan, handlePanPointerMove, …). 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.
CollapsibleContent.CollapsibleContent (cyclomatic 21) packages/desktop/src/renderer/components/chat/CollapsibleContent.tsx:79— CollapsibleContent.CollapsibleContent has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 6 of the 21 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 156, 101, 95, …). 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.
MessageQuestion.MessageQuestion (cyclomatic 21) packages/desktop/src/renderer/pages/conversation/Messages/MessageQuestion.tsx:45— MessageQuestion.MessageQuestion 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 8 function items inside it that branch (a function literal at line 93, answered, a function literal at line 69, …). 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.
DiffViewer.DiffPreview (cyclomatic 21) REDACTED:32— DiffViewer.DiffPreview has cyclomatic complexity 21 (threshold 15). Of this number, 12 points are the body's own statements and 9 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.
WorkspaceOpenButton.WorkspaceOpenButton (cyclomatic 21) packages/desktop/src/renderer/pages/conversation/components/ChatLayout/WorkspaceOpenButton.tsx:49— WorkspaceOpenButton.WorkspaceOpenButton 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 literals inside it that branch (lines 154, 184, 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.
SettingsSider.SettingsSider (cyclomatic 21) packages/desktop/src/renderer/pages/settings/components/SettingsSider.tsx:73— SettingsSider.SettingsSider 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 4 function literals inside it that branch (lines 85, 209, 154, …). 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.
useTeamActivityFeed.useTeamActivityFeed (cyclomatic 21) packages/desktop/src/renderer/pages/team/activity/useTeamActivityFeed.ts:45— useTeamActivityFeed.useTeamActivityFeed 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 9 function literals inside it that branch (lines 151, 159, 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.
benchmark-acp-startup.parsePerfLines (cyclomatic 21) scripts/benchmark-acp-startup.ts:122— benchmark-acp-startup.parsePerfLines 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.
build-with-builder.patchElectronBuilderNsisInstaller (cyclomatic 21) REDACTED:31— build-with-builder.patchElectronBuilderNsisInstaller 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, 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.
updateBridge.attemptDownload (cyclomatic 20) packages/desktop/src/process/bridge/updateBridge.ts:482— updateBridge.attemptDownload has cyclomatic complexity 20 (threshold 15). Of this number, 16 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.
ToolsModalContent.ModalMcpManagementSection (cyclomatic 20) packages/desktop/src/renderer/components/settings/SettingsModal/contents/ToolsModalContent.tsx:54— ToolsModalContent.ModalMcpManagementSection has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 98, 132, 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.
useConversations.useConversations (cyclomatic 20) packages/desktop/src/renderer/pages/conversation/GroupedHistory/hooks/useConversations.ts:56— useConversations.useConversations 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 literals inside it that branch (lines 98, 168, 132, …). 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.
MessageAcpPermission.MessageAcpPermission (cyclomatic 20) packages/desktop/src/renderer/pages/conversation/Messages/acp/MessageAcpPermission.tsx:21— MessageAcpPermission.MessageAcpPermission has cyclomatic complexity 20 (threshold 15). Of this number, 16 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.
MarkdownViewer.MarkdownImage (cyclomatic 20) packages/desktop/src/renderer/pages/conversation/Preview/components/viewers/MarkdownViewer.tsx:108— MarkdownViewer.MarkdownImage 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 8 function literals inside it that branch (lines 115, 124, 129, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
PDFViewer.PDFPreview (cyclomatic 20) packages/desktop/src/renderer/pages/conversation/Preview/components/viewers/PDFViewer.tsx:54— PDFViewer.PDFPreview 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 4 function literals inside it that branch (lines 86, 127, 72, …). 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.
index.AssistantSettings (cyclomatic 20) packages/desktop/src/renderer/pages/settings/AssistantSettings/index.tsx:39— index.AssistantSettings has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 185, 75, 74, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
AddPlatformModal.ProtocolDetectionStatus (cyclomatic 20) packages/desktop/src/renderer/pages/settings/components/AddPlatformModal.tsx:81— AddPlatformModal.ProtocolDetectionStatus 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.
backendStartupFailure.classifyBackendStartupFailure (cyclomatic 19) packages/desktop/src/process/startup/backendStartupFailure.ts:287— backendStartupFailure.classifyBackendStartupFailure 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.
PermissionRequestPanel.PermissionRequestPanel (cyclomatic 19) packages/desktop/src/renderer/pages/conversation/Messages/components/MessagePermission/PermissionRequestPanel.tsx:35— PermissionRequestPanel.PermissionRequestPanel 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.
hooks.useMergeLiveMessage (cyclomatic 19) packages/desktop/src/renderer/pages/conversation/Messages/hooks.ts:420— hooks.useMergeLiveMessage 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 4 function literals inside it that branch (lines 431, 491, 425, …). 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.
GoogleModelSelector.GoogleModelSelector (cyclomatic 19) packages/desktop/src/renderer/pages/conversation/platforms/gemini/GoogleModelSelector.tsx:18— GoogleModelSelector.GoogleModelSelector 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.
ChatTitleEditor.ChatTitleEditor (cyclomatic 19) packages/desktop/src/renderer/pages/conversation/components/ChatTitleEditor.tsx:23— ChatTitleEditor.ChatTitleEditor has cyclomatic complexity 19 (threshold 15). 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
layoutCalc.calcLayoutMetrics (cyclomatic 19) packages/desktop/src/renderer/pages/conversation/utils/layoutCalc.ts:50— layoutCalc.calcLayoutMetrics 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.
cronUtils.formatCronExpr (cyclomatic 19) packages/desktop/src/renderer/pages/cron/cronUtils.ts:26— cronUtils.formatCronExpr 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.
GuidInputCard.GuidInputCard (cyclomatic 19) packages/desktop/src/renderer/pages/guid/components/GuidInputCard.tsx:50— GuidInputCard.GuidInputCard has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 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.
MessageCard.MessageCard (cyclomatic 19) packages/desktop/src/renderer/pages/team/activity/MessageCard.tsx:34— MessageCard.MessageCard 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.
diffUtils.parseDiff (cyclomatic 19) packages/desktop/src/renderer/utils/file/diffUtils.ts:114— diffUtils.parseDiff 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.
chatLib.normalizeRawErrorSummary (cyclomatic 18) packages/desktop/src/common/chat/chatLib.ts:609— chatLib.normalizeRawErrorSummary 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.
OpenAI2AnthropicConverter.convertRequest (cyclomatic 18) packages/desktop/src/common/api/OpenAI2AnthropicConverter.ts:87— OpenAI2AnthropicConverter.convertRequest 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.
atCommandParser.parseAllAtCommands (cyclomatic 18) packages/desktop/src/common/chat/atCommandParser.ts:44— atCommandParser.parseAllAtCommands 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
backendInstallDiagnostics.collectBackendInstallDiagnostics (cyclomatic 18) packages/desktop/src/process/startup/backendInstallDiagnostics.ts:135— backendInstallDiagnostics.collectBackendInstallDiagnostics 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.
sentry.captureBackendStartupFailure (cyclomatic 18) packages/desktop/src/sentry.ts:238— sentry.captureBackendStartupFailure 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 one function literal inside it that branches (line 252). 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.
migrateAssistants.uploadLegacyAssistantRules (cyclomatic 18) packages/desktop/src/process/utils/migrateAssistants.ts:451— migrateAssistants.uploadLegacyAssistantRules has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
cdpTargetProtocol.decideCdpCommand (cyclomatic 18) packages/desktop/src/process/resources/builtinMcp/cdpTargetProtocol.ts:124— cdpTargetProtocol.decideCdpCommand has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
HorizontalFileList.HorizontalFileList (cyclomatic 18) packages/desktop/src/renderer/components/media/HorizontalFileList.tsx:19— HorizontalFileList.HorizontalFileList has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 29, a function literal at line 56, 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.
useAcpConfigOptions.useAcpConfigOptions (cyclomatic 18) packages/desktop/src/renderer/hooks/agent/useAcpConfigOptions.ts:263— useAcpConfigOptions.useAcpConfigOptions has cyclomatic complexity 18 (threshold 15). Of this number, 9 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.
useMcpConnection.useMcpConnection.handleTestMcpConnection (cyclomatic 18) packages/desktop/src/renderer/hooks/mcp/useMcpConnection.ts:144— useMcpConnection.useMcpConnection.handleTestMcpConnection has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 belong to 6 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ImageViewer.ImagePreview (cyclomatic 18) packages/desktop/src/renderer/pages/conversation/Preview/components/viewers/ImageViewer.tsx:21— ImageViewer.ImagePreview 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 2 function items inside it that branch (a function literal at line 30, renderStatus). 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.
ScmChangesView.ScmChangesView (cyclomatic 18) packages/desktop/src/renderer/pages/conversation/SourceControl/ScmChangesView.tsx:210— ScmChangesView.ScmChangesView has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 242). 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.
SearchPanel.SearchPanel (cyclomatic 18) packages/desktop/src/renderer/pages/conversation/explorer/search/SearchPanel.tsx:48— SearchPanel.SearchPanel 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, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
SkillRuleGenerator.LoadRuleModal (cyclomatic 18) packages/desktop/src/renderer/pages/conversation/components/SkillRuleGenerator.tsx:34— SkillRuleGenerator.LoadRuleModal 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 items inside it that branch (loadFiles, loadFiles::flattenFiles, a function literal at line 132, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
SkillRuleGenerator.SkillRuleGenerator (cyclomatic 18) packages/desktop/src/renderer/pages/conversation/components/SkillRuleGenerator.tsx:163— SkillRuleGenerator.SkillRuleGenerator has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 4 function items inside it that branch (handleGenerate, a function literal at line 238, a function literal at line 204, …). 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.
SkillDetailPage.SkillDetailPage (cyclomatic 18) packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillDetailPage.tsx:74— SkillDetailPage.SkillDetailPage has cyclomatic complexity 18 (threshold 15). 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
McpServerHeader.getStatusText (cyclomatic 18) packages/desktop/src/renderer/pages/settings/ToolsSettings/McpServerHeader.tsx:107— McpServerHeader.getStatusText 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.
run-benchmarks.renderStartupHtml (cyclomatic 18) REDACTED:522— run-benchmarks.renderStartupHtml 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 items inside it that branch (pushMemRow, a function literal at line 523). 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.
smoke-installer-self-lock.main (cyclomatic 18) scripts/smoke-installer-self-lock.js:65— smoke-installer-self-lock.main 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.
windowsPath.getExistingWindowsFallbackPathEntries (cyclomatic 17) packages/desktop/src/process/startup/windowsPath.ts:237— windowsPath.getExistingWindowsFallbackPathEntries 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.
useSiderTeamRunning.useSiderTeamRunning (cyclomatic 17) packages/desktop/src/renderer/components/layout/Sider/useSiderTeamRunning.ts:62— useSiderTeamRunning.useSiderTeamRunning 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 5 function literals inside it that branch (lines 76, 137, 112, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
AboutModalContent.AboutModalContent (cyclomatic 17) packages/desktop/src/renderer/components/settings/SettingsModal/contents/AboutModalContent.tsx:37— AboutModalContent.AboutModalContent 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 3 function items inside it that branch (checkUpdate, openLink, a function literal at line 211). 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.
useConfigModelListWithImage.useConfigModelListWithImage.modelListWithImage (cyclomatic 17) packages/desktop/src/renderer/hooks/agent/useConfigModelListWithImage.ts:7— useConfigModelListWithImage.useConfigModelListWithImage.modelListWithImage 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 literals inside it that branch (lines 8, 23, 14, …). 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.
useConversationListSync.initializeConversationListSyncStore (cyclomatic 17) packages/desktop/src/renderer/pages/conversation/GroupedHistory/hooks/useConversationListSync.ts:583— useConversationListSync.initializeConversationListSyncStore 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 literals inside it that branch (lines 608, 602, 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.
MessageAgentStatus.MessageAgentStatus (cyclomatic 17) packages/desktop/src/renderer/pages/conversation/Messages/components/MessageAgentStatus.tsx:23— MessageAgentStatus.MessageAgentStatus has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
assistantDefaults.resolveGuidAssistantDefaults (cyclomatic 17) packages/desktop/src/renderer/pages/guid/utils/assistantDefaults.ts:12— assistantDefaults.resolveGuidAssistantDefaults 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.
OfficialAssistantsGrid.OfficialAssistantsGrid (cyclomatic 17) packages/desktop/src/renderer/pages/settings/AssistantSettings/home/OfficialAssistantsGrid.tsx:33— OfficialAssistantsGrid.OfficialAssistantsGrid has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 103, 51, 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.
McpServerHeader.getStatusPopoverContent (cyclomatic 17) packages/desktop/src/renderer/pages/settings/ToolsSettings/McpServerHeader.tsx:60— McpServerHeader.getStatusPopoverContent 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.
petConfirmRenderer.document.addEventListener("keydown") (cyclomatic 17) packages/desktop/src/renderer/pet/petConfirmRenderer.ts:106— petConfirmRenderer.document.addEventListener("keydown") has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FileService.uploadFileViaHttp (cyclomatic 17) packages/desktop/src/renderer/services/FileService.ts:32— FileService.uploadFileViaHttp 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 5 function literals inside it that branch (lines 88, 48, 73, …). 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.
atFileQuery.getActiveAtFileQuery (cyclomatic 17) packages/desktop/src/renderer/utils/chat/atFileQuery.ts:61— atFileQuery.getActiveAtFileQuery 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.
modelPlatforms.getProviderLogo (cyclomatic 17) packages/desktop/src/renderer/utils/model/modelPlatforms.ts:312— modelPlatforms.getProviderLogo has cyclomatic complexity 17 (threshold 15). 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rebuildNativeModules.rebuildSingleModule (cyclomatic 17) REDACTED:174— rebuildNativeModules.rebuildSingleModule 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.
NavigationInterceptor.extractUrl (cyclomatic 16) packages/desktop/src/common/chat/navigation/NavigationInterceptor.ts:160— NavigationInterceptor.extractUrl 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.
installerLastFailure.parseInstallerLastFailureMarker (cyclomatic 16) packages/desktop/src/process/services/installerLastFailure.ts:24— installerLastFailure.parseInstallerLastFailureMarker 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.
updateBridge.scoreAsset (cyclomatic 16) packages/desktop/src/process/bridge/updateBridge.ts:143— updateBridge.scoreAsset 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.
PetIdleTicker.tick (cyclomatic 16) packages/desktop/src/process/pet/petIdleTicker.ts:71— PetIdleTicker.tick 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.
cdpBridge.handleSocketMessage (cyclomatic 16) REDACTED:187— cdpBridge.handleSocketMessage 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.
index.resolveDebugBackendStartupFailure (cyclomatic 16) packages/desktop/src/index.ts:399— index.resolveDebugBackendStartupFailure 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.
ContextUsageIndicator.ContextUsageIndicator (cyclomatic 16) packages/desktop/src/renderer/components/agent/ContextUsageIndicator.tsx:26— ContextUsageIndicator.ContextUsageIndicator has cyclomatic complexity 16 (threshold 15). Of this number, 12 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.
EmojiPicker.EmojiPicker (cyclomatic 16) packages/desktop/src/renderer/components/chat/EmojiPicker.tsx:450— EmojiPicker.EmojiPicker 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 7 function literals inside it that branch (lines 463, 472, 520, …). 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.
SlashCommandMenu.SlashCommandMenu (cyclomatic 16) packages/desktop/src/renderer/components/chat/SlashCommandMenu.tsx:31— SlashCommandMenu.SlashCommandMenu 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 91, renderLabel, a function literal at line 53, …). 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.
SiderFooter.SiderFooter (cyclomatic 16) packages/desktop/src/renderer/components/layout/Sider/SiderFooter.tsx:27— SiderFooter.SiderFooter 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.
FileAttachButton.FileAttachButton (cyclomatic 16) packages/desktop/src/renderer/components/media/FileAttachButton.tsx:75— FileAttachButton.FileAttachButton 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.
FilePreview.FilePreview (cyclomatic 16) packages/desktop/src/renderer/components/media/FilePreview.tsx:37— FilePreview.FilePreview has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 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.
useAcpModelInfo.useAcpModelInfo (cyclomatic 16) packages/desktop/src/renderer/hooks/agent/useAcpModelInfo.ts:68— useAcpModelInfo.useAcpModelInfo has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 120, 112, 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.
useAssistantEditor.useAssistantEditor.handleDuplicate (cyclomatic 16) packages/desktop/src/renderer/hooks/assistant/useAssistantEditor.ts:314— useAssistantEditor.useAssistantEditor.handleDuplicate 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.
useSlashCommands.useSlashCommands (cyclomatic 16) packages/desktop/src/renderer/hooks/chat/useSlashCommands.ts:49— useSlashCommands.useSlashCommands 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 4 function literals inside it that branch (lines 60, 88, 53, …). 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.
useConversationListSync.extractConfirmationId (cyclomatic 16) packages/desktop/src/renderer/pages/conversation/GroupedHistory/hooks/useConversationListSync.ts:146— useConversationListSync.extractConfirmationId 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.
MessageToolCall.MessageToolCall (cyclomatic 16) packages/desktop/src/renderer/pages/conversation/Messages/components/MessageToolCall.tsx:57— MessageToolCall.MessageToolCall 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.
SelectionReplyButton.SelectionReplyButton (cyclomatic 16) packages/desktop/src/renderer/pages/conversation/Messages/components/SelectionReplyButton.tsx:81— SelectionReplyButton.SelectionReplyButton 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 6 function literals inside it that branch (lines 102, 91, 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.
PreviewTabs.PreviewTabs (cyclomatic 16) packages/desktop/src/renderer/pages/conversation/Preview/components/PreviewPanel/PreviewTabs.tsx:180— PreviewTabs.PreviewTabs has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 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.
usePreviewKeyboardShortcuts.usePreviewKeyboardShortcuts (cyclomatic 16) packages/desktop/src/renderer/pages/conversation/Preview/hooks/usePreviewKeyboardShortcuts.ts:48— usePreviewKeyboardShortcuts.usePreviewKeyboardShortcuts 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 55). 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.
index.ChatConversationIndex (cyclomatic 16) packages/desktop/src/renderer/pages/conversation/index.tsx:16— index.ChatConversationIndex has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 102, 80, 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.
CronJobManager.CronJobManager (cyclomatic 16) packages/desktop/src/renderer/pages/cron/components/CronJobManager.tsx:30— CronJobManager.CronJobManager has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 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.
QuickActionButtons.QuickActionButtons (cyclomatic 16) packages/desktop/src/renderer/pages/guid/components/QuickActionButtons.tsx:29— QuickActionButtons.QuickActionButtons has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 42, 69, 82). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
assistantUtils.buildAssistantEditorBackends (cyclomatic 16) packages/desktop/src/renderer/pages/settings/AssistantSettings/assistantUtils.ts:193— assistantUtils.buildAssistantEditorBackends 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.
AssistantListPanel.SortableAssistantCard (cyclomatic 16) packages/desktop/src/renderer/pages/settings/AssistantSettings/AssistantListPanel.tsx:49— AssistantListPanel.SortableAssistantCard has cyclomatic complexity 16 (threshold 15). Of this number, 13 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.
AssistantListPanel.AssistantListPanel (cyclomatic 16) packages/desktop/src/renderer/pages/settings/AssistantSettings/AssistantListPanel.tsx:211— AssistantListPanel.AssistantListPanel has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 246, renderSourceTag, a function literal at line 305). 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.
SkillFileBrowser.SkillFileBrowser (cyclomatic 16) packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillFileBrowser.tsx:41— SkillFileBrowser.SkillFileBrowser has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to 6 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
mcpJsonImport.parseMcpJsonImport (cyclomatic 16) packages/desktop/src/renderer/pages/settings/ToolsSettings/mcpJsonImport.ts:140— mcpJsonImport.parseMcpJsonImport 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.
TeamTabs.TeamTabs (cyclomatic 16) packages/desktop/src/renderer/pages/team/components/TeamTabs.tsx:238— TeamTabs.TeamTabs 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 4 function literals inside it that branch (lines 328, 268, 296, …). 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.
TeamCreateModal.TeamCreateModal (cyclomatic 16) packages/desktop/src/renderer/pages/team/components/TeamCreateModal.tsx:35— TeamCreateModal.TeamCreateModal 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 6 function items inside it that branch (handleCreate, a function literal at line 303, a function literal at line 51, …). 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.
D11 · Test Reliability· Test reliability not measured · ×1
Test reliability not measured — JavaScript/TypeScript suite install refused the lockfile — Test reliability NOT MEASURED: the JavaScript/TypeScript suite's dependency install refused the committed lockfile, so no test ever ran and flakiness could not be exercised — the dependency install for the repository root failed in the analyzer sandbox (npm error code EUNSUPPORTEDPROTOCOL), so the suite never ran. It is excluded from the score rather than counted as a defect; a lockfile in sync with REDACTED is what lets the suite be re-run.
Repeated repair: packages/desktop/src/renderer/components/Markdown/ShadowView.tsx packages/desktop/src/renderer/components/Markdown/ShadowView.tsx:368— packages/desktop/src/renderer/components/Markdown/ShadowView.tsx 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 12 (its worst body is ShadowView.ShadowView at line 368), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(markdown): align table header with body rows (#4167)”; “fix(markdown): keep inline markup at the heading's size inside chat headings (#4104)”; “fix(markdown): render chat KaTeX formulas once in Shadow DOM (#4091)”. 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-07..2026-11-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-07 05:31:17 +00:00' --until='2026-11-05 05:31:17 +00:00' --full-history --no-merges -- packages/desktop/src/renderer/components/Markdown/ShadowView.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.
PasteServiceClass.handlePaste (cognitive 170) packages/desktop/src/renderer/services/PasteService.ts:159— PasteServiceClass.handlePaste has cognitive complexity 170 (threshold 15). Drivers by points: if/else 26 (83 pts), ternaries 6 (36 pts), loops 4 (20 pts), boolean chains 16, error handling 3 (15 pts) (nesting depth added 115). 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.
ChannelModalContent.ChannelModalContent (cognitive 158) packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/ChannelModalContent.tsx:142— ChannelModalContent.ChannelModalContent has cognitive complexity 158 (threshold 15). Drivers by points: if/else 51 (66 pts), boolean chains 43, ternaries 20 (32 pts), error handling 10, loops 3 (7 pts) (nesting depth added 31). Most of this is not in the body itself: 1 of the 158 points is its own statement and the rest belongs to 22 function items inside it that branch (a function literal at line 554, a function literal at line 730, a function literal at line 226, …). 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.
main.BackendStartupFailureDialog (cognitive 128) packages/desktop/src/renderer/main.tsx:373— main.BackendStartupFailureDialog has cognitive complexity 128 (threshold 15). Drivers by points: ternaries 22 (125 pts), if/else 2, boolean chains 1 (nesting depth added 103). 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.
PreviewContext.PreviewProvider (cognitive 117) packages/desktop/src/renderer/pages/conversation/Preview/context/PreviewContext.tsx:532— PreviewContext.PreviewProvider has cognitive complexity 117 (threshold 15). Drivers by points: if/else 60 (70 pts), ternaries 17 (22 pts), boolean chains 20, error handling 3 (4 pts), loops 1 (nesting depth added 16). None of this is in the body itself: all 117 points belong to 41 function literals inside it that branch (lines 1097, 586, 696, …). 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.
hooks.composeMessageWithIndex (cognitive 110) packages/desktop/src/renderer/pages/conversation/Messages/hooks.ts:140— hooks.composeMessageWithIndex has cognitive complexity 110 (threshold 15). Drivers by points: if/else 43 (85 pts), boolean chains 25 (nesting depth added 42). Of this number, 109 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.
AddPlatformModal.AddPlatformModal (cognitive 104) packages/desktop/src/renderer/pages/settings/components/AddPlatformModal.tsx:207— AddPlatformModal.AddPlatformModal has cognitive complexity 104 (threshold 15). Drivers by points: boolean chains 45, if/else 20 (34 pts), ternaries 17 (22 pts), error handling 1 (3 pts) (nesting depth added 21). Of this number, 40 points are the body's own statements and 64 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.
SkillsHubSettings.SkillsHubSettings (cognitive 99) packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillsHubSettings.tsx:141— SkillsHubSettings.SkillsHubSettings has cognitive complexity 99 (threshold 15). Drivers by points: if/else 30 (32 pts), ternaries 20 (31 pts), boolean chains 30, error handling 4, match/switch 2 (nesting depth added 13). Of this number, 20 points are the body's own statements and 79 belong to 23 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
MessageList.MessageList (cognitive 94) packages/desktop/src/renderer/pages/conversation/Messages/MessageList.tsx:334— MessageList.MessageList has cognitive complexity 94 (threshold 15). Drivers by points: if/else 35 (54 pts), boolean chains 27, ternaries 5 (10 pts), loops 3 (nesting depth added 24). Most of this is not in the body itself: 6 of the 94 points are its own statements and the rest belongs to 19 function items inside it that branch (a function literal at line 358, renderItem, a function literal at line 497, …). 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.
ExplorerPanel.ExplorerPanel (cognitive 92) packages/desktop/src/renderer/pages/conversation/explorer/ExplorerPanel.tsx:91— ExplorerPanel.ExplorerPanel has cognitive complexity 92 (threshold 15). Drivers by points: if/else 31 (46 pts), boolean chains 24, ternaries 14 (19 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 21). Most of this is not in the body itself: 3 of the 92 points are its own statements and the rest belongs to 15 function items inside it that branch (a function literal at line 195, a function literal at line 345, a function literal at line 261, …). 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.
benchmark-acp-startup.runBenchmark (cognitive 90) scripts/benchmark-acp-startup.ts:340— benchmark-acp-startup.runBenchmark has cognitive complexity 90 (threshold 15). Drivers by points: if/else 11 (47 pts), ternaries 6 (21 pts), loops 4 (10 pts), error handling 2 (9 pts), boolean chains 3 (nesting depth added 64). Of this number, 73 points are the body's own statements and 17 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.
LarkConfigForm.LarkConfigForm (cognitive 88) packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx:69— LarkConfigForm.LarkConfigForm has cognitive complexity 88 (threshold 15). Drivers by points: boolean chains 32, ternaries 19 (30 pts), if/else 14 (17 pts), error handling 9 (nesting depth added 14). Of this number, 45 points are the body's own statements and 43 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.
CreateTaskDialog.CreateTaskDialog (cognitive 88) packages/desktop/src/renderer/pages/cron/ScheduledTasksPage/CreateTaskDialog.tsx:234— CreateTaskDialog.CreateTaskDialog has cognitive complexity 88 (threshold 15). Drivers by points: boolean chains 35, if/else 23 (28 pts), ternaries 17 (21 pts), loops 2, error handling 1, match/switch 1 (nesting depth added 9). Of this number, 25 points are the body's own statements and 63 belong to 24 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.
TaskDetailPage.TaskDetailPage (cognitive 86) packages/desktop/src/renderer/pages/cron/ScheduledTasksPage/TaskDetailPage.tsx:38— TaskDetailPage.TaskDetailPage has cognitive complexity 86 (threshold 15). Drivers by points: if/else 25 (37 pts), boolean chains 24, ternaries 12 (18 pts), error handling 5, loops 1 (2 pts) (nesting depth added 19). Of this number, 23 points are the body's own statements and 63 belong to 16 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.
AcpSendBox.AcpSendBox (cognitive 85) packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx:116— AcpSendBox.AcpSendBox has cognitive complexity 85 (threshold 15). Drivers by points: if/else 29 (35 pts), boolean chains 27, ternaries 15 (18 pts), error handling 4 (5 pts) (nesting depth added 10). Of this number, 19 points are the body's own statements and 66 belong to 22 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.
GuidPage.GuidPage (cognitive 84) packages/desktop/src/renderer/pages/guid/GuidPage.tsx:56— GuidPage.GuidPage has cognitive complexity 84 (threshold 15). Drivers by points: if/else 33 (43 pts), boolean chains 21, ternaries 14 (19 pts), error handling 1 (nesting depth added 15). Most of this is not in the body itself: 8 of the 84 points are its own statements and the rest belongs to 19 function literals inside it that branch (lines 397, 522, 297, …). 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.
DingTalkConfigForm.DingTalkConfigForm (cognitive 83) packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.tsx:69— DingTalkConfigForm.DingTalkConfigForm has cognitive complexity 83 (threshold 15). Drivers by points: boolean chains 29, ternaries 17 (28 pts), if/else 14 (17 pts), error handling 9 (nesting depth added 14). Of this number, 42 points are the body's own statements and 41 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.
HTMLRenderer.HTMLRenderer (cognitive 83) packages/desktop/src/renderer/pages/conversation/Preview/components/renderers/HTMLRenderer.tsx:266— HTMLRenderer.HTMLRenderer has cognitive complexity 83 (threshold 15). Drivers by points: if/else 34 (42 pts), boolean chains 21, ternaries 7 (11 pts), error handling 3 (9 pts) (nesting depth added 18). Most of this is not in the body itself: 7 of the 83 points are its own statements and the rest belongs to 23 function literals inside it that branch (lines 539, 385, 685, …). 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.
WecomConfigForm.WecomConfigForm (cognitive 80) packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WecomConfigForm.tsx:70— WecomConfigForm.WecomConfigForm has cognitive complexity 80 (threshold 15). Drivers by points: ternaries 18 (30 pts), boolean chains 27, if/else 12 (15 pts), error handling 8 (nesting depth added 15). Of this number, 42 points are the body's own statements and 38 belong to 13 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.
afterPack.afterPack (cognitive 80) scripts/afterPack.js:40— afterPack.afterPack has cognitive complexity 80 (threshold 15). Drivers by points: if/else 26 (58 pts), loops 4 (11 pts), boolean chains 8, ternaries 2 (3 pts) (nesting depth added 40). 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.
AgentModeSelector.AgentModeSelector (cognitive 78) packages/desktop/src/renderer/components/agent/AgentModeSelector.tsx:81— AgentModeSelector.AgentModeSelector has cognitive complexity 78 (threshold 15). Drivers by points: ternaries 20 (32 pts), boolean chains 29, if/else 14 (16 pts), error handling 1 (nesting depth added 14). Of this number, 50 points are the body's own statements and 28 belong to 11 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.
index.ArchivedSettings (cognitive 76) packages/desktop/src/renderer/pages/settings/ArchivedSettings/index.tsx:78— index.ArchivedSettings has cognitive complexity 76 (threshold 15). Drivers by points: if/else 24 (30 pts), ternaries 16 (29 pts), boolean chains 9, error handling 4, loops 3 (4 pts) (nesting depth added 20). Most of this is not in the body itself: 7 of the 76 points are its own statements and the rest belongs to 19 function items inside it that branch (a function literal at line 115, a function literal at line 141, renderRow, …). 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.
index.SendBox (cognitive 75) packages/desktop/src/renderer/components/chat/SendBox/index.tsx:300— index.SendBox has cognitive complexity 75 (threshold 15). Drivers by points: if/else 125 (145 pts), boolean chains 76, ternaries 50 (58 pts), loops 7 (8 pts), match/switch 1 (nesting depth added 29). 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 (index.SendBox::sendMessageHandler) 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.
useAcpMessage.useAcpMessage.handleResponseMessage (cognitive 75) packages/desktop/src/renderer/pages/conversation/platforms/acp/useAcpMessage.ts:255— useAcpMessage.useAcpMessage.handleResponseMessage has cognitive complexity 75 (threshold 15). Drivers by points: if/else 27 (55 pts), boolean chains 16, ternaries 1 (3 pts), match/switch 1 (nesting depth added 30). Of this number, 67 points are the body's own statements and 8 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.
AionrsSendBox.AionrsSendBox (cognitive 75) packages/desktop/src/renderer/pages/conversation/platforms/aionrs/AionrsSendBox.tsx:126— AionrsSendBox.AionrsSendBox has cognitive complexity 75 (threshold 15). Drivers by points: if/else 28 (30 pts), ternaries 17 (21 pts), boolean chains 20, error handling 4 (nesting depth added 6). Of this number, 18 points are the body's own statements and 57 belong to 26 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.
WebviewHost.WebviewHost (cognitive 73) packages/desktop/src/renderer/components/media/WebviewHost.tsx:60— WebviewHost.WebviewHost has cognitive complexity 73 (threshold 15). Drivers by points: if/else 34 (40 pts), boolean chains 22, ternaries 5 (7 pts), error handling 4 (nesting depth added 8). Most of this is not in the body itself: 7 of the 73 points are its own statements and the rest belongs to 24 function literals inside it that branch (lines 258, 299, 566, …). 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.
EditModeModal.EditModeModal (cognitive 73) packages/desktop/src/renderer/pages/settings/components/EditModeModal.tsx:13— EditModeModal.EditModeModal has cognitive complexity 73 (threshold 15). Drivers by points: boolean chains 36, ternaries 14 (20 pts), if/else 10 (13 pts), error handling 3 (4 pts) (nesting depth added 10). Of this number, 29 points are the body's own statements and 44 belong to 6 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.
index.handleAppReady (cognitive 70) packages/desktop/src/index.ts:680— index.handleAppReady has cognitive complexity 70 (threshold 15). Drivers by points: if/else 25 (43 pts), error handling 11 (20 pts), boolean chains 7 (nesting depth added 27). Of this number, 57 points are the body's own statements and 13 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.
SlackConfigForm.SlackConfigForm (cognitive 69) packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/SlackConfigForm.tsx:63— SlackConfigForm.SlackConfigForm has cognitive complexity 69 (threshold 15). Drivers by points: ternaries 14 (21 pts), boolean chains 20, if/else 16 (19 pts), error handling 9 (nesting depth added 10). Of this number, 26 points are the body's own statements and 43 belong to 13 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.
index.Titlebar (cognitive 68) packages/desktop/src/renderer/components/layout/Titlebar/index.tsx:99— index.Titlebar has cognitive complexity 68 (threshold 15). Drivers by points: boolean chains 30, if/else 21 (26 pts), ternaries 8 (9 pts), error handling 2 (3 pts) (nesting depth added 7). Of this number, 31 points are the body's own statements and 37 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.
WeixinConfigForm.WeixinConfigForm (cognitive 66) packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WeixinConfigForm.tsx:63— WeixinConfigForm.WeixinConfigForm has cognitive complexity 66 (threshold 15). Drivers by points: boolean chains 21, if/else 16 (19 pts), ternaries 13 (18 pts), error handling 8 (nesting depth added 8). Most of this is not in the body itself: 14 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 414, renderLoginArea, a function literal at line 279, …). 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.
InlineAgentEditor.InlineAgentEditor (cognitive 66) packages/desktop/src/renderer/pages/settings/AgentSettings/InlineAgentEditor.tsx:186— InlineAgentEditor.InlineAgentEditor has cognitive complexity 66 (threshold 15). Drivers by points: boolean chains 26, if/else 14 (22 pts), ternaries 12 (14 pts), error handling 3, match/switch 1 (nesting depth added 10). Most of this is not in the body itself: 15 of the 66 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 304, 355, 387, …). 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.
useAionrsMessage.useAionrsMessage (cognitive 65) packages/desktop/src/renderer/pages/conversation/platforms/aionrs/useAionrsMessage.ts:26— useAionrsMessage.useAionrsMessage has cognitive complexity 65 (threshold 15). Drivers by points: if/else 29 (47 pts), boolean chains 12, ternaries 2 (5 pts), match/switch 1 (nesting depth added 21). Most of this is not in the body itself: 1 of the 65 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 206, 400, 131, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
chatLib.composeMessage (cognitive 63) packages/desktop/src/common/chat/chatLib.ts:941— chatLib.composeMessage has cognitive complexity 63 (threshold 15). Drivers by points: if/else 22 (38 pts), boolean chains 11, loops 4 (9 pts), ternaries 3 (5 pts) (nesting depth added 23). Of this number, 53 points are the body's own statements and 10 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.
usePresetAssistantInfo.usePresetAssistantInfo (cognitive 63) packages/desktop/src/renderer/hooks/agent/usePresetAssistantInfo.ts:276— usePresetAssistantInfo.usePresetAssistantInfo has cognitive complexity 63 (threshold 15). Drivers by points: if/else 21 (32 pts), ternaries 11 (22 pts), boolean chains 9 (nesting depth added 22). Most of this is not in the body itself: 2 of the 63 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 301, 357, 398, …). 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.
ModelModalContent.ModelModalContent (cognitive 62) packages/desktop/src/renderer/components/settings/SettingsModal/contents/ModelModalContent.tsx:109— ModelModalContent.ModelModalContent has cognitive complexity 62 (threshold 15). Drivers by points: ternaries 17 (30 pts), boolean chains 20, if/else 8, error handling 3 (4 pts) (nesting depth added 14). Most of this is not in the body itself: 5 of the 62 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 514, performHealthCheck, updatePlatform, …). 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.
OneClickImportModal.OneClickImportModal (cognitive 60) packages/desktop/src/renderer/pages/settings/components/OneClickImportModal.tsx:64— OneClickImportModal.OneClickImportModal has cognitive complexity 60 (threshold 15). Drivers by points: if/else 18 (27 pts), boolean chains 16, ternaries 9 (14 pts), error handling 2 (3 pts) (nesting depth added 15). Most of this is not in the body itself: 7 of the 60 points are its own statements and the rest belongs to 17 function items inside it that branch (a function literal at line 220, handleNextStep, handleBatchImport, …). 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.
DiscordConfigForm.DiscordConfigForm (cognitive 59) packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DiscordConfigForm.tsx:63— DiscordConfigForm.DiscordConfigForm has cognitive complexity 59 (threshold 15). Drivers by points: boolean chains 18, if/else 13 (16 pts), ternaries 11 (16 pts), error handling 9 (nesting depth added 8). Of this number, 19 points are the body's own statements and 40 belong to 13 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.
TelegramConfigForm.TelegramConfigForm (cognitive 59) packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/TelegramConfigForm.tsx:63— TelegramConfigForm.TelegramConfigForm has cognitive complexity 59 (threshold 15). Drivers by points: boolean chains 18, if/else 13 (16 pts), ternaries 11 (16 pts), error handling 9 (nesting depth added 8). Of this number, 19 points are the body's own statements and 40 belong to 13 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.
TeamPage.TeamPageContent (cognitive 59) packages/desktop/src/renderer/pages/team/TeamPage.tsx:533— TeamPage.TeamPageContent has cognitive complexity 59 (threshold 15). Drivers by points: ternaries 15 (26 pts), if/else 18 (22 pts), boolean chains 10, loops 1 (nesting depth added 15). Most of this is not in the body itself: 10 of the 59 points are its own statements and the rest belongs to 18 function literals inside it that branch (lines 886, 618, 663, …). 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.
MessageTips.MessageTips (cognitive 58) packages/desktop/src/renderer/pages/conversation/Messages/components/MessageTips.tsx:64— MessageTips.MessageTips has cognitive complexity 58 (threshold 15). Drivers by points: ternaries 16 (32 pts), boolean chains 15, if/else 7 (11 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DefaultsSection.DefaultsSection (cognitive 56) packages/desktop/src/renderer/pages/settings/AssistantSettings/editor/DefaultsSection.tsx:73— DefaultsSection.DefaultsSection has cognitive complexity 56 (threshold 15). Drivers by points: ternaries 20 (38 pts), if/else 7 (14 pts), boolean chains 4 (nesting depth added 25). Of this number, 28 points are the body's own statements and 28 belong to 12 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
imageGenCore.executeImageGeneration (cognitive 55) packages/desktop/src/common/chat/imageGenCore.ts:214— imageGenCore.executeImageGeneration has cognitive complexity 55 (threshold 15). Drivers by points: if/else 20 (30 pts), ternaries 3 (8 pts), error handling 3 (7 pts), boolean chains 6, loops 1 (4 pts) (nesting depth added 22). Of this number, 45 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.
Layout.Layout (cognitive 54) packages/desktop/src/renderer/components/layout/Layout.tsx:121— Layout.Layout has cognitive complexity 54 (threshold 15). Drivers by points: ternaries 14 (20 pts), boolean chains 18, if/else 13 (15 pts), error handling 1 (nesting depth added 8). Of this number, 27 points are the body's own statements and 27 belong to 10 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.
GuidActionRow.GuidActionRow (cognitive 54) packages/desktop/src/renderer/pages/guid/components/GuidActionRow.tsx:120— GuidActionRow.GuidActionRow has cognitive complexity 54 (threshold 15). Drivers by points: if/else 18 (20 pts), boolean chains 18, ternaries 11 (15 pts), error handling 1 (nesting depth added 6). Of this number, 16 points are the body's own statements and 38 belong to 12 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.
ExplorerContainer.ExplorerContainer (cognitive 53) packages/desktop/src/renderer/pages/conversation/explorer/ExplorerContainer.tsx:176— ExplorerContainer.ExplorerContainer has cognitive complexity 53 (threshold 15). Drivers by points: if/else 18 (19 pts), ternaries 15 (17 pts), boolean chains 10, error handling 7 (nesting depth added 3). Of this number, 17 points are the body's own statements and 36 belong to 12 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.
MessageText.MessageText (cognitive 52) packages/desktop/src/renderer/pages/conversation/Messages/components/MessageText.tsx:106— MessageText.MessageText has cognitive complexity 52 (threshold 15). Drivers by points: ternaries 19 (25 pts), boolean chains 21, if/else 4 (6 pts) (nesting depth added 8). Of this number, 38 points are the body's own statements and 14 belong to 5 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.
ToolsModalContent.ToolsModalContent (cognitive 51) packages/desktop/src/renderer/components/settings/SettingsModal/contents/ToolsModalContent.tsx:269— ToolsModalContent.ToolsModalContent has cognitive complexity 51 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 16, ternaries 9 (14 pts), error handling 2 (nesting depth added 8). Most of this is not in the body itself: 12 of the 51 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 309, 441, 378, …). 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.
index.ScheduledTasksPage (cognitive 51) packages/desktop/src/renderer/pages/cron/ScheduledTasksPage/index.tsx:28— index.ScheduledTasksPage has cognitive complexity 51 (threshold 15). Drivers by points: ternaries 15 (40 pts), boolean chains 6, if/else 3, error handling 2 (nesting depth added 25). Most of this is not in the body itself: 11 of the 51 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 202, 103, 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.
AionModal.AionModal (cognitive 50) packages/desktop/src/renderer/components/base/AionModal.tsx:194— AionModal.AionModal has cognitive complexity 50 (threshold 15). Drivers by points: if/else 18 (21 pts), boolean chains 20, ternaries 7 (9 pts) (nesting depth added 5). Of this number, 19 points are the body's own statements and 31 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.
index.SystemModalContent (cognitive 50) packages/desktop/src/renderer/components/settings/SettingsModal/contents/SystemModalContent/index.tsx:41— index.SystemModalContent has cognitive complexity 50 (threshold 15). Drivers by points: if/else 18 (19 pts), boolean chains 17, ternaries 9 (12 pts), error handling 2 (nesting depth added 4). Most of this is not in the body itself: 9 of the 50 points are its own statements and the rest belongs to 17 function literals inside it that branch (lines 469, 122, 515, …). 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.readDirectoryRecursive (cognitive 48) packages/desktop/src/process/utils/utils.ts:157— utils.readDirectoryRecursive has cognitive complexity 48 (threshold 15). Drivers by points: if/else 14 (28 pts), ternaries 4 (8 pts), boolean chains 7, error handling 3 (4 pts), loops 1 (nesting depth added 19). Of this number, 43 points are the body's own statements and 5 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.
useResizableSplit.useResizableSplit.handleDragStart.<returned closure> (cognitive 47) packages/desktop/src/renderer/hooks/ui/useResizableSplit.tsx:109— useResizableSplit.useResizableSplit.handleDragStart.<returned closure> has cognitive complexity 47 (threshold 15). Drivers by points: if/else 19 (21 pts), ternaries 11 (14 pts), boolean chains 10, error handling 1 (2 pts) (nesting depth added 6). Most of this is not in the body itself: 13 of the 47 points are its own statements and the rest belongs to 8 function items inside it that branch (finishDrag, applyLiveRatio, computeRaw, …). 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.
ConversationSearchPopover.ConversationSearchPopover (cognitive 46) packages/desktop/src/renderer/pages/conversation/GroupedHistory/ConversationSearchPopover.tsx:133— ConversationSearchPopover.ConversationSearchPopover has cognitive complexity 46 (threshold 15). Drivers by points: if/else 18 (19 pts), boolean chains 13, ternaries 8 (11 pts), error handling 3 (nesting depth added 4). Most of this is not in the body itself: 14 of the 46 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 332, 177, 307, …). 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.
webFsPicker.WebFsPicker (cognitive 45) packages/desktop/src/renderer/components/workspace/webFsPicker.tsx:33— webFsPicker.WebFsPicker has cognitive complexity 45 (threshold 15). Drivers by points: ternaries 11 (23 pts), if/else 10, boolean chains 8, error handling 4 (nesting depth added 12). Most of this is not in the body itself: 13 of the 45 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 93, 64, 136, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
index.createWindow (cognitive 44) packages/desktop/src/index.ts:455— index.createWindow has cognitive complexity 44 (threshold 15). Drivers by points: if/else 21 (26 pts), boolean chains 14, error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 7). Of this number, 22 points are the body's own statements and 22 belong to 10 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
updateNotificationState.updateNotificationReducer (cognitive 42) packages/desktop/src/renderer/components/settings/updateNotificationState.ts:241— updateNotificationState.updateNotificationReducer has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (22 pts), ternaries 7 (14 pts), boolean chains 5, match/switch 1 (nesting depth added 18). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
TeamAssistantPicker.TeamAssistantPicker (cognitive 42) packages/desktop/src/renderer/pages/team/components/memberPicker/TeamAssistantPicker.tsx:25— TeamAssistantPicker.TeamAssistantPicker has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 20 (38 pts), boolean chains 3, if/else 1 (nesting depth added 18). Most of this is not in the body itself: 8 of the 42 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 83, 41). 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.
MermaidBlock.MermaidBlock (cognitive 41) packages/desktop/src/renderer/components/Markdown/MermaidBlock.tsx:51— MermaidBlock.MermaidBlock has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 9 (17 pts), boolean chains 13, if/else 9 (10 pts), error handling 1 (nesting depth added 9). Of this number, 22 points are the body's own statements and 19 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.
BackendLifecycleManager.attemptStart (cognitive 41) packages/web-host/src/backend-launcher.ts:582— BackendLifecycleManager.attemptStart has cognitive complexity 41 (threshold 15). Drivers by points: if/else 20 (28 pts), boolean chains 7, error handling 4, loops 2 (nesting depth added 8). Most of this is not in the body itself: 15 of the 41 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 805, a function literal at line 747, a function literal at line 834, …). 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.
useMinimapPanel.useMinimapPanel (cognitive 40) packages/desktop/src/renderer/pages/conversation/components/ConversationTitleMinimap/useMinimapPanel.ts:56— useMinimapPanel.useMinimapPanel has cognitive complexity 40 (threshold 15). Drivers by points: if/else 23, boolean chains 12, ternaries 3 (5 pts) (nesting depth added 2). None of this is in the body itself: all 40 points belong to 15 function literals inside it that branch (lines 358, 291, 329, …). 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.
index.SettingsModal (cognitive 39) packages/desktop/src/renderer/components/settings/SettingsModal/index.tsx:135— index.SettingsModal has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (21 pts), ternaries 11 (13 pts), loops 3, boolean chains 1, match/switch 1 (nesting depth added 9). Most of this is not in the body itself: 7 of the 39 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 188, renderBuiltinContent, a function literal at line 247, …). 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.
useAssistantEditor.useAssistantEditor.handleSave (cognitive 39) packages/desktop/src/renderer/hooks/assistant/useAssistantEditor.ts:374— useAssistantEditor.useAssistantEditor.handleSave has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 11, ternaries 4 (5 pts), error handling 2 (4 pts), loops 1 (2 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.
AssistantSelectionArea.AssistantSelectionArea (cognitive 39) packages/desktop/src/renderer/pages/guid/components/AssistantSelectionArea.tsx:67— AssistantSelectionArea.AssistantSelectionArea has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 14 (15 pts), if/else 13 (14 pts), boolean chains 9, loops 1 (nesting depth added 2). Most of this is not in the body itself: 8 of the 39 points are its own statements and the rest belongs to 14 function items inside it that branch (renderAssistantPill, a function literal at line 170, a function literal at line 143, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
updateBridge.initUpdateBridge (cognitive 38) packages/desktop/src/process/bridge/updateBridge.ts:661— updateBridge.initUpdateBridge has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 9 (18 pts), error handling 8, if/else 7, boolean chains 5 (nesting depth added 9). None of this is in the body itself: all 38 points belong to 8 function literals inside it that branch (lines 726, 801, 676, …). 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.
UpdateNotificationCard.UpdateNotificationCard (cognitive 38) packages/desktop/src/renderer/components/settings/UpdateNotificationCard.tsx:24— UpdateNotificationCard.UpdateNotificationCard has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 13 (24 pts), if/else 8, boolean chains 5, match/switch 1 (nesting depth added 11). Of this number, 26 points are the body's own statements and 12 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.
applicationBridge.initApplicationBridge (cognitive 37) packages/desktop/src/process/bridge/applicationBridge.ts:100— applicationBridge.initApplicationBridge has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (15 pts), error handling 9, boolean chains 8, ternaries 3 (5 pts) (nesting depth added 5). None of this is in the body itself: all 37 points belong to 13 function literals inside it that branch (lines 118, 162, 225, …). 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.
index.WorkspaceGroupedHistory (cognitive 37) packages/desktop/src/renderer/pages/conversation/GroupedHistory/index.tsx:30— index.WorkspaceGroupedHistory has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 19, if/else 7 (9 pts), ternaries 5, loops 3 (4 pts) (nesting depth added 3). Of this number, 20 points are the body's own statements and 17 belong to 16 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.
GuidModelSelector.GuidModelSelector (cognitive 37) packages/desktop/src/renderer/pages/guid/components/GuidModelSelector.tsx:46— GuidModelSelector.GuidModelSelector has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 7 (17 pts), if/else 6 (11 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 16). Of this number, 27 points are the body's own statements and 10 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.
useGuidSend.useGuidSend.handleSend (cognitive 37) packages/desktop/src/renderer/pages/guid/hooks/useGuidSend.ts:102— useGuidSend.useGuidSend.handleSend has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 9, ternaries 6 (9 pts), error handling 2 (3 pts) (nesting depth added 9). Of this number, 34 points are the body's own statements and 3 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.
AssistantEditorSections.AssistantEditorSections (cognitive 37) packages/desktop/src/renderer/pages/settings/AssistantSettings/AssistantEditorSections.tsx:31— AssistantEditorSections.AssistantEditorSections has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (14 pts), ternaries 11 (13 pts), boolean chains 9, error handling 1 (nesting depth added 3). Most of this is not in the body itself: 9 of the 37 points are its own statements and the rest belongs to 15 function items inside it that branch (a function literal at line 163, renderAgentAvatar, handlePickAvatarImage, …). 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.
TeamWarmupOverlay.TeamWarmupOverlay (cognitive 37) packages/desktop/src/renderer/pages/team/components/TeamWarmupOverlay.tsx:54— TeamWarmupOverlay.TeamWarmupOverlay has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 15 (31 pts), boolean chains 4, if/else 2 (nesting depth added 16). Of this number, 21 points are the body's own statements and 16 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.
chatLib.transformMessageInner (cognitive 36) packages/desktop/src/common/chat/chatLib.ts:689— chatLib.transformMessageInner has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 16 (33 pts), boolean chains 2, match/switch 1 (nesting depth added 17). 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.
JsonImportModal.JsonImportModal (cognitive 36) packages/desktop/src/renderer/pages/settings/components/JsonImportModal.tsx:161— JsonImportModal.JsonImportModal has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 13, ternaries 4 (7 pts), error handling 2 (nesting depth added 5). Most of this is not in the body itself: 9 of the 36 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 197, handleSubmit, a function literal at line 173, …). 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.
smoke-installer-failure-messagebox.runHarness (cognitive 36) scripts/smoke-installer-failure-messagebox.js:452— smoke-installer-failure-messagebox.runHarness has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 9, ternaries 3 (6 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
prepareAioncore (cognitive 36) packages/shared-scripts/src/prepare-aioncore.js:443— prepareAioncore has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 8, ternaries 2 (4 pts), error handling 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WavedromBlock.WavedromBlock (cognitive 35) REDACTED:162— WavedromBlock.WavedromBlock has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 9 (16 pts), boolean chains 12, if/else 7 (nesting depth added 7). Of this number, 16 points are the body's own statements and 19 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.
useWorkspaceCollapse.useWorkspaceCollapse (cognitive 35) packages/desktop/src/renderer/pages/conversation/hooks/useWorkspaceCollapse.ts:55— useWorkspaceCollapse.useWorkspaceCollapse has cognitive complexity 35 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 7, error handling 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 7). None of this is in the body itself: all 35 points belong to 10 function literals inside it that branch (lines 109, 86, 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.
HTMLRenderer.inlineRelativeResources (cognitive 34) packages/desktop/src/renderer/pages/conversation/Preview/components/renderers/HTMLRenderer.tsx:170— HTMLRenderer.inlineRelativeResources has cognitive complexity 34 (threshold 15). Drivers by points: if/else 5 (14 pts), error handling 4 (12 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AgentRepairPanel.AgentRepairPanel (cognitive 34) packages/desktop/src/renderer/pages/settings/AgentSettings/AgentRepairPanel.tsx:85— AgentRepairPanel.AgentRepairPanel has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 17, ternaries 6 (8 pts), if/else 6 (7 pts), error handling 2 (nesting depth added 3). Most of this is not in the body itself: 13 of the 34 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 126, 101, 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.
atCommandParser.parseAllAtCommands (cognitive 33) packages/desktop/src/common/chat/atCommandParser.ts:44— atCommandParser.parseAllAtCommands has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 3 (5 pts), boolean chains 4, ternaries 1 (4 pts) (nesting depth added 16). Of this number, 32 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.
runBackendMigrations.ensureBootstrapMcpServersInDb (cognitive 33) packages/desktop/src/process/utils/runBackendMigrations.ts:295— runBackendMigrations.ensureBootstrapMcpServersInDb has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 9 (16 pts), if/else 7 (9 pts), boolean chains 8 (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.
SpeechInputButton.SpeechInputButton (cognitive 33) packages/desktop/src/renderer/components/chat/SpeechInputButton.tsx:77— SpeechInputButton.SpeechInputButton has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (17 pts), ternaries 8 (10 pts), boolean chains 5, error handling 1 (nesting depth added 3). 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 115, a function literal at line 168, a function literal at line 147, …). 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.
useMcpConnection.useMcpConnection.handleTestMcpConnection (cognitive 33) packages/desktop/src/renderer/hooks/mcp/useMcpConnection.ts:144— useMcpConnection.useMcpConnection.handleTestMcpConnection has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (14 pts), error handling 5 (13 pts), ternaries 3 (5 pts), boolean chains 1 (nesting depth added 15). Most of this is not in the body itself: 15 of the 33 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 170, 193, 154, …). 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.
hooks.useMergeLiveMessage (cognitive 33) packages/desktop/src/renderer/pages/conversation/Messages/hooks.ts:420— hooks.useMergeLiveMessage has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 14). None of this is in the body itself: all 33 points belong to 4 function literals inside it that branch (lines 431, 491, 425, …). 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.
useCronJobs.useCronJobsMap (cognitive 33) packages/desktop/src/renderer/pages/cron/useCronJobs.ts:279— useCronJobs.useCronJobsMap has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 7, error handling 3, loops 2, ternaries 1 (nesting depth added 6). None of this is in the body itself: all 33 points belong to 13 function literals inside it that branch (lines 310, 440, 359, …). 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.
check-i18n.checkTranslationKeys (cognitive 33) REDACTED:150— check-i18n.checkTranslationKeys has cognitive complexity 33 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 2 (7 pts), ternaries 2 (7 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MobileActionSheet.MobileActionSheet (cognitive 32) packages/desktop/src/renderer/components/chat/MobileActionSheet/MobileActionSheet.tsx:16— MobileActionSheet.MobileActionSheet has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 14, if/else 12, ternaries 6. Most of this is not in the body itself: 12 of the 32 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 148, handleSubSelect, a function literal at line 52, …). 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.
MessageAnchorRail.MessageAnchorRail (cognitive 32) packages/desktop/src/renderer/pages/conversation/Messages/anchorRail/MessageAnchorRail.tsx:61— MessageAnchorRail.MessageAnchorRail has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 14, if/else 11, ternaries 7. Most of this is not in the body itself: 11 of the 32 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 141, 90, 110, …). 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.
OfficeWatchViewer.OfficeWatchViewer (cognitive 32) packages/desktop/src/renderer/pages/conversation/Preview/components/viewers/OfficeWatchViewer.tsx:161— OfficeWatchViewer.OfficeWatchViewer has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (17 pts), ternaries 3 (8 pts), boolean chains 6, error handling 1 (nesting depth added 8). Most of this is not in the body itself: 10 of the 32 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 194, 188, 174, …). 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.
rebuildNativeModules.rebuildSingleModule (cognitive 32) REDACTED:174— rebuildNativeModules.rebuildSingleModule has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (24 pts), error handling 2 (3 pts), ternaries 2 (3 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
packaged-launch.resolvePackagedApp (cognitive 32) scripts/packaged-launch.mjs:27— packaged-launch.resolvePackagedApp has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 4 (9 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.
cdpBridge.handleSocketMessage (cognitive 31) REDACTED:187— cdpBridge.handleSocketMessage has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 1 (3 pts), boolean chains 2, error handling 2, ternaries 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.
CodeBlock.CodeBlock (cognitive 31) REDACTED:39— CodeBlock.CodeBlock has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 11, ternaries 8, if/else 6 (7 pts), error handling 3 (5 pts) (nesting depth added 3). Of this number, 24 points are the body's own statements and 7 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.
AcpModelSelector.AcpModelSelector (cognitive 31) packages/desktop/src/renderer/components/agent/AcpModelSelector.tsx:72— AcpModelSelector.AcpModelSelector has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 14, if/else 7 (8 pts), ternaries 6 (7 pts), error handling 2 (nesting depth added 2). Most of this is not in the body itself: 14 of the 31 points are its own statements and the rest belongs to 6 function items inside it that branch (renderReadonlyPill, a function literal at line 131, a function literal at line 165, …). 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.
ConversationRow.ConversationRow (cognitive 31) packages/desktop/src/renderer/pages/conversation/GroupedHistory/ConversationRow.tsx:36— ConversationRow.ConversationRow has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 17, if/else 7, ternaries 6 (7 pts) (nesting depth added 1). Of this number, 22 points are the body's own statements and 9 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.
MessageToolGroup.MessageToolGroup (cognitive 30) packages/desktop/src/renderer/pages/conversation/Messages/components/MessageToolGroup.tsx:456— MessageToolGroup.MessageToolGroup has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 13, if/else 6 (10 pts), ternaries 4 (7 pts) (nesting depth added 7). None of this is in the body itself: all 30 points belong to 3 function literals inside it that branch (lines 485, 463, 475). 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.
useTeamRunView.useTeamRunView (cognitive 30) packages/desktop/src/renderer/pages/team/hooks/useTeamRunView.ts:106— useTeamRunView.useTeamRunView has cognitive complexity 30 (threshold 15). Drivers by points: if/else 24, boolean chains 3, ternaries 1 (2 pts), error handling 1 (nesting depth added 1). None of this is in the body itself: all 30 points belong to 18 function literals inside it that branch (lines 119, 324, 296, …). 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.
TeamTabs.TeamTabView (cognitive 30) packages/desktop/src/renderer/pages/team/components/TeamTabs.tsx:38— TeamTabs.TeamTabView has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 10 (13 pts), boolean chains 12, if/else 5 (nesting depth added 3). Of this number, 23 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, 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.
MarkdownViewer.MarkdownImage (cognitive 29) packages/desktop/src/renderer/pages/conversation/Preview/components/viewers/MarkdownViewer.tsx:108— MarkdownViewer.MarkdownImage has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (19 pts), ternaries 5 (8 pts), boolean chains 2 (nesting depth added 10). Most of this is not in the body itself: 3 of the 29 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 115, 124, 129, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
PreviewPanel.PreviewPanel::renderContent (cognitive 29) packages/desktop/src/renderer/pages/conversation/Preview/components/PreviewPanel/PreviewPanel.tsx:905— PreviewPanel.PreviewPanel::renderContent has cognitive complexity 29 (threshold 15). Drivers by points: if/else 20 (27 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.
index.LoginPage (cognitive 29) packages/desktop/src/renderer/pages/login/index.tsx:34— index.LoginPage has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (17 pts), ternaries 7 (8 pts), boolean chains 2, match/switch 1 (2 pts) (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 9 function literals inside it that branch (lines 134, 64, 52, …). 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.
benchmark-acp-startup.parsePerfLines (cognitive 29) scripts/benchmark-acp-startup.ts:122— benchmark-acp-startup.parsePerfLines has cognitive complexity 29 (threshold 15). Drivers by points: if/else 19 (28 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.
PwaPullToRefresh.PwaPullToRefresh (cognitive 28) packages/desktop/src/renderer/components/layout/PwaPullToRefresh.tsx:16— PwaPullToRefresh.PwaPullToRefresh has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 9, ternaries 5, loops 1 (nesting depth added 1). None of this is in the body itself: all 28 points belong to 7 function literals inside it that branch (lines 44, 32, 58, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
HTMLViewer.HTMLPreview (cognitive 28) REDACTED:31— HTMLViewer.HTMLPreview has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 9, ternaries 1 (nesting depth added 4). Most of this is not in the body itself: 6 of the 28 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 61, a function literal at line 233, a function literal at line 40, …). 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.
useAcpMessage.useAcpMessage (cognitive 28) packages/desktop/src/renderer/pages/conversation/platforms/acp/useAcpMessage.ts:103— useAcpMessage.useAcpMessage has cognitive complexity 28 (threshold 15). Drivers by points: if/else 17 (19 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 3). None of this is in the body itself: all 28 points belong to 9 function literals inside it that branch (lines 616, 659, 704, …). 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.
SettingsSider.SettingsSider (cognitive 28) packages/desktop/src/renderer/pages/settings/components/SettingsSider.tsx:73— SettingsSider.SettingsSider has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 7 (9 pts), boolean chains 3, loops 3 (nesting depth added 8). None of this is in the body itself: all 28 points belong to 4 function literals inside it that branch (lines 85, 209, 154, …). 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.
normalizeToolCall.buildParamSummary (cognitive 27) packages/desktop/src/common/chat/normalizeToolCall.ts:102— normalizeToolCall.buildParamSummary has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 5, ternaries 2 (4 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.
updateBridge.attemptDownload (cognitive 27) packages/desktop/src/process/bridge/updateBridge.ts:482— updateBridge.attemptDownload has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (15 pts), error handling 3 (5 pts), boolean chains 3, ternaries 2 (3 pts), loops 1 (nesting depth added 8). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FeedbackReportModal.FeedbackReportModal (cognitive 27) packages/desktop/src/renderer/components/settings/SettingsModal/contents/FeedbackReportModal.tsx:82— FeedbackReportModal.FeedbackReportModal has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12, boolean chains 9, error handling 3, ternaries 3. Most of this is not in the body itself: 3 of the 27 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 126, 153, 164, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
GuidWorkspaceFootnote.GuidWorkspaceFootnote (cognitive 27) packages/desktop/src/renderer/pages/guid/components/GuidWorkspaceFootnote.tsx:51— GuidWorkspaceFootnote.GuidWorkspaceFootnote has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 9, if/else 8 (9 pts), ternaries 6 (9 pts) (nesting depth added 4). Most of this is not in the body itself: 10 of the 27 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 134, 157, 69, …). 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.
CssThemeSettings.CssThemeSettings (cognitive 27) packages/desktop/src/renderer/pages/settings/AppearanceSettings/CssThemeSettings.tsx:241— CssThemeSettings.CssThemeSettings has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (7 pts), error handling 5, ternaries 5, loops 1 (nesting depth added 1). Most of this is not in the body itself: 2 of the 27 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 454, 278, 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.
migrateAssistants.uploadLegacyAssistantRules (cognitive 26) packages/desktop/src/process/utils/migrateAssistants.ts:451— migrateAssistants.uploadLegacyAssistantRules has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 2, error handling 1, loops 1 (nesting depth added 7). Of this number, 21 points are the body's own statements and 5 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.
Diff2Html.Diff2Html (cognitive 26) REDACTED:23— Diff2Html.Diff2Html has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 9, ternaries 2 (nesting depth added 2). Most of this is not in the body itself: 3 of the 26 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 123, 66, 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.
MessageQuestion.MessageQuestion (cognitive 26) packages/desktop/src/renderer/pages/conversation/Messages/MessageQuestion.tsx:45— MessageQuestion.MessageQuestion has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 11 (17 pts), boolean chains 7, if/else 2 (nesting depth added 6). Most of this is not in the body itself: 7 of the 26 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 93, answered, a function literal at line 69, …). 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.
ChatTitleEditor.ChatTitleEditor (cognitive 26) packages/desktop/src/renderer/pages/conversation/components/ChatTitleEditor.tsx:23— ChatTitleEditor.ChatTitleEditor has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 7 (12 pts), boolean chains 7, if/else 4 (7 pts) (nesting depth added 8). Of this number, 15 points are the body's own statements and 11 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LocalAgents.LocalAgents (cognitive 26) packages/desktop/src/renderer/pages/settings/AgentSettings/LocalAgents.tsx:37— LocalAgents.LocalAgents has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 6 (9 pts), boolean chains 7, if/else 5, error handling 4, match/switch 1 (nesting depth added 3). 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 literals inside it that branch (lines 128, 65, 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.
index.ChatLayout (cognitive 25) packages/desktop/src/renderer/pages/conversation/components/ChatLayout/index.tsx:66— index.ChatLayout has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 17, ternaries 6, if/else 2. Of this number, 21 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.
AddModelModal.AddModelModal (cognitive 25) packages/desktop/src/renderer/pages/settings/components/AddModelModal.tsx:22— AddModelModal.AddModelModal has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 11, ternaries 8, if/else 5 (6 pts) (nesting depth added 1). Most of this is not in the body itself: 8 of the 25 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 52, 33, 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.
OpenAI2GeminiConverter.convertRequest (cognitive 24) packages/desktop/src/common/api/OpenAI2GeminiConverter.ts:122— OpenAI2GeminiConverter.convertRequest has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 8, loops 1 (2 pts) (nesting depth added 6). Of this number, 22 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.
updateBridge.scoreAsset (cognitive 24) packages/desktop/src/process/bridge/updateBridge.ts:143— updateBridge.scoreAsset has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
hooks.normalizeDbTipsMessage (cognitive 24) packages/desktop/src/renderer/pages/conversation/Messages/hooks.ts:678— hooks.normalizeDbTipsMessage has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 13 (16 pts), boolean chains 6, if/else 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.
ChatConversation.ChatConversation (cognitive 24) packages/desktop/src/renderer/pages/conversation/components/ChatConversation.tsx:271— ChatConversation.ChatConversation has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 11, if/else 7, ternaries 4 (5 pts), match/switch 1 (nesting depth added 1). Of this number, 12 points are the body's own statements and 12 belong to 3 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
useConversationCommandQueue.useConversationCommandQueue (cognitive 24) packages/desktop/src/renderer/pages/conversation/platforms/useConversationCommandQueue.ts:595— useConversationCommandQueue.useConversationCommandQueue has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 6, boolean chains 5 (nesting depth added 2). Most of this is not in the body itself: 4 of the 24 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 629, 1080, 1111, …). 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.
useGuidAssistantSelection.useGuidAssistantSelection (cognitive 24) packages/desktop/src/renderer/pages/guid/hooks/useGuidAssistantSelection.ts:119— useGuidAssistantSelection.useGuidAssistantSelection has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 7, ternaries 2 (3 pts) (nesting depth added 2). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 177, 198, 254, …). 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-with-builder.patchElectronBuilderNsisInstaller (cognitive 24) REDACTED:31— build-with-builder.patchElectronBuilderNsisInstaller has cognitive complexity 24 (threshold 15). Drivers by points: if/else 18 (19 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 2). Of this number, 23 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.
NavigationInterceptor.extractUrl (cognitive 23) packages/desktop/src/common/chat/navigation/NavigationInterceptor.ts:160— NavigationInterceptor.extractUrl has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AuthContext.AuthProvider (cognitive 23) packages/desktop/src/renderer/hooks/context/AuthContext.tsx:131— AuthContext.AuthProvider has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 3, error handling 2 (nesting depth added 3). None of this is in the body itself: all 23 points belong to 3 function literals inside it that branch (lines 168, 137, 271). 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.
AionrsModelSelector.AionrsModelSelector (cognitive 23) packages/desktop/src/renderer/pages/conversation/platforms/aionrs/AionrsModelSelector.tsx:38— AionrsModelSelector.AionrsModelSelector has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 9, ternaries 6 (8 pts), if/else 4 (5 pts), loops 1 (nesting depth added 3). Of this number, 18 points are the body's own statements and 5 belong to 3 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.
index.ConversationTitleMinimap (cognitive 23) packages/desktop/src/renderer/pages/conversation/components/ConversationTitleMinimap/index.tsx:19— index.ConversationTitleMinimap has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 10, ternaries 6 (7 pts), if/else 6 (nesting depth added 1). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 50, 163, 95, …). 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.
QuickActionButtons.QuickActionButtons (cognitive 23) packages/desktop/src/renderer/pages/guid/components/QuickActionButtons.tsx:29— QuickActionButtons.QuickActionButtons has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 9 (16 pts), if/else 4 (5 pts), boolean chains 1, error handling 1 (nesting depth added 8). Of this number, 12 points are the body's own statements and 11 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.
mcpJsonImport.parseMcpJsonImport (cognitive 23) packages/desktop/src/renderer/pages/settings/ToolsSettings/mcpJsonImport.ts:140— mcpJsonImport.parseMcpJsonImport has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 3 (4 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TeamActivityView.TeamActivityView (cognitive 23) packages/desktop/src/renderer/pages/team/activity/TeamActivityView.tsx:37— TeamActivityView.TeamActivityView has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10, boolean chains 8, ternaries 4 (5 pts) (nesting depth added 1). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 70, 82, 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.
atFileQuery.getActiveAtFileQuery (cognitive 23) packages/desktop/src/renderer/utils/chat/atFileQuery.ts:61— atFileQuery.getActiveAtFileQuery has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 5, ternaries 1 (3 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.
check-i18n.checkEmptyTranslations (cognitive 23) REDACTED:235— check-i18n.checkEmptyTranslations has cognitive complexity 23 (threshold 15). Drivers by points: if/else 3 (11 pts), ternaries 1 (5 pts), error handling 1 (4 pts), loops 2 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OpenAI2AnthropicConverter.ensureAlternatingMessages (cognitive 22) packages/desktop/src/common/api/OpenAI2AnthropicConverter.ts:256— OpenAI2AnthropicConverter.ensureAlternatingMessages has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 3 (10 pts), if/else 6 (9 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.
DocumentConverter.parseMarkdownTables (cognitive 22) packages/desktop/src/common/chat/document/DocumentConverter.ts:167— DocumentConverter.parseMarkdownTables has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 2, loops 1 (nesting depth added 9). 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.
CollapsibleContent.CollapsibleContent (cognitive 22) packages/desktop/src/renderer/components/chat/CollapsibleContent.tsx:79— CollapsibleContent.CollapsibleContent has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5, ternaries 4 (nesting depth added 3). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 156, 101, 95, …). 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.
ThoughtDisplay.ThoughtDisplay (cognitive 22) packages/desktop/src/renderer/components/chat/ThoughtDisplay.tsx:30— ThoughtDisplay.ThoughtDisplay has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 15, if/else 7. Of this number, 15 points are the body's own statements and 7 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.
WorkspaceFolderSelect.WorkspaceFolderSelect (cognitive 22) packages/desktop/src/renderer/components/workspace/WorkspaceFolderSelect.tsx:44— WorkspaceFolderSelect.WorkspaceFolderSelect has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 8, if/else 7, ternaries 7. Most of this is not in the body itself: 9 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 61, a function literal at line 86, 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.
usePreviewLauncher.usePreviewLauncher.launchPreview (cognitive 22) packages/desktop/src/renderer/hooks/file/usePreviewLauncher.ts:63— usePreviewLauncher.usePreviewLauncher.launchPreview has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 7, ternaries 3 (4 pts), error handling 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MessageToolGroup.ImageDisplay (cognitive 22) packages/desktop/src/renderer/pages/conversation/Messages/components/MessageToolGroup.tsx:230— MessageToolGroup.ImageDisplay has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6, error handling 4 (5 pts), ternaries 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 5 function literals inside it that branch (lines 269, 303, 239, …). 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.
CodeEditor.CodeEditor (cognitive 22) packages/desktop/src/renderer/pages/conversation/Preview/components/editors/CodeEditor.tsx:41— CodeEditor.CodeEditor has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12, boolean chains 5, ternaries 4 (5 pts) (nesting depth added 1). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 96, 119, 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.
ScmResourceRow.ScmResourceRow (cognitive 22) packages/desktop/src/renderer/pages/conversation/SourceControl/ScmResourceRow.tsx:133— ScmResourceRow.ScmResourceRow has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, ternaries 9 (10 pts), if/else 1 (nesting depth added 1). Of this number, 20 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
assistantDefaults.resolveGuidAssistantDefaults (cognitive 22) packages/desktop/src/renderer/pages/guid/utils/assistantDefaults.ts:12— assistantDefaults.resolveGuidAssistantDefaults has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 12 (18 pts), boolean chains 3, if/else 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JsonImportModal.shellSplit (cognitive 22) packages/desktop/src/renderer/pages/settings/components/JsonImportModal.tsx:30— JsonImportModal.shellSplit has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 3, 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.
submitFeedbackReport.submitFeedbackReport (cognitive 22) packages/desktop/src/renderer/services/feedback/submitFeedbackReport.ts:240— submitFeedbackReport.submitFeedbackReport has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 4 (8 pts), error handling 1 (nesting depth added 8). Of this number, 20 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.
index.runStart (cognitive 22) REDACTED:133— index.runStart has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (21 pts), error handling 1 (nesting depth added 8). Of this number, 19 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run-benchmarks.checkBundleSize (cognitive 22) REDACTED:293— run-benchmarks.checkBundleSize has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 8). Of this number, 18 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smoke-installer-failure-messagebox.main (cognitive 22) scripts/smoke-installer-failure-messagebox.js:545— smoke-installer-failure-messagebox.main has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 6 (15 pts), if/else 4, 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.
logs.collectDatedLogCandidates (cognitive 21) packages/desktop/src/process/feedback/logs.ts:97— logs.collectDatedLogCandidates has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (6 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.
migrateAssistants.migrateAssistantsToBackend (cognitive 21) packages/desktop/src/process/utils/migrateAssistants.ts:554— migrateAssistants.migrateAssistantsToBackend has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 5, error handling 2 (3 pts), boolean chains 2 (nesting depth added 3). 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.
index.Sider (cognitive 21) packages/desktop/src/renderer/components/layout/Sider/index.tsx:23— index.Sider has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10, boolean chains 6, ternaries 3 (4 pts), error handling 1 (nesting depth added 1). Most of this is not in the body itself: 6 of the 21 points are its own statements and the rest belongs to 9 function items inside it that branch (handleSettingsClick, a function literal at line 150, a function literal at line 116, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
FilePreview.FilePreview (cognitive 21) packages/desktop/src/renderer/components/media/FilePreview.tsx:37— FilePreview.FilePreview has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 6, ternaries 2 (3 pts) (nesting depth added 5). Most of this is not in the body itself: 9 of the 21 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 75, a function literal at line 53, a function literal at line 88, …). 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.
useConversationListSync.extractConfirmationId (cognitive 21) packages/desktop/src/renderer/pages/conversation/GroupedHistory/hooks/useConversationListSync.ts:146— useConversationListSync.extractConfirmationId has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 3 (7 pts), boolean chains 6 (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.
GoogleModelSelector.GoogleModelSelector (cognitive 21) packages/desktop/src/renderer/pages/conversation/platforms/gemini/GoogleModelSelector.tsx:18— GoogleModelSelector.GoogleModelSelector has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 10, ternaries 5 (7 pts), if/else 3 (4 pts) (nesting depth added 3). 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.
SkillRuleGenerator.SkillRuleGenerator (cognitive 21) packages/desktop/src/renderer/pages/conversation/components/SkillRuleGenerator.tsx:163— SkillRuleGenerator.SkillRuleGenerator has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 3, ternaries 2 (3 pts), error handling 2 (nesting depth added 4). None of this is in the body itself: all 21 points belong to 4 function items inside it that branch (a function literal at line 238, handleGenerate, a function literal at line 204, …). 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.
SettingsPageWrapper.SettingsPageWrapper (cognitive 21) packages/desktop/src/renderer/pages/settings/components/SettingsPageWrapper.tsx:94— SettingsPageWrapper.SettingsPageWrapper has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 4 (6 pts), boolean chains 2, loops 2 (nesting depth added 7). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 106, 135). 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.
PromptsSection.PromptsSection (cognitive 21) packages/desktop/src/renderer/pages/settings/AssistantSettings/editor/PromptsSection.tsx:24— PromptsSection.PromptsSection has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 8 (19 pts), boolean chains 2 (nesting depth added 11). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 77). 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.
index.AssistantSettings (cognitive 21) packages/desktop/src/renderer/pages/settings/AssistantSettings/index.tsx:39— index.AssistantSettings has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, error handling 3 (4 pts), ternaries 2 (nesting depth added 2). Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 185, 75, 74, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
SkillFileBrowser.SkillFileBrowser (cognitive 21) packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillFileBrowser.tsx:41— SkillFileBrowser.SkillFileBrowser has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 7, boolean chains 1, error handling 1 (nesting depth added 6). Of this number, 14 points are the body's own statements and 7 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.
SkillDetailPage.SkillDetailPage (cognitive 21) packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillDetailPage.tsx:74— SkillDetailPage.SkillDetailPage has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (12 pts), boolean chains 5, if/else 3, error handling 1 (nesting depth added 6). Of this number, 11 points are the body's own statements and 10 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.
AddPlatformModal.ProtocolDetectionStatus (cognitive 21) packages/desktop/src/renderer/pages/settings/components/AddPlatformModal.tsx:81— AddPlatformModal.ProtocolDetectionStatus has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 4 (11 pts), boolean chains 6, if/else 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TeamChatView.TeamChatView (cognitive 21) packages/desktop/src/renderer/pages/team/components/TeamChatView.tsx:124— TeamChatView.TeamChatView has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 8 (9 pts), boolean chains 5, if/else 4, error handling 1 (2 pts), match/switch 1 (nesting depth added 2). 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, 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.
petConfirmRenderer.document.addEventListener("keydown") (cognitive 21) packages/desktop/src/renderer/pet/petConfirmRenderer.ts:106— petConfirmRenderer.document.addEventListener("keydown") has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 5 (nesting depth added 5). 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.
modelPlatforms.getProviderLogo (cognitive 21) packages/desktop/src/renderer/utils/model/modelPlatforms.ts:312— modelPlatforms.getProviderLogo has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 5, error handling 1 (2 pts) (nesting depth added 6). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
petManager.registerIpcHandlers (cognitive 20) packages/desktop/src/process/pet/petManager.ts:365— petManager.registerIpcHandlers has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 9, ternaries 1 (2 pts) (nesting depth added 1). None of this is in the body itself: all 20 points belong to 7 function literals inside it that branch (lines 366, 421, 442, …). 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.
DiagramZoomOverlay.DiagramZoomOverlay (cognitive 20) REDACTED:89— DiagramZoomOverlay.DiagramZoomOverlay has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11, boolean chains 5, ternaries 4. Most of this is not in the body itself: 3 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 109, endPan, handlePanPointerMove, …). 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.
ContextUsageIndicator.ContextUsageIndicator (cognitive 20) packages/desktop/src/renderer/components/agent/ContextUsageIndicator.tsx:26— ContextUsageIndicator.ContextUsageIndicator has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 3, ternaries 1 (nesting depth added 5). Of this number, 16 points are the body's own statements and 4 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.
DevSettings.DevSettings (cognitive 20) packages/desktop/src/renderer/components/settings/SettingsModal/contents/SystemModalContent/DevSettings.tsx:21— DevSettings.DevSettings has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10, boolean chains 6, error handling 2, ternaries 2. Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 8 function items inside it that branch (handleToggle, a function literal at line 35, a function literal at line 40, …). 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.
useAssistantEditor.useAssistantEditor.handleEdit (cognitive 20) packages/desktop/src/renderer/hooks/assistant/useAssistantEditor.ts:227— useAssistantEditor.useAssistantEditor.handleEdit has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, ternaries 7, 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.
MessageAcpPermission.MessageAcpPermission (cognitive 20) packages/desktop/src/renderer/pages/conversation/Messages/acp/MessageAcpPermission.tsx:21— MessageAcpPermission.MessageAcpPermission has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 3 (4 pts), ternaries 4, error handling 1 (3 pts) (nesting depth added 3). Of this number, 16 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.
DiffViewer.DiffPreview (cognitive 20) REDACTED:32— DiffViewer.DiffPreview has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (7 pts), ternaries 4 (5 pts) (nesting depth added 2). Most of this is not in the body itself: 9 of the 20 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 86, handleViewModeChange, a function literal at line 41, …). 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.
ChatHistory.ChatHistory (cognitive 20) packages/desktop/src/renderer/pages/conversation/components/ChatHistory.tsx:64— ChatHistory.ChatHistory has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9, boolean chains 8, ternaries 2, error handling 1. Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to 8 function items inside it that branch (renderConversation, handleEditSave, 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.
SkillRuleGenerator.LoadRuleModal (cognitive 20) packages/desktop/src/renderer/pages/conversation/components/SkillRuleGenerator.tsx:34— SkillRuleGenerator.LoadRuleModal has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 4, ternaries 3 (4 pts), error handling 2, loops 1 (nesting depth added 4). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 5 function items inside it that branch (loadFiles::flattenFiles, loadFiles, a function literal at line 132, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
GuidInputCard.GuidInputCard (cognitive 20) packages/desktop/src/renderer/pages/guid/components/GuidInputCard.tsx:50— GuidInputCard.GuidInputCard has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 12 (14 pts), boolean chains 4, if/else 2 (nesting depth added 2). Of this number, 17 points are the body's own statements and 3 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.
chatLib.normalizeAgentStreamError (cognitive 19) packages/desktop/src/common/chat/chatLib.ts:637— chatLib.normalizeAgentStreamError has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 14, boolean chains 3, if/else 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.
backendStartupFailure.classifyIncompleteInstallation (cognitive 19) packages/desktop/src/process/startup/backendStartupFailure.ts:125— backendStartupFailure.classifyIncompleteInstallation has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 8, 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.
sentry.captureBackendStartupFailure (cognitive 19) packages/desktop/src/sentry.ts:238— sentry.captureBackendStartupFailure has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (14 pts), ternaries 2 (3 pts), error handling 1, loops 1 (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 one function literal inside it that branches (line 252). 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.
utils.copyFilesToDirectory (cognitive 19) packages/desktop/src/process/utils/utils.ts:376— utils.copyFilesToDirectory has cognitive complexity 19 (threshold 15). Drivers by points: error handling 3 (7 pts), if/else 4 (7 pts), ternaries 2 (3 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.
migrateAssistants.collectBuiltinAgentIdOverrides (cognitive 19) packages/desktop/src/process/utils/migrateAssistants.ts:299— migrateAssistants.collectBuiltinAgentIdOverrides has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 2 (4 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.
useUpdateNotificationController.useUpdateNotificationController (cognitive 19) packages/desktop/src/renderer/components/settings/useUpdateNotificationController.ts:67— useUpdateNotificationController.useUpdateNotificationController has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 8, match/switch 1 (nesting depth added 2). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 271, 445, 209, …). 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.
useAcpConfigOptions.useAcpConfigOptions (cognitive 19) packages/desktop/src/renderer/hooks/agent/useAcpConfigOptions.ts:263— useAcpConfigOptions.useAcpConfigOptions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 4 (5 pts), boolean chains 4 (nesting depth added 3). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 409, 402, 407). 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.
hooks.classifyPersistedSendFailure (cognitive 19) packages/desktop/src/renderer/pages/conversation/Messages/hooks.ts:565— hooks.classifyPersistedSendFailure has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, ternaries 4 (5 pts), boolean chains 4 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ExtensionSettingsPage.ExtensionSettingsPage (cognitive 19) REDACTED:23— ExtensionSettingsPage.ExtensionSettingsPage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, boolean chains 8, error handling 1. Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 54, 81, 31, …). 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.
atFileQuery.getAllAtFileQueries (cognitive 19) packages/desktop/src/renderer/utils/chat/atFileQuery.ts:120— atFileQuery.getAllAtFileQueries has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
diffUtils.parseDiff (cognitive 19) packages/desktop/src/renderer/utils/file/diffUtils.ts:114— diffUtils.parseDiff has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 6, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run-benchmarks.renderStartupHtml (cognitive 19) REDACTED:522— run-benchmarks.renderStartupHtml has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 9 (11 pts), boolean chains 4, if/else 4 (nesting depth added 2). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 2 function items inside it that branch (pushMemRow, a function literal at line 523). 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.
webui.main (cognitive 19) REDACTED:202— webui.main has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 pts), error handling 2 (nesting depth added 7). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ToolsModalContent.ModalMcpManagementSection (cognitive 18) packages/desktop/src/renderer/components/settings/SettingsModal/contents/ToolsModalContent.tsx:54— ToolsModalContent.ModalMcpManagementSection has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 7, ternaries 2. Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 98, 132, 207, …). 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.
useConversationExport.useConversationExport.handleKeyDown (cognitive 18) packages/desktop/src/renderer/hooks/file/useConversationExport.tsx:286— useConversationExport.useConversationExport.handleKeyDown has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
useConversationListSync.initializeConversationListSyncStore (cognitive 18) packages/desktop/src/renderer/pages/conversation/GroupedHistory/hooks/useConversationListSync.ts:583— useConversationListSync.initializeConversationListSyncStore has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 3 (nesting depth added 2). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 608, 602, 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.
useConversations.useConversations (cognitive 18) packages/desktop/src/renderer/pages/conversation/GroupedHistory/hooks/useConversations.ts:56— useConversations.useConversations has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, ternaries 2 (3 pts), boolean chains 2, error handling 2 (nesting depth added 1). None of this is in the body itself: all 18 points belong to 11 function literals inside it that branch (lines 98, 168, 176, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
minimapUtils.buildTurnPreview (cognitive 18) packages/desktop/src/renderer/pages/conversation/components/ConversationTitleMinimap/minimapUtils.ts:160— minimapUtils.buildTurnPreview has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 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.
OfficialAssistantsGrid.OfficialAssistantsGrid (cognitive 18) packages/desktop/src/renderer/pages/settings/AssistantSettings/home/OfficialAssistantsGrid.tsx:33— OfficialAssistantsGrid.OfficialAssistantsGrid has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 11 (14 pts), boolean chains 2, if/else 2 (nesting depth added 3). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 103, 51, 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.
useTeamActivityFeed.useTeamActivityFeed (cognitive 18) packages/desktop/src/renderer/pages/team/activity/useTeamActivityFeed.ts:45— useTeamActivityFeed.useTeamActivityFeed has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9, boolean chains 4, ternaries 3, loops 2. Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 9 function literals inside it that branch (lines 151, 159, 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.
TeamPage.TeamAgentActions (cognitive 18) packages/desktop/src/renderer/pages/team/TeamPage.tsx:231— TeamPage.TeamAgentActions has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, if/else 7, error handling 2, ternaries 2. Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 274, 248, 266, …). 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.
smoke-installer-self-lock.main (cognitive 18) scripts/smoke-installer-self-lock.js:65— smoke-installer-self-lock.main has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 7, ternaries 1 (2 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.
OpenAI2AnthropicConverter.convertRequest (cognitive 17) packages/desktop/src/common/api/OpenAI2AnthropicConverter.ts:87— OpenAI2AnthropicConverter.convertRequest has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 7, 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.
OpenAI2GeminiConverter.convertResponse (cognitive 17) packages/desktop/src/common/api/OpenAI2GeminiConverter.ts:191— OpenAI2GeminiConverter.convertResponse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 6, loops 1 (2 pts), ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
backendStartupFailure.classifyBackendStartupFailure (cognitive 17) packages/desktop/src/process/startup/backendStartupFailure.ts:287— backendStartupFailure.classifyBackendStartupFailure has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, boolean chains 3, 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.
utils.copyDirectoryRecursively (cognitive 17) packages/desktop/src/process/utils/utils.ts:287— utils.copyDirectoryRecursively has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 2, boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
index.resolveDebugBackendStartupFailure (cognitive 17) packages/desktop/src/index.ts:399— index.resolveDebugBackendStartupFailure has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, ternaries 3 (6 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.
index.SendBox::sendMessageHandler (cognitive 17) packages/desktop/src/renderer/components/chat/SendBox/index.tsx:1548— index.SendBox::sendMessageHandler has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5 (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. This shape REPEATS in the file: one other method here (index.SendBox) 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.
useSiderTeamRunning.useSiderTeamRunning (cognitive 17) packages/desktop/src/renderer/components/layout/Sider/useSiderTeamRunning.ts:62— useSiderTeamRunning.useSiderTeamRunning has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 4, boolean chains 2, error handling 1 (nesting depth added 2). None of this is in the body itself: all 17 points belong to 5 function literals inside it that branch (lines 137, 76, 112, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
HorizontalFileList.HorizontalFileList (cognitive 17) packages/desktop/src/renderer/components/media/HorizontalFileList.tsx:19— HorizontalFileList.HorizontalFileList has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, ternaries 3 (nesting depth added 1). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 56, a function literal at line 29, 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.
AboutModalContent.AboutModalContent (cognitive 17) packages/desktop/src/renderer/components/settings/SettingsModal/contents/AboutModalContent.tsx:37— AboutModalContent.AboutModalContent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 3 function items inside it that branch (checkUpdate, a function literal at line 211, openLink). 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.
index.VoiceInputSection (cognitive 17) packages/desktop/src/renderer/components/settings/SettingsModal/contents/SystemModalContent/VoiceInputSection/index.tsx:49— index.VoiceInputSection has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 6, error handling 1, ternaries 1. Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 61, 147, 182, …). 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.
WebuiModalContent.WebuiModalContent::handleAllowRemoteChange (cognitive 17) REDACTED:301— WebuiModalContent.WebuiModalContent::handleAllowRemoteChange has cognitive complexity 17 (threshold 15). Drivers by points: error handling 4 (8 pts), if/else 5 (8 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
useConfigModelListWithImage.useConfigModelListWithImage.modelListWithImage (cognitive 17) packages/desktop/src/renderer/hooks/agent/useConfigModelListWithImage.ts:7— useConfigModelListWithImage.useConfigModelListWithImage.modelListWithImage has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (7 pts) (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 8, 23, 14, …). 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.
browserNotificationCore.createBrowserNotificationController.onStreamMessage (cognitive 17) packages/desktop/src/renderer/hooks/system/notification/browserNotificationCore.ts:107— browserNotificationCore.createBrowserNotificationController.onStreamMessage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PermissionRequestPanel.PermissionRequestPanel (cognitive 17) packages/desktop/src/renderer/pages/conversation/Messages/components/MessagePermission/PermissionRequestPanel.tsx:35— PermissionRequestPanel.PermissionRequestPanel has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, if/else 4 (5 pts), error handling 1 (nesting depth added 1). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 78). 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.
anchors.buildMessageAnchors (cognitive 17) packages/desktop/src/renderer/pages/conversation/Messages/anchorRail/anchors.ts:36— anchors.buildMessageAnchors has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MessageToolGroupSummary.ToolItemDetail (cognitive 17) packages/desktop/src/renderer/pages/conversation/Messages/components/MessageToolGroupSummary.tsx:31— MessageToolGroupSummary.ToolItemDetail has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 3, error handling 2, ternaries 2. Of this number, 11 points are the body's own statements and 6 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.
ImageViewer.ImagePreview (cognitive 17) packages/desktop/src/renderer/pages/conversation/Preview/components/viewers/ImageViewer.tsx:21— ImageViewer.ImagePreview has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 6, error handling 1, ternaries 1 (nesting depth added 1). 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 items inside it that branch (a function literal at line 30, renderStatus). 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.
PDFViewer.PDFPreview (cognitive 17) packages/desktop/src/renderer/pages/conversation/Preview/components/viewers/PDFViewer.tsx:54— PDFViewer.PDFPreview has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, boolean chains 5, error handling 2, ternaries 1 (2 pts) (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 4 function literals inside it that branch (lines 86, 72, 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.
WorkspaceOpenButton.WorkspaceOpenButton (cognitive 17) packages/desktop/src/renderer/pages/conversation/components/ChatLayout/WorkspaceOpenButton.tsx:49— WorkspaceOpenButton.WorkspaceOpenButton has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7, boolean chains 4, ternaries 3, error handling 2, match/switch 1. Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 92, 184, 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.
CronJobManager.CronJobManager (cognitive 17) packages/desktop/src/renderer/pages/cron/components/CronJobManager.tsx:30— CronJobManager.CronJobManager has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (8 pts), if/else 7, boolean chains 2 (nesting depth added 2). Of this number, 12 points are the body's own statements and 5 belong to 5 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.
AgentHubModal.AgentHubModal (cognitive 17) packages/desktop/src/renderer/pages/settings/AgentSettings/AgentHubModal.tsx:19— AgentHubModal.AgentHubModal has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (15 pts), boolean chains 1, match/switch 1 (nesting depth added 10). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 131, renderActionBtn). 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.
FileService.uploadFileViaHttp (cognitive 17) packages/desktop/src/renderer/services/FileService.ts:32— FileService.uploadFileViaHttp has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 3, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 88, 48, 73, …). 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.
httpBridge.httpRequest (cognitive 16) packages/desktop/src/common/adapter/httpBridge.ts:220— httpBridge.httpRequest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 2, 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.
configMigration.migrateConfigStorage (cognitive 16) packages/desktop/src/common/config/configMigration.ts:84— configMigration.migrateConfigStorage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (3 pts), boolean chains 1, error handling 1, ternaries 1 (nesting depth added 5). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
index.getPlatformServices (cognitive 16) packages/desktop/src/common/platform/index.ts:20— index.getPlatformServices has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 1 (4 pts) (nesting depth added 9). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
backendInstallDiagnostics.collectBackendInstallDiagnostics (cognitive 16) packages/desktop/src/process/startup/backendInstallDiagnostics.ts:135— backendInstallDiagnostics.collectBackendInstallDiagnostics has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, ternaries 3, 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.
sentry.collectEventSearchText (cognitive 16) packages/desktop/src/sentry.ts:62— sentry.collectEventSearchText has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (3 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.
PetIdleTicker.tick (cognitive 16) packages/desktop/src/process/pet/petIdleTicker.ts:71— PetIdleTicker.tick has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 5, ternaries 1 (2 pts), error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
migrateAssistants.fetchAgentIdByRuntimeKey (cognitive 16) packages/desktop/src/process/utils/migrateAssistants.ts:398— migrateAssistants.fetchAgentIdByRuntimeKey has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 3 (6 pts), error handling 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EmojiPicker.EmojiPicker (cognitive 16) packages/desktop/src/renderer/components/chat/EmojiPicker.tsx:450— EmojiPicker.EmojiPicker has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8 (9 pts), if/else 3, boolean chains 2, 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 7 function literals inside it that branch (lines 463, 472, 520, …). 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.
useAcpModelInfo.useAcpModelInfo (cognitive 16) packages/desktop/src/renderer/hooks/agent/useAcpModelInfo.ts:68— useAcpModelInfo.useAcpModelInfo has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 5, ternaries 2 (4 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 5 function literals inside it that branch (lines 120, 112, 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.
MessageAcpTerminalOutput.MessageAcpTerminalOutput (cognitive 16) packages/desktop/src/renderer/pages/conversation/Messages/acp/MessageAcpTerminalOutput.tsx:19— MessageAcpTerminalOutput.MessageAcpTerminalOutput has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, ternaries 3 (6 pts), if/else 3, error handling 1 (nesting depth added 3). Of this number, 11 points are the body's own statements and 5 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.
MonitorClient.handleFrame (cognitive 16) packages/desktop/src/renderer/pages/conversation/explorer/monitorClient.ts:235— MonitorClient.handleFrame has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
layoutCalc.calcLayoutMetrics (cognitive 16) packages/desktop/src/renderer/pages/conversation/utils/layoutCalc.ts:50— layoutCalc.calcLayoutMetrics has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 9 (11 pts), boolean chains 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
CssThemeModal.CssThemeModal (cognitive 16) packages/desktop/src/renderer/pages/settings/AppearanceSettings/CssThemeModal.tsx:49— CssThemeModal.CssThemeModal has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 6, ternaries 2, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 80, 63, 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.
assistantUtils.buildAssistantEditorBackends (cognitive 16) packages/desktop/src/renderer/pages/settings/AssistantSettings/assistantUtils.ts:193— assistantUtils.buildAssistantEditorBackends has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 3 (6 pts), loops 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
McpServerHeader.getStatusPopoverContent (cognitive 16) packages/desktop/src/renderer/pages/settings/ToolsSettings/McpServerHeader.tsx:60— McpServerHeader.getStatusPopoverContent has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, ternaries 3 (4 pts), if/else 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.
McpServerHeader.getStatusText (cognitive 16) packages/desktop/src/renderer/pages/settings/ToolsSettings/McpServerHeader.tsx:107— McpServerHeader.getStatusText has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 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.
TeamTabs.TeamTabs (cognitive 16) packages/desktop/src/renderer/pages/team/components/TeamTabs.tsx:238— TeamTabs.TeamTabs has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, ternaries 4 (5 pts), if/else 4 (nesting depth added 1). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 328, 268, 296, …). 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.
TeamChatEmptyState.TeamChatEmptyState (cognitive 16) packages/desktop/src/renderer/pages/team/components/TeamChatEmptyState.tsx:61— TeamChatEmptyState.TeamChatEmptyState has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 3, ternaries 3 (nesting depth added 2). Of this number, 8 points are the body's own statements and 8 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.
MessageCard.MessageCard (cognitive 16) packages/desktop/src/renderer/pages/team/activity/MessageCard.tsx:34— MessageCard.MessageCard has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8 (9 pts), boolean chains 7 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
check-i18n.checkDirectoryStructure (cognitive 16) REDACTED:101— check-i18n.checkDirectoryStructure has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (4 pts), error handling 1 (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.
smoke-installer-rstrtmgr-ui.main (cognitive 16) scripts/smoke-installer-rstrtmgr-ui.js:75— smoke-installer-rstrtmgr-ui.main has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
MethodTooLong: PasteServiceClass.handlePaste packages/desktop/src/renderer/services/PasteService.ts:159— MethodTooLong — handlePaste runs 141 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 41 over it, 1.41× 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.
TooManyMethods: AutoUpdaterService packages/desktop/src/process/services/autoUpdaterService.ts:102— TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Off the main sequence: @aionui/web-host — @aionui/web-host: 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.
IC1 · Incompleteness & stubs· Guard cannot change the result · ×1
Guard cannot change the result — returns what the code already falls through to packages/desktop/src/renderer/components/settings/SettingsModal/index.tsx:317— The guard above `return null;` also returns `null`, so no input can make it matter. Implement the distinction that was intended, or delete the guard.
IC1 · Incompleteness & stubs· Empty method body · ×1
Empty method body — does nothing with its inputs packages/desktop/src/renderer/hooks/context/AuthContext.tsx:7— `clearCookie` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
P12 · CI test-gate honesty· Test failure does not fail the CI gate · ×1
Test failure does not fail the CI gate REDACTED:171— `continue-on-error: true` lets the step or job that runs `bun run test:coverage` fail without failing the pipeline — the suite can go red and the change still merges. Remove it from the test step, or quarantine the specific failing tests instead.
Outbound HTTP without resilience packages/web-host/src/backend-launcher.ts:952— `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.
Duplication concentrated across 4 sibling directories (65 clone groups) packages/desktop/src/renderer/components/settings/SettingsModal/contents/ToolsModalContent.tsx:68— 65 duplicated blocks under packages/desktop/src/renderer/ have copies in at least two of the sibling directories components, hooks, pages, utils — 36 of them are reported below, and 29 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 65 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 65 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 65 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 (29 clone groups) packages/desktop/src/renderer/pages/conversation/components/SingleChatEmptyState.tsx:34— 29 duplicated blocks under packages/desktop/src/renderer/pages/ have copies in at least two of the sibling directories conversation, cron, guid, settings, team — 13 of them are reported below, and 16 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 29 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 29 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 29 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 (18 clone groups) packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx:615— 18 duplicated blocks under packages/desktop/src/renderer/pages/conversation/platforms/ have copies in at least two of the sibling directories acp, aionrs, gemini — 17 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 18 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 18 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 18 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 9 sibling directories (12 clone groups) packages/desktop/src/renderer/pages/conversation/GroupedHistory/hooks/useConversationActions.ts:160— 12 duplicated blocks under packages/desktop/src/renderer/pages/conversation/ have copies in at least two of the sibling directories GroupedHistory, Messages, Preview, SourceControl, components, explorer (+3 more sibling(s) not listed) — 6 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 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 3 sibling directories (11 clone groups) packages/desktop/src/common/adapter/ipcBridge.ts:973— 11 duplicated blocks under packages/desktop/src/ have copies in at least two of the sibling directories common, process, renderer — 4 of them are reported below, and 7 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 11 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 11 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 11 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 (7 clone groups) packages/desktop/src/renderer/pages/settings/AgentSettings/BoundAssistants.tsx:60— 7 duplicated blocks under packages/desktop/src/renderer/pages/settings/ have copies in at least two of the sibling directories AgentSettings, AssistantSettings, SkillsSettings — 5 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 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 7 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 4 sibling directories (5 clone groups) packages/desktop/src/renderer/components/chat/MobileActionSheet/useAttachEntry.tsx:48— 5 duplicated blocks under packages/desktop/src/renderer/components/ have copies in at least two of the sibling directories agent, chat, media, 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.
Wholesale file copy (366 identical lines × 3 files) packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DiscordConfigForm.tsx:7— packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DiscordConfigForm.tsx:7 · packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/SlackConfigForm.tsx:7 · packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/TelegramConfigForm.tsx:7 — these 3 files are line-for-line copies of one another — 366 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 (356 matched lines × 2 locations) · ×1
Duplicated block with local edits (356 matched lines × 2 locations) packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.tsx:29— packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.tsx:29 · packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx:29 — the two spans are one implementation copied and then locally edited — 2438 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 (255 matched lines × 2 locations) · ×1
Duplicated block with local edits (255 matched lines × 2 locations) packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx:615— packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx:615 · packages/desktop/src/renderer/pages/conversation/platforms/aionrs/AionrsSendBox.tsx:567 — the two spans are one implementation copied and then locally edited — 1423 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) packages/desktop/src/renderer/pages/settings/components/AddPlatformModal.tsx:402— packages/desktop/src/renderer/pages/settings/components/AddPlatformModal.tsx:402 · packages/desktop/src/renderer/pages/settings/components/EditModeModal.tsx:130 — the two spans are one implementation copied and then locally edited — 1104 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 (109 matched lines × 2 locations) · ×1
Duplicated block with local edits (109 matched lines × 2 locations) packages/desktop/src/renderer/components/settings/SettingsModal/contents/ToolsModalContent.tsx:68— packages/desktop/src/renderer/components/settings/SettingsModal/contents/ToolsModalContent.tsx:68 · packages/desktop/src/renderer/pages/settings/ToolsSettings/McpManagement.tsx:31 — 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 (95 lines × 2 locations) packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/SlackConfigForm.tsx:63— packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/SlackConfigForm.tsx:63 · packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WecomConfigForm.tsx:70 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication· Duplicated block with local edits (88 matched lines × 2 locations) · ×1
Duplicated block with local edits (88 matched lines × 2 locations) scripts/smoke-installer-rstrtmgr-ui.js:8— scripts/smoke-installer-rstrtmgr-ui.js:8 · scripts/smoke-installer-self-lock.js:8 — the two spans are one implementation copied and then locally edited — 701 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 (80 lines × 2 locations) packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/TelegramConfigForm.tsx:389— packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/TelegramConfigForm.tsx:389 · packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WeixinConfigForm.tsx:389 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication· Duplicated block with local edits (79 matched lines × 2 locations) · ×1
Duplicated block with local edits (79 matched lines × 2 locations) packages/desktop/src/renderer/pages/settings/AssistantSettings/home/MyAssistantCard.tsx:40— packages/desktop/src/renderer/pages/settings/AssistantSettings/home/MyAssistantCard.tsx:40 · packages/desktop/src/renderer/pages/settings/AssistantSettings/home/OfficialAssistantsGrid.tsx:104 — the two spans are one implementation copied and then locally edited — 523 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 (78 matched lines × 2 locations) · ×1
Duplicated block with local edits (78 matched lines × 2 locations) packages/desktop/src/renderer/pages/conversation/components/SingleChatEmptyState.tsx:34— packages/desktop/src/renderer/pages/conversation/components/SingleChatEmptyState.tsx:34 · packages/desktop/src/renderer/pages/team/components/TeamChatEmptyState.tsx:47 — the two spans are one implementation copied and then locally edited — 423 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 (77 lines × 2 locations) packages/desktop/src/renderer/components/Markdown/MermaidBlock.tsx:219— packages/desktop/src/renderer/components/Markdown/MermaidBlock.tsx:219 · REDACTED:317 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (75 lines × 2 locations) packages/desktop/src/renderer/components/Markdown/MermaidBlock.tsx:308— packages/desktop/src/renderer/components/Markdown/MermaidBlock.tsx:308 · REDACTED:406 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
Duplicated block (69 lines × 2 locations) packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx:433— packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx:433 · packages/desktop/src/renderer/pages/conversation/platforms/aionrs/AionrsSendBox.tsx:381 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (62 lines × 4 locations) packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.tsx:616— packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.tsx:616 · packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx:736 · packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/TelegramConfigForm.tsx:525 · packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WecomConfigForm.tsx:583 — the 4 copies are spread across 4 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (62 lines × 3 locations) packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DiscordConfigForm.tsx:521— packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DiscordConfigForm.tsx:521 · packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/SlackConfigForm.tsx:582 · packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WeixinConfigForm.tsx:513 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (62 matched lines × 2 locations) · ×1
Duplicated block with local edits (62 matched lines × 2 locations) packages/desktop/src/renderer/pages/conversation/platforms/acp/useAcpMessage.ts:107— packages/desktop/src/renderer/pages/conversation/platforms/acp/useAcpMessage.ts:107 · packages/desktop/src/renderer/pages/conversation/platforms/aionrs/useAionrsMessage.ts:38 — the two spans are one implementation copied and then locally edited — 393 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 (61 matched lines × 2 locations) · ×1
Duplicated block with local edits (61 matched lines × 2 locations) packages/desktop/src/renderer/pages/conversation/platforms/aionrs/AionrsModelSelector.tsx:92— packages/desktop/src/renderer/pages/conversation/platforms/aionrs/AionrsModelSelector.tsx:92 · packages/desktop/src/renderer/pages/guid/components/GuidModelSelector.tsx:122 — the two spans are one implementation copied and then locally edited — 340 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 (57 lines × 2 locations) packages/desktop/src/renderer/components/layout/Sider/SiderNav/SiderAssistantEntry.tsx:22— packages/desktop/src/renderer/components/layout/Sider/SiderNav/SiderAssistantEntry.tsx:22 · packages/desktop/src/renderer/components/layout/Sider/SiderNav/SiderScheduledEntry.tsx:22 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (52 lines × 2 locations) packages/desktop/src/renderer/pages/settings/AssistantSettings/editor/DefaultsSection.tsx:266— packages/desktop/src/renderer/pages/settings/AssistantSettings/editor/DefaultsSection.tsx:266 · packages/desktop/src/renderer/pages/settings/AssistantSettings/editor/DefaultsSection.tsx:383 — 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 (48 lines × 2 locations) packages/desktop/src/renderer/components/Markdown/MermaidBlock.tsx:83— packages/desktop/src/renderer/components/Markdown/MermaidBlock.tsx:83 · REDACTED:256 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (48 matched lines × 2 locations) · ×1
Duplicated block with local edits (48 matched lines × 2 locations) packages/desktop/src/renderer/components/chat/AtFileMenu/index.tsx:7— packages/desktop/src/renderer/components/chat/AtFileMenu/index.tsx:7 · packages/desktop/src/renderer/components/chat/AtSessionMenu/index.tsx:13 — the two spans are one implementation copied and then locally edited — 258 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 (46 lines × 3 locations) packages/desktop/src/renderer/hooks/ui/font/useFontFamilies.ts:44— packages/desktop/src/renderer/hooks/ui/font/useFontFamilies.ts:44 · packages/desktop/src/renderer/hooks/ui/font/useFontSizes.ts:44 · packages/desktop/src/renderer/hooks/ui/font/useFontWeights.ts:44 — the 3 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
R10 · Code Duplication· Duplicated block with local edits (45 matched lines × 2 locations) · ×1
Duplicated block with local edits (45 matched lines × 2 locations) REDACTED:99— REDACTED:99 · REDACTED:277 — the two spans are one implementation copied and then locally edited — 255 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (44 matched lines × 2 locations) · ×1
Duplicated block with local edits (44 matched lines × 2 locations) packages/desktop/src/renderer/pages/settings/AssistantSettings/home/MyAssistantsList.tsx:66— packages/desktop/src/renderer/pages/settings/AssistantSettings/home/MyAssistantsList.tsx:66 · packages/desktop/src/renderer/pages/settings/AssistantSettings/home/OfficialAssistantsGrid.tsx:46 — the two spans are one implementation copied and then locally edited — 248 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 (43 matched lines × 2 locations) · ×1
Duplicated block with local edits (43 matched lines × 2 locations) packages/desktop/src/renderer/pages/conversation/Messages/acp/MessageAcpToolCall.tsx:115— packages/desktop/src/renderer/pages/conversation/Messages/acp/MessageAcpToolCall.tsx:115 · packages/desktop/src/renderer/pages/conversation/Messages/components/MessageToolGroupSummary.tsx:38 — the two spans are one implementation copied and then locally edited — 221 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 (40 lines × 2 locations) packages/desktop/src/renderer/pages/conversation/platforms/useConversationCommandQueue.ts:916— packages/desktop/src/renderer/pages/conversation/platforms/useConversationCommandQueue.ts:916 · packages/desktop/src/renderer/pages/conversation/platforms/useConversationCommandQueue.ts:1111 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (38 lines × 2 locations) packages/desktop/src/process/services/database/migrations.ts:1260— packages/desktop/src/process/services/database/migrations.ts:1260 · packages/desktop/src/process/services/database/migrations.ts:1318 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication· Duplicated block with local edits (38 matched lines × 2 locations) · ×1
Duplicated block with local edits (38 matched lines × 2 locations) packages/desktop/src/renderer/pages/conversation/Messages/components/MessageToolCall.tsx:74— packages/desktop/src/renderer/pages/conversation/Messages/components/MessageToolCall.tsx:74 · packages/desktop/src/renderer/pages/conversation/Messages/components/MessageToolGroupSummary.tsx:80 — the two spans are one implementation copied and then locally edited — 266 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 (36 lines × 2 locations) packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx:67— packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx:67 · packages/desktop/src/renderer/pages/conversation/platforms/aionrs/AionrsSendBox.tsx:77 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Complex function (anonymous) (cyclomatic 101, cognitive 87) packages/desktop/src/renderer/components/chat/SendBox/index.tsx:300— (anonymous) has cyclomatic complexity 101 and cognitive complexity 87; 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 composeMessageWithIndex (cyclomatic 69, cognitive 109) packages/desktop/src/renderer/pages/conversation/Messages/hooks.ts:140— composeMessageWithIndex has cyclomatic complexity 69 and cognitive complexity 109; 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 64, cognitive 71) packages/desktop/src/renderer/pages/conversation/platforms/acp/useAcpMessage.ts:255— (anonymous) has cyclomatic complexity 64 and cognitive complexity 71; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function LarkConfigForm (cyclomatic 60, cognitive 49) packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx:69— LarkConfigForm 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 (anonymous) (cyclomatic 55, cognitive 48) packages/desktop/src/renderer/components/settings/updateNotificationState.ts:244— (anonymous) has cyclomatic complexity 55 and cognitive complexity 48; 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 DingTalkConfigForm (cyclomatic 55, cognitive 44) packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.tsx:69— DingTalkConfigForm has cyclomatic complexity 55 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function WecomConfigForm (cyclomatic 54, cognitive 44) packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WecomConfigForm.tsx:70— WecomConfigForm has cyclomatic complexity 54 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 53, cognitive 41) packages/desktop/src/common/chat/chatLib.ts:689— (anonymous) has cyclomatic complexity 53 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 handlePaste (cyclomatic 52, cognitive 170) packages/desktop/src/renderer/services/PasteService.ts:159— handlePaste has cyclomatic complexity 52 and cognitive complexity 170; 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 AgentModeSelector (cyclomatic 51, cognitive 56) packages/desktop/src/renderer/components/agent/AgentModeSelector.tsx:81— AgentModeSelector has cyclomatic complexity 51 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 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 47, cognitive 57) packages/desktop/src/renderer/pages/conversation/platforms/aionrs/useAionrsMessage.ts:206— (anonymous) has cyclomatic complexity 47 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 (anonymous) (cyclomatic 44, cognitive 40) packages/desktop/src/renderer/pages/settings/components/AddPlatformModal.tsx:207— (anonymous) 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 ChatLayout (cyclomatic 42, cognitive 34) packages/desktop/src/renderer/pages/conversation/components/ChatLayout/index.tsx:66— ChatLayout has cyclomatic complexity 42 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 MessageTips (cyclomatic 41, cognitive 60) packages/desktop/src/renderer/pages/conversation/Messages/components/MessageTips.tsx:64— MessageTips has cyclomatic complexity 41 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 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 MessageText (cyclomatic 41, cognitive 36) packages/desktop/src/renderer/pages/conversation/Messages/components/MessageText.tsx:106— MessageText has cyclomatic complexity 41 and cognitive complexity 36; 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 afterPack (cyclomatic 40, cognitive 81) scripts/afterPack.js:40— afterPack has cyclomatic complexity 40 and cognitive complexity 81; 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 39, cognitive 25) packages/desktop/src/common/adapter/ipcBridge.ts:450— (anonymous) has cyclomatic complexity 39 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 PreviewToolbar (cyclomatic 38, cognitive 28) packages/desktop/src/renderer/pages/conversation/Preview/components/PreviewPanel/PreviewToolbar.tsx:172— PreviewToolbar has cyclomatic complexity 38 and cognitive complexity 28; 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 37, cognitive 61) packages/desktop/src/index.ts:680— (anonymous) has cyclomatic complexity 37 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function handleSave (cyclomatic 35, cognitive 54) packages/desktop/src/renderer/hooks/assistant/useAssistantEditor.ts:374— handleSave has cyclomatic complexity 35 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.
R3 · Large Files· packages/desktop/src/common/adapter/ipcBridge.ts · ×1
packages/desktop/src/common/adapter/ipcBridge.ts: 2350 lines of code packages/desktop/src/common/adapter/ipcBridge.ts:1— packages/desktop/src/common/adapter/ipcBridge.ts has 2350 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· packages/desktop/src/renderer/components/chat/SendBox/index.tsx · ×1
packages/desktop/src/renderer/components/chat/SendBox/index.tsx: 2092 lines of code packages/desktop/src/renderer/components/chat/SendBox/index.tsx:1— packages/desktop/src/renderer/components/chat/SendBox/index.tsx has 2092 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· packages/desktop/src/renderer/pages/conversation/Preview/context/PreviewContext.tsx · ×1
packages/desktop/src/renderer/pages/conversation/Preview/context/PreviewContext.tsx: 1315 lines of code packages/desktop/src/renderer/pages/conversation/Preview/context/PreviewContext.tsx:1— packages/desktop/src/renderer/pages/conversation/Preview/context/PreviewContext.tsx has 1315 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· packages/desktop/src/process/services/database/migrations.ts · ×1
packages/desktop/src/process/services/database/migrations.ts: 1295 lines of code packages/desktop/src/process/services/database/migrations.ts:1— packages/desktop/src/process/services/database/migrations.ts has 1295 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· packages/desktop/src/renderer/pages/conversation/Preview/components/PreviewPanel/PreviewPanel.tsx · ×1
packages/desktop/src/renderer/pages/conversation/Preview/components/PreviewPanel/PreviewPanel.tsx: 1208 lines of code packages/desktop/src/renderer/pages/conversation/Preview/components/PreviewPanel/PreviewPanel.tsx:1— packages/desktop/src/renderer/pages/conversation/Preview/components/PreviewPanel/PreviewPanel.tsx has 1208 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· packages/desktop/src/index.ts · ×1
packages/desktop/src/index.ts: 1075 lines of code packages/desktop/src/index.ts:1— packages/desktop/src/index.ts has 1075 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· packages/desktop/src/renderer/pages/conversation/platforms/useConversationCommandQueue.ts · ×1
packages/desktop/src/renderer/pages/conversation/platforms/useConversationCommandQueue.ts: 1052 lines of code packages/desktop/src/renderer/pages/conversation/platforms/useConversationCommandQueue.ts:1— packages/desktop/src/renderer/pages/conversation/platforms/useConversationCommandQueue.ts has 1052 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· packages/desktop/src/common/chat/chatLib.ts · ×1
packages/desktop/src/common/chat/chatLib.ts: 1033 lines of code packages/desktop/src/common/chat/chatLib.ts:1— packages/desktop/src/common/chat/chatLib.ts has 1033 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· packages/web-host/src/backend-launcher.ts · ×1
packages/web-host/src/backend-launcher.ts: 1015 lines of code packages/web-host/src/backend-launcher.ts:1— packages/web-host/src/backend-launcher.ts has 1015 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· packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillsHubSettings.tsx · ×1
packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillsHubSettings.tsx: 987 lines of code packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillsHubSettings.tsx:1— packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillsHubSettings.tsx has 987 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· packages/desktop/src/renderer/pages/team/TeamPage.tsx · ×1
packages/desktop/src/renderer/pages/team/TeamPage.tsx: 985 lines of code packages/desktop/src/renderer/pages/team/TeamPage.tsx:1— packages/desktop/src/renderer/pages/team/TeamPage.tsx has 985 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· packages/desktop/src/renderer/pages/conversation/Messages/hooks.ts · ×1
packages/desktop/src/renderer/pages/conversation/Messages/hooks.ts: 984 lines of code packages/desktop/src/renderer/pages/conversation/Messages/hooks.ts:1— packages/desktop/src/renderer/pages/conversation/Messages/hooks.ts has 984 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· packages/desktop/src/renderer/pages/cron/ScheduledTasksPage/CreateTaskDialog.tsx · ×1
packages/desktop/src/renderer/pages/cron/ScheduledTasksPage/CreateTaskDialog.tsx: 929 lines of code packages/desktop/src/renderer/pages/cron/ScheduledTasksPage/CreateTaskDialog.tsx:1— packages/desktop/src/renderer/pages/cron/ScheduledTasksPage/CreateTaskDialog.tsx has 929 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· packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/ChannelModalContent.tsx · ×1
packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/ChannelModalContent.tsx: 909 lines of code packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/ChannelModalContent.tsx:1— packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/ChannelModalContent.tsx has 909 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· packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx · ×1
packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx: 907 lines of code packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx:1— packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx has 907 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: 881 lines of code REDACTED:1— REDACTED has 881 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· packages/desktop/src/renderer/pages/conversation/platforms/aionrs/AionrsSendBox.tsx · ×1
packages/desktop/src/renderer/pages/conversation/platforms/aionrs/AionrsSendBox.tsx: 848 lines of code packages/desktop/src/renderer/pages/conversation/platforms/aionrs/AionrsSendBox.tsx:1— packages/desktop/src/renderer/pages/conversation/platforms/aionrs/AionrsSendBox.tsx 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· packages/desktop/src/process/services/autoUpdaterService.ts · ×1
packages/desktop/src/process/services/autoUpdaterService.ts: 831 lines of code packages/desktop/src/process/services/autoUpdaterService.ts:1— packages/desktop/src/process/services/autoUpdaterService.ts has 831 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· packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx · ×1
packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx: 793 lines of code packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx:1— packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx has 793 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· packages/desktop/src/process/bridge/updateBridge.ts · ×1
packages/desktop/src/process/bridge/updateBridge.ts: 759 lines of code packages/desktop/src/process/bridge/updateBridge.ts:1— packages/desktop/src/process/bridge/updateBridge.ts has 759 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· packages/desktop/src/renderer/components/media/WebviewHost.tsx · ×1
packages/desktop/src/renderer/components/media/WebviewHost.tsx: 745 lines of code packages/desktop/src/renderer/components/media/WebviewHost.tsx:1— packages/desktop/src/renderer/components/media/WebviewHost.tsx has 745 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· packages/desktop/src/renderer/pages/conversation/Messages/MessageList.tsx · ×1
packages/desktop/src/renderer/pages/conversation/Messages/MessageList.tsx: 742 lines of code packages/desktop/src/renderer/pages/conversation/Messages/MessageList.tsx:1— packages/desktop/src/renderer/pages/conversation/Messages/MessageList.tsx has 742 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· packages/desktop/src/renderer/pages/conversation/platforms/acp/useAcpMessage.ts · ×1
packages/desktop/src/renderer/pages/conversation/platforms/acp/useAcpMessage.ts: 723 lines of code packages/desktop/src/renderer/pages/conversation/platforms/acp/useAcpMessage.ts:1— packages/desktop/src/renderer/pages/conversation/platforms/acp/useAcpMessage.ts has 723 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· packages/desktop/src/renderer/pages/settings/components/AddPlatformModal.tsx · ×1
packages/desktop/src/renderer/pages/settings/components/AddPlatformModal.tsx: 718 lines of code packages/desktop/src/renderer/pages/settings/components/AddPlatformModal.tsx:1— packages/desktop/src/renderer/pages/settings/components/AddPlatformModal.tsx has 718 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· packages/desktop/src/renderer/hooks/system/useSpeechInput.ts · ×1
packages/desktop/src/renderer/hooks/system/useSpeechInput.ts: 704 lines of code packages/desktop/src/renderer/hooks/system/useSpeechInput.ts:1— packages/desktop/src/renderer/hooks/system/useSpeechInput.ts has 704 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· packages/desktop/src/renderer/pages/conversation/SourceControl/ScmPanel.tsx · ×1
packages/desktop/src/renderer/pages/conversation/SourceControl/ScmPanel.tsx: 698 lines of code packages/desktop/src/renderer/pages/conversation/SourceControl/ScmPanel.tsx:1— packages/desktop/src/renderer/pages/conversation/SourceControl/ScmPanel.tsx has 698 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· packages/desktop/src/renderer/pages/guid/GuidPage.tsx · ×1
packages/desktop/src/renderer/pages/guid/GuidPage.tsx: 695 lines of code packages/desktop/src/renderer/pages/guid/GuidPage.tsx:1— packages/desktop/src/renderer/pages/guid/GuidPage.tsx has 695 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· packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.tsx · ×1
packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.tsx: 677 lines of code packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.tsx:1— packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.tsx has 677 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· packages/desktop/src/renderer/pages/conversation/Preview/components/renderers/HTMLRenderer.tsx · ×1
packages/desktop/src/renderer/pages/conversation/Preview/components/renderers/HTMLRenderer.tsx: 674 lines of code packages/desktop/src/renderer/pages/conversation/Preview/components/renderers/HTMLRenderer.tsx:1— packages/desktop/src/renderer/pages/conversation/Preview/components/renderers/HTMLRenderer.tsx has 674 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· packages/desktop/src/renderer/pages/conversation/GroupedHistory/hooks/useConversationListSync.ts · ×1
packages/desktop/src/renderer/pages/conversation/GroupedHistory/hooks/useConversationListSync.ts: 658 lines of code packages/desktop/src/renderer/pages/conversation/GroupedHistory/hooks/useConversationListSync.ts:1— packages/desktop/src/renderer/pages/conversation/GroupedHistory/hooks/useConversationListSync.ts has 658 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· packages/desktop/src/renderer/pages/conversation/SourceControl/scmStore.ts · ×1
packages/desktop/src/renderer/pages/conversation/SourceControl/scmStore.ts: 650 lines of code packages/desktop/src/renderer/pages/conversation/SourceControl/scmStore.ts:1— packages/desktop/src/renderer/pages/conversation/SourceControl/scmStore.ts has 650 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· packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WecomConfigForm.tsx · ×1
packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WecomConfigForm.tsx: 646 lines of code packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WecomConfigForm.tsx:1— packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WecomConfigForm.tsx has 646 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· packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/SlackConfigForm.tsx · ×1
packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/SlackConfigForm.tsx: 644 lines of code packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/SlackConfigForm.tsx:1— packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/SlackConfigForm.tsx has 644 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· packages/desktop/src/renderer/components/settings/SettingsModal/contents/ModelModalContent.tsx · ×1
packages/desktop/src/renderer/components/settings/SettingsModal/contents/ModelModalContent.tsx: 643 lines of code packages/desktop/src/renderer/components/settings/SettingsModal/contents/ModelModalContent.tsx:1— packages/desktop/src/renderer/components/settings/SettingsModal/contents/ModelModalContent.tsx has 643 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· packages/desktop/src/common/config/storage.ts · ×1
packages/desktop/src/common/config/storage.ts: 640 lines of code packages/desktop/src/common/config/storage.ts:1— packages/desktop/src/common/config/storage.ts has 640 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· packages/desktop/src/renderer/pages/guid/components/GuidActionRow.tsx · ×1
packages/desktop/src/renderer/pages/guid/components/GuidActionRow.tsx: 640 lines of code packages/desktop/src/renderer/pages/guid/components/GuidActionRow.tsx:1— packages/desktop/src/renderer/pages/guid/components/GuidActionRow.tsx has 640 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· packages/desktop/src/renderer/pages/conversation/runtime/conversationRuntimeViewStore.ts · ×1
packages/desktop/src/renderer/pages/conversation/runtime/conversationRuntimeViewStore.ts: 634 lines of code packages/desktop/src/renderer/pages/conversation/runtime/conversationRuntimeViewStore.ts:1— packages/desktop/src/renderer/pages/conversation/runtime/conversationRuntimeViewStore.ts has 634 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· packages/desktop/src/renderer/pages/conversation/explorer/ExplorerContainer.tsx · ×1
packages/desktop/src/renderer/pages/conversation/explorer/ExplorerContainer.tsx: 628 lines of code packages/desktop/src/renderer/pages/conversation/explorer/ExplorerContainer.tsx:1— packages/desktop/src/renderer/pages/conversation/explorer/ExplorerContainer.tsx has 628 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/desktop/src/renderer/components/chat/EmojiPicker.tsx · ×1
packages/desktop/src/renderer/components/chat/EmojiPicker.tsx: 627 lines of code packages/desktop/src/renderer/components/chat/EmojiPicker.tsx:1— packages/desktop/src/renderer/components/chat/EmojiPicker.tsx has 627 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· packages/desktop/src/process/utils/migrateAssistants.ts · ×1
packages/desktop/src/process/utils/migrateAssistants.ts: 615 lines of code packages/desktop/src/process/utils/migrateAssistants.ts:1— packages/desktop/src/process/utils/migrateAssistants.ts has 615 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
Dead file (~424 LoC) packages/desktop/src/renderer/components/settings/SettingsModal/index.tsx— no import path from any entry point (80 application, 30 tooling, 685 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/desktop/src/renderer/components/settings/SettingsModal/useSettingsModal.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 (~401 LoC) REDACTED— no import path from any entry point (80 application, 30 tooling, 685 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (scripts/afterPack.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 (~318 LoC) packages/desktop/src/renderer/pages/conversation/components/ChatHistory.tsx— no import path from any entry point (80 application, 30 tooling, 685 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 (~269 LoC) packages/desktop/src/common/chat/navigation/NavigationInterceptor.ts— no import path from any entry point (80 application, 30 tooling, 685 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/desktop/src/common/chat/navigation/index.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~226 LoC) scripts/afterPack.js— no import path from any entry point (80 application, 30 tooling, 685 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 (~216 LoC) REDACTED— no import path from any entry point (80 application, 30 tooling, 685 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 (~181 LoC) packages/desktop/src/renderer/pages/settings/AgentSettings/AgentHubModal.tsx— no import path from any entry point (80 application, 30 tooling, 685 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 (~159 LoC) packages/desktop/src/common/update/models/VersionInfo.ts— no import path from any entry point (80 application, 30 tooling, 685 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 (~142 LoC) packages/desktop/src/common/chat/atCommandParser.ts— no import path from any entry point (80 application, 30 tooling, 685 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 (~126 LoC) packages/desktop/src/renderer/components/agent/ChannelConflictWarning.tsx— no import path from any entry point (80 application, 30 tooling, 685 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 (~120 LoC) packages/desktop/src/renderer/components/layout/Sider/useStoredSiderOrder.ts— no import path from any entry point (80 application, 30 tooling, 685 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 (~115 LoC) packages/desktop/src/renderer/pages/conversation/GroupedHistory/utils/exportHelpers.ts— no import path from any entry point (80 application, 30 tooling, 685 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 (~89 LoC) packages/desktop/src/renderer/hooks/chat/useInitialMessage.ts— no import path from any entry point (80 application, 30 tooling, 685 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 (~88 LoC) packages/desktop/src/renderer/utils/model/errorDetection.ts— no import path from any entry point (80 application, 30 tooling, 685 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 (~86 LoC) packages/desktop/src/renderer/components/ShimmerText.tsx— no import path from any entry point (80 application, 30 tooling, 685 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 (~82 LoC) packages/desktop/src/common/chat/approval/ApprovalStore.ts— no import path from any entry point (80 application, 30 tooling, 685 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/desktop/src/common/chat/approval/index.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~80 LoC) packages/desktop/src/renderer/components/settings/SettingsModal/useSettingsModal.tsx— no import path from any entry point (80 application, 30 tooling, 685 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 (~79 LoC) packages/desktop/src/renderer/pages/conversation/components/ConversationSkillsIndicator.tsx— no import path from any entry point (80 application, 30 tooling, 685 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~62 LoC) packages/desktop/src/renderer/hooks/file/useWorkspaceSelector.ts— no import path from any entry point (80 application, 30 tooling, 685 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~59 LoC) packages/desktop/src/renderer/hooks/chat/useAutoScroll.ts— no import path from any entry point (80 application, 30 tooling, 685 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 (~55 LoC) packages/desktop/src/renderer/pages/conversation/Messages/acp/MessageAvailableCommands.tsx— no import path from any entry point (80 application, 30 tooling, 685 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) REDACTED— no import path from any entry point (80 application, 30 tooling, 685 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 (~27 LoC) packages/desktop/src/renderer/hooks/ui/useIndexedItemRefs.ts— no import path from any entry point (80 application, 30 tooling, 685 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) packages/desktop/src/common/types/platform/fileSnapshot.ts— no import path from any entry point (80 application, 30 tooling, 685 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 (~18 LoC) packages/desktop/src/renderer/pages/conversation/utils/newConversationName.ts— no import path from any entry point (80 application, 30 tooling, 685 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 '@aionui/shared-scripts' — Declared in packages/web-cli/REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Weak hash algorithm REDACTED:190— 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.
redundant comment packages/desktop/src/index.ts:476— "Create the browser window." repeats the code it sits on: 3 of its 3 words (create, browser, window) are already in `mainWindow = new BrowserWindow({`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/desktop/src/index.ts:1103— "App initialization failed" repeats the code it sits on: 3 of its 3 words (app, initialization, failed) are already in `console.error('[AionUi] App initialization failed:', error);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/desktop/src/process/pet/petManager.ts:219— "Destroy confirm manager" repeats the code it sits on: 3 of its 3 words (destroy, confirm, manager) are already in `destroyPetConfirmManager();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/desktop/src/process/services/database/migrations.ts:90— "user_preferences table removed from schema" repeats the code it sits on: 4 of its 5 words (user, preferences, table, removed) are already in `console.log('[Migration v4] Skipped (user_preferences table removed)');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/desktop/src/process/services/database/migrations.ts:129— "Add jwt_secret column to users table" repeats the code it sits on: 6 of its 6 words (add, jwt, secret, column, users, table) are already in `db.exec('ALTER TABLE users ADD COLUMN jwt_secret TEXT');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/desktop/src/process/services/database/migrations.ts:202— "Pending pairing requests" repeats the code it sits on: 3 of its 3 words (pending, pairing, requests) are already in `db.exec(`CREATE TABLE IF NOT EXISTS assistant_pairing_codes (`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/ChannelModalContent.tsx:196— "Load plugin status" repeats the code it sits on: 3 of its 3 words (load, plugin, status) are already in `const loadPluginStatus = useCallback(async () =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/ChannelModalContent.tsx:925— "Get toggle handler for each channel" repeats the code it sits on: 4 of its 4 words (get, toggle, handler, channel) are already in `const getToggleHandler = (channelId: string) =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.tsx:89— "Load pending pairings" repeats the code it sits on: 3 of its 3 words (load, pending, pairings) are already in `const loadPendingPairings = useCallback(async () =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.tsx:104— "Load authorized users" repeats the code it sits on: 3 of its 3 words (load, authorized, users) are already in `const loadAuthorizedUsers = useCallback(async () =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DiscordConfigForm.tsx:86— "Load pending pairings" repeats the code it sits on: 3 of its 3 words (load, pending, pairings) are already in `const loadPendingPairings = useCallback(async () =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DiscordConfigForm.tsx:101— "Load authorized users" repeats the code it sits on: 3 of its 3 words (load, authorized, users) are already in `const loadAuthorizedUsers = useCallback(async () =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx:92— "Load pending pairings" repeats the code it sits on: 3 of its 3 words (load, pending, pairings) are already in `const loadPendingPairings = useCallback(async () =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx:108— "Load authorized users" repeats the code it sits on: 3 of its 3 words (load, authorized, users) are already in `const loadAuthorizedUsers = useCallback(async () =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/SlackConfigForm.tsx:87— "Load pending pairings" repeats the code it sits on: 3 of its 3 words (load, pending, pairings) are already in `const loadPendingPairings = useCallback(async () =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/SlackConfigForm.tsx:102— "Load authorized users" repeats the code it sits on: 3 of its 3 words (load, authorized, users) are already in `const loadAuthorizedUsers = useCallback(async () =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/TelegramConfigForm.tsx:86— "Load pending pairings" repeats the code it sits on: 3 of its 3 words (load, pending, pairings) are already in `const loadPendingPairings = useCallback(async () =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/TelegramConfigForm.tsx:101— "Load authorized users" repeats the code it sits on: 3 of its 3 words (load, authorized, users) are already in `const loadAuthorizedUsers = useCallback(async () =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WecomConfigForm.tsx:93— "Load pending pairings" repeats the code it sits on: 3 of its 3 words (load, pending, pairings) are already in `const loadPendingPairings = useCallback(async () =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/WecomConfigForm.tsx:108— "Load authorized users" repeats the code it sits on: 3 of its 3 words (load, authorized, users) are already in `const loadAuthorizedUsers = useCallback(async () =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/desktop/src/renderer/hooks/agent/usePresetAssistantInfo.ts:293— "Remote agent for remote conversations" repeats the code it sits on: 3 of its 3 words (remote, agent, conversations) are already in `const remoteAgentId =`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/desktop/src/renderer/hooks/chat/useInitialMessage.ts:38— "Check ACP status" repeats the code it sits on: 3 of its 3 words (check, acp, status) are already in `if (!acpStatus || (acpStatus !== 'authenticated' && acpStatus !== 'session_active'))`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/desktop/src/renderer/hooks/context/AuthContext.tsx:60— "Clear CSRF cookie" repeats the code it sits on: 3 of its 3 words (clear, csrf, cookie) are already in `clearCookie(CSRF_COOKIE_NAME);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/desktop/src/renderer/pages/conversation/GroupedHistory/hooks/useDragAndDrop.ts:86— "Check if reindex needed" repeats the code it sits on: 3 of its 3 words (check, reindex, needed) are already in `if (needsReindex(reordered.map((i) => ({ sortOrder: i.id === activeIdStr ? newSortOrder : i.sortOrder }))))`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/desktop/src/renderer/pages/conversation/Messages/MessageList.tsx:153— "Image preview context" repeats the code it sits on: 3 of its 3 words (image, preview, context) are already in `export const ImagePreviewContext = createContext<{ inPreviewGroup: boolean }>({ inPreviewGroup: false });`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
Mock-dominated test: captures and flushes a dedicated backend startup failure with diagnostics tests/unit/sentry.test.ts:139— This test sets up 3 test doubles (for example `vi.mock/jest.mock of an imported module`) 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: sets flattened incomplete-installation tags for update-related missing directory resources tests/unit/sentry.test.ts:166— This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 2 real object(s) of its own, and its only verification is 9 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: toggles enabled state without opening the detail view tests/unit/settings/MyAssistantCard.dom.test.tsx:138— 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: selects a model through the selection callback tests/unit/renderer/AionrsModelSelector.dom.test.tsx:213— This test sets up 3 test doubles (for example `vi.fn`) 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: runs the health probe and shows a success toast after an official-agent test connection succeeds tests/unit/renderer/LocalAgents.dom.test.tsx:151— This test sets up 4 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: warns with the auth guidance when a test connection reports auth_required tests/unit/renderer/LocalAgents.dom.test.tsx:172— This test sets up 4 test doubles (for example `vi.fn`) 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: renders the setup-guide action for official agents diagnostics tests/unit/renderer/LocalAgents.dom.test.tsx:282— This test sets up 3 test doubles (for example `vi.fn`) 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: surfaces custom-agent toggle failures to the user tests/unit/renderer/LocalAgents.dom.test.tsx:399— This test sets up 4 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: only triggers the active voice input when several send boxes are mounted tests/unit/renderer/SpeechInputButton.dom.test.tsx:91— This test sets up 3 test doubles (for example `vi.fn`) 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: on Electron: renders the item and clicking it calls onRevealInFolder with the pe-ref tests/unit/renderer/explorerRevealInFolder.dom.test.tsx:73— This test sets up 3 test doubles (for example `vi.fn`) 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: converges locally before reconciling after a successful stop tests/unit/renderer/teamSendRuntime.test.ts:239— This test sets up 3 test doubles (for example `vi.fn`) 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: preserves existing key interception before normal Enter sends tests/unit/renderer/useCompositionInput.dom.test.ts:132— This test sets up 3 test doubles (for example `vi.fn`) 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: sends on Enter on devices with a hover-capable fine pointer tests/unit/renderer/useCompositionInput.dom.test.ts:153— This test sets up 3 test doubles (for example `vi.fn`) 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: keeps the native newline on Enter on touch-first devices instead of sending tests/unit/renderer/useCompositionInput.dom.test.ts:168— This test sets up 3 test doubles (for example `vi.fn`) 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: still lets intercepts consume Enter on touch-first devices (e.g. picking a menu item) tests/unit/renderer/useCompositionInput.dom.test.ts:183— This test sets up 4 test doubles (for example `vi.fn`) 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: allows an empty-input start for aionrs without stashing an initial message tests/unit/renderer/useGuidSend.dom.test.ts:363— This test sets up 3 test doubles (for example `vi.spyOn`) 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: still shows the success message when the context is alive tests/unit/renderer/useMcpConnection.dom.test.ts:145— This test sets up 5 test doubles (for example `vi.fn`) 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: abortUploads with exceptConversationId only aborts uploads bound to other conversations tests/unit/renderer/useUploadState.test.ts:39— 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: removes the team member directly when the member conversation has no cron job tests/unit/renderer/team/removeTeamAssistantWithCronCleanup.test.ts:34— This test sets up 3 test doubles (for example `vi.fn`) 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: deduplicates cron jobs before removing the team tests/unit/renderer/team/removeTeamAssistantWithCronCleanup.test.ts:82— 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: model_resolution_failure_blocks_create_and_names_assistant tests/unit/renderer/hooks/teamCreateModal.dom.test.tsx:351— This test sets up 5 test doubles (for example `vi.fn`) against 1 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: triggers run-now only once when the button is clicked twice in quick succession tests/unit/renderer/cron/TaskDetailPage.dom.test.tsx:130— This test sets up 3 test doubles (for example `vi.mock/jest.mock of an imported module`) 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: renames run-now conversations with the execution date in new conversation mode tests/unit/renderer/cron/TaskDetailPage.dom.test.tsx:173— This test sets up 6 test doubles (for example `vi.mock/jest.mock of an imported module`) 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: opens the owning team from execution history when the conversation belongs to a team tests/unit/renderer/cron/TaskDetailPage.dom.test.tsx:294— This test sets up 3 test doubles (for example `vi.mock/jest.mock of an imported module`) 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: keeps opening non-team execution history conversations directly tests/unit/renderer/cron/TaskDetailPage.dom.test.tsx:322— This test sets up 3 test doubles (for example `vi.mock/jest.mock of an imported module`) 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.
Orphaned file REDACTED: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 packages/desktop/src/common/utils/protocolDetector.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 packages/desktop/src/renderer/components/chat/EmojiPicker.tsx: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 packages/desktop/src/renderer/services/speech/SpeechStreamClient.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 packages/desktop/src/renderer/services/speech/pcmRecorder.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 packages/desktop/src/renderer/components/chat/CollapsibleContent.tsx: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 packages/desktop/src/renderer/components/base/AionCollapse.tsx: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 packages/desktop/src/common/chat/navigation/NavigationInterceptor.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 REDACTED: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 packages/desktop/src/common/chat/document/DocumentConverter.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 packages/desktop/src/renderer/utils/ui/runtimePatches.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 packages/desktop/src/renderer/pages/settings/SkillsSettings/SkillFileBrowser.tsx: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 packages/desktop/src/renderer/pages/TestShowcase.tsx: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 packages/desktop/src/renderer/pages/settings/AssistantSettings/home/MyAssistantCard.tsx: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 packages/desktop/src/renderer/components/chat/BtwOverlay/index.tsx: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 packages/desktop/src/renderer/pages/conversation/Preview/hooks/useScrollSyncHelpers.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 packages/desktop/src/renderer/pages/conversation/Preview/components/renderers/htmlInspectScript.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 packages/desktop/src/renderer/pages/conversation/Preview/hooks/useScrollSync.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 packages/desktop/src/renderer/pages/conversation/Preview/fileUtils.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 packages/desktop/src/renderer/services/speech/speechStreamPolicy.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 packages/desktop/src/renderer/components/base/AionSelect.tsx: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 packages/desktop/src/renderer/hooks/system/useProtocolDetection.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 packages/desktop/src/common/api/RotatingApiClient.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 packages/desktop/src/renderer/pages/conversation/Preview/components/editors/HTMLEditor.tsx: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 packages/desktop/src/renderer/utils/chat/conversationExport.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.
+ 37 more in this group — see findings.md.
P2 · Observability· Console output used as the logging channel · ×39
Console output used as the logging channel packages/desktop/src/sentry.ts:479— `packages/desktop/src/sentry.ts` reports through `console.*` at line 479 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 packages/desktop/src/sentry.ts:486— `packages/desktop/src/sentry.ts` reports through `console.*` at line 486 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 packages/desktop/src/sentry.ts:536— `packages/desktop/src/sentry.ts` reports through `console.*` at line 536 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 packages/desktop/src/sentry.ts:555— `packages/desktop/src/sentry.ts` reports through `console.*` at line 555 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 packages/desktop/src/renderer/main.tsx:87— `packages/desktop/src/renderer/main.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 packages/desktop/src/renderer/utils/navigation.ts:30— `packages/desktop/src/renderer/utils/navigation.ts` reports through `console.*` at line 30 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 packages/desktop/src/renderer/utils/workspace/workspaceHistory.ts:36— `packages/desktop/src/renderer/utils/workspace/workspaceHistory.ts` reports through `console.*` at line 36 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 packages/desktop/src/renderer/utils/ui/clipboard.ts:24— `packages/desktop/src/renderer/utils/ui/clipboard.ts` reports through `console.*` at line 24 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/desktop/src/renderer/utils/ui/createContext.tsx:21— `packages/desktop/src/renderer/utils/ui/createContext.tsx` reports through `console.*` at line 21 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 packages/desktop/src/renderer/utils/theme/systemThemeWatcher.ts:21— `packages/desktop/src/renderer/utils/theme/systemThemeWatcher.ts` reports through `console.*` at line 21 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 packages/desktop/src/renderer/services/FileService.ts:348— `packages/desktop/src/renderer/services/FileService.ts` reports through `console.*` at line 348 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 packages/desktop/src/renderer/services/PasteService.ts:240— `packages/desktop/src/renderer/services/PasteService.ts` reports through `console.*` at line 240 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 packages/desktop/src/renderer/services/PasteService.ts:244— `packages/desktop/src/renderer/services/PasteService.ts` reports through `console.*` at line 244 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/desktop/src/renderer/services/PasteService.ts:292— `packages/desktop/src/renderer/services/PasteService.ts` reports through `console.*` at line 292 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 packages/desktop/src/renderer/services/PasteService.ts:296— `packages/desktop/src/renderer/services/PasteService.ts` reports through `console.*` at line 296 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 packages/desktop/src/renderer/services/PasteService.ts:342— `packages/desktop/src/renderer/services/PasteService.ts` reports through `console.*` at line 342 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 packages/desktop/src/renderer/services/PasteService.ts:345— `packages/desktop/src/renderer/services/PasteService.ts` reports through `console.*` at line 345 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 packages/desktop/src/renderer/services/registerPwa.ts:43— `packages/desktop/src/renderer/services/registerPwa.ts` reports through `console.*` at line 43 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 packages/desktop/src/renderer/services/speech/SpeechStreamClient.ts:224— `packages/desktop/src/renderer/services/speech/SpeechStreamClient.ts` reports through `console.*` at line 224 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 packages/desktop/src/renderer/services/feedback/submitFeedbackReport.ts:102— `packages/desktop/src/renderer/services/feedback/submitFeedbackReport.ts` reports through `console.*` at line 102 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/desktop/src/renderer/services/feedback/submitFeedbackReport.ts:104— `packages/desktop/src/renderer/services/feedback/submitFeedbackReport.ts` reports through `console.*` at line 104 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/desktop/src/renderer/services/feedback/submitFeedbackReport.ts:106— `packages/desktop/src/renderer/services/feedback/submitFeedbackReport.ts` reports through `console.*` at line 106 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 packages/desktop/src/renderer/pages/team/TeamPage.tsx:1005— `packages/desktop/src/renderer/pages/team/TeamPage.tsx` reports through `console.*` at line 1005 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 packages/desktop/src/renderer/pages/team/hooks/useTeamRunView.ts:48— `packages/desktop/src/renderer/pages/team/hooks/useTeamRunView.ts` reports through `console.*` at line 48 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 packages/desktop/src/renderer/pages/team/hooks/useTeamRunView.ts:64— `packages/desktop/src/renderer/pages/team/hooks/useTeamRunView.ts` reports through `console.*` at line 64 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Silent fallback default in catch mobile/src/i18n/index.ts:71— `getLanguagePreference` swallows every exception into `return 'system'` — 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 packages/desktop/src/common/config/configMigration.ts:484— `fetchExistingClientKeys` 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 packages/desktop/src/process/utils/gpuRecovery.ts:41— `readConfig` 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 packages/desktop/src/process/utils/rendererRecovery.ts:43— `readState` 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 packages/desktop/src/sentry.ts:418— `readState` 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 packages/desktop/src/process/bridge/updateBridge.ts:410— `fetchReleaseNotesEnrichment` 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 packages/desktop/src/process/bridge/webuiBridge.ts:39— `fetchAdminUsername` swallows every exception into `return 'admin'` — 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 packages/desktop/src/process/feedback/logs.ts:132— `readDirNames` 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 packages/desktop/src/process/startup/windowsPath.ts:183— `readWindowsRegistryPath` 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 packages/desktop/src/process/startup/windowsPath.ts:209— `readTextFileIfPresent` 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 packages/desktop/src/process/utils/tray.ts:105— `getRecentConversations` (in `buildTrayContextMenu`) 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 packages/desktop/src/process/utils/runBackendMigrations.ts:65— `fetchBackendClientPreferences` 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 packages/desktop/src/process/services/database/schema.ts:146— `getDatabaseVersion` 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 packages/desktop/src/renderer/components/chat/EmojiPicker.tsx:467— `EmojiPicker` 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 packages/desktop/src/renderer/components/layout/Sider/siderOrder.ts:15— `readStoredSiderOrder` 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 packages/desktop/src/renderer/components/workspace/recentWorkspaces.ts:13— `getRecentWorkspaces` 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 packages/desktop/src/renderer/pages/conversation/GroupedHistory/hooks/useWorkspaceExpansionState.ts:23— `readExpandedWorkspaces` 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 packages/desktop/src/renderer/pages/conversation/Messages/components/MessageCronTrigger.tsx:37— `parseContent` (in `MessageCronTrigger`) 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 packages/desktop/src/renderer/pages/conversation/Messages/components/MessageSkillSuggest.tsx:23— `MessageSkillSuggest` 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 packages/desktop/src/renderer/pages/conversation/SourceControl/scmUiStore.ts:121— `loadUi` 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 packages/desktop/src/renderer/pages/cron/cronUtils.ts:82— `getCurrentCronTimeZone` swallows every exception into `return 'UTC'` — 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 packages/desktop/src/renderer/pages/login/index.tsx:29— `deobfuscate` 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 packages/desktop/src/renderer/pages/team/hooks/useTeamPendingPermissions.ts:21— `useTeamPendingPermissions.readFromStorage` 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 packages/desktop/src/renderer/services/speech/speechStreamPolicy.ts:98— `readMemory` 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 packages/desktop/src/renderer/utils/model/modelPlatforms.ts:342— `getProviderLogo` 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.
Duplicated predicate packages/desktop/src/renderer/hooks/mcp/useMcpConnection.ts:37— `!details || typeof details !== 'object' || Array.isArray(details)` appears character-identically in 2 files — packages/desktop/src/renderer/hooks/mcp/useMcpConnection.ts, packages/desktop/src/renderer/utils/model/agentTypes.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:182— `!drag || drag.pointerId !== event.pointerId` appears character-identically in 3 files — REDACTED, packages/desktop/src/renderer/components/Markdown/MermaidBlock.tsx, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate packages/desktop/src/renderer/components/Markdown/MermaidBlock.tsx:113— `!drag.moved && Math.abs(event.clientX - drag.startX) + Math.abs(event.clientY - drag.startY) < PAN_CLICK_THRESHOLD` appears character-identically in 2 files — packages/desktop/src/renderer/components/Markdown/MermaidBlock.tsx, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate packages/desktop/src/renderer/components/Markdown/MermaidBlock.tsx:129— `!drag.moved && event.type === 'pointerup'` appears character-identically in 2 files — packages/desktop/src/renderer/components/Markdown/MermaidBlock.tsx, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate packages/desktop/src/renderer/components/chat/MobileActionSheet/useAttachEntry.tsx:53— `!fileList || fileList.length === 0 || !onLocalFilesAdded` appears character-identically in 2 files — packages/desktop/src/renderer/components/chat/MobileActionSheet/useAttachEntry.tsx, packages/desktop/src/renderer/components/media/FileAttachButton.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 REDACTED:70— `!frameWindow || event.source !== frameWindow` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate packages/desktop/src/renderer/pages/settings/components/AddPlatformModal.tsx:589— `!isBedrock || bedrockAuthMethod !== 'accessKey'` appears character-identically in 2 files — packages/desktop/src/renderer/pages/settings/components/AddPlatformModal.tsx, packages/desktop/src/renderer/pages/settings/components/EditModeModal.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 packages/desktop/src/renderer/pages/settings/components/AddPlatformModal.tsx:611— `!isBedrock || bedrockAuthMethod !== 'profile'` appears character-identically in 2 files — packages/desktop/src/renderer/pages/settings/components/AddPlatformModal.tsx, packages/desktop/src/renderer/pages/settings/components/EditModeModal.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 packages/desktop/src/renderer/pages/settings/components/AddPlatformModal.tsx:629— `!isFullUrl && modelListState.error instanceof Error` appears character-identically in 2 files — packages/desktop/src/renderer/pages/settings/components/AddPlatformModal.tsx, packages/desktop/src/renderer/pages/settings/components/EditModeModal.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 packages/desktop/src/process/utils/deepLink.ts:72— `!mainWindowRef || mainWindowRef.isDestroyed()` appears character-identically in 2 files — packages/desktop/src/process/utils/deepLink.ts, packages/desktop/src/process/utils/tray.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 packages/desktop/src/renderer/utils/chat/atFileQuery.ts:82— `!previousChar || isBoundaryChar(previousChar)` appears character-identically in 2 files — packages/desktop/src/renderer/utils/chat/atFileQuery.ts, packages/desktop/src/renderer/utils/chat/atSessionQuery.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 packages/desktop/src/renderer/hooks/chat/useSlashCommands.ts:92— `!result || !Array.isArray(result) || result.length === 0` appears character-identically in 2 files — packages/desktop/src/renderer/hooks/chat/useSlashCommands.ts, packages/desktop/src/renderer/pages/conversation/platforms/acp/useAcpMessage.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 packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx:204— `!runtimeMode || mode === runtimeMode.currentValue` appears character-identically in 2 files — packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx, packages/desktop/src/renderer/pages/conversation/platforms/aionrs/AionrsSendBox.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 packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.tsx:499— `!savedProviderExists && providers.length > 0` appears character-identically in 7 files — packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DingTalkConfigForm.tsx, packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/DiscordConfigForm.tsx, packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/LarkConfigForm.tsx, packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/SlackConfigForm.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 packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx:465— `!teamRuntime?.onInterruptSend || !content.trim() || interrupting` appears character-identically in 2 files — packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx, packages/desktop/src/renderer/pages/conversation/platforms/aionrs/AionrsSendBox.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 packages/desktop/src/renderer/pages/settings/components/AddPlatformModal.tsx:653— `!values.bedrockAuthMethod || !values.bedrockRegion` appears character-identically in 2 files — packages/desktop/src/renderer/pages/settings/components/AddPlatformModal.tsx, packages/desktop/src/renderer/pages/settings/components/EditModeModal.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 packages/desktop/src/renderer/hooks/agent/useModelProviderList.ts:66— `(functionCalling === true || functionCalling === undefined) && excluded !== true` appears character-identically in 2 files — packages/desktop/src/renderer/hooks/agent/useModelProviderList.ts, packages/desktop/src/renderer/pages/guid/utils/modelUtils.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 packages/desktop/src/renderer/utils/model/agentLogo.ts:86— `/\.(svg|png|jpe?g|webp|gif)$/i.test(resolved) || /^(https?:|data:|\/)/i.test(resolved)` appears character-identically in 2 files — packages/desktop/src/renderer/utils/model/agentLogo.ts, packages/desktop/src/renderer/utils/model/assistantAvatar.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 packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx:800— `Boolean(teamRuntime) || turnStartedAtMs != null` appears character-identically in 2 files — packages/desktop/src/renderer/pages/conversation/platforms/acp/AcpSendBox.tsx, packages/desktop/src/renderer/pages/conversation/platforms/aionrs/AionrsSendBox.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 packages/desktop/src/renderer/pages/settings/ToolsSettings/mcpJsonImport.ts:29— `Boolean(value) && typeof value === 'object' && !Array.isArray(value)` appears character-identically in 2 files — packages/desktop/src/renderer/pages/settings/ToolsSettings/mcpJsonImport.ts, packages/desktop/src/renderer/utils/model/agentRuntimeCatalog.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 packages/desktop/src/process/utils/zoom.ts:26— `Number.isNaN(value) || !Number.isFinite(value)` appears character-identically in 2 files — packages/desktop/src/process/utils/zoom.ts, packages/desktop/src/renderer/hooks/ui/font/useFontScale.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 packages/desktop/src/renderer/hooks/assistant/useAssistantEditor.ts:320— `assistant.description_i18n?.[localeKey] || assistant.description || ''` appears character-identically in 5 files — packages/desktop/src/renderer/hooks/assistant/useAssistantEditor.ts, packages/desktop/src/renderer/pages/settings/AssistantSettings/AssistantListPanel.tsx, packages/desktop/src/renderer/pages/settings/AssistantSettings/assistantUtils.ts, packages/desktop/src/renderer/pages/settings/AssistantSettings/home/MyAssistantCard.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 packages/desktop/src/renderer/pages/guid/components/AssistantSelectionArea.tsx:227— `assistant.name_i18n?.[localeKey] || assistant.name` appears character-identically in 10 files — packages/desktop/src/renderer/pages/guid/components/AssistantSelectionArea.tsx, packages/desktop/src/renderer/pages/settings/AgentSettings/BoundAssistants.tsx, packages/desktop/src/renderer/pages/settings/AgentSettings/InlineAgentEditor.tsx, packages/desktop/src/renderer/pages/settings/AssistantSettings/AssistantListPanel.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 packages/desktop/src/renderer/pages/settings/AgentSettings/InlineAgentEditor.tsx:216— `assistant.source === 'builtin' && assistant.avatar?.startsWith('/api/assistants/')` appears character-identically in 2 files — packages/desktop/src/renderer/pages/settings/AgentSettings/InlineAgentEditor.tsx, packages/desktop/src/renderer/pages/settings/AssistantSettings/index.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 packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/assistantBinding.ts:25— `assistant.source === 'generated' && isAionrsAssistant(assistant)` appears character-identically in 2 files — packages/desktop/src/renderer/components/settings/SettingsModal/contents/channels/assistantBinding.ts, packages/desktop/src/renderer/pages/guid/hooks/useGuidAssistantSelection.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.
Disabled test tests/e2e/cases/teams/team-agent-lifecycle.e2e.ts:91— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test tests/e2e/cases/teams/team-agent-lifecycle.e2e.ts:103— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test tests/e2e/cases/teams/team-agent-lifecycle.e2e.ts:123— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test tests/e2e/cases/teams/team-communication.e2e.ts:16— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test tests/e2e/cases/teams/team-create-mobile.e2e.ts:99— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test tests/e2e/cases/teams/team-create-ui.e2e.ts:16— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test tests/e2e/cases/teams/team-create-ui.e2e.ts:58— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test tests/e2e/cases/teams/team-create.e2e.ts:118— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test tests/e2e/cases/teams/team-create.e2e.ts:171— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test tests/e2e/cases/teams/team-delete-ui.e2e.ts:22— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test tests/e2e/cases/teams/team-delete.e2e.ts:52— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test tests/e2e/cases/teams/team-delete.e2e.ts:87— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test tests/e2e/cases/teams/team-member-init-failure.e2e.ts:29— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test tests/e2e/cases/teams/team-member-init-failure.e2e.ts:37— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test tests/e2e/cases/teams/team-member-init-failure.e2e.ts:71— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test tests/e2e/cases/teams/team-member-messaging.e2e.ts:25— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test tests/e2e/cases/teams/team-member-messaging.e2e.ts:34— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test tests/e2e/cases/teams/team-member-ops.e2e.ts: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.
Disabled test tests/e2e/cases/teams/team-member-ops.e2e.ts:74— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test tests/e2e/cases/teams/team-member-ops.e2e.ts:82— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test tests/e2e/cases/teams/team-member-ops.e2e.ts:100— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test tests/e2e/cases/teams/team-session-mode.e2e.ts:41— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test tests/e2e/cases/teams/team-session-mode.e2e.ts:49— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Outdated (npm): expo REDACTED:39— expo is pinned at 55.0.6; registry.npmjs.org publishes 58.0.23 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): expo-camera REDACTED:40— expo-camera is pinned at 55.0.10; registry.npmjs.org publishes 58.0.14 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): expo-clipboard REDACTED:41— expo-clipboard is pinned at 55.0.9; registry.npmjs.org publishes 58.0.4 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): expo-constants REDACTED:42— expo-constants is pinned at 55.0.7; registry.npmjs.org publishes 58.0.15 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): expo-dev-client REDACTED:43— expo-dev-client is pinned at 55.0.17; registry.npmjs.org publishes 58.0.18 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): expo-linking REDACTED:44— expo-linking is pinned at 55.0.7; registry.npmjs.org publishes 58.0.16 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): expo-localization REDACTED:45— expo-localization is pinned at 55.0.8; registry.npmjs.org publishes 58.0.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): expo-router REDACTED:46— expo-router is pinned at 55.0.5; registry.npmjs.org publishes 58.0.30 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): expo-secure-store REDACTED:47— expo-secure-store is pinned at 55.0.8; registry.npmjs.org publishes 58.0.2 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): expo-splash-screen REDACTED:48— expo-splash-screen is pinned at 55.0.10; registry.npmjs.org publishes 58.0.13 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): expo-status-bar REDACTED:49— expo-status-bar is pinned at 55.0.4; registry.npmjs.org publishes 58.0.4 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): expo-system-ui REDACTED:50— expo-system-ui is pinned at 55.0.9; registry.npmjs.org publishes 58.0.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): officeparser REDACTED:146— officeparser is pinned at 5.2.2; registry.npmjs.org publishes 8.6.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.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 8 significant file(s) lose their only recent owner: packages/desktop/src/renderer/pages/conversation/explorer/ExplorerContainer.tsx, packages/desktop/src/renderer/pages/settings/ArchivedSettings/index.tsx, packages/desktop/src/renderer/pages/conversation/SourceControl/scmModel.ts, packages/desktop/src/renderer/pages/conversation/explorer/monitorClient.ts, packages/desktop/src/renderer/pages/conversation/explorer/monitorTransport.ts, packages/desktop/src/common/adapter/sessionRefresh.ts, packages/desktop/src/renderer/components/settings/checkForUpdatesShared.ts, packages/desktop/src/common/types/chatFile.ts. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 7 significant file(s) lose their only recent owner: packages/desktop/src/renderer/pages/settings/AgentSettings/AgentRepairPanel.tsx, packages/desktop/src/process/startup/windowsPath.ts, packages/desktop/src/renderer/services/i18n/format.ts, packages/desktop/src/process/utils/describeUncaughtError.ts, packages/desktop/src/renderer/utils/chat/turnCopy.ts, packages/desktop/src/process/utils/rendererRecovery.ts, packages/web-cli/src/browser.ts. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 4 significant file(s) lose their only recent owner: REDACTED, packages/desktop/src/process/resources/builtinMcp/browserServer.ts, REDACTED, packages/desktop/src/process/utils/windowBounds.ts. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #4 — If anonymized user #4 becomes unavailable, 4 significant file(s) lose their only recent owner: packages/desktop/src/renderer/pages/team/components/teamSendRuntime.ts, packages/desktop/src/process/services/autoUpdateDiagnostics.ts, packages/desktop/src/renderer/pages/team/hooks/useTeamWarmup.ts, packages/desktop/src/renderer/services/runtime/runtimeInstallationReconciler.ts. Pair on, review, or document these before any departure.
X7 · Silent fallback defaults· Pending state with no failure state · ×3
Pending state with no failure state REDACTED:104— The view draws `Loading…` 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 packages/desktop/src/renderer/components/media/LocalImageView.tsx:56— The view draws `<span style= >` 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 packages/desktop/src/renderer/components/layout/Router.tsx:53— The view draws `<AppLoader/>` under `status === 'checking'`, but `status` 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.
IC1 · Incompleteness & stubs· Empty method body · ×2
Empty method body packages/desktop/src/process/bridge/index.ts:40— `disposeAllTeamSessions` has an empty body — confirm it's an intentional no-op and not an unfinished method.
Empty method body REDACTED:701— `restorePackageVersionOverride` has an empty body — confirm it's an intentional no-op and not an unfinished method.
README/code drift packages/desktop/src/renderer/pages/conversation/Preview/README.cn.md:515— packages/desktop/src/renderer/pages/conversation/Preview/README.cn.md links to `../Workspace/README.cn.md`, but `packages/desktop/src/renderer/pages/conversation/Workspace/README.cn.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift packages/desktop/src/renderer/pages/conversation/Preview/README.en.md:516— packages/desktop/src/renderer/pages/conversation/Preview/README.en.md links to `../Workspace/README.en.md`, but `packages/desktop/src/renderer/pages/conversation/Workspace/README.en.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
No app-layer HTTPS enforcement detected REDACTED:381— `httpServer.listen(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.)
No app-layer HTTPS enforcement detected REDACTED:257— `tcp_server.listen(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.)
Hand-rolled JSON/XML parsing via regex packages/desktop/src/renderer/components/media/WebviewHost.tsx:261— 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 packages/desktop/src/renderer/components/media/WebviewHost.tsx:269— 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.
Fat interface: PreviewContextValue (20 required operations) packages/desktop/src/renderer/pages/conversation/Preview/context/PreviewContext.tsx:102— `PreviewContextValue` declares 20 required operations: `openPreview`, `openBrowserTab`, `closePreview`, `toggleMaximized`, `clearPreviewForScope`, `closeTab`, `switchTab`, `updateContent`, `updateTab`, `saveContent`, `reloadTabContent`, `clearTabUpdate`, `findPreviewTab`, `closePreviewByIdentity`, `closePreviewIfScopeChanged`, `addToSendBox`, `setSendBoxHandler`, `addDomSnippet`, `removeDomSnippet`, `clearDomSnippets`. 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.
C2 · Access Controls· No named authorization policies · ×1
No named authorization policies packages/desktop/src/common/adapter/browser.ts:31— 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.
Thin authorization enforcement — Only 1 place(s) refuse an unauthorized caller — too few to demonstrate default-deny across handlers.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 5 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 (30 single-owned of 564 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; 564 of the 870 production source files in this repository met that bar). They are anonymized user #5 (2 file(s)), anonymized user #6 (2 file(s)), anonymized user #7 (1 file(s)), anonymized user #8 (1 file(s)), anonymized user (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: REDACTED, packages/desktop/src/renderer/components/Markdown/markdownComponents.tsx, packages/desktop/src/renderer/hooks/chat/useTypingAnimation.ts, packages/desktop/src/renderer/hooks/mcp/messageQueue.ts, packages/desktop/src/renderer/pages/guid/components/QuickActionButtons.tsx, packages/desktop/src/renderer/components/layout/Sider/useSiderTeamRunning.ts, packages/desktop/src/common/types/channel/channel.ts.
No ADRs found — 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/`.
D21 · Naming Consistency· `resolveFromSystemPATH` spells `PATH` where 186 names in the project spell it `Path` · ×1
`resolveFromSystemPATH` spells `PATH` where 186 names in the project spell it `Path` packages/desktop/src/process/backend/binaryResolver.ts:148— 186 of 187 names in project AionUi spell the token `Path` (186 of 187; unit: names in project AionUi containing `Path`). Peers: WorkspacePickerSheet.getDisplayName(fullPath) (mobile/src/components/chat/WorkspacePickerSheet.tsx:16); workspace.splitPathSegments (mobile/src/utils/workspace.ts:8); workspace.splitPathSegments(targetPath) (mobile/src/utils/workspace.ts:8); workspace.isTemporaryWorkspace(workspacePath) (mobile/src/utils/workspace.ts:13); workspace.getWorkspaceDisplayName(workspacePath) (mobile/src/utils/workspace.ts:22). Rename to `resolveFromSystemPath`. [rule N6]
D21 · Naming Consistency· `getCSSVar` spells `CSS` where 12 names in the project spell it `Css` · ×1
`getCSSVar` spells `CSS` where 12 names in the project spell it `Css` packages/desktop/src/renderer/styles/colors.ts:87— 12 of 13 names in project AionUi spell the token `Css` (12 of 13; unit: names in project AionUi containing `Css`). Peers: packages.desktop.src.common.config.storage.ICssTheme (packages/desktop/src/common/config/storage.ts:669); ShadowView.createInitStyle(customCss) (packages/desktop/src/renderer/components/Markdown/ShadowView.tsx:18); ShadowView.collectKatexCssRules (packages/desktop/src/renderer/components/Markdown/ShadowView.tsx:326); CssThemeSettings.parseCssVarsFromBlocks (packages/desktop/src/renderer/pages/settings/AppearanceSettings/CssThemeSettings.tsx:76); CssThemeSettings.resolveCssVarValue (packages/desktop/src/renderer/pages/settings/AppearanceSettings/CssThemeSettings.tsx:92). Rename to `getCssVar`. [rule N6]
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 2 of 5 project(s) overshoot their size bounds, lowering Project Cohesion to 2.0/10. The most over is `packages/desktop` (136584 LoC, 1218 module-visible types across 145 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
D34 · Knowledge Freshness· Further orphaned files (smaller) · ×1
Further orphaned files (smaller) — 62 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: REDACTED, packages/desktop/src/common/utils/protocolDetector.ts, packages/desktop/src/renderer/components/chat/EmojiPicker.tsx, packages/desktop/src/renderer/services/speech/SpeechStreamClient.ts, packages/desktop/src/renderer/services/speech/pcmRecorder.ts, packages/desktop/src/renderer/components/chat/CollapsibleContent.tsx, packages/desktop/src/renderer/components/base/AionCollapse.tsx, packages/desktop/src/common/chat/navigation/NavigationInterceptor.ts (and 54 more) (64 orphaned of 564 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; 564 of the 870 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
Logging is not universal — Only 1/3 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `packages/web-cli`, `packages/web-host`.
No SAST REDACTED:4— 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 129914 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
No dependency-update automation REDACTED:77— `REDACTED` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
R8 · Dependency Hygiene· Type-only dependency 'streamdown' in production deps · ×1
Type-only dependency 'streamdown' in production deps packages/desktop/src/renderer/pages/conversation/Preview/theme/markdownTheme.ts:8— Every import is type-only — 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/20 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 — 2/4 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 (`!`) reduce the strict null checking score — ~0.4 `!` null assertions per 1k TypeScript source lines — 57 assertion(s) across the 155931 source line(s) of the 860 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: packages/desktop/src/common/adapter/httpBridge.ts (10), packages/desktop/src/renderer/pages/conversation/GroupedHistory/utils/sortOrderHelpers.ts (4), packages/desktop/src/renderer/pet/petConfirmRenderer.ts (4). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.
Outdated (npm): @agentclientprotocol/sdk — @agentclientprotocol/sdk is pinned at 0.18.2; registry.npmjs.org publishes 2.4.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @anthropic-ai/sdk — @anthropic-ai/sdk is pinned at 0.71.2; registry.npmjs.org publishes 1.6.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): @arco-design/web-react — @arco-design/web-react is pinned at 2.66.11; registry.npmjs.org publishes 2.66.18 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): @aws-sdk/client-bedrock — @aws-sdk/client-bedrock is pinned at 3.1009.0; registry.npmjs.org publishes 3.1164.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): @codemirror/commands — @codemirror/commands is pinned at 6.10.3; registry.npmjs.org publishes 6.11.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): @codemirror/lang-html — @codemirror/lang-html is pinned at 6.4.11; registry.npmjs.org publishes 6.4.12 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): @codemirror/lang-markdown — @codemirror/lang-markdown is pinned at 6.5.0; registry.npmjs.org publishes 6.5.2 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): @codemirror/language — @codemirror/language is pinned at 6.12.3; registry.npmjs.org publishes 6.13.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): @codemirror/search — @codemirror/search is pinned at 6.7.0; registry.npmjs.org publishes 6.7.2 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): @codemirror/state — @codemirror/state is pinned at 6.6.0; registry.npmjs.org publishes 6.7.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): @codemirror/view — @codemirror/view is pinned at 6.40.0; registry.npmjs.org publishes 6.43.15 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): @floating-ui/react — @floating-ui/react is pinned at 0.27.19; registry.npmjs.org publishes 0.27.20 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): @google/genai — @google/genai is pinned at 1.45.0; registry.npmjs.org publishes 3.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): @iconify-json/vscode-icons — @iconify-json/vscode-icons is pinned at 1.2.53; registry.npmjs.org publishes 1.2.96 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): @iconify/react — @iconify/react is pinned at 6.0.2; registry.npmjs.org publishes 6.0.4 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): @larksuiteoapi/node-sdk — @larksuiteoapi/node-sdk is pinned at 1.59.0; registry.npmjs.org publishes 1.76.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): @lezer/highlight — @lezer/highlight is pinned at 1.2.3; registry.npmjs.org publishes 1.2.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): @modelcontextprotocol/sdk — @modelcontextprotocol/sdk is pinned at 1.27.1; registry.npmjs.org publishes 1.32.2 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-native-async-storage/async-storage — @react-native-async-storage/async-storage is pinned at 2.2.0; registry.npmjs.org publishes 3.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): @react-navigation/bottom-tabs — @react-navigation/bottom-tabs is pinned at 7.15.5; registry.npmjs.org publishes 7.21.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): @react-navigation/drawer — @react-navigation/drawer is pinned at 7.9.4; registry.npmjs.org publishes 7.14.4 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-navigation/native — @react-navigation/native is pinned at 7.1.33; registry.npmjs.org publishes 7.5.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @sentry/electron — @sentry/electron is pinned at 7.10.0; registry.npmjs.org publishes 8.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): @shopify/flash-list — @shopify/flash-list is pinned at 2.0.2; registry.npmjs.org publishes 2.3.3 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): @types/bcryptjs — @types/bcryptjs is pinned at 2.4.6; registry.npmjs.org publishes 3.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.
Skipped (documented): Backend port conflict: throws and does not leak resources packages/web-host/tests/start-web-host.test.ts:64— Skipped with a documented reason — a deferral, not lazy debt: declared with test.todo — a placeholder that registers a name and runs nothing
Skipped (documented): Static-server port conflict: cleans up backend before throwing packages/web-host/tests/start-web-host.test.ts:65— Skipped with a documented reason — a deferral, not lazy debt: declared with test.todo — a placeholder that registers a name and runs nothing
Skipped (documented): Stop cleanup: stops static-server then backend in sequence packages/web-host/tests/start-web-host.test.ts:66— Skipped with a documented reason — a deferral, not lazy debt: declared with test.todo — a placeholder that registers a name and runs nothing
doc comments repeat the names packages/desktop/src/common/config/storage.ts:435— 1 of 66 documented parameters and 14 of 1859 summaries in `@aionui/desktop` only repeat the member or parameter name (e.g. "Preset assistant ID" for `preset_assistant_id`). Delete the restating tags, or add what the name does not say.
doc comments repeat the names REDACTED:115— 6 of 36 documented parameters and 4 of 358 summaries in `AionUi` only repeat the member or parameter name (e.g. "Electron version" for `electronVersion`). Delete the restating tags, or add what the name does not say.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 11 file(s) — `packages/desktop/src/common/adapter/ipcBridge.ts`, `packages/desktop/src/common/config/configMigration.ts`, `packages/desktop/src/common/config/storage.ts`, `packages/desktop/src/common/types/feedbackDiagnostics.ts`, `packages/desktop/src/process/bridge/updateBridge.ts`, … (+6 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1b7c0-3fde-76e8-9ef8-263e69664b4f · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 323 · Warnings: 1494 · Recommendations: 393 · Info: 87 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 07-11-2026 @ 20:43 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.