Public report of yuanzui0728/Enclave, published 17 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 17 November 2026, 08:37 UTC · Survey ID cd_908e8f447fad4a5b87f209c2980e5dc9
yuanzui0728/Enclave
Measured 17 November 2026, 08:33 UTC, at code version 023b653
First survey, so nothing to compare with yet
CAI scoreAt risk
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A very large codebase: 503,068 lines of product code in 20 projects, tests not counted · Estimated rebuild effort: about 3.4 person-years · Weakest lens: Production Readiness, 30.7
Findings by how serious they are
299 critical3222 serious149 minor
9 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
17 November 2026, 08:33 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 ▸
92of 92 dimensions measured by tools.
3649of 3670 findings point to an exact file and line, so you can open each one in the code. The other 21 concern the repository as a whole, such as missing documentation.
92dimensions across 9 lenses, read from 503,068 lines of product code in 20 projects.
yuanzui0728/Enclave is rated At risk because critical security findings are open, most of them in the packages it uses. Its score is held back in part because we found no automated security scanning of the code, its secrets or its dependencies. It scores 37.1 out of 100, which the At risk rating leaves unchanged. We judged it as a preview release, against a lower bar.
Production Readiness, at 30.7, is the weakest lens and counts most in the score. The best first steps are adding automated security scanning and tidying the declared packages, each worth about 4.2 points. Raising Production Readiness to 62 would lift the score to about 42.4.
Eighty-three known security holes in the packages the code depends on can be used by attackers. Thirty-nine pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with, and nineteen form fields can't be read by a screen reader. Updating the vulnerable packages, pinning each tool to an exact version and labelling the form fields would close these risks. Fixing the weaknesses the scanner points to would fix the seven security weaknesses in the code, and setting a waiting period for automatic updates would deal with the three automatic dependency updates that take new releases at once. The 40 pieces of business logic tied to the database or web code need separating from the database and web code.
The product code is 503,068 lines, about €490,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Production Readiness rose from 30.7 to 62, the lowest score rated Strong, the score would rise from 37.1 to about 42.4.
Code composition: what the lines of code are
Product code 95%Tests 5%
Rebuild cost: about €490,000 · Estimate
Cost to rebuild
€160,000 to €830,000, for 2,739 to 8,689 hours of work, about 3.4 person-years for 2 to 7 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 37. 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
Very large: 503,068 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
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.
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
Raises the score by about 4.2 points · Medium effort · Dependency Hygiene
3
Turn off TypeORM synchronize: true in production and let the versioned migrations own the schema.
Raises the score by about 2.4 points · Medium effort · Schema migrations
Diagnosis: what the measurements show together
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €490,000 to build again, about 3.4 person-years of work. Its weakest lens is Production Readiness, at 30.7 (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
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. Of all the actions in this report, it raises the score most for the work it takes: about 4.2 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.9 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 5% to 12% on every change. The history of the code shows how much it changes: about 2,646,571 lines over the last 90 days, which is about 10,733,316 lines a year. At that pace, the extra work comes to an estimated 1401.3 to 8407.6 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
1024 modules, with 1605 dependencies between them. 5 loops run through 27 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 984 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.
api.src.modules.auth.world-owner_service uses api.src.modules.ai.ai_types, so a change to api.src.modules.ai.ai_types can break api.src.modules.auth.world-owner_service, while a change to api.src.modules.auth.world-owner_service can't break api.src.modules.ai.ai_types.
Position
Below the diagonal: api.src.modules.auth.world-owner_service uses a module listed above it, which is the healthy direction.
api.src.modules.auth.world-owner_service uses api.src.modules.auth.user_entity, so a change to api.src.modules.auth.user_entity can break api.src.modules.auth.world-owner_service, while a change to api.src.modules.auth.world-owner_service can't break api.src.modules.auth.user_entity.
Position
Below the diagonal: api.src.modules.auth.world-owner_service uses a module listed above it, which is the healthy direction.
api.src.modules.characters.character_entity uses api.src.modules.ai.ai_types, so a change to api.src.modules.ai.ai_types can break api.src.modules.characters.character_entity, while a change to api.src.modules.characters.character_entity can't break api.src.modules.ai.ai_types.
Position
Below the diagonal: api.src.modules.characters.character_entity uses a module listed above it, which is the healthy direction.
api.src.modules.config.world-language_service uses api.src.modules.config.config_service, so a change to api.src.modules.config.config_service can break api.src.modules.config.world-language_service, while a change to api.src.modules.config.world-language_service can't break api.src.modules.config.config_service.
Position
Below the diagonal: api.src.modules.config.world-language_service uses a module listed above it, which is the healthy direction.
api.src.modules.minimax.minimax-job_service uses api.src.modules.minimax.minimax-quota_service, so a change to api.src.modules.minimax.minimax-quota_service can break api.src.modules.minimax.minimax-job_service, while a change to api.src.modules.minimax.minimax-job_service can't break api.src.modules.minimax.minimax-quota_service.
Position
Below the diagonal: api.src.modules.minimax.minimax-job_service uses a module listed above it, which is the healthy direction.
apps.app.src.features.chat uses api.src.modules.chat.chat_types, so a change to api.src.modules.chat.chat_types can break apps.app.src.features.chat, while a change to apps.app.src.features.chat can't break api.src.modules.chat.chat_types.
Position
Below the diagonal: apps.app.src.features.chat uses a module listed above it, which is the healthy direction.
apps.app.src.features.games.farm.components uses api.src.modules.games.farm.farm_types, so a change to api.src.modules.games.farm.farm_types can break apps.app.src.features.games.farm.components, while a change to apps.app.src.features.games.farm.components can't break api.src.modules.games.farm.farm_types.
Position
Below the diagonal: apps.app.src.features.games.farm.components uses a module listed above it, which is the healthy direction.
api.src.modules.ai.ai-orchestrator_service uses api.src.modules.ai.ai_types, so a change to api.src.modules.ai.ai_types can break api.src.modules.ai.ai-orchestrator_service, while a change to api.src.modules.ai.ai-orchestrator_service can't break api.src.modules.ai.ai_types.
Position
Below the diagonal: api.src.modules.ai.ai-orchestrator_service uses a module listed above it, which is the healthy direction.
api.src.modules.ai.ai-orchestrator_service uses api.src.modules.minimax.minimax-quota_service, so a change to api.src.modules.minimax.minimax-quota_service can break api.src.modules.ai.ai-orchestrator_service, while a change to api.src.modules.ai.ai-orchestrator_service can't break api.src.modules.minimax.minimax-quota_service.
Position
Below the diagonal: api.src.modules.ai.ai-orchestrator_service uses a module listed above it, which is the healthy direction.
api.src.modules.ai.ai-orchestrator_service uses api.src.modules.subscription.subscription_service, so a change to api.src.modules.subscription.subscription_service can break api.src.modules.ai.ai-orchestrator_service, while a change to api.src.modules.ai.ai-orchestrator_service can't break api.src.modules.subscription.subscription_service.
Position
Below the diagonal: api.src.modules.ai.ai-orchestrator_service uses a module listed above it, which is the healthy direction.
api.src.modules.ai.ai-orchestrator_service uses api.src.modules.config.world-language_service, so a change to api.src.modules.config.world-language_service can break api.src.modules.ai.ai-orchestrator_service, while a change to api.src.modules.ai.ai-orchestrator_service can't break api.src.modules.config.world-language_service.
Position
Below the diagonal: api.src.modules.ai.ai-orchestrator_service uses a module listed above it, which is the healthy direction.
api.src.modules.admin.reply-logic-admin_service uses api.src.modules.auth.user_entity, so a change to api.src.modules.auth.user_entity can break api.src.modules.admin.reply-logic-admin_service, while a change to api.src.modules.admin.reply-logic-admin_service can't break api.src.modules.auth.user_entity.
Position
Below the diagonal: api.src.modules.admin.reply-logic-admin_service uses a module listed above it, which is the healthy direction.
api.src.modules.admin.reply-logic-admin_service uses api.src.modules.chat.conversation_entity, so a change to api.src.modules.chat.conversation_entity can break api.src.modules.admin.reply-logic-admin_service, while a change to api.src.modules.admin.reply-logic-admin_service can't break api.src.modules.chat.conversation_entity.
Position
Below the diagonal: api.src.modules.admin.reply-logic-admin_service uses a module listed above it, which is the healthy direction.
api.src.modules.admin.reply-logic-admin_service uses api.src.modules.chat.message_entity, so a change to api.src.modules.chat.message_entity can break api.src.modules.admin.reply-logic-admin_service, while a change to api.src.modules.admin.reply-logic-admin_service can't break api.src.modules.chat.message_entity.
Position
Below the diagonal: api.src.modules.admin.reply-logic-admin_service uses a module listed above it, which is the healthy direction.
api.src.modules.admin.reply-logic-admin_service uses api.src.modules.config.config_service, so a change to api.src.modules.config.config_service can break api.src.modules.admin.reply-logic-admin_service, while a change to api.src.modules.admin.reply-logic-admin_service can't break api.src.modules.config.config_service.
Position
Below the diagonal: api.src.modules.admin.reply-logic-admin_service uses a module listed above it, which is the healthy direction.
api.src.modules.admin.reply-logic-admin_service uses api.src.modules.auth.world-owner_service, so a change to api.src.modules.auth.world-owner_service can break api.src.modules.admin.reply-logic-admin_service, while a change to api.src.modules.admin.reply-logic-admin_service can't break api.src.modules.auth.world-owner_service.
Position
Below the diagonal: api.src.modules.admin.reply-logic-admin_service uses a module listed above it, which is the healthy direction.
api.src.modules.admin.reply-logic-admin_service uses api.src.modules.characters.character_entity, so a change to api.src.modules.characters.character_entity can break api.src.modules.admin.reply-logic-admin_service, while a change to api.src.modules.admin.reply-logic-admin_service can't break api.src.modules.characters.character_entity.
Position
Below the diagonal: api.src.modules.admin.reply-logic-admin_service uses a module listed above it, which is the healthy direction.
api.src.modules.admin.reply-logic-admin_service uses api.src.modules.ai.ai-orchestrator_service, so a change to api.src.modules.ai.ai-orchestrator_service can break api.src.modules.admin.reply-logic-admin_service, while a change to api.src.modules.admin.reply-logic-admin_service can't break api.src.modules.ai.ai-orchestrator_service.
Position
Below the diagonal: api.src.modules.admin.reply-logic-admin_service uses a module listed above it, which is the healthy direction.
api.src.modules.characters.character-blueprint_service uses api.src.modules.characters.character_entity, so a change to api.src.modules.characters.character_entity can break api.src.modules.characters.character-blueprint_service, while a change to api.src.modules.characters.character-blueprint_service can't break api.src.modules.characters.character_entity.
Position
Below the diagonal: api.src.modules.characters.character-blueprint_service uses a module listed above it, which is the healthy direction.
api.src.modules.characters.character-blueprint_service uses api.src.modules.ai.ai-orchestrator_service, so a change to api.src.modules.ai.ai-orchestrator_service can break api.src.modules.characters.character-blueprint_service, while a change to api.src.modules.characters.character-blueprint_service can't break api.src.modules.ai.ai-orchestrator_service.
Position
Below the diagonal: api.src.modules.characters.character-blueprint_service uses a module listed above it, which is the healthy direction.
api.src.modules.cyber-avatar.cyber-avatar_service uses api.src.modules.subscription.subscription_service, so a change to api.src.modules.subscription.subscription_service can break api.src.modules.cyber-avatar.cyber-avatar_service, while a change to api.src.modules.cyber-avatar.cyber-avatar_service can't break api.src.modules.subscription.subscription_service.
Position
Below the diagonal: api.src.modules.cyber-avatar.cyber-avatar_service uses a module listed above it, which is the healthy direction.
api.src.modules.cyber-avatar.cyber-avatar_service uses api.src.modules.auth.world-owner_service, so a change to api.src.modules.auth.world-owner_service can break api.src.modules.cyber-avatar.cyber-avatar_service, while a change to api.src.modules.cyber-avatar.cyber-avatar_service can't break api.src.modules.auth.world-owner_service.
Position
Below the diagonal: api.src.modules.cyber-avatar.cyber-avatar_service uses a module listed above it, which is the healthy direction.
api.src.modules.cyber-avatar.cyber-avatar_service uses api.src.modules.characters.character_entity, so a change to api.src.modules.characters.character_entity can break api.src.modules.cyber-avatar.cyber-avatar_service, while a change to api.src.modules.cyber-avatar.cyber-avatar_service can't break api.src.modules.characters.character_entity.
Position
Below the diagonal: api.src.modules.cyber-avatar.cyber-avatar_service uses a module listed above it, which is the healthy direction.
api.src.modules.cyber-avatar.cyber-avatar_service uses api.src.modules.ai.ai-orchestrator_service, so a change to api.src.modules.ai.ai-orchestrator_service can break api.src.modules.cyber-avatar.cyber-avatar_service, while a change to api.src.modules.cyber-avatar.cyber-avatar_service can't break api.src.modules.ai.ai-orchestrator_service.
Position
Below the diagonal: api.src.modules.cyber-avatar.cyber-avatar_service uses a module listed above it, which is the healthy direction.
api.src.modules.reminder-runtime.reminder-runtime_service uses api.src.modules.chat.message_entity, so a change to api.src.modules.chat.message_entity can break api.src.modules.reminder-runtime.reminder-runtime_service, while a change to api.src.modules.reminder-runtime.reminder-runtime_service can't break api.src.modules.chat.message_entity.
Position
Below the diagonal: api.src.modules.reminder-runtime.reminder-runtime_service uses a module listed above it, which is the healthy direction.
api.src.modules.reminder-runtime.reminder-runtime_service uses api.src.modules.auth.world-owner_service, so a change to api.src.modules.auth.world-owner_service can break api.src.modules.reminder-runtime.reminder-runtime_service, while a change to api.src.modules.reminder-runtime.reminder-runtime_service can't break api.src.modules.auth.world-owner_service.
Position
Below the diagonal: api.src.modules.reminder-runtime.reminder-runtime_service uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in api.src.modules.reminder-runtime.reminder-runtime_service uses a type in api.src.modules.config.world-language_service.
api.src.modules.reminder-runtime.reminder-runtime_service uses api.src.modules.config.world-language_service, so a change to api.src.modules.config.world-language_service can break api.src.modules.reminder-runtime.reminder-runtime_service, while a change to api.src.modules.reminder-runtime.reminder-runtime_service can't break api.src.modules.config.world-language_service.
Position
Below the diagonal: api.src.modules.reminder-runtime.reminder-runtime_service uses a module listed above it, which is the healthy direction.
api.src.modules.reminder-runtime.reminder-runtime_service uses api.src.modules.ai.ai-orchestrator_service, so a change to api.src.modules.ai.ai-orchestrator_service can break api.src.modules.reminder-runtime.reminder-runtime_service, while a change to api.src.modules.reminder-runtime.reminder-runtime_service can't break api.src.modules.ai.ai-orchestrator_service.
Position
Below the diagonal: api.src.modules.reminder-runtime.reminder-runtime_service uses a module listed above it, which is the healthy direction.
api.src.modules.characters.characters_service uses api.src.modules.ai.ai_types, so a change to api.src.modules.ai.ai_types can break api.src.modules.characters.characters_service, while a change to api.src.modules.characters.characters_service can't break api.src.modules.ai.ai_types.
Position
Below the diagonal: api.src.modules.characters.characters_service uses a module listed above it, which is the healthy direction.
api.src.modules.characters.characters_service uses api.src.modules.auth.world-owner_service, so a change to api.src.modules.auth.world-owner_service can break api.src.modules.characters.characters_service, while a change to api.src.modules.characters.characters_service can't break api.src.modules.auth.world-owner_service.
Position
Below the diagonal: api.src.modules.characters.characters_service uses a module listed above it, which is the healthy direction.
api.src.modules.characters.characters_service uses api.src.modules.characters.character_entity, so a change to api.src.modules.characters.character_entity can break api.src.modules.characters.characters_service, while a change to api.src.modules.characters.characters_service can't break api.src.modules.characters.character_entity.
Position
Below the diagonal: api.src.modules.characters.characters_service uses a module listed above it, which is the healthy direction.
api.src.modules.characters.characters_service uses api.src.modules.characters.character-blueprint_service, so a change to api.src.modules.characters.character-blueprint_service can break api.src.modules.characters.characters_service, while a change to api.src.modules.characters.characters_service can't break api.src.modules.characters.character-blueprint_service.
Position
Below the diagonal: api.src.modules.characters.characters_service uses a module listed above it, which is the healthy direction.
api.src.modules.characters.characters_service uses api.src.modules.cyber-avatar.cyber-avatar_service, so a change to api.src.modules.cyber-avatar.cyber-avatar_service can break api.src.modules.characters.characters_service, while a change to api.src.modules.characters.characters_service can't break api.src.modules.cyber-avatar.cyber-avatar_service.
Position
Below the diagonal: api.src.modules.characters.characters_service uses a module listed above it, which is the healthy direction.
api.src.modules.wiki.services.wiki-edit_service uses api.src.modules.characters.character_entity, so a change to api.src.modules.characters.character_entity can break api.src.modules.wiki.services.wiki-edit_service, while a change to api.src.modules.wiki.services.wiki-edit_service can't break api.src.modules.characters.character_entity.
Position
Below the diagonal: api.src.modules.wiki.services.wiki-edit_service uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in api.src.modules.wiki.services.wiki-edit_service uses a type in api.src.modules.characters.character-blueprint_service.
api.src.modules.wiki.services.wiki-edit_service uses api.src.modules.characters.character-blueprint_service, so a change to api.src.modules.characters.character-blueprint_service can break api.src.modules.wiki.services.wiki-edit_service, while a change to api.src.modules.wiki.services.wiki-edit_service can't break api.src.modules.characters.character-blueprint_service.
Position
Below the diagonal: api.src.modules.wiki.services.wiki-edit_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.favorites_service uses api.src.modules.chat.conversation_entity, so a change to api.src.modules.chat.conversation_entity can break api.src.modules.chat.favorites_service, while a change to api.src.modules.chat.favorites_service can't break api.src.modules.chat.conversation_entity.
Position
Below the diagonal: api.src.modules.chat.favorites_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.favorites_service uses api.src.modules.chat.message_entity, so a change to api.src.modules.chat.message_entity can break api.src.modules.chat.favorites_service, while a change to api.src.modules.chat.favorites_service can't break api.src.modules.chat.message_entity.
Position
Below the diagonal: api.src.modules.chat.favorites_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.favorites_service uses api.src.modules.config.config_service, so a change to api.src.modules.config.config_service can break api.src.modules.chat.favorites_service, while a change to api.src.modules.chat.favorites_service can't break api.src.modules.config.config_service.
Position
Below the diagonal: api.src.modules.chat.favorites_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.favorites_service uses api.src.modules.auth.world-owner_service, so a change to api.src.modules.auth.world-owner_service can break api.src.modules.chat.favorites_service, while a change to api.src.modules.chat.favorites_service can't break api.src.modules.auth.world-owner_service.
Position
Below the diagonal: api.src.modules.chat.favorites_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.favorites_service uses api.src.modules.cyber-avatar.cyber-avatar_service, so a change to api.src.modules.cyber-avatar.cyber-avatar_service can break api.src.modules.chat.favorites_service, while a change to api.src.modules.chat.favorites_service can't break api.src.modules.cyber-avatar.cyber-avatar_service.
Position
Below the diagonal: api.src.modules.chat.favorites_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.favorites_service uses api.src.modules.characters.characters_service, so a change to api.src.modules.characters.characters_service can break api.src.modules.chat.favorites_service, while a change to api.src.modules.chat.favorites_service can't break api.src.modules.characters.characters_service.
Position
Below the diagonal: api.src.modules.chat.favorites_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.reply-artifact-job_service uses api.src.modules.chat.chat_types, so a change to api.src.modules.chat.chat_types can break api.src.modules.chat.reply-artifact-job_service, while a change to api.src.modules.chat.reply-artifact-job_service can't break api.src.modules.chat.chat_types.
Position
Below the diagonal: api.src.modules.chat.reply-artifact-job_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.reply-artifact-job_service uses api.src.modules.chat.conversation_entity, so a change to api.src.modules.chat.conversation_entity can break api.src.modules.chat.reply-artifact-job_service, while a change to api.src.modules.chat.reply-artifact-job_service can't break api.src.modules.chat.conversation_entity.
Position
Below the diagonal: api.src.modules.chat.reply-artifact-job_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.reply-artifact-job_service uses api.src.modules.chat.message_entity, so a change to api.src.modules.chat.message_entity can break api.src.modules.chat.reply-artifact-job_service, while a change to api.src.modules.chat.reply-artifact-job_service can't break api.src.modules.chat.message_entity.
Position
Below the diagonal: api.src.modules.chat.reply-artifact-job_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.reply-artifact-job_service uses api.src.modules.auth.world-owner_service, so a change to api.src.modules.auth.world-owner_service can break api.src.modules.chat.reply-artifact-job_service, while a change to api.src.modules.chat.reply-artifact-job_service can't break api.src.modules.auth.world-owner_service.
Position
Below the diagonal: api.src.modules.chat.reply-artifact-job_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.reply-artifact-job_service uses api.src.modules.ai.ai-orchestrator_service, so a change to api.src.modules.ai.ai-orchestrator_service can break api.src.modules.chat.reply-artifact-job_service, while a change to api.src.modules.chat.reply-artifact-job_service can't break api.src.modules.ai.ai-orchestrator_service.
Position
Below the diagonal: api.src.modules.chat.reply-artifact-job_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.reply-artifact-job_service uses api.src.modules.characters.characters_service, so a change to api.src.modules.characters.characters_service can break api.src.modules.chat.reply-artifact-job_service, while a change to api.src.modules.chat.reply-artifact-job_service can't break api.src.modules.characters.characters_service.
Position
Below the diagonal: api.src.modules.chat.reply-artifact-job_service uses a module listed above it, which is the healthy direction.
27→28 api.src.modules.chat.reply-artifact-job_service uses api.src.modules.chat.chat_servicepart of a loop✕
Connections
1 pair of types, where a type in api.src.modules.chat.reply-artifact-job_service uses a type in api.src.modules.chat.chat_service.
api.src.modules.chat.reply-artifact-job_service uses api.src.modules.chat.chat_service, so a change to api.src.modules.chat.chat_service can break api.src.modules.chat.reply-artifact-job_service, while a change to api.src.modules.chat.reply-artifact-job_service can't break api.src.modules.chat.chat_service.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
27→30 api.src.modules.chat.reply-artifact-job_service uses api.src.modules.chat.chat_gatewaypart of a loop✕
Connections
1 pair of types, where a type in api.src.modules.chat.reply-artifact-job_service uses a type in api.src.modules.chat.chat_gateway.
api.src.modules.chat.reply-artifact-job_service uses api.src.modules.chat.chat_gateway, so a change to api.src.modules.chat.chat_gateway can break api.src.modules.chat.reply-artifact-job_service, while a change to api.src.modules.chat.reply-artifact-job_service can't break api.src.modules.chat.chat_gateway.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
api.src.modules.chat.chat_service uses api.src.modules.chat.chat_types, so a change to api.src.modules.chat.chat_types can break api.src.modules.chat.chat_service, while a change to api.src.modules.chat.chat_service can't break api.src.modules.chat.chat_types.
Position
Below the diagonal: api.src.modules.chat.chat_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.chat_service uses api.src.modules.chat.conversation_entity, so a change to api.src.modules.chat.conversation_entity can break api.src.modules.chat.chat_service, while a change to api.src.modules.chat.chat_service can't break api.src.modules.chat.conversation_entity.
Position
Below the diagonal: api.src.modules.chat.chat_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.chat_service uses api.src.modules.chat.message_entity, so a change to api.src.modules.chat.message_entity can break api.src.modules.chat.chat_service, while a change to api.src.modules.chat.chat_service can't break api.src.modules.chat.message_entity.
Position
Below the diagonal: api.src.modules.chat.chat_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.chat_service uses api.src.modules.auth.world-owner_service, so a change to api.src.modules.auth.world-owner_service can break api.src.modules.chat.chat_service, while a change to api.src.modules.chat.chat_service can't break api.src.modules.auth.world-owner_service.
Position
Below the diagonal: api.src.modules.chat.chat_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.chat_service uses api.src.modules.config.world-language_service, so a change to api.src.modules.config.world-language_service can break api.src.modules.chat.chat_service, while a change to api.src.modules.chat.chat_service can't break api.src.modules.config.world-language_service.
Position
Below the diagonal: api.src.modules.chat.chat_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.chat_service uses api.src.modules.ai.ai-orchestrator_service, so a change to api.src.modules.ai.ai-orchestrator_service can break api.src.modules.chat.chat_service, while a change to api.src.modules.chat.chat_service can't break api.src.modules.ai.ai-orchestrator_service.
Position
Below the diagonal: api.src.modules.chat.chat_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.chat_service uses api.src.modules.cyber-avatar.cyber-avatar_service, so a change to api.src.modules.cyber-avatar.cyber-avatar_service can break api.src.modules.chat.chat_service, while a change to api.src.modules.chat.chat_service can't break api.src.modules.cyber-avatar.cyber-avatar_service.
Position
Below the diagonal: api.src.modules.chat.chat_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.chat_service uses api.src.modules.reminder-runtime.reminder-runtime_service, so a change to api.src.modules.reminder-runtime.reminder-runtime_service can break api.src.modules.chat.chat_service, while a change to api.src.modules.chat.chat_service can't break api.src.modules.reminder-runtime.reminder-runtime_service.
Position
Below the diagonal: api.src.modules.chat.chat_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.chat_service uses api.src.modules.characters.characters_service, so a change to api.src.modules.characters.characters_service can break api.src.modules.chat.chat_service, while a change to api.src.modules.chat.chat_service can't break api.src.modules.characters.characters_service.
Position
Below the diagonal: api.src.modules.chat.chat_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.chat_service uses api.src.modules.chat.reply-artifact-job_service, so a change to api.src.modules.chat.reply-artifact-job_service can break api.src.modules.chat.chat_service, while a change to api.src.modules.chat.chat_service can't break api.src.modules.chat.reply-artifact-job_service.
Position
Below the diagonal: api.src.modules.chat.chat_service uses a module listed above it, which is the healthy direction.
apps.app.src.routes uses api.src.modules.chat.chat_types, so a change to api.src.modules.chat.chat_types can break apps.app.src.routes, while a change to apps.app.src.routes can't break api.src.modules.chat.chat_types.
Position
Below the diagonal: apps.app.src.routes uses a module listed above it, which is the healthy direction.
apps.app.src.routes uses packages.contracts.src.cloud, so a change to packages.contracts.src.cloud can break apps.app.src.routes, while a change to apps.app.src.routes can't break packages.contracts.src.cloud.
Position
Below the diagonal: apps.app.src.routes uses a module listed above it, which is the healthy direction.
apps.app.src.routes uses api.src.modules.chat.favorites_service, so a change to api.src.modules.chat.favorites_service can break apps.app.src.routes, while a change to apps.app.src.routes can't break api.src.modules.chat.favorites_service.
Position
Below the diagonal: apps.app.src.routes uses a module listed above it, which is the healthy direction.
api.src.modules.chat.chat_gateway uses api.src.modules.config.world-language_service, so a change to api.src.modules.config.world-language_service can break api.src.modules.chat.chat_gateway, while a change to api.src.modules.chat.chat_gateway can't break api.src.modules.config.world-language_service.
Position
Below the diagonal: api.src.modules.chat.chat_gateway uses a module listed above it, which is the healthy direction.
api.src.modules.chat.chat_gateway uses api.src.modules.chat.chat_service, so a change to api.src.modules.chat.chat_service can break api.src.modules.chat.chat_gateway, while a change to api.src.modules.chat.chat_gateway can't break api.src.modules.chat.chat_service.
Position
Below the diagonal: api.src.modules.chat.chat_gateway uses a module listed above it, which is the healthy direction.
api.src.modules.social.social_service uses api.src.modules.auth.user_entity, so a change to api.src.modules.auth.user_entity can break api.src.modules.social.social_service, while a change to api.src.modules.social.social_service can't break api.src.modules.auth.user_entity.
Position
Below the diagonal: api.src.modules.social.social_service uses a module listed above it, which is the healthy direction.
api.src.modules.social.social_service uses api.src.modules.auth.world-owner_service, so a change to api.src.modules.auth.world-owner_service can break api.src.modules.social.social_service, while a change to api.src.modules.social.social_service can't break api.src.modules.auth.world-owner_service.
Position
Below the diagonal: api.src.modules.social.social_service uses a module listed above it, which is the healthy direction.
api.src.modules.social.social_service uses api.src.modules.characters.character_entity, so a change to api.src.modules.characters.character_entity can break api.src.modules.social.social_service, while a change to api.src.modules.social.social_service can't break api.src.modules.characters.character_entity.
Position
Below the diagonal: api.src.modules.social.social_service uses a module listed above it, which is the healthy direction.
api.src.modules.social.social_service uses api.src.modules.config.world-language_service, so a change to api.src.modules.config.world-language_service can break api.src.modules.social.social_service, while a change to api.src.modules.social.social_service can't break api.src.modules.config.world-language_service.
Position
Below the diagonal: api.src.modules.social.social_service uses a module listed above it, which is the healthy direction.
api.src.modules.social.social_service uses api.src.modules.ai.ai-orchestrator_service, so a change to api.src.modules.ai.ai-orchestrator_service can break api.src.modules.social.social_service, while a change to api.src.modules.social.social_service can't break api.src.modules.ai.ai-orchestrator_service.
Position
Below the diagonal: api.src.modules.social.social_service uses a module listed above it, which is the healthy direction.
api.src.modules.social.social_service uses api.src.modules.cyber-avatar.cyber-avatar_service, so a change to api.src.modules.cyber-avatar.cyber-avatar_service can break api.src.modules.social.social_service, while a change to api.src.modules.social.social_service can't break api.src.modules.cyber-avatar.cyber-avatar_service.
Position
Below the diagonal: api.src.modules.social.social_service uses a module listed above it, which is the healthy direction.
api.src.modules.social.social_service uses api.src.modules.characters.characters_service, so a change to api.src.modules.characters.characters_service can break api.src.modules.social.social_service, while a change to api.src.modules.social.social_service can't break api.src.modules.characters.characters_service.
Position
Below the diagonal: api.src.modules.social.social_service uses a module listed above it, which is the healthy direction.
api.src.modules.social.social_service uses api.src.modules.chat.chat_service, so a change to api.src.modules.chat.chat_service can break api.src.modules.social.social_service, while a change to api.src.modules.social.social_service can't break api.src.modules.chat.chat_service.
Position
Below the diagonal: api.src.modules.social.social_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.group_service uses api.src.modules.ai.ai_types, so a change to api.src.modules.ai.ai_types can break api.src.modules.chat.group_service, while a change to api.src.modules.chat.group_service can't break api.src.modules.ai.ai_types.
Position
Below the diagonal: api.src.modules.chat.group_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.group_service uses api.src.modules.chat.chat_types, so a change to api.src.modules.chat.chat_types can break api.src.modules.chat.group_service, while a change to api.src.modules.chat.group_service can't break api.src.modules.chat.chat_types.
Position
Below the diagonal: api.src.modules.chat.group_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.group_service uses api.src.modules.chat.conversation_entity, so a change to api.src.modules.chat.conversation_entity can break api.src.modules.chat.group_service, while a change to api.src.modules.chat.group_service can't break api.src.modules.chat.conversation_entity.
Position
Below the diagonal: api.src.modules.chat.group_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.group_service uses api.src.modules.chat.message_entity, so a change to api.src.modules.chat.message_entity can break api.src.modules.chat.group_service, while a change to api.src.modules.chat.group_service can't break api.src.modules.chat.message_entity.
Position
Below the diagonal: api.src.modules.chat.group_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.group_service uses api.src.modules.auth.world-owner_service, so a change to api.src.modules.auth.world-owner_service can break api.src.modules.chat.group_service, while a change to api.src.modules.chat.group_service can't break api.src.modules.auth.world-owner_service.
Position
Below the diagonal: api.src.modules.chat.group_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.group_service uses api.src.modules.config.world-language_service, so a change to api.src.modules.config.world-language_service can break api.src.modules.chat.group_service, while a change to api.src.modules.chat.group_service can't break api.src.modules.config.world-language_service.
Position
Below the diagonal: api.src.modules.chat.group_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.group_service uses api.src.modules.ai.ai-orchestrator_service, so a change to api.src.modules.ai.ai-orchestrator_service can break api.src.modules.chat.group_service, while a change to api.src.modules.chat.group_service can't break api.src.modules.ai.ai-orchestrator_service.
Position
Below the diagonal: api.src.modules.chat.group_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.group_service uses api.src.modules.cyber-avatar.cyber-avatar_service, so a change to api.src.modules.cyber-avatar.cyber-avatar_service can break api.src.modules.chat.group_service, while a change to api.src.modules.chat.group_service can't break api.src.modules.cyber-avatar.cyber-avatar_service.
Position
Below the diagonal: api.src.modules.chat.group_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.group_service uses api.src.modules.characters.characters_service, so a change to api.src.modules.characters.characters_service can break api.src.modules.chat.group_service, while a change to api.src.modules.chat.group_service can't break api.src.modules.characters.characters_service.
Position
Below the diagonal: api.src.modules.chat.group_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.group_service uses api.src.modules.chat.reply-artifact-job_service, so a change to api.src.modules.chat.reply-artifact-job_service can break api.src.modules.chat.group_service, while a change to api.src.modules.chat.group_service can't break api.src.modules.chat.reply-artifact-job_service.
Position
Below the diagonal: api.src.modules.chat.group_service uses a module listed above it, which is the healthy direction.
api.src.modules.chat.group_service uses api.src.modules.chat.chat_gateway, so a change to api.src.modules.chat.chat_gateway can break api.src.modules.chat.group_service, while a change to api.src.modules.chat.group_service can't break api.src.modules.chat.chat_gateway.
Position
Below the diagonal: api.src.modules.chat.group_service uses a module listed above it, which is the healthy direction.
api.src.modules.feed.feed_service uses api.src.modules.minimax.minimax-quota_service, so a change to api.src.modules.minimax.minimax-quota_service can break api.src.modules.feed.feed_service, while a change to api.src.modules.feed.feed_service can't break api.src.modules.minimax.minimax-quota_service.
Position
Below the diagonal: api.src.modules.feed.feed_service uses a module listed above it, which is the healthy direction.
api.src.modules.feed.feed_service uses api.src.modules.auth.world-owner_service, so a change to api.src.modules.auth.world-owner_service can break api.src.modules.feed.feed_service, while a change to api.src.modules.feed.feed_service can't break api.src.modules.auth.world-owner_service.
Position
Below the diagonal: api.src.modules.feed.feed_service uses a module listed above it, which is the healthy direction.
api.src.modules.feed.feed_service uses api.src.modules.config.world-language_service, so a change to api.src.modules.config.world-language_service can break api.src.modules.feed.feed_service, while a change to api.src.modules.feed.feed_service can't break api.src.modules.config.world-language_service.
Position
Below the diagonal: api.src.modules.feed.feed_service uses a module listed above it, which is the healthy direction.
api.src.modules.feed.feed_service uses api.src.modules.minimax.minimax-job_service, so a change to api.src.modules.minimax.minimax-job_service can break api.src.modules.feed.feed_service, while a change to api.src.modules.feed.feed_service can't break api.src.modules.minimax.minimax-job_service.
Position
Below the diagonal: api.src.modules.feed.feed_service uses a module listed above it, which is the healthy direction.
api.src.modules.feed.feed_service uses api.src.modules.ai.ai-orchestrator_service, so a change to api.src.modules.ai.ai-orchestrator_service can break api.src.modules.feed.feed_service, while a change to api.src.modules.feed.feed_service can't break api.src.modules.ai.ai-orchestrator_service.
Position
Below the diagonal: api.src.modules.feed.feed_service uses a module listed above it, which is the healthy direction.
api.src.modules.feed.feed_service uses api.src.modules.cyber-avatar.cyber-avatar_service, so a change to api.src.modules.cyber-avatar.cyber-avatar_service can break api.src.modules.feed.feed_service, while a change to api.src.modules.feed.feed_service can't break api.src.modules.cyber-avatar.cyber-avatar_service.
Position
Below the diagonal: api.src.modules.feed.feed_service uses a module listed above it, which is the healthy direction.
api.src.modules.feed.feed_service uses api.src.modules.characters.characters_service, so a change to api.src.modules.characters.characters_service can break api.src.modules.feed.feed_service, while a change to api.src.modules.feed.feed_service can't break api.src.modules.characters.characters_service.
Position
Below the diagonal: api.src.modules.feed.feed_service uses a module listed above it, which is the healthy direction.
api.src.modules.feed.feed_service uses api.src.modules.chat.chat_service, so a change to api.src.modules.chat.chat_service can break api.src.modules.feed.feed_service, while a change to api.src.modules.feed.feed_service can't break api.src.modules.chat.chat_service.
Position
Below the diagonal: api.src.modules.feed.feed_service uses a module listed above it, which is the healthy direction.
api.src.modules.feed.feed_service uses api.src.modules.chat.chat_gateway, so a change to api.src.modules.chat.chat_gateway can break api.src.modules.feed.feed_service, while a change to api.src.modules.feed.feed_service can't break api.src.modules.chat.chat_gateway.
Position
Below the diagonal: api.src.modules.feed.feed_service uses a module listed above it, which is the healthy direction.
api.src.modules.feed.feed_service uses api.src.modules.social.social_service, so a change to api.src.modules.social.social_service can break api.src.modules.feed.feed_service, while a change to api.src.modules.feed.feed_service can't break api.src.modules.social.social_service.
Position
Below the diagonal: api.src.modules.feed.feed_service uses a module listed above it, which is the healthy direction.
api.src.modules.followup-runtime.followup-runtime_service uses api.src.modules.chat.conversation_entity, so a change to api.src.modules.chat.conversation_entity can break api.src.modules.followup-runtime.followup-runtime_service, while a change to api.src.modules.followup-runtime.followup-runtime_service can't break api.src.modules.chat.conversation_entity.
Position
Below the diagonal: api.src.modules.followup-runtime.followup-runtime_service uses a module listed above it, which is the healthy direction.
api.src.modules.followup-runtime.followup-runtime_service uses api.src.modules.chat.message_entity, so a change to api.src.modules.chat.message_entity can break api.src.modules.followup-runtime.followup-runtime_service, while a change to api.src.modules.followup-runtime.followup-runtime_service can't break api.src.modules.chat.message_entity.
Position
Below the diagonal: api.src.modules.followup-runtime.followup-runtime_service uses a module listed above it, which is the healthy direction.
api.src.modules.followup-runtime.followup-runtime_service uses api.src.modules.auth.world-owner_service, so a change to api.src.modules.auth.world-owner_service can break api.src.modules.followup-runtime.followup-runtime_service, while a change to api.src.modules.followup-runtime.followup-runtime_service can't break api.src.modules.auth.world-owner_service.
Position
Below the diagonal: api.src.modules.followup-runtime.followup-runtime_service uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in api.src.modules.followup-runtime.followup-runtime_service uses a type in api.src.modules.config.world-language_service.
api.src.modules.followup-runtime.followup-runtime_service uses api.src.modules.config.world-language_service, so a change to api.src.modules.config.world-language_service can break api.src.modules.followup-runtime.followup-runtime_service, while a change to api.src.modules.followup-runtime.followup-runtime_service can't break api.src.modules.config.world-language_service.
Position
Below the diagonal: api.src.modules.followup-runtime.followup-runtime_service uses a module listed above it, which is the healthy direction.
api.src.modules.followup-runtime.followup-runtime_service uses api.src.modules.ai.ai-orchestrator_service, so a change to api.src.modules.ai.ai-orchestrator_service can break api.src.modules.followup-runtime.followup-runtime_service, while a change to api.src.modules.followup-runtime.followup-runtime_service can't break api.src.modules.ai.ai-orchestrator_service.
Position
Below the diagonal: api.src.modules.followup-runtime.followup-runtime_service uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in api.src.modules.followup-runtime.followup-runtime_service uses a type in api.src.modules.cyber-avatar.cyber-avatar_service.
api.src.modules.followup-runtime.followup-runtime_service uses api.src.modules.cyber-avatar.cyber-avatar_service, so a change to api.src.modules.cyber-avatar.cyber-avatar_service can break api.src.modules.followup-runtime.followup-runtime_service, while a change to api.src.modules.followup-runtime.followup-runtime_service can't break api.src.modules.cyber-avatar.cyber-avatar_service.
Position
Below the diagonal: api.src.modules.followup-runtime.followup-runtime_service uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in api.src.modules.followup-runtime.followup-runtime_service uses a type in api.src.modules.characters.characters_service.
api.src.modules.followup-runtime.followup-runtime_service uses api.src.modules.characters.characters_service, so a change to api.src.modules.characters.characters_service can break api.src.modules.followup-runtime.followup-runtime_service, while a change to api.src.modules.followup-runtime.followup-runtime_service can't break api.src.modules.characters.characters_service.
Position
Below the diagonal: api.src.modules.followup-runtime.followup-runtime_service uses a module listed above it, which is the healthy direction.
api.src.modules.followup-runtime.followup-runtime_service uses api.src.modules.chat.chat_service, so a change to api.src.modules.chat.chat_service can break api.src.modules.followup-runtime.followup-runtime_service, while a change to api.src.modules.followup-runtime.followup-runtime_service can't break api.src.modules.chat.chat_service.
Position
Below the diagonal: api.src.modules.followup-runtime.followup-runtime_service uses a module listed above it, which is the healthy direction.
api.src.modules.followup-runtime.followup-runtime_service uses api.src.modules.chat.chat_gateway, so a change to api.src.modules.chat.chat_gateway can break api.src.modules.followup-runtime.followup-runtime_service, while a change to api.src.modules.followup-runtime.followup-runtime_service can't break api.src.modules.chat.chat_gateway.
Position
Below the diagonal: api.src.modules.followup-runtime.followup-runtime_service uses a module listed above it, which is the healthy direction.
api.src.modules.followup-runtime.followup-runtime_service uses api.src.modules.social.social_service, so a change to api.src.modules.social.social_service can break api.src.modules.followup-runtime.followup-runtime_service, while a change to api.src.modules.followup-runtime.followup-runtime_service can't break api.src.modules.social.social_service.
Position
Below the diagonal: api.src.modules.followup-runtime.followup-runtime_service uses a module listed above it, which is the healthy direction.
api.src.modules.need-discovery.need-discovery_service uses api.src.modules.chat.conversation_entity, so a change to api.src.modules.chat.conversation_entity can break api.src.modules.need-discovery.need-discovery_service, while a change to api.src.modules.need-discovery.need-discovery_service can't break api.src.modules.chat.conversation_entity.
Position
Below the diagonal: api.src.modules.need-discovery.need-discovery_service uses a module listed above it, which is the healthy direction.
api.src.modules.need-discovery.need-discovery_service uses api.src.modules.chat.message_entity, so a change to api.src.modules.chat.message_entity can break api.src.modules.need-discovery.need-discovery_service, while a change to api.src.modules.need-discovery.need-discovery_service can't break api.src.modules.chat.message_entity.
Position
Below the diagonal: api.src.modules.need-discovery.need-discovery_service uses a module listed above it, which is the healthy direction.
api.src.modules.need-discovery.need-discovery_service uses api.src.modules.auth.world-owner_service, so a change to api.src.modules.auth.world-owner_service can break api.src.modules.need-discovery.need-discovery_service, while a change to api.src.modules.need-discovery.need-discovery_service can't break api.src.modules.auth.world-owner_service.
Position
Below the diagonal: api.src.modules.need-discovery.need-discovery_service uses a module listed above it, which is the healthy direction.
api.src.modules.need-discovery.need-discovery_service uses api.src.modules.characters.character_entity, so a change to api.src.modules.characters.character_entity can break api.src.modules.need-discovery.need-discovery_service, while a change to api.src.modules.need-discovery.need-discovery_service can't break api.src.modules.characters.character_entity.
Position
Below the diagonal: api.src.modules.need-discovery.need-discovery_service uses a module listed above it, which is the healthy direction.
api.src.modules.need-discovery.need-discovery_service uses api.src.modules.config.world-language_service, so a change to api.src.modules.config.world-language_service can break api.src.modules.need-discovery.need-discovery_service, while a change to api.src.modules.need-discovery.need-discovery_service can't break api.src.modules.config.world-language_service.
Position
Below the diagonal: api.src.modules.need-discovery.need-discovery_service uses a module listed above it, which is the healthy direction.
api.src.modules.need-discovery.need-discovery_service uses api.src.modules.ai.ai-orchestrator_service, so a change to api.src.modules.ai.ai-orchestrator_service can break api.src.modules.need-discovery.need-discovery_service, while a change to api.src.modules.need-discovery.need-discovery_service can't break api.src.modules.ai.ai-orchestrator_service.
Position
Below the diagonal: api.src.modules.need-discovery.need-discovery_service uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in api.src.modules.need-discovery.need-discovery_service uses a type in api.src.modules.characters.character-blueprint_service.
api.src.modules.need-discovery.need-discovery_service uses api.src.modules.characters.character-blueprint_service, so a change to api.src.modules.characters.character-blueprint_service can break api.src.modules.need-discovery.need-discovery_service, while a change to api.src.modules.need-discovery.need-discovery_service can't break api.src.modules.characters.character-blueprint_service.
Position
Below the diagonal: api.src.modules.need-discovery.need-discovery_service uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in api.src.modules.need-discovery.need-discovery_service uses a type in api.src.modules.cyber-avatar.cyber-avatar_service.
api.src.modules.need-discovery.need-discovery_service uses api.src.modules.cyber-avatar.cyber-avatar_service, so a change to api.src.modules.cyber-avatar.cyber-avatar_service can break api.src.modules.need-discovery.need-discovery_service, while a change to api.src.modules.need-discovery.need-discovery_service can't break api.src.modules.cyber-avatar.cyber-avatar_service.
Position
Below the diagonal: api.src.modules.need-discovery.need-discovery_service uses a module listed above it, which is the healthy direction.
api.src.modules.need-discovery.need-discovery_service uses api.src.modules.characters.characters_service, so a change to api.src.modules.characters.characters_service can break api.src.modules.need-discovery.need-discovery_service, while a change to api.src.modules.need-discovery.need-discovery_service can't break api.src.modules.characters.characters_service.
Position
Below the diagonal: api.src.modules.need-discovery.need-discovery_service uses a module listed above it, which is the healthy direction.
api.src.modules.need-discovery.need-discovery_service uses api.src.modules.chat.favorites_service, so a change to api.src.modules.chat.favorites_service can break api.src.modules.need-discovery.need-discovery_service, while a change to api.src.modules.need-discovery.need-discovery_service can't break api.src.modules.chat.favorites_service.
Position
Below the diagonal: api.src.modules.need-discovery.need-discovery_service uses a module listed above it, which is the healthy direction.
api.src.modules.need-discovery.need-discovery_service uses api.src.modules.social.social_service, so a change to api.src.modules.social.social_service can break api.src.modules.need-discovery.need-discovery_service, while a change to api.src.modules.need-discovery.need-discovery_service can't break api.src.modules.social.social_service.
Position
Below the diagonal: api.src.modules.need-discovery.need-discovery_service uses a module listed above it, which is the healthy direction.
api.src.modules.social.shake-discovery_service uses api.src.modules.chat.conversation_entity, so a change to api.src.modules.chat.conversation_entity can break api.src.modules.social.shake-discovery_service, while a change to api.src.modules.social.shake-discovery_service can't break api.src.modules.chat.conversation_entity.
Position
Below the diagonal: api.src.modules.social.shake-discovery_service uses a module listed above it, which is the healthy direction.
api.src.modules.social.shake-discovery_service uses api.src.modules.chat.message_entity, so a change to api.src.modules.chat.message_entity can break api.src.modules.social.shake-discovery_service, while a change to api.src.modules.social.shake-discovery_service can't break api.src.modules.chat.message_entity.
Position
Below the diagonal: api.src.modules.social.shake-discovery_service uses a module listed above it, which is the healthy direction.
api.src.modules.social.shake-discovery_service uses api.src.modules.config.config_service, so a change to api.src.modules.config.config_service can break api.src.modules.social.shake-discovery_service, while a change to api.src.modules.social.shake-discovery_service can't break api.src.modules.config.config_service.
Position
Below the diagonal: api.src.modules.social.shake-discovery_service uses a module listed above it, which is the healthy direction.
api.src.modules.social.shake-discovery_service uses api.src.modules.subscription.subscription_service, so a change to api.src.modules.subscription.subscription_service can break api.src.modules.social.shake-discovery_service, while a change to api.src.modules.social.shake-discovery_service can't break api.src.modules.subscription.subscription_service.
Position
Below the diagonal: api.src.modules.social.shake-discovery_service uses a module listed above it, which is the healthy direction.
api.src.modules.social.shake-discovery_service uses api.src.modules.auth.world-owner_service, so a change to api.src.modules.auth.world-owner_service can break api.src.modules.social.shake-discovery_service, while a change to api.src.modules.social.shake-discovery_service can't break api.src.modules.auth.world-owner_service.
Position
Below the diagonal: api.src.modules.social.shake-discovery_service uses a module listed above it, which is the healthy direction.
api.src.modules.social.shake-discovery_service uses api.src.modules.characters.character_entity, so a change to api.src.modules.characters.character_entity can break api.src.modules.social.shake-discovery_service, while a change to api.src.modules.social.shake-discovery_service can't break api.src.modules.characters.character_entity.
Position
Below the diagonal: api.src.modules.social.shake-discovery_service uses a module listed above it, which is the healthy direction.
api.src.modules.social.shake-discovery_service uses api.src.modules.config.world-language_service, so a change to api.src.modules.config.world-language_service can break api.src.modules.social.shake-discovery_service, while a change to api.src.modules.social.shake-discovery_service can't break api.src.modules.config.world-language_service.
Position
Below the diagonal: api.src.modules.social.shake-discovery_service uses a module listed above it, which is the healthy direction.
api.src.modules.social.shake-discovery_service uses api.src.modules.ai.ai-orchestrator_service, so a change to api.src.modules.ai.ai-orchestrator_service can break api.src.modules.social.shake-discovery_service, while a change to api.src.modules.social.shake-discovery_service can't break api.src.modules.ai.ai-orchestrator_service.
Position
Below the diagonal: api.src.modules.social.shake-discovery_service uses a module listed above it, which is the healthy direction.
api.src.modules.social.shake-discovery_service uses api.src.modules.characters.character-blueprint_service, so a change to api.src.modules.characters.character-blueprint_service can break api.src.modules.social.shake-discovery_service, while a change to api.src.modules.social.shake-discovery_service can't break api.src.modules.characters.character-blueprint_service.
Position
Below the diagonal: api.src.modules.social.shake-discovery_service uses a module listed above it, which is the healthy direction.
api.src.modules.social.shake-discovery_service uses api.src.modules.cyber-avatar.cyber-avatar_service, so a change to api.src.modules.cyber-avatar.cyber-avatar_service can break api.src.modules.social.shake-discovery_service, while a change to api.src.modules.social.shake-discovery_service can't break api.src.modules.cyber-avatar.cyber-avatar_service.
Position
Below the diagonal: api.src.modules.social.shake-discovery_service uses a module listed above it, which is the healthy direction.
api.src.modules.social.shake-discovery_service uses api.src.modules.chat.favorites_service, so a change to api.src.modules.chat.favorites_service can break api.src.modules.social.shake-discovery_service, while a change to api.src.modules.social.shake-discovery_service can't break api.src.modules.chat.favorites_service.
Position
Below the diagonal: api.src.modules.social.shake-discovery_service uses a module listed above it, which is the healthy direction.
api.src.modules.social.shake-discovery_service uses api.src.modules.social.social_service, so a change to api.src.modules.social.social_service can break api.src.modules.social.shake-discovery_service, while a change to api.src.modules.social.shake-discovery_service can't break api.src.modules.social.social_service.
Position
Below the diagonal: api.src.modules.social.shake-discovery_service uses a module listed above it, which is the healthy direction.
api.src.modules.moments.moments_service uses api.src.modules.ai.ai_types, so a change to api.src.modules.ai.ai_types can break api.src.modules.moments.moments_service, while a change to api.src.modules.moments.moments_service can't break api.src.modules.ai.ai_types.
Position
Below the diagonal: api.src.modules.moments.moments_service uses a module listed above it, which is the healthy direction.
api.src.modules.moments.moments_service uses api.src.modules.minimax.minimax-quota_service, so a change to api.src.modules.minimax.minimax-quota_service can break api.src.modules.moments.moments_service, while a change to api.src.modules.moments.moments_service can't break api.src.modules.minimax.minimax-quota_service.
Position
Below the diagonal: api.src.modules.moments.moments_service uses a module listed above it, which is the healthy direction.
api.src.modules.moments.moments_service uses api.src.modules.auth.world-owner_service, so a change to api.src.modules.auth.world-owner_service can break api.src.modules.moments.moments_service, while a change to api.src.modules.moments.moments_service can't break api.src.modules.auth.world-owner_service.
Position
Below the diagonal: api.src.modules.moments.moments_service uses a module listed above it, which is the healthy direction.
api.src.modules.moments.moments_service uses api.src.modules.characters.character_entity, so a change to api.src.modules.characters.character_entity can break api.src.modules.moments.moments_service, while a change to api.src.modules.moments.moments_service can't break api.src.modules.characters.character_entity.
Position
Below the diagonal: api.src.modules.moments.moments_service uses a module listed above it, which is the healthy direction.
api.src.modules.moments.moments_service uses api.src.modules.config.world-language_service, so a change to api.src.modules.config.world-language_service can break api.src.modules.moments.moments_service, while a change to api.src.modules.moments.moments_service can't break api.src.modules.config.world-language_service.
Position
Below the diagonal: api.src.modules.moments.moments_service uses a module listed above it, which is the healthy direction.
api.src.modules.moments.moments_service uses api.src.modules.minimax.minimax-job_service, so a change to api.src.modules.minimax.minimax-job_service can break api.src.modules.moments.moments_service, while a change to api.src.modules.moments.moments_service can't break api.src.modules.minimax.minimax-job_service.
Position
Below the diagonal: api.src.modules.moments.moments_service uses a module listed above it, which is the healthy direction.
api.src.modules.moments.moments_service uses api.src.modules.ai.ai-orchestrator_service, so a change to api.src.modules.ai.ai-orchestrator_service can break api.src.modules.moments.moments_service, while a change to api.src.modules.moments.moments_service can't break api.src.modules.ai.ai-orchestrator_service.
Position
Below the diagonal: api.src.modules.moments.moments_service uses a module listed above it, which is the healthy direction.
api.src.modules.moments.moments_service uses api.src.modules.cyber-avatar.cyber-avatar_service, so a change to api.src.modules.cyber-avatar.cyber-avatar_service can break api.src.modules.moments.moments_service, while a change to api.src.modules.moments.moments_service can't break api.src.modules.cyber-avatar.cyber-avatar_service.
Position
Below the diagonal: api.src.modules.moments.moments_service uses a module listed above it, which is the healthy direction.
api.src.modules.moments.moments_service uses api.src.modules.reminder-runtime.reminder-runtime_service, so a change to api.src.modules.reminder-runtime.reminder-runtime_service can break api.src.modules.moments.moments_service, while a change to api.src.modules.moments.moments_service can't break api.src.modules.reminder-runtime.reminder-runtime_service.
Position
Below the diagonal: api.src.modules.moments.moments_service uses a module listed above it, which is the healthy direction.
api.src.modules.moments.moments_service uses api.src.modules.characters.characters_service, so a change to api.src.modules.characters.characters_service can break api.src.modules.moments.moments_service, while a change to api.src.modules.moments.moments_service can't break api.src.modules.characters.characters_service.
Position
Below the diagonal: api.src.modules.moments.moments_service uses a module listed above it, which is the healthy direction.
api.src.modules.moments.moments_service uses api.src.modules.social.social_service, so a change to api.src.modules.social.social_service can break api.src.modules.moments.moments_service, while a change to api.src.modules.moments.moments_service can't break api.src.modules.social.social_service.
Position
Below the diagonal: api.src.modules.moments.moments_service uses a module listed above it, which is the healthy direction.
api.src.modules.moments.moments_service uses api.src.modules.feed.feed_service, so a change to api.src.modules.feed.feed_service can break api.src.modules.moments.moments_service, while a change to api.src.modules.moments.moments_service can't break api.src.modules.feed.feed_service.
Position
Below the diagonal: api.src.modules.moments.moments_service uses a module listed above it, which is the healthy direction.
api.src.modules.scheduler.scheduler_service uses api.src.modules.auth.user_entity, so a change to api.src.modules.auth.user_entity can break api.src.modules.scheduler.scheduler_service, while a change to api.src.modules.scheduler.scheduler_service can't break api.src.modules.auth.user_entity.
Position
Below the diagonal: api.src.modules.scheduler.scheduler_service uses a module listed above it, which is the healthy direction.
api.src.modules.scheduler.scheduler_service uses api.src.modules.chat.conversation_entity, so a change to api.src.modules.chat.conversation_entity can break api.src.modules.scheduler.scheduler_service, while a change to api.src.modules.scheduler.scheduler_service can't break api.src.modules.chat.conversation_entity.
Position
Below the diagonal: api.src.modules.scheduler.scheduler_service uses a module listed above it, which is the healthy direction.
api.src.modules.scheduler.scheduler_service uses api.src.modules.chat.message_entity, so a change to api.src.modules.chat.message_entity can break api.src.modules.scheduler.scheduler_service, while a change to api.src.modules.scheduler.scheduler_service can't break api.src.modules.chat.message_entity.
Position
Below the diagonal: api.src.modules.scheduler.scheduler_service uses a module listed above it, which is the healthy direction.
api.src.modules.scheduler.scheduler_service uses api.src.modules.minimax.minimax-quota_service, so a change to api.src.modules.minimax.minimax-quota_service can break api.src.modules.scheduler.scheduler_service, while a change to api.src.modules.scheduler.scheduler_service can't break api.src.modules.minimax.minimax-quota_service.
Position
Below the diagonal: api.src.modules.scheduler.scheduler_service uses a module listed above it, which is the healthy direction.
api.src.modules.scheduler.scheduler_service uses api.src.modules.subscription.subscription_service, so a change to api.src.modules.subscription.subscription_service can break api.src.modules.scheduler.scheduler_service, while a change to api.src.modules.scheduler.scheduler_service can't break api.src.modules.subscription.subscription_service.
Position
Below the diagonal: api.src.modules.scheduler.scheduler_service uses a module listed above it, which is the healthy direction.
api.src.modules.scheduler.scheduler_service uses api.src.modules.auth.world-owner_service, so a change to api.src.modules.auth.world-owner_service can break api.src.modules.scheduler.scheduler_service, while a change to api.src.modules.scheduler.scheduler_service can't break api.src.modules.auth.world-owner_service.
Position
Below the diagonal: api.src.modules.scheduler.scheduler_service uses a module listed above it, which is the healthy direction.
api.src.modules.scheduler.scheduler_service uses api.src.modules.characters.character_entity, so a change to api.src.modules.characters.character_entity can break api.src.modules.scheduler.scheduler_service, while a change to api.src.modules.scheduler.scheduler_service can't break api.src.modules.characters.character_entity.
Position
Below the diagonal: api.src.modules.scheduler.scheduler_service uses a module listed above it, which is the healthy direction.
api.src.modules.scheduler.scheduler_service uses api.src.modules.config.world-language_service, so a change to api.src.modules.config.world-language_service can break api.src.modules.scheduler.scheduler_service, while a change to api.src.modules.scheduler.scheduler_service can't break api.src.modules.config.world-language_service.
Position
Below the diagonal: api.src.modules.scheduler.scheduler_service uses a module listed above it, which is the healthy direction.
api.src.modules.scheduler.scheduler_service uses api.src.modules.ai.ai-orchestrator_service, so a change to api.src.modules.ai.ai-orchestrator_service can break api.src.modules.scheduler.scheduler_service, while a change to api.src.modules.scheduler.scheduler_service can't break api.src.modules.ai.ai-orchestrator_service.
Position
Below the diagonal: api.src.modules.scheduler.scheduler_service uses a module listed above it, which is the healthy direction.
api.src.modules.scheduler.scheduler_service uses api.src.modules.cyber-avatar.cyber-avatar_service, so a change to api.src.modules.cyber-avatar.cyber-avatar_service can break api.src.modules.scheduler.scheduler_service, while a change to api.src.modules.scheduler.scheduler_service can't break api.src.modules.cyber-avatar.cyber-avatar_service.
Position
Below the diagonal: api.src.modules.scheduler.scheduler_service uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in api.src.modules.scheduler.scheduler_service uses a type in api.src.modules.reminder-runtime.reminder-runtime_service.
api.src.modules.scheduler.scheduler_service uses api.src.modules.reminder-runtime.reminder-runtime_service, so a change to api.src.modules.reminder-runtime.reminder-runtime_service can break api.src.modules.scheduler.scheduler_service, while a change to api.src.modules.scheduler.scheduler_service can't break api.src.modules.reminder-runtime.reminder-runtime_service.
Position
Below the diagonal: api.src.modules.scheduler.scheduler_service uses a module listed above it, which is the healthy direction.
api.src.modules.scheduler.scheduler_service uses api.src.modules.characters.characters_service, so a change to api.src.modules.characters.characters_service can break api.src.modules.scheduler.scheduler_service, while a change to api.src.modules.scheduler.scheduler_service can't break api.src.modules.characters.characters_service.
Position
Below the diagonal: api.src.modules.scheduler.scheduler_service uses a module listed above it, which is the healthy direction.
api.src.modules.scheduler.scheduler_service uses api.src.modules.chat.chat_service, so a change to api.src.modules.chat.chat_service can break api.src.modules.scheduler.scheduler_service, while a change to api.src.modules.scheduler.scheduler_service can't break api.src.modules.chat.chat_service.
Position
Below the diagonal: api.src.modules.scheduler.scheduler_service uses a module listed above it, which is the healthy direction.
api.src.modules.scheduler.scheduler_service uses api.src.modules.chat.chat_gateway, so a change to api.src.modules.chat.chat_gateway can break api.src.modules.scheduler.scheduler_service, while a change to api.src.modules.scheduler.scheduler_service can't break api.src.modules.chat.chat_gateway.
Position
Below the diagonal: api.src.modules.scheduler.scheduler_service uses a module listed above it, which is the healthy direction.
api.src.modules.scheduler.scheduler_service uses api.src.modules.social.social_service, so a change to api.src.modules.social.social_service can break api.src.modules.scheduler.scheduler_service, while a change to api.src.modules.scheduler.scheduler_service can't break api.src.modules.social.social_service.
Position
Below the diagonal: api.src.modules.scheduler.scheduler_service uses a module listed above it, which is the healthy direction.
api.src.modules.scheduler.scheduler_service uses api.src.modules.feed.feed_service, so a change to api.src.modules.feed.feed_service can break api.src.modules.scheduler.scheduler_service, while a change to api.src.modules.scheduler.scheduler_service can't break api.src.modules.feed.feed_service.
Position
Below the diagonal: api.src.modules.scheduler.scheduler_service uses a module listed above it, which is the healthy direction.
api.src.modules.scheduler.scheduler_service uses api.src.modules.followup-runtime.followup-runtime_service, so a change to api.src.modules.followup-runtime.followup-runtime_service can break api.src.modules.scheduler.scheduler_service, while a change to api.src.modules.scheduler.scheduler_service can't break api.src.modules.followup-runtime.followup-runtime_service.
Position
Below the diagonal: api.src.modules.scheduler.scheduler_service uses a module listed above it, which is the healthy direction.
api.src.modules.scheduler.scheduler_service uses api.src.modules.need-discovery.need-discovery_service, so a change to api.src.modules.need-discovery.need-discovery_service can break api.src.modules.scheduler.scheduler_service, while a change to api.src.modules.scheduler.scheduler_service can't break api.src.modules.need-discovery.need-discovery_service.
Position
Below the diagonal: api.src.modules.scheduler.scheduler_service uses a module listed above it, which is the healthy direction.
api.src.modules.scheduler.scheduler_service uses api.src.modules.moments.moments_service, so a change to api.src.modules.moments.moments_service can break api.src.modules.scheduler.scheduler_service, while a change to api.src.modules.scheduler.scheduler_service can't break api.src.modules.moments.moments_service.
Position
Below the diagonal: api.src.modules.scheduler.scheduler_service uses a module listed above it, which is the healthy direction.
packages.contracts.src uses api.src.modules.chat.chat_types, so a change to api.src.modules.chat.chat_types can break packages.contracts.src, while a change to packages.contracts.src can't break api.src.modules.chat.chat_types.
Position
Below the diagonal: packages.contracts.src uses a module listed above it, which is the healthy direction.
packages.contracts.src uses api.src.modules.games.farm.farm_types, so a change to api.src.modules.games.farm.farm_types can break packages.contracts.src, while a change to packages.contracts.src can't break api.src.modules.games.farm.farm_types.
Position
Below the diagonal: packages.contracts.src uses a module listed above it, which is the healthy direction.
packages.contracts.src uses packages.contracts.src.cloud, so a change to packages.contracts.src.cloud can break packages.contracts.src, while a change to packages.contracts.src can't break packages.contracts.src.cloud.
Position
Below the diagonal: packages.contracts.src uses a module listed above it, which is the healthy direction.
packages.contracts.src uses api.src.modules.moments.moments_service, so a change to api.src.modules.moments.moments_service can break packages.contracts.src, while a change to packages.contracts.src can't break api.src.modules.moments.moments_service.
Position
Below the diagonal: packages.contracts.src uses a module listed above it, which is the healthy direction.
api.src.modules.admin.admin_controller uses api.src.modules.characters.character_entity, so a change to api.src.modules.characters.character_entity can break api.src.modules.admin.admin_controller, while a change to api.src.modules.admin.admin_controller can't break api.src.modules.characters.character_entity.
Position
Below the diagonal: api.src.modules.admin.admin_controller uses a module listed above it, which is the healthy direction.
api.src.modules.admin.admin_controller uses api.src.modules.config.world-language_service, so a change to api.src.modules.config.world-language_service can break api.src.modules.admin.admin_controller, while a change to api.src.modules.admin.admin_controller can't break api.src.modules.config.world-language_service.
Position
Below the diagonal: api.src.modules.admin.admin_controller uses a module listed above it, which is the healthy direction.
api.src.modules.admin.admin_controller uses api.src.modules.ai.ai-orchestrator_service, so a change to api.src.modules.ai.ai-orchestrator_service can break api.src.modules.admin.admin_controller, while a change to api.src.modules.admin.admin_controller can't break api.src.modules.ai.ai-orchestrator_service.
Position
Below the diagonal: api.src.modules.admin.admin_controller uses a module listed above it, which is the healthy direction.
api.src.modules.admin.admin_controller uses api.src.modules.admin.reply-logic-admin_service, so a change to api.src.modules.admin.reply-logic-admin_service can break api.src.modules.admin.admin_controller, while a change to api.src.modules.admin.admin_controller can't break api.src.modules.admin.reply-logic-admin_service.
Position
Below the diagonal: api.src.modules.admin.admin_controller uses a module listed above it, which is the healthy direction.
api.src.modules.admin.admin_controller uses api.src.modules.characters.character-blueprint_service, so a change to api.src.modules.characters.character-blueprint_service can break api.src.modules.admin.admin_controller, while a change to api.src.modules.admin.admin_controller can't break api.src.modules.characters.character-blueprint_service.
Position
Below the diagonal: api.src.modules.admin.admin_controller uses a module listed above it, which is the healthy direction.
api.src.modules.admin.admin_controller uses api.src.modules.reminder-runtime.reminder-runtime_service, so a change to api.src.modules.reminder-runtime.reminder-runtime_service can break api.src.modules.admin.admin_controller, while a change to api.src.modules.admin.admin_controller can't break api.src.modules.reminder-runtime.reminder-runtime_service.
Position
Below the diagonal: api.src.modules.admin.admin_controller uses a module listed above it, which is the healthy direction.
api.src.modules.admin.admin_controller uses api.src.modules.followup-runtime.followup-runtime_service, so a change to api.src.modules.followup-runtime.followup-runtime_service can break api.src.modules.admin.admin_controller, while a change to api.src.modules.admin.admin_controller can't break api.src.modules.followup-runtime.followup-runtime_service.
Position
Below the diagonal: api.src.modules.admin.admin_controller uses a module listed above it, which is the healthy direction.
api.src.modules.admin.admin_controller uses api.src.modules.need-discovery.need-discovery_service, so a change to api.src.modules.need-discovery.need-discovery_service can break api.src.modules.admin.admin_controller, while a change to api.src.modules.admin.admin_controller can't break api.src.modules.need-discovery.need-discovery_service.
Position
Below the diagonal: api.src.modules.admin.admin_controller uses a module listed above it, which is the healthy direction.
api.src.modules.admin.admin_controller uses api.src.modules.scheduler.scheduler_service, so a change to api.src.modules.scheduler.scheduler_service can break api.src.modules.admin.admin_controller, while a change to api.src.modules.admin.admin_controller can't break api.src.modules.scheduler.scheduler_service.
Position
Below the diagonal: api.src.modules.admin.admin_controller uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 42.6 · Weak · gated by D1, D2, R10, R3 ·
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
462
High / Critical
A03:2025 — Software Supply Chain Failures
153
High / Critical
A02:2025 — Security Misconfiguration
13
High / Critical
A07:2025 — Authentication Failures
2
High / Critical
A01:2025 — Broken Access Control
1
Medium
Roadmap
Top priorities: 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; Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies; Turn off TypeORM synchronize: true in production and let the versioned migrations own the schema.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
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.
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.
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.
Bring the 100 bodies over 60 down to 60 or less in Cognitive Complexity — start with sticker-panel.StickerPanel (cognitive 677), contacts-page.ContactsPage (cognitive 517), dom-text-localizer.translateKnownPattern (cognitive 445).
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 — 299
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 — 3222
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 — 149
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 9
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 92 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 — 92 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, 3649 of 3670 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 could not reach github.com, which the analyzer sandbox's egress allowlist does not carry (Error: Error when performing the request to https://registry.npmjs.org/pnpm/-/pnpm-8.15.4.tgz; for troubleshooting help, see https://github.com/nodejs/corepack#…), 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.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT MEASURED: the JavaScript/TypeScript suite could not be re-run in the analyzer sandbox — the dependency install for the repository root could not reach github.com, which the analyzer sandbox's egress allowlist does not carry (Error: Error when performing the request to https://registry.npmjs.org/pnpm/-/pnpm-8.15.4.tgz; for troubleshooting help, see https://github.com/nodejs/corepack#…), so the suite never ran. This is OUR limitation, not a defect in the repo — it is excluded from the score.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the its own test command under node's V8 coverage suite in the repository root was NOT MEASURED: the dependency install for the repository root could not reach github.com, which the analyzer sandbox's egress allowlist does not carry (Error: Error when performing the request to https://registry.npmjs.org/pnpm/-/pnpm-8.15.4.tgz; for troubleshooting help, see https://github.com/nodejs/corepack#…), 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 jest suite in api/ was NOT MEASURED: the dependency install for api/ could not reach github.com, which the analyzer sandbox's egress allowlist does not carry (Error: Error when performing the request to https://registry.npmjs.org/pnpm/-/pnpm-8.15.4.tgz; for troubleshooting help, see https://github.com/nodejs/corepack#…), 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 apps/app/ was NOT MEASURED: the dependency install for apps/app/ could not reach github.com, which the analyzer sandbox's egress allowlist does not carry (Error: Error when performing the request to https://registry.npmjs.org/pnpm/-/pnpm-8.15.4.tgz; for troubleshooting help, see https://github.com/nodejs/corepack#…), 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 node:test suite in apps/cloud-api/ was NOT MEASURED: the dependency install for apps/cloud-api/ could not reach github.com, which the analyzer sandbox's egress allowlist does not carry (Error: Error when performing the request to https://registry.npmjs.org/pnpm/-/pnpm-8.15.4.tgz; for troubleshooting help, see https://github.com/nodejs/corepack#…), 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 apps/cloud-console/ was NOT MEASURED: the dependency install for apps/cloud-console/ could not reach github.com, which the analyzer sandbox's egress allowlist does not carry (Error: Error when performing the request to https://registry.npmjs.org/pnpm/-/pnpm-8.15.4.tgz; for troubleshooting help, see https://github.com/nodejs/corepack#…), 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.
D12 Dependency Hygiene — 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. Not scored — 2 Maven/Gradle manifest(s) were read, stating a version for 2 dependency(ies) and leaving 3 to a parent or an imported BOM, but no build resolved the dependency graph, so the outdated signal was not established. NOT a finding that these dependencies are current or healthy.
D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares REDACTED, but the licence verdict published here was taken over its crate dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 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 (apps/desktop/src-tauri/Cargo.toml), 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.
D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D24 compares a comment's words with the identifiers, literals and constructs of the code it annotates, using English function-word and rationale lexicons. Comments in another script or language were left unread rather than counted as clean.
D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D27 Navigability — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Tracing effort is measured over resolved call sites, and all 840 sampled here came from .js/.mjs/.ts files. This repository's .tsx source is a material share of its production lines and contributed none, so the score above is a verdict about the part that was read. Not a finding that the unread half navigates well — it is unmeasured.
D32 Data Compliance (PII/GDPR) — 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. `api/src/modules/admin/wechat-sync-admin.service.ts`, `api/src/modules/ai/ai-orchestrator.service.ts`, `REDACTED`, `api/src/modules/chat/digital-human-calls.service.ts`, `api/src/modules/chat/digital-human-provider.ts`, … (+49 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. 32 further occurrence(s) are not listed individually; the score already reflects all 72.
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. 21 further occurrence(s) are not listed individually; the score already reflects all 61.
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. 67 further occurrence(s) are not listed individually; the score already reflects all 107.
AX7 Slice cohesion — 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. 223 further occurrence(s) are not listed individually; the score already reflects all 263.
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. Boot via AndroidApp (apps/android-shell/android/app). the Android app did not build — `./gradlew :app:assembleDebug` exited 1: re:
Script 'apps/android-shell/android/app/capacitor.build.gradle' line: 10
* What went wrong:
A problem occurred evaluating script.
> Could not r…; runtime evidence skipped (launch chosen because apps/android-shell/android/app/build.gradle applies the Android application plugin and apps/android-shell/android/gradlew builds it).
DM6 Domain ↔ infrastructure boundary — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 17 further occurrence(s) are not listed individually; the score already reflects all 57.
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.
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. Some of this repository's production types come from a frontend that does not bind comparison operands to the members they read, which arm one needs, and those types were not walked for this dimension. The counts above speak for the languages that declare it.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
R10 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The filesystem refused the listing or the read of: download/platforms/wechat-channels/package/shared-assets. Every other path was read.
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. 1991 further occurrence(s) are not listed individually; the score already reflects all 2031.
R2 Cyclomatic Complexity — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 936 further occurrence(s) are not listed individually; the score already reflects all 976.
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. 214 further occurrence(s) are not listed individually; the score already reflects all 254.
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. 157 further occurrence(s) are not listed individually; the score already reflects all 197.
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. 121 further occurrence(s) are not listed individually; the score already reflects all 161.
X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 347 further occurrence(s) are not listed individually; the score already reflects all 387.
X26 Unsynchronised callback handoff — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 233 further occurrence(s) are not listed individually; the score already reflects all 273.
X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala, Rust, Go, Swift, Erlang, F# and Visual Basic source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP log through no library that carries a message's values as fields (pino, winston, bunyan, tslog, LogTape, roarr; Python's logging, structlog; PHP's PSR-3 loggers), so its log calls cannot be judged, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
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. 14 further occurrence(s) are not listed individually; the score already reflects all 54.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
D23 Boundary Type-Coupling: Boundary leakage is detected from type references across detected contexts — leaks that flow through primitives, serialization or shared infrastructure may not surface as a typed reference.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D32 Data Compliance (PII/GDPR): PII/GDPR signals are heuristic pattern matches in code — they flag likely handling concerns, not legal compliance, and cannot trace where data actually flows at runtime.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
C4 Data Retention: This control is scored from in-repo evidence only — its real-world effectiveness, exercised only at runtime, is outside a static scan.
C5 Data-Subject Rights: This control is scored from in-repo evidence only — absence of evidence here means the scan found no in-repo trace, not that the control does not exist.
DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of purity.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
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.
503 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was sticker-panel.StickerPanel at 376. A further 13 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 yinjie_desktop::desktop_text at 77 — they are counted neither in the figure above nor in this dimension's score. 3 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: apps/desktop/src-tauri/src/main.rs (yinjie_desktop::desktop_text at 77), apps/app/src/features/contacts/friend-request-scene-label.ts (friend-request-scene-label.getFriendRequestSourceLabel at 28), apps/cloud-api/src/world-access/world-access-state.ts (world-access-state.buildWorldAccessSnapshot at 16). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 492 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 25 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with sticker-panel.StickerPanel (cyclomatic 376), discover-feed-page.DiscoverFeedPage (cyclomatic 295), contacts-page.ContactsPage (cyclomatic 295). — 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 25 together lifts Cyclomatic Complexity from 2.0 to about 3.6/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 575 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 100 bodies over 60 down to 60 or less in Cognitive Complexity — start with sticker-panel.StickerPanel (cognitive 677), contacts-page.ContactsPage (cognitive 517), dom-text-localizer.translateKnownPattern (cognitive 445). — 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 100 together lifts Cognitive Complexity from 2.0 to about 4.6/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes6.5 / 10Adequate✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 326 FunctionTooLong finding(s) in God Classes — start with chat-message-list.tsx (9), channels-page.tsx (7), desktop-search-workspace.tsx (4). — One of this dimension's main actionable groups (326 warning-level).
Resolve the 175 FileTooLong finding(s) in God Classes — start with contact-import-parser.ts (2), root-layout.tsx (2), chat-message-list.tsx. — One of this dimension's main actionable groups (175 warning-level).
Resolve the 70 MethodTooLong finding(s) in God Classes — start with ai-orchestrator.service.ts (6), feed.service.ts (5), shake-discovery.service.ts (3). — One of this dimension's main actionable groups (70 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
23 duplicated block group(s) detected. 0.3 % of the production lines (1,326 of 503,068) are in a reported copy. A further 14 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. Measured on part of this repository only: .ts, .tsx (98% of production source) was not exposed to THIS dimension's token comparison and is not in this count; duplication there is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream.
+ 26 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 3 Duplicated block (9 lines × 3) finding(s) in Code Duplication — start with AppDelegate.swift (3). — One of this dimension's main actionable groups (3 warning-level).
Resolve the 2 Edited copies of one member (3 members, 3+ corresponding lines) finding(s) in Code Duplication — start with AppDelegate.swift (2). — One of this dimension's main actionable groups (2 warning-level).
Resolve the 2 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with _build.py (2). — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling9.1 / 10Stronggated by 2 serious findings✓ 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.
17 production modules (Gradle+Cargo+npm), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; edges a convention plugin adds from buildSrc or build-logic are not visible there; 3 module(s) off the main sequence, with abstractness counted on 14 of the 17 (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: @yinjie/config · ×2
Off the main sequence: @yinjie/contracts
What to do
Resolve the 2 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 5 Low cohesion finding(s) in Cohesion (LCOM4) — start with world-language.service.ts, admin.service.ts, cloud-alert-notifier.service.ts. — One of this dimension's main actionable groups (5 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D10 · Test Quality10.0 / 10Stronggated by 1 serious 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.
0 skipped, 1 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 613 tests.
No assertions: self-heals legacy desktop paths into desktop workspace protocolsapps/app/tests/desktop.desktop.browser.spec.ts:64
Mock-dominated test: does not re-seed an existing ownerapi/src/modules/tenancy/tenant.service.spec.ts:176
What to do
Resolve the 1 No assertions finding(s) in Test Quality — start with desktop.desktop.browser.spec.ts. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Mock-dominated test finding(s) in Test Quality — start with tenant.service.spec.ts. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
REDACTED scan ran and found no leaked secrets. 3 detection(s) were excluded as holding no minted credential in material that runs: a name, reference or comparison rather than a value, a readable phrase or pattern, a value that declares itself fake, or development, test, example, mock or demo material.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 560 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. ★ COVERAGE OF THIS VERDICT: it grades this repository's crate dependencies and nothing else. The repository also declares REDACTED, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Top hotspots: apps/app/src/components/chat-message-list.tsx (351×603=211653); apps/app/src/components/chat-composer.tsx (217×544=118048); apps/app/src/features/chat/stickers/sticker-panel.tsx (123×588=72324) Repeated repair below the complexity floor: apps/app/scripts/audit-desktop-web-routing.mjs (49 of 54 changes were fixes); apps/ios-shell/plugins/swift-stub/YinjieMobileBridgePlugin.swift (25 of 36 changes were fixes); apps/app/src/components/wechat-moment-card.tsx (24 of 33 changes were fixes)
Resolve the 287 Hotspot finding(s) in Churn × Complexity Hotspots — start with search-page.tsx (2), root-layout.tsx (2), chat-message-list.tsx. — One of this dimension's main actionable groups (287 warning-level).
Resolve the 98 Repeated repair finding(s) in Churn × Complexity Hotspots — start with AppDelegatePush.example.swift (2), audit-desktop-web-routing.mjs, YinjieMobileBridgePlugin.swift. — One of this dimension's main actionable groups (98 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 Factor6.7 / 10Adequate✓ 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.
331 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is api/src/modules/characters/celebrity-character-presets.ts. Counted over 979 of the 1581 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 · ×3
What to do
Resolve the 3 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (3 recommendation-level).
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
2 deducted task-comment markers across 475738 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 2 TodoComment finding(s) in Explicit Debt — start with wiki-character-video.service.ts, REDACTED. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
2 of 2 documentation facets pass in full. 62 document(s) read across 20 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.
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.
6 of 20 build units (Cargo, Gradle, Xcode, npm) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion · ×6apps/app/package.json:1
What to do
Resolve the 6 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with REDACTED (6). — One of this dimension's main actionable groups (6 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.
20 % of calls cross a namespace and 0 % go through an interface, but 98 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated. Measured over the .js/.mjs/.ts source only — this repository's .tsx was not sampled for call sites, so this score covers part of the tree, not all of it.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
1 finding(s): 0 critical, 1 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
What to do
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).
462 finding(s): 0 critical, 51 high, 410 medium, 1 low. 39 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 71 file(s) — `api/src/modules/admin/wechat-sync-admin.service.ts`, `api/src/modules/ai/ai-orchestrator.service.ts` (line 2526, line 2580, line 2581), `REDACTED` (line 52), `api/src/modules/chat/digital-human-calls.service.ts` (line 239), `api/src/modules/chat/digital-human-provider.ts` (line 164), … (+66 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 2 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 18 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
No action in Static Analysis (SAST) — all 39 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (39 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 67 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (44), REDACTED (21), REDACTED (2). — One of this dimension's main actionable groups (67 issue-level).
Resolve the 33 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (19), REDACTED (11), REDACTED (3). — One of this dimension's main actionable groups (33 warning-level).
Resolve the 16 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (12), REDACTED (3), REDACTED. — One of this dimension's main actionable groups (16 issue-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 3 High IaC finding(s) in IaC & Container Security — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).
Resolve the 7 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (7). — One of this dimension's main actionable groups (7 warning-level).
Resolve the 3 Low IaC finding(s) in IaC & Container Security — start with REDACTED (3). — One of this dimension's main actionable groups (3 recommendation-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D32 · Data Compliance (PII/GDPR)9.0 / 10Stronggated by 1 serious finding✓ Tool-verified
What it measures: Likely personal-data (PII / GDPR) handling concerns — logging or storing data without safeguards.
Method: Heuristic PII/GDPR LEAK scan via semgrep across the repo, using our own ruleset: personal data crossing a boundary it should not — reaching a log/console sink, a URL or query string, or unprotected browser storage. Matches map to severity and a 0-10 wide normalizer. A clean sweep is unscored rather than an unearned 10, and is a statement about the leak paths checked only — this dimension does not inventory the personal data a repository holds (the personal-data map and the C1-C5 compliance cards do that), so it never reports that a repository has no personal-data surface. Reported LOUDLY as a measurement gap if the ruleset is missing from the analyzer image. Exhaustive over the leak paths, advisory-leaning; degrades on parse failure.
1 finding(s): 0 critical, 0 high, 1 medium, 0 low. semgrep could not parse 54 file(s) — `api/src/modules/admin/wechat-sync-admin.service.ts`, `api/src/modules/ai/ai-orchestrator.service.ts`, `REDACTED`, `api/src/modules/chat/digital-human-calls.service.ts`, `api/src/modules/chat/digital-human-provider.ts`, … (+49 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
REDACTED
What to do
Resolve the 1 REDACTED finding(s) in Data Compliance (PII/GDPR) — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d32_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
Every significant source file has living knowledge — recently and meaningfully worked. Counted over 979 of the 1581 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 18 Boundary-crossing change coupling finding(s) in Change Coupling — start with admin-cloud.controller.ts (2), REDACTED (2), chat-message-list.tsx (2). — One of this dimension's main actionable groups (18 issue-level).
Resolve the 37 Change coupling finding(s) in Change Coupling — start with chat.service.ts (2), desktop-games-workspace.tsx (2), game-center-data.ts (2). — One of this dimension's main actionable groups (37 warning-level).
Resolve the 3 Change-coupling hub finding(s) in Change Coupling — start with REDACTED, REDACTED, ws.ts. — One of this dimension's main actionable groups (3 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.
+ 3 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 2 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 warning-level).
Resolve the 2 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — 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 3 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
✓ On the Gold path — maintain.
Detailed fixes: d44_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives5.0 / 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.
An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. (×16) — apps/app/src/components/chat-message-list.tsx:6110, apps/app/src/components/chat-message-list.tsx:6371, apps/app/src/components/chat-message-list.tsx:6539, …
Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation). (×3) — apps/app/src/components/moment-compose-media-preview.tsx:444, apps/app/src/components/moment-media-gallery.tsx:818, apps/app/src/routes/channels-page.tsx:3770
A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content. (×4) — apps/app/src/features/games/tank-war/tank-war-bake-sprites.ts:73, apps/app/src/features/games/tank-war/tank-war-bake-sprites.ts:153, apps/app/src/features/games/tank-war/tank-war-bake-sprites.ts:161, …
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 & labels6.7 / 10Strong✓ Tool-verified
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
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). (×5) — apps/app/src/components/moment-post-card.tsx:79, apps/app/src/components/moment-post-card.tsx:87, apps/app/src/features/cyber-avatar/cyber-avatar-report-sheet.tsx:94, …
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. — REDACTED:398
This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label. (×17) — apps/app/src/components/wechat-comment-bar.tsx:240, apps/app/src/features/contacts/management/contacts-bulk-action-bar.tsx:341, apps/app/src/features/contacts/voice-picker.tsx:400, …
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. (×13) — apps/app/src/features/contacts/desktop-contact-text-edit-dialog.tsx:206, apps/app/src/features/desktop/official-accounts/desktop-official-accounts-workspace.tsx:704, apps/app/src/features/shell/desktop-shell.tsx:754, …
This <video> 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. — apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx:1883
An element made editable (contenteditable, or role="textbox"/"searchbox" with a tab stop or key handling) is a text-entry control, and it has no aria-label, no aria-labelledby and no title, so assistive tech announces an unnamed edit field. Point aria-labelledby at its visible caption, or add an aria-label. — REDACTED:1363
This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×2) — apps/app/src/features/games/farm/components/gift-sheet.tsx:140, apps/app/src/features/games/tank-war/tank-war-game.tsx:275
What to do
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Do you agree with this assessment?
AC3 · Page structure7.7 / 10Strong✓ Tool-verified
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×3) — apps/app/index.html:2, apps/site/src/app/global-error.tsx:29, REDACTED:2
A page with no <title> gives no name in the tab, history or screen-reader page list. Declare it the way this router does — Next App Router `export const metadata = { title }`, React Router/Remix `export function meta`, TanStack Start `head`, or a Helmet/Head component. — apps/site/src/app/global-error.tsx:29
Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one. (×4) — apps/wiki/public/tutorial-en-US.html:225, apps/wiki/public/tutorial-ja-JP.html:216, apps/wiki/public/tutorial-ko-KR.html:216, …
The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). — apps/wiki/public/tutorial.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. (×6) — apps/app/src/components/avatar-encounter-transcript.tsx:151, apps/app/src/components/chat-message-list.tsx:6364, apps/app/src/components/chat-message-list.tsx:6526, …
This <div> binds wheel and double-click — pointer gestures with no keyboard form, a double-click among them. No click, no key handler, and no tabIndex={0}, so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabIndex={0} + a key handler alongside the double-click. — apps/app/src/components/chat-composer.tsx:5480
This <rect> binds pointerdown and double-click — pointer gestures with no keyboard form, a double-click among them. No click, no key handler, and no tabIndex={0}, so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabIndex={0} + a key handler alongside the double-click. — apps/app/src/components/chat-composer.tsx:5809
This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, 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. (×6) — apps/app/src/components/chat-composer.tsx:5187, apps/app/src/components/wechat-comment-bar.tsx:209, apps/app/src/features/chat/message-quote-selection-sheet.tsx:130, …
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. (×14) — apps/app/src/components/chat-message-list.tsx:7973, apps/app/src/components/chat-message-list.tsx:8211, apps/app/src/components/chat-message-list.tsx:8420, …
This <div> carries its own click handler, but it sits inside a <button> that performs a different action. A keyboard user reaches the <button> and activating it runs the <button>'s handler, never this one, so this action has no keyboard path at all. Role and tabindex cannot supply one: HTML forbids a <button> from containing interactive content or any descendant with a tabindex, so the browser will not put this element in the tab order however it is marked up. Move it out of the <button> and make it a sibling <button>, so each action has its own control. (×6) — apps/app/src/components/moment-media-gallery.tsx:300, apps/app/src/components/moment-media-gallery.tsx:351, apps/app/src/components/moment-media-gallery.tsx:421, …
This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens, 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. — apps/app/src/features/chat-details/mobile-details-action-sheet.tsx:178
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}. (×2) — apps/app/src/features/chat/stickers/sticker-panel.tsx:3144, apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx:1883
This <img> carries its own click handler, but it sits inside a <button> that performs a different action. A keyboard user reaches the <button> and activating it runs the <button>'s handler, never this one, so this action has no keyboard path at all. Role and tabindex cannot supply one: HTML forbids a <button> from containing interactive content or any descendant with a tabindex, so the browser will not put this element in the tab order however it is marked up. Move it out of the <button> and make it a sibling <button>, so each action has its own control. — apps/app/src/features/chat/stickers/sticker-panel.tsx:3339
This <form role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, 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) — apps/app/src/features/contacts/desktop-contact-text-edit-dialog.tsx:162, apps/app/src/features/desktop/chat/desktop-chat-text-edit-dialog.tsx:193
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.
This is not a valid WAI-ARIA attribute, so assistive technology ignores it (usually a typo). Use the correct aria-* attribute. (×21) — apps/app/src/components/moment-media-gallery.tsx:613, apps/app/src/components/wechat-comment-bar.tsx:209, apps/app/src/features/chat/mobile-group-call-screen.tsx:1370, …
aria-labelledby is present but empty, so it references no element and the relationship is lost. Point it at the id(s) of the target element, or remove it. (×3) — apps/app/src/features/chat/message-quote-selection-sheet.tsx:175, apps/app/src/routes/group-announcement-page.tsx:549, apps/app/src/routes/group-chat-edit-page.tsx:457
The checkbox role requires aria-checked to convey its state. Add it. — apps/app/src/routes/create-group-page.tsx:829
aria-hidden="true" here hides the subtree from assistive tech, but a focusable descendant stays in the tab order — a keyboard user can land on a control screen readers can't see. Add inert, take the descendants out of the tab order (tabindex="-1"), or drop aria-hidden. — apps/app/src/routes/official-accounts-page.tsx:194
What to do
Use valid, non-abstract roles, supply the ARIA state each role requires, and never put aria-hidden on a focusable element.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
`.boot-logo` moves (`animation: boot-pulse 1.2s 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. — apps/app/index.html:168
<span> moves — its `animate-bounce` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — apps/app/src/components/avatar-encounter-transcript.tsx:32
<textarea> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). (×7) — apps/app/src/components/chat-composer.tsx:3636, apps/app/src/components/chat-composer.tsx:3887, apps/app/src/components/wechat-comment-bar.tsx:240, …
<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). (×22) — apps/app/src/components/chat-composer.tsx:5307, apps/app/src/features/chat/chat-message-search-panel.tsx:445, apps/app/src/features/chat/chat-message-search-panel.tsx:569, …
<div> moves — its inline style sets `animation: yinjie-route-progress 1.1s cubic-bezier(0.4, 0, 0.2, 1) 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:. — apps/app/src/components/route-transition-indicator.tsx:42
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. — apps/app/src/components/share-card-modal.tsx:491
<div> moves — its inline style sets `transition: transform 120ms ease-out` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — apps/app/src/components/wechat-comment-bar.tsx:209
<select> 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). — apps/app/src/features/chat/chat-message-search-panel.tsx:587
<div> moves — its `animate-ping` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — apps/app/src/features/chat/digital-human-stage.tsx:90
<span> moves — its `animate-ping` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — apps/app/src/features/chat/wechat-call/speaking-indicator.tsx:85
<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). — apps/app/src/features/desktop/chat/desktop-chat-history-panel.tsx:902
<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). — REDACTED:1363
<button> moves — its inline style sets `animation: p.type` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — apps/app/src/features/games/farm/components/decoration-layer.tsx: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.
Other · Architecture — Whether any singleton service captures a scoped/transient dependency — a silent lifetime/threading bug.
Method: Roslyn scan: DI registrations parsed from AddSingleton/Scoped/Transient; each singleton checked for captured shorter-lifetime dependencies. Exhaustive, deterministic.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.
Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
Other · Architecture — Whether feature slices stay independent (no direct cross-slice references) — the discipline that makes vertical-slice architecture pay off.
Method: Roslyn scan (vertical-slice gated): feature slices resolved from namespaces (.Features.*, .Slices.*) or project names; cross-slice type references detected. Deterministic, traceable.
`ChatCallFallbackSectionProps` (slice 'chat-details') depends on `ChatCallFallbackKind` from slice 'chat'. — apps/app/src/features/chat-details/chat-call-fallback-section.tsx:12
`ChatCallFallbackSection` (slice 'chat-details') depends on `ChatCallFallbackNotice` from slice 'chat'. — apps/app/src/features/chat-details/chat-call-fallback-section.tsx:73
`ChatMessageSearchPanel` (slice 'chat') depends on `ChatDetailsShell` from slice 'chat-details'. — apps/app/src/features/chat/chat-message-search-panel.tsx:433
`ChatMessageSearchPanel` (slice 'chat') depends on `ChatDetailsSection` from slice 'chat-details'. — apps/app/src/features/chat/chat-message-search-panel.tsx:438
`ConversationThreadPanelProps` (slice 'chat') depends on `DesktopChatCallAction` from slice 'desktop'. — apps/app/src/features/chat/conversation-thread-panel.tsx:72
`ConversationThreadPanel` (slice 'chat') depends on `GiftToFriendSheet` from slice 'shop'. — apps/app/src/features/chat/conversation-thread-panel.tsx:1247
`GroupChatThreadPanelProps` (slice 'chat') depends on `DesktopChatCallAction` from slice 'desktop'. — apps/app/src/features/chat/group-chat-thread-panel.tsx:107
`GroupChatThreadPanel` (slice 'chat') depends on `buildDesktopChatRouteHash` from slice 'desktop'. — apps/app/src/features/chat/group-chat-thread-panel.tsx:1540
`MobileAiCallScreen` (slice 'chat') depends on `useDesktopLayout` from slice 'shell'. — apps/app/src/features/chat/mobile-ai-call-screen.tsx:94
`MobileAiCallScreen` (slice 'chat') depends on `buildDesktopChatThreadPath` from slice 'desktop'. — apps/app/src/features/chat/mobile-ai-call-screen.tsx:106
`MobileAiCallScreen` (slice 'chat') depends on `buildDesktopChatRouteHash` from slice 'desktop'. — apps/app/src/features/chat/mobile-ai-call-screen.tsx:113
`MobileGroupCallScreen` (slice 'chat') depends on `useDesktopLayout` from slice 'shell'. — apps/app/src/features/chat/mobile-group-call-screen.tsx:77
`MobileGroupCallScreen` (slice 'chat') depends on `buildDesktopChatThreadPath` from slice 'desktop'. — apps/app/src/features/chat/mobile-group-call-screen.tsx:89
`MobileGroupCallScreen` (slice 'chat') depends on `buildDesktopChatRouteHash` from slice 'desktop'. — apps/app/src/features/chat/mobile-group-call-screen.tsx:96
`ContactsWorkspaceShellProps` (slice 'contacts') depends on `DesktopContactsWorkspaceProps` from slice 'desktop'. — apps/app/src/features/contacts/contacts-workspace-shell.tsx:13
`ContactsWorkspaceShellProps` (slice 'contacts') depends on `SearchRouteSource` from slice 'search'. — apps/app/src/features/contacts/contacts-workspace-shell.tsx:24
`ContactsWorkspaceShell` (slice 'contacts') depends on `useDesktopSearchLauncher` from slice 'search'. — apps/app/src/features/contacts/contacts-workspace-shell.tsx:33
`ContactsWorkspaceShell` (slice 'contacts') depends on `DesktopContactsWorkspace` from slice 'desktop'. — apps/app/src/features/contacts/contacts-workspace-shell.tsx:52
`ContactsWorkspaceShell` (slice 'contacts') depends on `DesktopSearchDropdownPanel` from slice 'search'. — apps/app/src/features/contacts/contacts-workspace-shell.tsx:61
`ContactsManagementModal` (slice 'contacts') depends on `useDesktopLayout` from slice 'shell'. — apps/app/src/features/contacts/management/contacts-management-modal.tsx:39
`DesktopChannelsWorkspace` (slice 'desktop') depends on `stripToolCallSyntax` from slice 'moments'. — apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx:327
`DesktopChannelsWorkspace` (slice 'desktop') depends on `getChannelsSectionBadge` from slice 'channels'. — apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx:353
`DesktopChannelsWorkspace` (slice 'desktop') depends on `getChannelsEmptyState` from slice 'channels'. — apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx:1025
`DirectChatDetailsPanel` (slice 'desktop') depends on `useConversationBackground` from slice 'chat'. — apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:209
`DirectChatDetailsPanel` (slice 'desktop') depends on `getChatBackgroundLabel` from slice 'chat'. — apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:333
`DirectChatDetailsPanel` (slice 'desktop') depends on `buildDesktopContactsRouteHash` from slice 'contacts'. — apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:570
`DirectChatDetailsPanel` (slice 'desktop') depends on `buildDesktopAddFriendRouteHash` from slice 'contacts'. — apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:580
`DirectChatDetailsPanel` (slice 'desktop') depends on `buildDesktopFriendMomentsRouteHash` from slice 'moments'. — apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:601
`DirectChatDetailsPanel` (slice 'desktop') depends on `DesktopContactProfileHeader` from slice 'contacts'. — apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:799
`DirectChatDetailsPanel` (slice 'desktop') depends on `DesktopContactProfileSection` from slice 'contacts'. — apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:821
`DirectChatDetailsPanel` (slice 'desktop') depends on `DesktopContactProfileActionRow` from slice 'contacts'. — apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:831
`DirectChatDetailsPanel` (slice 'desktop') depends on `DesktopContactProfileRow` from slice 'contacts'. — apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:837
`DirectChatDetailsPanel` (slice 'desktop') depends on `buildCharacterDetailRouteHash` from slice 'contacts'. — apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:949
`DirectChatDetailsPanel` (slice 'desktop') depends on `buildMobileChatRouteHash` from slice 'chat'. — apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:985
`DirectChatDetailsPanel` (slice 'desktop') depends on `DesktopContactProfileToggleRow` from slice 'contacts'. — apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:1026
`DirectChatDetailsPanel` (slice 'desktop') depends on `DesktopContactTextEditDialog` from slice 'contacts'. — apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:1134
`GroupChatDetailsPanel` (slice 'desktop') depends on `useGroupBackground` from slice 'chat'. — apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:1184
`GroupChatDetailsPanel` (slice 'desktop') depends on `buildMobileGroupRouteHash` from slice 'chat'. — apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:1249
`GroupChatDetailsPanel` (slice 'desktop') depends on `getFriendDisplayName` from slice 'contacts'. — apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:1691
`DesktopChatWorkspaceProps` (slice 'desktop') depends on `ChatRouteContextNotice` from slice 'chat'. — apps/app/src/features/desktop/chat/desktop-chat-workspace.tsx:191
What to do
Keep slices independent: share cross-slice needs via an explicit contract/shared-kernel, not direct references between slices.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
Do you agree with this assessment?
C1 · Data Protection6.5 / 10Adequate✓ Tool-verified
Other · Security — Whether sensitive data is encrypted at rest and in transit and keys are vaulted.
Method: Roslyn plus filesystem scan: encryption presence (EF ColumnEncryption, key-vault references, HTTPS enforcement) and key-derivation KDF detection. Deterministic.
No in-app HTTPS enforcement, but a trusted-proxy setting ('trust proxy' / trustProxy) indicates a reverse-proxy topology — terminating TLS in the app would be wrong in this layout. Verify the reverse proxy enforces TLS. — apps/cloud-api/src/main.ts:55
What to do
Strengthen data-at-rest protection: vault your keys (AWS KMS / Secrets Manager, Azure Key Vault, GCP KMS / REDACTED Manager, HashiCorp Vault) and encrypt the most sensitive columns (typeorm-encrypted, prisma-field-encryption, mongoose-field-encryption or MongoDB CSFLE) — partial coverage still leaves gaps.
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.
Do you agree with this assessment?
C4 · Data Retention10.0 / 10Exemplary✓ Tool-verified
Other · Security — Whether data has a defined lifetime — retention periods, TTLs, cleanup jobs (storage limitation).
Method: Roslyn scan: retention/TTL configuration presence in schema; CascadeDelete detected but not scored as retention control. Deterministic, gated by PII presence.
Other · Security — Whether GDPR data-subject requests are supported in code — erasure, export/portability, consent.
Method: Roslyn scan: GDPR data-subject-rights corroboration (erasure/export/consent vocabulary co-occurring with subject-id store crossing or explicit GDPR pattern). Deterministic, gated by PII.
Corroborated rights: erasure ✓ · export ✗ · consent ✗. Each tick means this scan found code in the repository implementing that right — a deletion/anonymisation path for erasure, a data-export or portability path for export, and consent state recorded alongside the personal data it authorises. A ✗ therefore means no such code was recognised HERE, not that the right is unsupported: a capability provided by a platform, a manual runbook, or code spelled in a way this scan does not match is not visible to it. Confirm before treating a cross as a gap; where it is one, the right has to be fulfilled manually.
What to do
Implement data export/portability for a data subject (a machine-readable export of their personal data).
Track GDPR consent (lawful basis) alongside the personal data it authorises.
Other · Domain Modelling — Whether the domain layer stays free of infrastructure dependencies — a domain aggregate fused to a persistence ORM (TypeORM/Prisma/MikroORM/Sequelize/Mongoose) on its own declaration (active-record) couples the domain to infrastructure. The clean-architecture dependency rule.
Method: Roslyn (DDD-gated): domain-layer types scanned for infrastructure usage in member SIGNATURES and inside method/accessor BODIES — resolved calls and object-creations into EF/Marten/HTTP/Mongo/Redis/message-bus types (not just a namespace allowlist). Deterministic, symbol-resolved, exhaustive over domain-layer bodies, DDD-native.
Coverage: Domain layer identified by NAMESPACE heuristic; infrastructure then resolved by symbol in member SIGNATURES and method/accessor BODIES — rename the layer and the check evaporates.
FarmEventLogEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — api/src/modules/games/farm/entities/farm-event-log.entity.ts:10
FarmNpcStateEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — api/src/modules/games/farm/entities/farm-npc-state.entity.ts:16
FarmPlayerStateEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — api/src/modules/games/farm/entities/farm-player-state.entity.ts:19
FarmQuestProgressEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — api/src/modules/games/farm/entities/farm-quest-progress.entity.ts:11
FarmCheckinEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — api/src/modules/games/farm/entities/farm-checkin.entity.ts:9
ParkingWarEventLogEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — api/src/modules/games/parking-war/entities/parking-war-event-log.entity.ts:13
ParkingWarNpcStateEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — api/src/modules/games/parking-war/entities/parking-war-npc-state.entity.ts:22
ParkingWarPlayerStateEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — api/src/modules/games/parking-war/entities/parking-war-player-state.entity.ts:22
ParkingWarOccupancyEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — api/src/modules/games/parking-war/entities/parking-war-occupancy.entity.ts:25
AbuseFilterEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — api/src/modules/wiki/entities/abuse-filter.entity.ts:45
AbuseFilterHitEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — api/src/modules/wiki/entities/abuse-filter-hit.entity.ts:10
WikiFieldProtectionEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — api/src/modules/wiki/entities/wiki-field-protection.entity.ts:17
CharacterPageEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — api/src/modules/wiki/entities/character-page.entity.ts:9
CharacterRevisionEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — api/src/modules/wiki/entities/character-revision.entity.ts:27
EditSubmissionEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — api/src/modules/wiki/entities/edit-submission.entity.ts:9
UserWikiProfileEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — api/src/modules/wiki/entities/user-wiki-profile.entity.ts:3
WikiBlockEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — api/src/modules/wiki/entities/wiki-block.entity.ts:9
WikiProtectionLogEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — api/src/modules/wiki/entities/wiki-protection-log.entity.ts:9
WikiTalkThreadEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — api/src/modules/wiki/entities/wiki-talk-thread.entity.ts:10
WikiTalkPostEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — api/src/modules/wiki/entities/wiki-talk-post.entity.ts:9
WikiWatchlistEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — api/src/modules/wiki/entities/wiki-watchlist.entity.ts:3
UserPrivateCharacterEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — api/src/modules/wiki/entities/user-private-character.entity.ts:17
CharacterDraftEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — api/src/modules/wiki/entities/character-draft.entity.ts:22
AiGenerationJobEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — api/src/modules/wiki/entities/ai-generation-job.entity.ts:32
GamePageEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — api/src/modules/wiki/entities/game-page.entity.ts:15
GameRevisionEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — api/src/modules/wiki/entities/game-revision.entity.ts:17
GameGenerationJobEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — api/src/modules/wiki/entities/game-generation-job.entity.ts:22
CharacterVideoEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — api/src/modules/wiki/entities/character-video.entity.ts:20
CloudWorldEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — apps/cloud-api/src/entities/cloud-world.entity.ts:3
CloudAdminSessionEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — apps/cloud-api/src/entities/cloud-admin-session.entity.ts:3
CloudUserEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — apps/cloud-api/src/entities/cloud-user.entity.ts:10
PhoneVerificationSessionEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — apps/cloud-api/src/entities/phone-verification-session.entity.ts:3
CloudInstanceEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — apps/cloud-api/src/entities/cloud-instance.entity.ts:3
CloudWorldRequestEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — apps/cloud-api/src/entities/cloud-world-request.entity.ts:3
UserSubscriptionEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — apps/cloud-api/src/entities/user-subscription.entity.ts:10
WaitingSessionSyncTaskEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — apps/cloud-api/src/entities/waiting-session-sync-task.entity.ts:10
WorldLifecycleJobEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — apps/cloud-api/src/entities/world-lifecycle-job.entity.ts:3
WorldAccessSessionEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — apps/cloud-api/src/entities/world-access-session.entity.ts:3
EmailVerificationSessionEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — apps/cloud-api/src/entities/email-verification-session.entity.ts:9
CloudUserOAuthIdentityEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper. — apps/cloud-api/src/entities/cloud-user-oauth-identity.entity.ts:10
What to do
Keep the ORM/table mapping on a boundary data-model + mapper; leave the domain entity framework-free (map row↔domain through a repository).
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.
api.src.modules.admin.wechat-sync-admin_types.WechatSyncContactBundleValue's [messageCount, sampleMessages] are judged in api.src.modules.admin.wechat-sync-admin.service, api.src.modules.admin.wechat-sync-admin_service.WechatSyncAdminService — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
api.src.modules.characters.character_entity.CharacterEntity's [id, relationshipType, sourceKey] are judged in api.src.modules.chat.chat_service.ChatService, api.src.modules.self-agent.self-agent_service.SelfAgentService — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
api.src.modules.games.farm.farm_types.FarmPlot's [maturedAt, plantedAt] are judged in api.src.modules.games.farm.farm-state.service, api.src.modules.games.farm.farm-state_service.FarmStateService — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
What to do
Move each repeated judgement onto the type that owns the members it reads, so the rule has one home and cannot drift.
Other · Event-Driven — Whether event/message handlers avoid synchronous blocking waits — a blocking wait inside a handler stalls throughput and risks deadlock.
Method: Roslyn semantic scan (event-driven gated): event-handler bodies scanned for HTTP/gRPC invocations by resolved symbol type, not substring. Deterministic, semantic-resolved.
`src.read_desktop_locale` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — apps/desktop/src-tauri/src/main.rs:232
`src.write_desktop_locale` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::write`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — apps/desktop/src-tauri/src/main.rs:246
`src.resolve_runtime_paths` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::create_dir_all`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. (×2) — apps/desktop/src-tauri/src/main.rs:1919, apps/desktop/src-tauri/src/main.rs:1920
`src.probe_remote_health` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `reqwest::blocking::Client::builder`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — apps/desktop/src-tauri/src/main.rs:1943
`src.ensure_parent_dir_exists` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::create_dir_all`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — apps/desktop/src-tauri/src/main.rs:1987
What to do
Use the awaited twin of each blocking call, or move the work off the loop with `tokio::task::spawn_blocking` — a synchronous handler cannot simply `.await` in place.
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.
A placeholder string ("看着像 ios-shell.config.local.example.json …") is still in shipped code — typical of generated boilerplate that was never filled in. — apps/ios-shell/scripts/inject-runtime-config.mjs:60
What to do
Finish or delete the functions that still throw "not implemented", and replace placeholder text before shipping.
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.
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. (×30) — api/src/modules/chat/message-search.utils.ts:138, apps/app/src/components/chat-message-list.tsx:4986, apps/app/src/components/group-avatar-chip.tsx:44, …
`assertDailyStealQuota` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — api/src/modules/games/farm/farm-state.service.ts:507
`onError` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — apps/app/src/components/moment-media-gallery.tsx:234
`onOpenActionMenu` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — apps/app/src/components/moment-share-card-modal.tsx:62
`onOpenProfile` 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) — apps/app/src/routes/character-detail-page.tsx:1422, apps/app/src/routes/character-detail-page.tsx:1428
The guard above `return "desktop";` also returns `"desktop"`, so no input can make it matter. Implement the distinction that was intended, or delete the guard. — apps/cloud-api/src/auth/device-type.ts:27
The `if` and its `else` contain the same statements, so no input can make the condition matter. Implement the distinction that was intended, or drop the branch and keep the body. — apps/cloud-api/src/orchestration/local-process-compute-provider.service.ts:391
`listPersonaAssets` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — REDACTED:1870
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.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
Only 2/9 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `.`, `apps/app`, `apps/desktop/src-tauri`, `apps/ios-shell/ios/App` and 2 more.
`api/inspect-db.js` reports through `console.*` at line 29 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — api/inspect-db.js:29
`api/inspect-db.js` 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. — api/inspect-db.js:30
`api/inspect-db.js` reports through `console.*` at line 34 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — api/inspect-db.js:34
`api/inspect-db.js` reports through `console.*` at line 38 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — api/inspect-db.js:38
`REDACTED` reports through `console.*` at line 85 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:85
`REDACTED` reports through `console.*` at line 88 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:88
`REDACTED` reports through `console.*` at line 139 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:139
`REDACTED` reports through `console.*` at line 128 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:128
`api/src/proxy-bootstrap.ts` reports through `console.*` at line 18 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — api/src/proxy-bootstrap.ts:18
`api/src/proxy-bootstrap.ts` reports through `console.*` at line 23 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — api/src/proxy-bootstrap.ts:23
`api/src/modules/moderation/content-moderation.ts` reports through `console.*` at line 154 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — api/src/modules/moderation/content-moderation.ts:154
`api/src/database/database-path.ts` reports through `console.*` at line 204 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — api/src/database/database-path.ts:204
`api/src/database/database-path.ts` 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. — api/src/database/database-path.ts:214
`api/src/database/relationship-seed.ts` reports through `console.*` at line 17 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — api/src/database/relationship-seed.ts:17
`api/src/database/relationship-seed.ts` reports through `console.*` at line 63 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — api/src/database/relationship-seed.ts:63
`apps/cloud-api/src/auth/password-auth.service.ts` reports through `console.*` at line 257 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/cloud-api/src/auth/password-auth.service.ts:257
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Route service-code `console.*` output through the module's structured logger (with named fields), so delivery outcomes and failures reach the log pipeline with a level.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 4 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:6
`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:142
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. (×20) — api/src/modules/ai/minimax-native.client.ts:134, api/src/modules/characters/character-import-register.client.ts:47, api/src/modules/chat/document-extraction.service.ts:285, …
`http.request(` 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. — apps/cloud-api/src/world-api-proxy/world-api-proxy.service.ts:114
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.
Do you agree with this assessment?
P8 · Schema migrations3.0 / 10Weak✓ Tool-verified
Readiness · Readiness — Whether database schema changes go through versioned migrations rather than being auto-created from the model at startup.
Method: Roslyn scan: EF Core DbContext for a versioned migrations directory versus bare EnsureCreated usage; off .NET, a file scan of dependency manifests, migration histories (Flyway, Liquibase, Alembic, Django, Rails, Prisma, TypeORM, Knex/Sequelize, golang-migrate, goose, Laravel, Doctrine, Diesel/sqlx) and schema auto-create in production source or config. Exhaustive, deterministic.
This repository versions its schema (TypeORM migrations), but TypeORM synchronize: true here builds or alters the schema from the model as well, outside that history — the two paths can disagree about the shape, and a change made this way is never a reviewed migration. Turn it off and let TypeORM migrations own the schema. (×2) — api/src/wiki-app.module.ts:314, api/scripts/migrations/2026-mt-prep-schema-catchup.mjs:74
What to do
Turn off TypeORM synchronize: true in production and let the versioned migrations own the schema.
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 `resolveAuditServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — apps/app/scripts/lib/mobile-audit-fixtures.mjs:419
`existsSync` in `onModuleInit` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — apps/cloud-api/src/orchestration/local-process-compute-provider.service.ts:131
`mkdirSync` in `createInstance` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — apps/cloud-api/src/orchestration/local-process-compute-provider.service.ts:237
`mkdirSync` in `startInstance` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — apps/cloud-api/src/orchestration/local-process-compute-provider.service.ts:314
`mkdirSync` in `spawnChild` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — apps/cloud-api/src/orchestration/local-process-compute-provider.service.ts:706
`openSync` in `spawnChild` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — apps/cloud-api/src/orchestration/local-process-compute-provider.service.ts:707, apps/cloud-api/src/orchestration/local-process-compute-provider.service.ts:711
`existsSync` in `serve` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — apps/cloud-api/src/wiki-public/wiki-public.controller.ts:64
`rmSync` in `startService` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — apps/wechat-connector/src/upstream-service-manager.ts:175, apps/wechat-connector/src/upstream-service-manager.ts:176
`existsSync` in `ensureWeFlowBuild` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — apps/wechat-connector/src/upstream-service-manager.ts:1082, apps/wechat-connector/src/upstream-service-manager.ts:1087
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.4 / 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.
React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.
Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.
306 duplicated blocks under api/src/modules/ have copies in at least two of the sibling directories action-runtime, admin, agent-delegation, ai, analytics, auth (+27 more sibling(s) not listed) — 173 of them are reported below, and 133 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 306 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 306 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 306 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. — api/src/modules/cloud-runtime/cloud-token-usage-sync.service.ts:117
283 duplicated blocks under apps/app/src/ have copies in at least two of the sibling directories components, features, hooks, lib, routes, runtime — 167 of them are reported below, and 116 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 283 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 283 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 283 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — REDACTED:111
155 duplicated blocks under the repository root have copies in at least two of the sibling directories api, apps, packages, scripts — 64 of them are reported below, and 91 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 155 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 155 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 155 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/wechat-connector/src/contact-import-parser.ts:1
111 duplicated blocks under apps/app/src/features/ have copies in at least two of the sibling directories channels, chat, chat-details, contacts, cyber-avatar, desktop (+12 more sibling(s) not listed) — 75 of them are reported below, and 36 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 111 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 111 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 111 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/app/src/features/games/game-center-session-panel.tsx:37
68 duplicated blocks under apps/ have copies in at least two of the sibling directories android-shell, app, cloud-api, cloud-console, ios-shell, wechat-connector (+1 more sibling(s) not listed) — 30 of them are reported below, and 38 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 68 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 68 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 68 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/app/src/features/desktop/chat/desktop-chat-confirm-dialog.tsx:7
40 duplicated blocks under apps/cloud-api/src/ have copies in at least two of the sibling directories alerts, auth, cloud, cloud-config, feedback, http-dto (+12 more sibling(s) not listed) — 22 of them are reported below, and 18 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 40 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 40 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 40 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/cloud-api/src/feedback/feedback.dto.ts:76
38 duplicated blocks under apps/app/src/features/games/ have copies in at least two of the sibling directories cat-inn, cloud-farm, farm, forest-train, island-concert, night-market (+5 more sibling(s) not listed) — 30 of them are reported below, and 8 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 38 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 38 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 38 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/app/src/features/games/cloud-farm/cloud-farm-game.tsx:60
32 duplicated blocks under apps/app/src/features/desktop/ have copies in at least two of the sibling directories channels, chat, contacts, feed, games, mini-programs (+2 more sibling(s) not listed) — 15 of them are reported below, and 17 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 32 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 32 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 32 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/app/src/features/desktop/feed/desktop-feed-compose-panel.tsx:1
11 duplicated blocks under api/src/modules/games/ have copies in at least two of the sibling directories farm, parking-war — 7 of them are reported below, and 4 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 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. — api/src/modules/games/farm/farm-event.service.ts:29
6 duplicated blocks under apps/wiki/src/ have copies in at least two of the sibling directories components, lib, routes — 3 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/wiki/src/components/character-edit-form.tsx:2608
REDACTED:111 · REDACTED:155 — the two spans are one implementation copied and then locally edited — 3874 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:111
apps/wechat-connector/src/contact-import-parser.ts:1 · packages/contracts/src/contact-import-parser.ts:1 — these 2 files are line-for-line copies of one another — 714 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — apps/wechat-connector/src/contact-import-parser.ts:1
apps/app/src/routes/chat-background-page.tsx:49 · apps/app/src/routes/group-chat-background-page.tsx:48 — the two spans are one implementation copied and then locally edited — 3300 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/app/src/routes/chat-background-page.tsx:49
apps/app/src/features/chat/mobile-ai-call-screen.tsx:72 · apps/app/src/features/chat/mobile-group-call-screen.tsx:63 — the two spans are one implementation copied and then locally edited — 2226 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/app/src/features/chat/mobile-ai-call-screen.tsx:72
apps/app/src/features/subscription/subscription-panel.tsx:34 · apps/app/src/routes/profile-subscription-page.tsx:37 — the two spans are one implementation copied and then locally edited — 2802 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/app/src/features/subscription/subscription-panel.tsx:34
api/src/modules/admin/reply-logic-admin.types.ts:9 · packages/contracts/src/reply-logic.ts:5 — these 2 files are line-for-line copies of one another — 457 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. — api/src/modules/admin/reply-logic-admin.types.ts:9
apps/app/src/features/chat/conversation-thread-panel.tsx:756 · apps/app/src/features/chat/group-chat-thread-panel.tsx:1384 — the two spans are one implementation copied and then locally edited — 1305 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/app/src/features/chat/conversation-thread-panel.tsx:756
apps/app/src/routes/official-account-article-page.tsx:45 · apps/app/src/routes/official-account-detail-page.tsx:50 — the two spans are one implementation copied and then locally edited — 1344 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/app/src/routes/official-account-article-page.tsx:45
apps/app/src/routes/starred-friends-page.tsx:39 · apps/app/src/routes/tags-page.tsx:42 — the two spans are one implementation copied and then locally edited — 1324 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/app/src/routes/starred-friends-page.tsx:39
apps/app/src/routes/games-page.tsx:64 · apps/app/src/routes/mini-programs-page.tsx:54 — the two spans are one implementation copied and then locally edited — 1251 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/app/src/routes/games-page.tsx:64
apps/app/src/features/games/game-center-session-panel.tsx:37 · apps/app/src/features/mini-programs/mini-program-open-panel.tsx:58 — the two spans are one implementation copied and then locally edited — 914 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/app/src/features/games/game-center-session-panel.tsx:37
apps/app/src/features/channels/live-companion-storage.ts:45 · apps/app/src/features/desktop/feedback/desktop-feedback-storage.ts:45 — the two spans are one implementation copied and then locally edited — 1080 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/app/src/features/channels/live-companion-storage.ts:45
apps/app/src/routes/discover-encounter-page.tsx:83 · apps/app/src/routes/discover-scene-page.tsx:172 — the two spans are one implementation copied and then locally edited — 1032 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/app/src/routes/discover-encounter-page.tsx:83
apps/app/src/features/desktop/chat/desktop-group-member-picker.tsx:23 · apps/app/src/features/desktop/chat/desktop-group-member-removal-picker.tsx:23 — the two spans are one implementation copied and then locally edited — 913 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/app/src/features/desktop/chat/desktop-group-member-picker.tsx:23
apps/app/src/routes/desktop-chat-files-page.tsx:275 · apps/app/src/routes/desktop-chat-history-page.tsx:127 — the two spans are one implementation copied and then locally edited — 841 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/app/src/routes/desktop-chat-files-page.tsx:275
REDACTED:1276 · REDACTED:1392 — the two spans are one implementation copied and then locally edited — 797 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:1276
apps/app/src/features/desktop/chat/desktop-direct-call-panel.tsx:486 · apps/app/src/features/desktop/chat/desktop-group-call-panel.tsx:406 — the two spans are one implementation copied and then locally edited — 841 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/app/src/features/desktop/chat/desktop-direct-call-panel.tsx:486
apps/app/src/features/chat/use-group-voice-call-session.ts:169 · apps/app/src/features/chat/use-voice-call-session.ts:153 — the two spans are one implementation copied and then locally edited — 960 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/app/src/features/chat/use-group-voice-call-session.ts:169
apps/app/src/features/games/game-center-storage.ts:18 · apps/app/src/features/mini-programs/mini-programs-storage.ts:10 — the two spans are one implementation copied and then locally edited — 886 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/app/src/features/games/game-center-storage.ts:18
apps/app/src/routes/group-announcement-page.tsx:59 · apps/app/src/routes/group-chat-edit-page.tsx:82 — the two spans are one implementation copied and then locally edited — 785 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/app/src/routes/group-announcement-page.tsx:59
apps/app/src/routes/group-contacts-page.tsx:63 · apps/app/src/routes/official-accounts-page.tsx:55 — the two spans are one implementation copied and then locally edited — 789 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/app/src/routes/group-contacts-page.tsx:63
api/src/modules/chat/group-voice-calls.service.ts:99 · api/src/modules/chat/voice-calls.service.ts:96 — the two spans are one implementation copied and then locally edited — 806 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. — api/src/modules/chat/group-voice-calls.service.ts:99
api/src/app.module.ts:1 · api/src/wiki-app.module.ts:18 — these 2 files are line-for-line copies of one another — 150 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. — api/src/app.module.ts:1
api/src/modules/chat/attachment-semantic-text.ts:28 · apps/app/src/lib/message-attachment-semantic.ts:35 — the two spans are one implementation copied and then locally edited — 855 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. — api/src/modules/chat/attachment-semantic-text.ts:28
apps/app/src/features/contacts/desktop-contact-text-edit-dialog.tsx:9 · apps/app/src/features/desktop/chat/desktop-chat-text-edit-dialog.tsx:10 — the two spans are one implementation copied and then locally edited — 667 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/app/src/features/contacts/desktop-contact-text-edit-dialog.tsx:9
apps/app/src/features/desktop/moments/desktop-friend-moments-workspace.tsx:50 · apps/app/src/features/desktop/moments/desktop-profile-moments-workspace.tsx:47 — the two spans are one implementation copied and then locally edited — 756 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/app/src/features/desktop/moments/desktop-friend-moments-workspace.tsx:50
apps/cloud-api/src/auth/email-auth.service.ts:45 · apps/cloud-api/src/auth/phone-auth.service.ts:28 — the two spans are one implementation copied and then locally edited — 807 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/cloud-api/src/auth/email-auth.service.ts:45
apps/app/src/features/desktop/feed/desktop-feed-compose-panel.tsx:1 · apps/app/src/features/desktop/moments/desktop-moment-compose-panel.tsx:1 — these 2 files are line-for-line copies of one another — 141 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — apps/app/src/features/desktop/feed/desktop-feed-compose-panel.tsx:1
apps/app/src/features/desktop/chat/desktop-message-forward-dialog.tsx:204 · apps/app/src/features/desktop/chat/desktop-note-send-dialog.tsx:133 — the two spans are one implementation copied and then locally edited — 656 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/app/src/features/desktop/chat/desktop-message-forward-dialog.tsx:204
REDACTED:64 · apps/app/src/features/account-security/delete-account-panel.tsx:27 — the two spans are one implementation copied and then locally edited — 811 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:64
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.
scripts/migrate-channels-to-global.mjs:21 reaches into another package with a relative path (../api/package.json) — import the package by name instead. — scripts/migrate-channels-to-global.mjs:21
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.
translateKnownPattern has cyclomatic complexity 366 and cognitive complexity 543; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:199
translateAppErrorCode has cyclomatic complexity 330 and cognitive complexity 66; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/app/src/lib/error-translate.ts:22
CharacterDetailPage has cyclomatic complexity 218 and cognitive complexity 223; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/app/src/routes/character-detail-page.tsx:134
(anonymous) has cyclomatic complexity 118 and cognitive complexity 149; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/cloud-console/tests/test-helpers.tsx:1389
ContactsPage has cyclomatic complexity 117 and cognitive complexity 157; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/app/src/routes/contacts-page.tsx:295
ChatComposer has cyclomatic complexity 110 and cognitive complexity 101; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/app/src/components/chat-composer.tsx:304
MobileChatDetailsPage has cyclomatic complexity 109 and cognitive complexity 94; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/app/src/routes/chat-details-page.tsx:92
DesktopMessageAvatarPopover has cyclomatic complexity 106 and cognitive complexity 90; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/app/src/features/desktop/chat/desktop-message-avatar-popover.tsx:72
ChannelsPage has cyclomatic complexity 100 and cognitive complexity 94; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/app/src/routes/channels-page.tsx:107
DirectChatDetailsPanel has cyclomatic complexity 99 and cognitive complexity 89; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:177
WorldDetailPage has cyclomatic complexity 95 and cognitive complexity 94; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/cloud-console/src/routes/world-detail-page.tsx:254
evaluateLegacyEvalOutput has cyclomatic complexity 92 and cognitive complexity 112; 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. — api/src/modules/system/system.service.ts:1596
main has cyclomatic complexity 89 and cognitive complexity 186; 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/_tmp-discover-games-walk.mjs:313
AdminSessionsPage has cyclomatic complexity 89 and cognitive complexity 73; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/cloud-console/src/routes/admin-sessions-page.tsx:1110
sendMessageDetailed has cyclomatic complexity 85 and cognitive complexity 89; 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. — api/src/modules/chat/chat.service.ts:1159
importPersonalCharacter has cyclomatic complexity 84 and cognitive complexity 136; 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. — api/src/modules/characters/characters.service.ts:586
MobileFriendMomentsPage has cyclomatic complexity 80 and cognitive complexity 70; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/app/src/routes/mobile-friend-moments-page.tsx:61
DesktopMobilePage has cyclomatic complexity 78 and cognitive complexity 72; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/app/src/routes/desktop-mobile-page.tsx:184
GroupChatThreadPanel has cyclomatic complexity 75 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 sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/app/src/features/chat/group-chat-thread-panel.tsx:118
(anonymous) has cyclomatic complexity 74 and cognitive complexity 181; 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/migrate-model-persona-merge.mjs:365
MobileAiCallScreen has cyclomatic complexity 74 and cognitive complexity 89; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/app/src/features/chat/mobile-ai-call-screen.tsx:76
ProfileSettingsDesktop has cyclomatic complexity 74 and cognitive complexity 63; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/app/src/routes/profile-settings-desktop.tsx:155
DesktopOfficialAccountsWorkspace has cyclomatic complexity 73 and cognitive complexity 70; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/app/src/features/desktop/official-accounts/desktop-official-accounts-workspace.tsx:56
ContactDetailPane has cyclomatic complexity 71 and cognitive complexity 68; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/app/src/features/contacts/contact-detail-pane.tsx:84
GroupChatDetailsPanel has cyclomatic complexity 71 and cognitive complexity 64; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:1163
ConversationThreadPanel has cyclomatic complexity 70 and cognitive complexity 65; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/app/src/features/chat/conversation-thread-panel.tsx:95
reconcileObservedWorld has cyclomatic complexity 68 and cognitive complexity 114; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/cloud-api/src/orchestration/world-lifecycle-worker.service.ts:827
OfficialAccountServiceThread has cyclomatic complexity 68 and cognitive complexity 88; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/app/src/features/official-accounts/service/official-account-service-thread.tsx:37
DesktopScreenshotEditor has cyclomatic complexity 66 and cognitive complexity 63; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/app/src/components/chat-composer.tsx:4506
DesktopDirectCallPanel has cyclomatic complexity 66 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/app/src/features/desktop/chat/desktop-direct-call-panel.tsx:53
MobileGroupCallScreen has cyclomatic complexity 64 and cognitive complexity 75; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/app/src/features/chat/mobile-group-call-screen.tsx:67
ChatBackgroundPage has cyclomatic complexity 64 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 sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/app/src/routes/chat-background-page.tsx:51
CharacterEditForm has cyclomatic complexity 64 and cognitive complexity 57; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/wiki/src/components/character-edit-form.tsx:319
OfficialArticleViewer has cyclomatic complexity 63 and cognitive complexity 62; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:19
GroupChatBackgroundPage has cyclomatic complexity 61 and cognitive complexity 58; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/app/src/routes/group-chat-background-page.tsx:50
assertPrivateCharacterFieldLimits has cyclomatic complexity 60 and cognitive complexity 77; 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. — api/src/modules/characters/characters.service.ts:1517
resolveMobileHandoffCategory has cyclomatic complexity 60 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/app/src/routes/desktop-mobile-page.tsx:1982
collectOwnerRecords has cyclomatic complexity 55 and cognitive complexity 83; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — api/src/modules/admin/behavior-records-admin.service.ts:363
MobileGroupChatDetailsPage has cyclomatic complexity 55 and cognitive complexity 51; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/app/src/routes/group-chat-details-page.tsx:63
updateOwner has cyclomatic complexity 53 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. — api/src/modules/auth/world-owner.service.ts:689
Do you agree with this assessment?
R3 · Large Files3.6 / 10Weak✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
apps/app/src/components/chat-message-list.tsx has 8445 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/app/src/components/chat-message-list.tsx:1
apps/app/src/components/chat-composer.tsx has 6930 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/app/src/components/chat-composer.tsx:1
apps/app/src/routes/channels-page.tsx has 5626 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/app/src/routes/channels-page.tsx:1
REDACTED has 5229 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
api/src/modules/feed/feed.service.ts has 5042 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — api/src/modules/feed/feed.service.ts:1
packages/i18n/src/runtime/surface-text-dictionaries-cloud-console.ts has 5034 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/i18n/src/runtime/surface-text-dictionaries-cloud-console.ts:1
api/src/modules/characters/celebrity-character-presets.ts has 4933 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — api/src/modules/characters/celebrity-character-presets.ts:1
api/src/modules/ai/ai-orchestrator.service.ts has 4140 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — api/src/modules/ai/ai-orchestrator.service.ts:1
apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx has 3961 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx:1
REDACTED has 3601 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
apps/app/src/features/chat/stickers/sticker-panel.tsx has 3552 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/app/src/features/chat/stickers/sticker-panel.tsx:1
api/src/modules/system/system.service.ts has 3539 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — api/src/modules/system/system.service.ts:1
api/src/modules/moments/moments.service.ts has 3421 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — api/src/modules/moments/moments.service.ts:1
apps/app/src/features/desktop/chat/desktop-chat-workspace.tsx has 3258 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/app/src/features/desktop/chat/desktop-chat-workspace.tsx:1
REDACTED has 3252 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
apps/app/src/routes/discover-feed-page.tsx has 3116 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/app/src/routes/discover-feed-page.tsx:1
apps/app/src/routes/moments-page.tsx has 3095 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/app/src/routes/moments-page.tsx:1
apps/cloud-console/src/routes/admin-sessions-page.tsx has 3095 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/cloud-console/src/routes/admin-sessions-page.tsx:1
apps/app/src/routes/contacts-page.tsx has 3080 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/app/src/routes/contacts-page.tsx:1
apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx has 2888 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:1
api/src/modules/chat/chat.service.ts has 2817 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — api/src/modules/chat/chat.service.ts:1
api/src/modules/inference/inference.service.ts has 2803 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — api/src/modules/inference/inference.service.ts:1
apps/app/src/routes/character-detail-page.tsx has 2794 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/app/src/routes/character-detail-page.tsx:1
apps/app/src/features/search/desktop-search-workspace.tsx has 2728 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/app/src/features/search/desktop-search-workspace.tsx:1
apps/wiki/src/components/character-edit-form.tsx has 2565 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/wiki/src/components/character-edit-form.tsx:1
api/src/modules/analytics/ai-usage-ledger.service.ts has 2426 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — api/src/modules/analytics/ai-usage-ledger.service.ts:1
apps/cloud-console/src/lib/cloud-console-i18n.ts has 2395 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/cloud-console/src/lib/cloud-console-i18n.ts:1
apps/app/src/routes/chat-list-page.tsx has 2392 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/app/src/routes/chat-list-page.tsx:1
apps/app/src/routes/welcome-page.tsx has 2358 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/app/src/routes/welcome-page.tsx:1
api/src/modules/scheduler/scheduler.service.ts has 2240 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — api/src/modules/scheduler/scheduler.service.ts:1
apps/cloud-api/src/cloud/cloud.service.ts has 2235 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/cloud-api/src/cloud/cloud.service.ts:1
REDACTED has 2158 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
api/src/modules/admin/wechat-sync-admin.service.ts has 2113 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — api/src/modules/admin/wechat-sync-admin.service.ts:1
apps/app/src/routes/desktop-mobile-page.tsx has 2044 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/app/src/routes/desktop-mobile-page.tsx:1
apps/app/src/features/chat/group-chat-thread-panel.tsx has 1996 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/app/src/features/chat/group-chat-thread-panel.tsx:1
api/src/modules/social/shake-discovery.service.ts has 1967 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — api/src/modules/social/shake-discovery.service.ts:1
api/src/modules/ai/reply-logic.constants.ts has 1902 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — api/src/modules/ai/reply-logic.constants.ts:1
api/src/modules/games/games.service.ts has 1886 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — api/src/modules/games/games.service.ts:1
apps/cloud-console/src/routes/waiting-session-sync-page.tsx has 1805 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/cloud-console/src/routes/waiting-session-sync-page.tsx:1
api/src/modules/chat/group.service.ts has 1790 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — api/src/modules/chat/group.service.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.7 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
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) — apps/wiki/src/components/character-edit-form.tsx:1, apps/app/scripts/audit-desktop-web-routing.mjs:1, apps/cloud-api/scripts/cloud-api-e2e.mjs:1, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).
Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.
32 outdated package(s); JS/npm CVEs scored in D30
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.
The package in `api` declares the lint script `lint` (`eslint "{src,apps,libs,test}/**/*.ts" --fix`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run lint` in `api` (or the workspace's task runner). — api/package.json:25
The package in `apps/app` declares the lint script `lint` (`eslint .`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run lint` in `apps/app` (or the workspace's task runner). — apps/app/package.json:16
The package in `apps/wiki` declares the lint script `lint` (`eslint .`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run lint` in `apps/wiki` (or the workspace's task runner). — apps/wiki/package.json:11
Do you agree with this assessment?
R7 · Dead Code7.7 / 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.
168 file(s) (~36538 LoC) were excluded from dead-code analysis. This package's entry point(s) resolved, but the walk stopped one hop in: apps/cloud-api/src/app.module.ts imports './admin/wiki-admin.controller', which is not in the scanned tree. That is usually a generated or build-output module, so reachability cannot see past it and no dead-code claim is made about this package. Nothing is necessarily wrong here. — apps/cloud-api
48 file(s) (~15038 LoC) were excluded from dead-code analysis. This package's entry point(s) resolved, but the walk stopped one hop in: apps/wiki/src/router.tsx imports './lib/lazy-with-reload', which is not in the scanned tree. That is usually a generated or build-output module, so reachability cannot see past it and no dead-code claim is made about this package. Nothing is necessarily wrong here. — apps/wiki
Unreachable from the 268 application, 92 tooling and 83 test entry point(s) detected in this repo. Gate removals on `pnpm run build` — an undetected custom entry would make these reachable.
no import path from any entry point (268 application, 92 tooling, 83 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 (×36) — apps/app/src/i18n/static-dom-seed.ts, apps/app/scripts/measure-public-load.mjs, apps/app/src/features/games/game-center-session-panel.tsx, …
no import path from any entry point (268 application, 92 tooling, 83 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/app/src/features/games/embedded/embedded-game-host.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 — REDACTED
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. — scripts/migrate-channels-to-global.mjs:22
Declared in the root 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. — REDACTED:146
Declared in api/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×4) — api/package.json:67, api/package.json:38, api/package.json:55, …
Declared in apps/android-shell/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×4) — apps/android-shell/package.json:22, apps/android-shell/package.json:23, apps/android-shell/package.json:24, …
Declared in apps/app/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×4) — apps/app/package.json:34, apps/app/package.json:53, apps/app/package.json:76, …
Declared in apps/cloud-api/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. — apps/cloud-api/package.json:37
Declared in apps/desktop/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. — apps/desktop/package.json:19
Declared in apps/ios-shell/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×4) — apps/ios-shell/package.json:23, apps/ios-shell/package.json:26, apps/ios-shell/package.json:27, …
Declared in packages/ui/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. — packages/ui/package.json:22
Every import is type-only — move it to devDependencies. — apps/wiki/src/components/character-edit-form.tsx:20
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
api/src/modules/ai/ai.module.ts → api/src/modules/world/world.module.ts → api/src/modules/cyber-avatar/cyber-avatar.module.ts → api/src/modules/ai/ai.module.ts (one verified cycle inside a mutually-dependent group of 12 files) — api/src/modules/ai/ai.module.ts:14
api/src/modules/chat/character-social-context.service.ts → api/src/modules/tenancy/tenant.service.ts → api/src/modules/social/social.service.ts → api/src/modules/chat/chat.service.ts → api/src/modules/chat/character-social-context.service.ts (one verified cycle inside a mutually-dependent group of 8 files) — api/src/modules/chat/character-social-context.service.ts:12
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. This repository commits the configuration that serves its own HTTP surface, so that configuration was read in full for the security response headers it sets. Of the server controls, two are read where the source shows them: every session or sign-in cookie the code sets is read for HttpOnly, Secure and SameSite at the line that sets it (a raw `Set-Cookie` header, Express, Fastify, Hono, Koa, Next.js, `cookie.serialize`, express-session and cookie-session), and every Node listener for HTTPS enforcement. HSTS, security response headers and input validation are NOT assessed for JavaScript/TypeScript: each is scored as an absence, an absence is only reportable over the production HTTP server, and in this ecosystem the file that opens the port is build output or a framework launcher rather than a file in the source tree. Their absence here is not a finding about this repository. 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.
`key` is the symmetric cipher key, and its shipped DEFAULT is a compile-time constant — an installation that never overrides it encrypts with a value published in this repository, and the code cannot distinguish that state from a configured one. A key that ships with the source is not secret: every contributor, fork, mirror and released binary carries it, so anyone holding the repository can decrypt what any installation encrypted, and there is no way to invalidate what was already protected because every deployment built from this source shares the value. Where the constant is a password salt the consequence differs but is no smaller — one global salt means precomputation amortises across every installation, which is the property salting exists to destroy. Read the value from configuration, an environment variable or a secrets manager at startup and FAIL FAST when it is absent, so a missing key stops the process instead of silently falling back to a shared default; treat the committed value as disclosed and rotate it rather than only deleting the line. For a salt, generate a fresh random one per password and store it alongside the hash. — apps/cloud-api/src/orchestration/local-process-compute-provider.service.ts:93
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. (×12) — api/scripts/migrations/2026-mt-step0-remap-owner-id.mjs:70, api/scripts/migrations/2026-mt-step3-copy-media.mjs:22, api/src/common/cron-jitter.util.ts:13, …
`app.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.) (×3) — REDACTED:138, REDACTED:127, apps/cloud-api/src/main.ts:99
`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.) (×2) — apps/cloud-api/src/orchestration/local-process-compute-provider.service.ts:514, apps/wechat-connector/src/main.ts:9
What to do
Load cryptographic key and salt material from configuration, an environment variable or a secrets manager rather than fixing it in the source, and fail fast at startup when it is absent — a default that silently works is the one that reaches production. Rotate anything already committed: it must be treated as disclosed. Salts should be generated per password and stored with the hash, never shared across installations.
Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 12 sites, not one: `api/scripts/migrations/2026-mt-step0-remap-owner-id.mjs:70` (createHash("sha1")), `api/scripts/migrations/2026-mt-step3-copy-media.mjs:22` (createHash("sha1")), `api/src/common/cron-jitter.util.ts:13` (createHash("sha1")), `REDACTED:999` (createHash("sha1")), `api/src/modules/followup-runtime/followup-runtime.service.ts:1583` (createHash("sha1")), `api/src/modules/inference/inference.service.ts:2470` (createHash("sha1")), `api/src/modules/minimax/minimax-key-pool.service.ts:84` (createHash("sha1")), `api/src/modules/moments/music-theme-catalog.ts:57` (createHash("sha1")), and 4 further site(s). Each is a separate decision — fixing only the line this row cites leaves the others in place.
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.
This function unwraps IPv4-MAPPED IPv6 (`::ffff:`, line 35) and then rejects `10.0.0.0/8` on its IPv4 path — but the IPv6 decision at line 17 classifies the address as written, and IPv4 reaches IPv6 through three MORE embeddings this function never mentions: IPv4-compatible (`::a.b.c.d`), 6to4 (`2002::/16`) and NAT64 (`64:ff9b::/96`). So `::10.0.0.1`, `2002:0a00:0001::` and `64:ff9b::10.0.0.0` all name a host inside `10.0.0.0/8` — the range this same function declares non-public — and all reach the IPv6 decision un-unwrapped, taking the opposite verdict. Unwrap every embedding to its IPv4 form before classifying, or reject any IPv6 address carrying an embedded IPv4 outright. — apps/cloud-console/src/lib/ip-region.ts:17
What to do
Each finding names the IPv4 branch that rejects the host and the IPv6 branch that accepts the same host in another notation. Confirm from the two, then unwrap every IPv4-in-IPv6 embedding before classifying, or reject non-native IPv6 outright.
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.
`diffPaths` is exported and takes `left: unknown` from its caller, and it calls itself at line 24 (`diffPaths`) with a piece of `left` — and nowhere in `diffPaths` 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 `diffPaths` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — apps/wiki/src/lib/recipe-diff.ts:24
`diffPaths` is exported and takes `left: unknown` from its caller, and it calls itself at line 511 (`diffPaths`) with a piece of `left` — and nowhere in `diffPaths` 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 `diffPaths` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — api/src/modules/wiki/wiki.types.ts:511
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 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 26/64 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.
`loginAndGetSession` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/wiki/screenshot-wiki.mjs:38
`exportMyCharacter` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/wiki/src/lib/wiki-api.ts:1176
`uploadAvatar` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/wiki/src/lib/wiki-api.ts:1225
`downloadCommunityCharacter` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/wiki/src/lib/wiki-api.ts:1330
`probeWeFlowReadiness` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/wechat-connector/src/upstream-service-manager.ts:772
`POST` holds an AbortSignal but calls `fetch(…)` without it, so its caller's cancellation never reaches that call and it runs to its end after whatever wanted it has given up. Hand the signal on: `fetch(…, { signal })`. — apps/site/src/app/api/cloud-waitlist/route.ts:35
`fetchHtml` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/site/scripts/audit-headings.mjs:21
`issueCloudAdminAccessToken` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/cloud-console/src/lib/cloud-admin-api.ts:493
`refreshCloudAdminAccessToken` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/cloud-console/src/lib/cloud-admin-api.ts:563
`revokeCloudAdminSession` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/cloud-console/src/lib/cloud-admin-api.ts:621
`sendAdminRequest` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/cloud-console/src/lib/cloud-admin-api.ts:712
`readNativeBridgeImageAssetFile` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/app/src/runtime/native-image-picker.ts:128
`readNativeRuntimeConfig` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/app/src/runtime/native-runtime.ts:53
`openRemoteFile` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/app/src/runtime/open-remote-file.ts:31
`syncNativePushTokenCore` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/app/src/runtime/push-token-sync.ts:113
`saveRemoteFileWithNativeShell` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/app/src/runtime/save-remote-file.ts:71
`probeWorldEndpoint` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/app/src/lib/world-entry.ts:15
`prepareRemoteCustomStickerUpload` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/app/src/features/chat/stickers/prepare-custom-sticker-upload.ts:104
`readNativeBridgeFileAsset` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/app/src/components/chat-composer.tsx:6274
`run` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/app/src/components/share-card-modal.tsx:177
`publish` 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 })`. — api/src/modules/wiki/services/wiki-character-video-publish-sync.service.ts:26
`push` 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 })`. — api/src/modules/wiki/services/wiki-game-publish-sync.service.ts:36
`lookup` 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 })`. — api/src/modules/subscription/cloud-subscription.client.ts:56
`fetchFeedEntries` 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:1872, REDACTED:907
`postOnce` 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) — api/src/modules/minimax/minimax-usage-reporter.service.ts:133, api/src/modules/cloud-runtime/cloud-token-usage-sync.service.ts:340
`backfillOnce` 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:38
`ackDelivered` 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:89
`fetchRemote` 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 })`. — api/src/modules/config/video-channel-prompt.client.ts:109
`postRuntimeSignal` 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 })`. — api/src/modules/cloud-runtime/cloud-runtime-reporting.service.ts:349
`postRevenueSignal` 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 })`. — api/src/modules/cloud-runtime/cloud-runtime-reporting.service.ts:385
`pullPlatformDefaults` 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 })`. — api/src/modules/cloud-runtime/cloud-token-usage-sync.service.ts:248
`loadAssetFromUrl` 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 })`. — api/src/modules/chat/document-extraction.service.ts:258
`post` 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 })`. — api/src/modules/chat/hongbao-cloud.client.ts:93
`sweepExpired` 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 })`. — api/src/modules/chat/hongbao-cloud.client.ts:166
`register` 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 })`. — api/src/modules/characters/character-import-register.client.ts:19
`generateImage` 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 })`. — api/src/modules/ai/minimax-native.client.ts:109
What to do
Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped5.4 / 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.
`document!.contentHtml` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/app/src/components/chat-message-list.tsx:8487
`article.contentHtml` 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:407
`nextState.contentHtml` 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. (×2) — REDACTED:235, REDACTED:308
`input.state.contentHtml` 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. (×2) — REDACTED:614, REDACTED:735
What to do
Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×25) — packages/ui/src/components/telemetry-error-boundary.tsx:32, packages/i18n/src/locales.ts:126, packages/i18n/src/runtime/app-locale-provider.tsx:123, …
`.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. (×6) — packages/i18n/src/runtime/app-locale-provider.tsx:120, packages/analytics/src/index.ts:152, packages/analytics/src/index.ts:155, …
`catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included. — packages/analytics/src/contracts-bridge.ts:30
`catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×8) — apps/ios-shell/plugins/swift-stub/YinjieMobileBridgePlugin.swift:1051, apps/ios-shell/plugins/swift-stub/YinjieMobileBridgePlugin.swift:1102, apps/ios-shell/plugins/swift-stub/YinjieMobileBridgePlugin.swift:1134, …
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.
~0.5 `!` null assertions per 1k TypeScript source lines — 232 assertion(s) across the 506088 source line(s) of the 1614 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: api/src/modules/games/farm/farm-npc-tick.service.ts (16), apps/app/src/features/chat/mobile-message-action-sheet.tsx (15), api/src/modules/minimax/minimax-job.entity.ts (12). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
What to do
The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 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 — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
X10 Duplicated predicate — 40 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.
X9 Subsumed condition operand — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Repo shows no audit-logging mechanism (an audit-log table or model, an ORM write hook that records changes — a TypeORM/MikroORM subscriber, a Sequelize or Mongoose hook, Prisma middleware — or a change-history plugin such as mongoose-history or sequelize-paper-trail) for sensitive changes — absence of evidence is not evidence of a working control. Record an audit trail in code (or document where it lives) so this dimension can be scored.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 40 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.
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No class in this Java code is a Spring, JSR-330 or CDI singleton bean. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. No Swift request handler (a Vapor, Hummingbird, Kitura, Swifter or Perfect route handler, as a method or a registered closure) is declared, so no state is shared between request threads. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
AX4 Dependency direction — not applicable to a vertical-slice architecture (the inward-dependency rule is for layered/clean styles)
AX8 Test isolation — no test/production split to check
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — the Android app did not build — `./gradlew :app:assembleDebug` exited 1: re:
Script 'apps/android-shell/android/app/capacitor.build.gradle' line: 10
* What went wrong:
A problem occurred evaluating script.
> Could not r…; runtime evidence skipped (launch chosen because apps/android-shell/android/app/build.gradle applies the Android application plugin and apps/android-shell/android/gradlew builds it) This is a statement about this run, not a statement about your application: nothing here says the app is inaccessible, only that it was never run.
D11 Test Reliability — Test reliability not measured — JavaScript/TypeScript suite did not run
D12 Dependency Hygiene — Not scored — 2 Maven/Gradle manifest(s) were read, stating a version for 2 dependency(ies) and leaving 3 to a parent or an imported BOM, but no build resolved the dependency graph, so the outdated signal was not established. NOT a finding that these dependencies are current or healthy.
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
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not measured — 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
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
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for tinybench, mitata, benchmark.js, benny or vitest `bench(...)` calls in files that import them (or `*.bench.*` files), or one of those in a 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.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — X26 reached only 1% of this repository's production lines — typescript (468,166 lines), javascript (27,330 lines), rust (1,845 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X27 Collection changed while being enumerated — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Domain fused to persistence infrastructure: FarmEventLogEntity api/src/modules/games/farm/entities/farm-event-log.entity.ts:10— FarmEventLogEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper.
Domain fused to persistence infrastructure: FarmNpcStateEntity api/src/modules/games/farm/entities/farm-npc-state.entity.ts:16— FarmNpcStateEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper.
Domain fused to persistence infrastructure: FarmPlayerStateEntity api/src/modules/games/farm/entities/farm-player-state.entity.ts:19— FarmPlayerStateEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper.
Domain fused to persistence infrastructure: FarmQuestProgressEntity api/src/modules/games/farm/entities/farm-quest-progress.entity.ts:11— FarmQuestProgressEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper.
Domain fused to persistence infrastructure: FarmCheckinEntity api/src/modules/games/farm/entities/farm-checkin.entity.ts:9— FarmCheckinEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper.
Domain fused to persistence infrastructure: ParkingWarEventLogEntity api/src/modules/games/parking-war/entities/parking-war-event-log.entity.ts:13— ParkingWarEventLogEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper.
Domain fused to persistence infrastructure: ParkingWarNpcStateEntity api/src/modules/games/parking-war/entities/parking-war-npc-state.entity.ts:22— ParkingWarNpcStateEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper.
Domain fused to persistence infrastructure: ParkingWarPlayerStateEntity api/src/modules/games/parking-war/entities/parking-war-player-state.entity.ts:22— ParkingWarPlayerStateEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper.
Domain fused to persistence infrastructure: ParkingWarOccupancyEntity api/src/modules/games/parking-war/entities/parking-war-occupancy.entity.ts:25— ParkingWarOccupancyEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper.
Domain fused to persistence infrastructure: AbuseFilterEntity api/src/modules/wiki/entities/abuse-filter.entity.ts:45— AbuseFilterEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper.
Domain fused to persistence infrastructure: AbuseFilterHitEntity api/src/modules/wiki/entities/abuse-filter-hit.entity.ts:10— AbuseFilterHitEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper.
Domain fused to persistence infrastructure: WikiFieldProtectionEntity api/src/modules/wiki/entities/wiki-field-protection.entity.ts:17— WikiFieldProtectionEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper.
Domain fused to persistence infrastructure: CharacterPageEntity api/src/modules/wiki/entities/character-page.entity.ts:9— CharacterPageEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper.
Domain fused to persistence infrastructure: CharacterRevisionEntity api/src/modules/wiki/entities/character-revision.entity.ts:27— CharacterRevisionEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper.
Domain fused to persistence infrastructure: EditSubmissionEntity api/src/modules/wiki/entities/edit-submission.entity.ts:9— EditSubmissionEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper.
Domain fused to persistence infrastructure: UserWikiProfileEntity api/src/modules/wiki/entities/user-wiki-profile.entity.ts:3— UserWikiProfileEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper.
Domain fused to persistence infrastructure: WikiBlockEntity api/src/modules/wiki/entities/wiki-block.entity.ts:9— WikiBlockEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper.
Domain fused to persistence infrastructure: WikiProtectionLogEntity api/src/modules/wiki/entities/wiki-protection-log.entity.ts:9— WikiProtectionLogEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper.
Domain fused to persistence infrastructure: WikiTalkThreadEntity api/src/modules/wiki/entities/wiki-talk-thread.entity.ts:10— WikiTalkThreadEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper.
Domain fused to persistence infrastructure: WikiTalkPostEntity api/src/modules/wiki/entities/wiki-talk-post.entity.ts:9— WikiTalkPostEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper.
Domain fused to persistence infrastructure: WikiWatchlistEntity api/src/modules/wiki/entities/wiki-watchlist.entity.ts:3— WikiWatchlistEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper.
Domain fused to persistence infrastructure: UserPrivateCharacterEntity api/src/modules/wiki/entities/user-private-character.entity.ts:17— UserPrivateCharacterEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper.
Domain fused to persistence infrastructure: CharacterDraftEntity api/src/modules/wiki/entities/character-draft.entity.ts:22— CharacterDraftEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper.
Domain fused to persistence infrastructure: AiGenerationJobEntity api/src/modules/wiki/entities/ai-generation-job.entity.ts:32— AiGenerationJobEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper.
Domain fused to persistence infrastructure: GamePageEntity api/src/modules/wiki/entities/game-page.entity.ts:15— GamePageEntity is a domain type carrying TypeORM (@Entity/@Column) persistence decorators fused ON ITS OWN DECLARATION in the domain layer (with domain behaviour, no separated infrastructure model) — a domain ↔ infrastructure leak: the domain entity IS the persistence row (an active-record fusion). Separate the persistence model from the domain aggregate with a mapper.
Boundary-crossing change coupling: desktop-contacts-route-state.ts ↔ contacts-page.tsx apps/app/src/features/desktop/contacts/desktop-contacts-route-state.ts:1— `apps/app/src/features/desktop/contacts/desktop-contacts-route-state.ts` (context features) and `apps/app/src/routes/contacts-page.tsx` (context routes) sit in DIFFERENT parts of the tree yet change together 100% of the time (13 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `3611fc3e` refactor: share contacts and moments route state; `6b35245d` feat: sync desktop official display mode routes; `1503f22d` feat: sync desktop official display mode routes — run `git show` on any of them.
Boundary-crossing change coupling: admin-cloud.controller.ts ↔ cloud-admin-api.ts apps/cloud-api/src/admin/admin-cloud.controller.ts:1— `apps/cloud-api/src/admin/admin-cloud.controller.ts` (context cloud-api) and `apps/cloud-console/src/lib/cloud-admin-api.ts` (context cloud-console) sit in DIFFERENT parts of the tree yet change together 89% of the time (16 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 16 shared commits counted here, the most recent 3 are `39ad097f` feat(cloud-console/admin): 世界列表"进入后台"按钮,免登录直跳 admin; `fae5a307` feat(cloud): add backend job sorting; `4c3b8eaf` feat: add cloud alert escalation thresholds — run `git show` on any of them.
Boundary-crossing change coupling: desktop-chat-image-viewer-route-state.ts ↔ desktop-chat-image-viewer-page.tsx apps/app/src/features/desktop/chat/desktop-chat-image-viewer-route-state.ts:1— `apps/app/src/features/desktop/chat/desktop-chat-image-viewer-route-state.ts` (context features) and `apps/app/src/routes/desktop-chat-image-viewer-page.tsx` (context routes) sit in DIFFERENT parts of the tree yet change together 73% of the time (11 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `0372ad51` refactor: share chat image viewer route state; `d965d779` feat(desktop): route image printing through standalone viewer; `a9c0e444` feat(desktop): route image printing through standalone viewer — run `git show` on any of them.
Boundary-crossing change coupling: REDACTED ↔ world-detail-page.tsx REDACTED:1— `REDACTED` (context cloud-api) and `apps/cloud-console/src/routes/world-detail-page.tsx` (context cloud-console) sit in DIFFERENT parts of the tree yet change together 73% of the time (8 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `38941f3e` feat: add cloud runtime status inspection; `8c51c228` feat: add cloud runtime status inspection; `13066bde` feat: add manual docker cloud provider — run `git show` on any of them.
Boundary-crossing change coupling: REDACTED ↔ cloud-admin-api.ts REDACTED:1— `REDACTED` (context cloud-api) and `apps/cloud-console/src/lib/cloud-admin-api.ts` (context cloud-console) sit in DIFFERENT parts of the tree yet change together 73% of the time (8 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `38941f3e` feat: add cloud runtime status inspection; `8c51c228` feat: add cloud runtime status inspection; `13066bde` feat: add manual docker cloud provider — run `git show` on any of them.
Boundary-crossing change coupling: admin-cloud.controller.ts ↔ world-detail-page.tsx apps/cloud-api/src/admin/admin-cloud.controller.ts:1— `apps/cloud-api/src/admin/admin-cloud.controller.ts` (context cloud-api) and `apps/cloud-console/src/routes/world-detail-page.tsx` (context cloud-console) sit in DIFFERENT parts of the tree yet change together 67% of the time (12 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `4c3b8eaf` feat: add cloud alert escalation thresholds; `b90047f4` feat: add cloud alert escalation thresholds; `30af673c` feat: add cloud world reconcile loop — run `git show` on any of them.
Boundary-crossing change coupling: REDACTED ↔ notes-page.tsx REDACTED:1— `REDACTED` (context features) and `apps/app/src/routes/notes-page.tsx` (context routes) sit in DIFFERENT parts of the tree yet change together 65% of the time (11 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `90867cc6` feat(notes): 移动端"+菜单·新建笔记"完整闭环,桌面端修复跳转回弹; `b30746c7` refactor(app): fold notes into favorites workspace; `3878d6ca` refactor(app): fold notes into favorites workspace — run `git show` on any of them.
Boundary-crossing change coupling: world-lifecycle-worker.service.ts ↔ world-detail-page.tsx apps/cloud-api/src/orchestration/world-lifecycle-worker.service.ts:1— `apps/cloud-api/src/orchestration/world-lifecycle-worker.service.ts` (context cloud-api) and `apps/cloud-console/src/routes/world-detail-page.tsx` (context cloud-console) sit in DIFFERENT parts of the tree yet change together 61% of the time (14 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `bc1303c2` feat: audit cloud reconcile actions; `702b4512` feat: audit cloud reconcile actions; `30af673c` feat: add cloud world reconcile loop — run `git show` on any of them.
Boundary-crossing change coupling: chat-message-list.tsx ↔ desktop-chat-image-viewer-route-state.ts apps/app/src/components/chat-message-list.tsx:1— `apps/app/src/components/chat-message-list.tsx` (context components) and `apps/app/src/features/desktop/chat/desktop-chat-image-viewer-route-state.ts` (context features) sit in DIFFERENT parts of the tree yet change together 60% of the time (9 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `0372ad51` refactor: share chat image viewer route state; `d965d779` feat(desktop): route image printing through standalone viewer; `a9c0e444` feat(desktop): route image printing through standalone viewer — run `git show` on any of them.
Boundary-crossing change coupling: world-access.service.ts ↔ world-detail-page.tsx apps/cloud-api/src/world-access/world-access.service.ts:1— `apps/cloud-api/src/world-access/world-access.service.ts` (context cloud-api) and `apps/cloud-console/src/routes/world-detail-page.tsx` (context cloud-console) sit in DIFFERENT parts of the tree yet change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `13066bde` feat: add manual docker cloud provider; `c753ec11` feat: add manual docker cloud provider; `5cf5390f` feat: add provider-aware world orchestration — run `git show` on any of them.
Boundary-crossing change coupling: game-center-storage.ts ↔ games-page.tsx apps/app/src/features/games/game-center-storage.ts:1— `apps/app/src/features/games/game-center-storage.ts` (context features) and `apps/app/src/routes/games-page.tsx` (context routes) sit in DIFFERENT parts of the tree yet 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `7c57e8b0` feat: jump back to delivered game invite chats; `5be2c6af` feat: jump back to delivered game invite chats; `4c8f7d81` feat: track delivered game invite chats — run `git show` on any of them.
Boundary-crossing change coupling: users.service.ts ↔ users-page.tsx apps/cloud-api/src/users/users.service.ts:1— `apps/cloud-api/src/users/users.service.ts` (context cloud-api) and `apps/cloud-console/src/routes/users-page.tsx` (context cloud-console) sit in DIFFERENT parts of the tree yet 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `36b2de2c` fix(app/移动端/群聊): 走查 R1 — ChatComposer + 面板「群语音/群视频通话」缺同帧双击 ref 守; `de88dec1` feat(cloud-console/users): 顶部增加"用户总数 / 会员用户数"两张统计卡; `e7697224` feat(cloud-console/users): 列表去掉"世界/套餐"列,新增"上次发言时间" — run `git show` on any of them.
Boundary-crossing change coupling: cloud.service.ts ↔ world-detail-page.tsx apps/cloud-api/src/cloud/cloud.service.ts:1— `apps/cloud-api/src/cloud/cloud.service.ts` (context cloud-api) and `apps/cloud-console/src/routes/world-detail-page.tsx` (context cloud-console) sit in DIFFERENT parts of the tree yet change together 55% of the time (16 of the 29 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 16 shared commits counted here, the most recent 3 are `4c3b8eaf` feat: add cloud alert escalation thresholds; `b90047f4` feat: add cloud alert escalation thresholds; `bc1303c2` feat: audit cloud reconcile actions — run `git show` on any of them.
Boundary-crossing change coupling: cloud.service.ts ↔ cloud-admin-api.ts apps/cloud-api/src/cloud/cloud.service.ts:1— `apps/cloud-api/src/cloud/cloud.service.ts` (context cloud-api) and `apps/cloud-console/src/lib/cloud-admin-api.ts` (context cloud-console) sit in DIFFERENT parts of the tree yet change together 55% of the time (16 of the 29 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 16 shared commits counted here, the most recent 3 are `39ad097f` feat(cloud-console/admin): 世界列表"进入后台"按钮,免登录直跳 admin; `fae5a307` feat(cloud): add backend job sorting; `4c3b8eaf` feat: add cloud alert escalation thresholds — run `git show` on any of them.
Boundary-crossing change coupling: desktop-friend-moments-workspace.tsx ↔ moments-page.tsx apps/app/src/features/desktop/moments/desktop-friend-moments-workspace.tsx:1— `apps/app/src/features/desktop/moments/desktop-friend-moments-workspace.tsx` (context features) and `apps/app/src/routes/moments-page.tsx` (context routes) sit in DIFFERENT parts of the tree yet change together 50% of the time (10 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `a7772d2f` fix(app/desktop/广场动态): 走查新 Round 8 — 深链 scrollIntoView race 把用户卡在 fee…; `686344e1` fix(app/电脑端/朋友圈): 走查 Round 1 — desktop notice tone 永远绿色 + 缺重试按钮; `5fd559be` perf(app/moments/desktop): 走查 Round 1 — 修 scroll loop / keyboard 越界 /… — run `git show` on any of them.
Boundary-crossing change coupling: mobile-social-composer-card.tsx ↔ moments-page.tsx apps/app/src/components/mobile-social-composer-card.tsx:1— `apps/app/src/components/mobile-social-composer-card.tsx` (context components) and `apps/app/src/routes/moments-page.tsx` (context routes) sit in DIFFERENT parts of the tree yet change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `f5d3774f` feat(app): add moments media compose flow; `49a3de09` feat(app): add moments media compose flow; `eef39bd0` feat(mobile): add compose shortcuts to social feeds — run `git show` on any of them.
Boundary-crossing change coupling: mobile-social-composer-card.tsx ↔ discover-feed-page.tsx apps/app/src/components/mobile-social-composer-card.tsx:1— `apps/app/src/components/mobile-social-composer-card.tsx` (context components) and `apps/app/src/routes/discover-feed-page.tsx` (context routes) sit in DIFFERENT parts of the tree yet change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `e521637a` refactor: tighten mobile discover feed cards; `85868c2c` refactor: tighten mobile discover feed cards; `eef39bd0` feat(mobile): add compose shortcuts to social feeds — run `git show` on any of them.
Boundary-crossing change coupling: chat-message-list.tsx ↔ recent-stickers.ts apps/app/src/components/chat-message-list.tsx:1— `apps/app/src/components/chat-message-list.tsx` (context components) and `apps/app/src/features/chat/stickers/recent-stickers.ts` (context features) sit in DIFFERENT parts of the tree yet change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `00d8283e` perf(app/电脑端/单聊): 新一轮 R1 — chat-message-list / composer 的 storage 监听全…; `7171109e` feat: add desktop sticker catalog and custom flows; `f4deaaab` feat: add desktop sticker catalog and custom flows — run `git show` on any of them.
AC1 · Text alternatives· <img> without a text alternative · ×16
<img> without a text alternative apps/app/src/components/chat-message-list.tsx:6110— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative apps/app/src/components/chat-message-list.tsx:6371— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative apps/app/src/components/chat-message-list.tsx:6539— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative apps/app/src/components/chat-message-list.tsx:7809— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative apps/app/src/components/chat-message-list.tsx:8517— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative apps/app/src/components/chat-message-list.tsx:8528— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative apps/app/src/components/moment-media-gallery.tsx:205— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative apps/app/src/components/share-card-modal.tsx:191— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative apps/app/src/features/chat/stickers/sticker-panel.tsx:2134— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative apps/app/src/features/chat/stickers/sticker-panel.tsx:3362— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative apps/app/src/features/chat/stickers/sticker-panel.tsx:3364— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx:1688— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative apps/app/src/features/desktop/chat/desktop-chat-workspace.tsx:3397— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative apps/app/src/features/desktop/chat/desktop-note-send-dialog.tsx:370— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative apps/app/src/routes/desktop-chat-image-viewer-page.tsx:624— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative apps/app/src/routes/mobile-notes-page.tsx:272— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
AC2 · Forms & labels· <input> without a programmatic label · ×10
<input> without a programmatic label apps/app/src/features/contacts/management/contacts-bulk-action-bar.tsx:341— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
<input> without a programmatic label apps/app/src/features/contacts/voice-picker.tsx:400— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
<input> without a programmatic label apps/app/src/features/games/farm/components/gift-sheet.tsx:140— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label apps/app/src/features/games/tank-war/tank-war-game.tsx:275— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label apps/app/src/features/search/desktop-search-workspace.tsx:1134— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
<input> without a programmatic label apps/app/src/features/search/mobile-search-workspace.tsx:235— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
<input> without a programmatic label apps/app/src/routes/knowledge-base-page.tsx:359— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
<input> without a programmatic label apps/app/src/routes/knowledge-base-page.tsx:385— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
<input> without a programmatic label apps/app/src/routes/knowledge-base-page.tsx:392— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
<input> without a programmatic label apps/app/src/routes/profile-feedback-page.tsx:294— 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· <textarea> without a programmatic label · ×9
<textarea> without a programmatic label apps/app/src/components/wechat-comment-bar.tsx:240— 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.
<textarea> without a programmatic label apps/app/src/features/desktop/contacts/desktop-add-friend-send-dialog.tsx:161— 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.
<textarea> without a programmatic label apps/app/src/routes/channels-page.tsx:5671— 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.
<textarea> without a programmatic label apps/app/src/routes/desktop-feedback-page.tsx:811— 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.
<textarea> without a programmatic label apps/app/src/routes/discover-page.tsx:1113— 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.
<textarea> without a programmatic label apps/app/src/routes/knowledge-base-page.tsx:366— 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.
<textarea> without a programmatic label apps/app/src/routes/mobile-add-friend-page.tsx:1339— 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.
<textarea> without a programmatic label apps/app/src/routes/profile-feedback-page.tsx:317— 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.
<textarea> without a programmatic label apps/app/src/routes/profile-xhs-reward-page.tsx:382— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
AC4 · Keyboard semantics· Click handler on a <div> nested inside <button> · ×6
Click handler on a <div> nested inside <button> apps/app/src/components/moment-media-gallery.tsx:300— This <div> carries its own click handler, but it sits inside a <button> that performs a different action. A keyboard user reaches the <button> and activating it runs the <button>'s handler, never this one, so this action has no keyboard path at all. Role and tabindex cannot supply one: HTML forbids a <button> from containing interactive content or any descendant with a tabindex, so the browser will not put this element in the tab order however it is marked up. Move it out of the <button> and make it a sibling <button>, so each action has its own control.
Click handler on a <div> nested inside <button> apps/app/src/components/moment-media-gallery.tsx:351— This <div> carries its own click handler, but it sits inside a <button> that performs a different action. A keyboard user reaches the <button> and activating it runs the <button>'s handler, never this one, so this action has no keyboard path at all. Role and tabindex cannot supply one: HTML forbids a <button> from containing interactive content or any descendant with a tabindex, so the browser will not put this element in the tab order however it is marked up. Move it out of the <button> and make it a sibling <button>, so each action has its own control.
Click handler on a <div> nested inside <button> apps/app/src/components/moment-media-gallery.tsx:421— This <div> carries its own click handler, but it sits inside a <button> that performs a different action. A keyboard user reaches the <button> and activating it runs the <button>'s handler, never this one, so this action has no keyboard path at all. Role and tabindex cannot supply one: HTML forbids a <button> from containing interactive content or any descendant with a tabindex, so the browser will not put this element in the tab order however it is marked up. Move it out of the <button> and make it a sibling <button>, so each action has its own control.
Click handler on a <div> nested inside <button> apps/app/src/components/moment-media-gallery.tsx:496— This <div> carries its own click handler, but it sits inside a <button> that performs a different action. A keyboard user reaches the <button> and activating it runs the <button>'s handler, never this one, so this action has no keyboard path at all. Role and tabindex cannot supply one: HTML forbids a <button> from containing interactive content or any descendant with a tabindex, so the browser will not put this element in the tab order however it is marked up. Move it out of the <button> and make it a sibling <button>, so each action has its own control.
Click handler on a <div> nested inside <button> apps/app/src/components/moment-media-gallery.tsx:665— This <div> carries its own click handler, but it sits inside a <button> that performs a different action. A keyboard user reaches the <button> and activating it runs the <button>'s handler, never this one, so this action has no keyboard path at all. Role and tabindex cannot supply one: HTML forbids a <button> from containing interactive content or any descendant with a tabindex, so the browser will not put this element in the tab order however it is marked up. Move it out of the <button> and make it a sibling <button>, so each action has its own control.
Click handler on a <div> nested inside <button> apps/app/src/components/moment-media-gallery.tsx:811— This <div> carries its own click handler, but it sits inside a <button> that performs a different action. A keyboard user reaches the <button> and activating it runs the <button>'s handler, never this one, so this action has no keyboard path at all. Role and tabindex cannot supply one: HTML forbids a <button> from containing interactive content or any descendant with a tabindex, so the browser will not put this element in the tab order however it is marked up. Move it out of the <button> and make it a sibling <button>, so each action has its own control.
ED1 · Handler temporal coupling· Blocking call on the event loop · ×6
Blocking call on the event loop: src.read_desktop_locale calls `std::fs::read_to_string` apps/desktop/src-tauri/src/main.rs:232— `src.read_desktop_locale` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
Blocking call on the event loop: src.write_desktop_locale calls `std::fs::write` apps/desktop/src-tauri/src/main.rs:246— `src.write_desktop_locale` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::write`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
Blocking call on the event loop: src.resolve_runtime_paths calls `std::fs::create_dir_all` apps/desktop/src-tauri/src/main.rs:1919— `src.resolve_runtime_paths` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::create_dir_all`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
Blocking call on the event loop: src.resolve_runtime_paths calls `std::fs::create_dir_all` apps/desktop/src-tauri/src/main.rs:1920— `src.resolve_runtime_paths` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::create_dir_all`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
Blocking call on the event loop: src.probe_remote_health calls `reqwest::blocking::Client::builder` apps/desktop/src-tauri/src/main.rs:1943— `src.probe_remote_health` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `reqwest::blocking::Client::builder`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
Blocking call on the event loop: src.ensure_parent_dir_exists calls `std::fs::create_dir_all` apps/desktop/src-tauri/src/main.rs:1987— `src.ensure_parent_dir_exists` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::create_dir_all`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
AC2 · Forms & labels· <button> with no accessible text · ×5
<button> with no accessible text apps/app/src/components/moment-post-card.tsx:79— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text apps/app/src/components/moment-post-card.tsx:87— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text apps/app/src/features/cyber-avatar/cyber-avatar-report-sheet.tsx:94— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text apps/app/src/routes/cyber-avatar-page.tsx:172— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text apps/app/src/routes/discover-avatar-encounter-page.tsx:351— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
AC4 · Keyboard semantics· Click handler on a non-interactive <div> · ×4
Click handler on a non-interactive <div> apps/app/src/components/avatar-encounter-transcript.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> apps/app/src/components/moment-media-gallery.tsx:168— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> apps/app/src/components/moment-media-gallery.tsx:184— 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:398— 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· Click handler on a non-interactive <img> · ×3
Click handler on a non-interactive <img> apps/app/src/components/chat-message-list.tsx:6364— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <img> apps/app/src/components/chat-message-list.tsx:6526— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <img> apps/app/src/features/chat/stickers/sticker-panel.tsx:3144— 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}.
Empty aria-labelledby reference apps/app/src/features/chat/message-quote-selection-sheet.tsx:175— aria-labelledby is present but empty, so it references no element and the relationship is lost. Point it at the id(s) of the target element, or remove it.
Empty aria-labelledby reference apps/app/src/routes/group-announcement-page.tsx:549— aria-labelledby is present but empty, so it references no element and the relationship is lost. Point it at the id(s) of the target element, or remove it.
Empty aria-labelledby reference apps/app/src/routes/group-chat-edit-page.tsx:457— aria-labelledby is present but empty, so it references no element and the relationship is lost. Point it at the id(s) of the target element, or remove it.
Unknown ARIA attribute "aria-label。" apps/app/src/components/moment-media-gallery.tsx:613— This is not a valid WAI-ARIA attribute, so assistive technology ignores it (usually a typo). Use the correct aria-* attribute.
Unknown ARIA attribute "aria-label。" apps/app/src/features/chat/stickers/sticker-panel.tsx:2025— This is not a valid WAI-ARIA attribute, so assistive technology ignores it (usually a typo). Use the correct aria-* attribute.
Unknown ARIA attribute "aria-label," apps/app/src/routes/create-group-page.tsx:542— This is not a valid WAI-ARIA attribute, so assistive technology ignores it (usually a typo). Use the correct aria-* attribute.
Unknown ARIA attribute "aria-label," apps/app/src/routes/profile-settings-language-page.tsx:57— This is not a valid WAI-ARIA attribute, so assistive technology ignores it (usually a typo). Use the correct aria-* attribute.
AC2 · Forms & labels· Custom control with no accessible name on <div> · ×1
Custom control with no accessible name on <div> REDACTED:398— 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· Custom control with no accessible name on <video> · ×1
Custom control with no accessible name on <video> apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx:1883— This <video> 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· Editable <div> without an accessible name · ×1
Editable <div> without an accessible name REDACTED:1363— An element made editable (contenteditable, or role="textbox"/"searchbox" with a tab stop or key handling) is a text-entry control, and it has no aria-label, no aria-labelledby and no title, so assistive tech announces an unnamed edit field. Point aria-labelledby at its visible caption, or add an aria-label.
AC3 · Page structure· Document without a <title> · ×1
Document without a <title> apps/site/src/app/global-error.tsx:29— A page with no <title> gives no name in the tab, history or screen-reader page list. Declare it the way this router does — Next App Router `export const metadata = { title }`, React Router/Remix `export function meta`, TanStack Start `head`, or a Helmet/Head component.
<html> without a lang apps/wiki/public/tutorial.html:2— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
AC4 · Keyboard semantics· Double-click handler on a non-interactive <div> · ×1
Double-click handler on a non-interactive <div> apps/app/src/components/chat-composer.tsx:5480— This <div> binds wheel and double-click — pointer gestures with no keyboard form, a double-click among them. No click, no key handler, and no tabIndex={0}, so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabIndex={0} + a key handler alongside the double-click.
AC4 · Keyboard semantics· Double-click handler on a non-interactive <rect> · ×1
Double-click handler on a non-interactive <rect> apps/app/src/components/chat-composer.tsx:5809— This <rect> binds pointerdown and double-click — pointer gestures with no keyboard form, a double-click among them. No click, no key handler, and no tabIndex={0}, so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabIndex={0} + a key handler alongside the double-click.
AC4 · Keyboard semantics· Click handler on a <img> nested inside <button> · ×1
Click handler on a <img> nested inside <button> apps/app/src/features/chat/stickers/sticker-panel.tsx:3339— This <img> carries its own click handler, but it sits inside a <button> that performs a different action. A keyboard user reaches the <button> and activating it runs the <button>'s handler, never this one, so this action has no keyboard path at all. Role and tabindex cannot supply one: HTML forbids a <button> from containing interactive content or any descendant with a tabindex, so the browser will not put this element in the tab order however it is marked up. Move it out of the <button> and make it a sibling <button>, so each action has its own control.
AC4 · Keyboard semantics· Click handler on a non-interactive <video> · ×1
Click handler on a non-interactive <video> apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx:1883— 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}.
Unknown ARIA attribute "aria-" apps/app/src/components/wechat-comment-bar.tsx:209— This is not a valid WAI-ARIA attribute, so assistive technology ignores it (usually a typo). Use the correct aria-* attribute.
Unknown ARIA attribute "aria-labelledby,section" apps/app/src/features/chat/mobile-group-call-screen.tsx:1370— This is not a valid WAI-ARIA attribute, so assistive technology ignores it (usually a typo). Use the correct aria-* attribute.
Unknown ARIA attribute "aria-label。autocorrect" apps/app/src/features/contacts/management/management-permissions-screen.tsx:87— This is not a valid WAI-ARIA attribute, so assistive technology ignores it (usually a typo). Use the correct aria-* attribute.
Unknown ARIA attribute "aria-expanded)" apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx:2058— This is not a valid WAI-ARIA attribute, so assistive technology ignores it (usually a typo). Use the correct aria-* attribute.
Unknown ARIA attribute "aria-labelledby。父" apps/app/src/features/desktop/chat/desktop-chat-history-panel.tsx:405— This is not a valid WAI-ARIA attribute, so assistive technology ignores it (usually a typo). Use the correct aria-* attribute.
Unknown ARIA attribute "aria-label,盲人屏幕阅读器只听到一堆" apps/app/src/features/desktop/chat/desktop-message-avatar-popover.tsx:460— This is not a valid WAI-ARIA attribute, so assistive technology ignores it (usually a typo). Use the correct aria-* attribute.
Unknown ARIA attribute "aria-labelledby(卡片内的" apps/app/src/features/desktop/chat/desktop-message-avatar-popover.tsx:460— This is not a valid WAI-ARIA attribute, so assistive technology ignores it (usually a typo). Use the correct aria-* attribute.
Unknown ARIA attribute "aria-selected,aria-pressed" apps/app/src/routes/channel-author-page.tsx:734— This is not a valid WAI-ARIA attribute, so assistive technology ignores it (usually a typo). Use the correct aria-* attribute.
Unknown ARIA attribute "aria-selected。两者并存非标准:nvda" apps/app/src/routes/channels-page.tsx:2544— This is not a valid WAI-ARIA attribute, so assistive technology ignores it (usually a typo). Use the correct aria-* attribute.
Unknown ARIA attribute "aria-selected。" apps/app/src/routes/channels-page.tsx:2544— This is not a valid WAI-ARIA attribute, so assistive technology ignores it (usually a typo). Use the correct aria-* attribute.
Unknown ARIA attribute "aria-hidden,盲人用户读" apps/app/src/routes/create-group-page.tsx:542— This is not a valid WAI-ARIA attribute, so assistive technology ignores it (usually a typo). Use the correct aria-* attribute.
role="checkbox" missing required aria-checked apps/app/src/routes/create-group-page.tsx:829— The checkbox role requires aria-checked to convey its state. Add it.
Unknown ARIA attribute "aria-checked,屏幕阅读器只读「张三" apps/app/src/routes/create-group-page.tsx:829— This is not a valid WAI-ARIA attribute, so assistive technology ignores it (usually a typo). Use the correct aria-* attribute.
Unknown ARIA attribute "aria-labelledby,对齐" apps/app/src/routes/mobile-add-friend-page.tsx:1270— This is not a valid WAI-ARIA attribute, so assistive technology ignores it (usually a typo). Use the correct aria-* attribute.
AC5 · ARIA correctness· aria-hidden hides a focusable element · ×1
aria-hidden hides a focusable element apps/app/src/routes/official-accounts-page.tsx:194— aria-hidden="true" here hides the subtree from assistive tech, but a focusable descendant stays in the tab order — a keyboard user can land on a control screen readers can't see. Add inert, take the descendants out of the tab order (tabindex="-1"), or drop aria-hidden.
Unknown ARIA attribute "aria-label,避免屏阅器" apps/app/src/routes/tags-page.tsx:271— This is not a valid WAI-ARIA attribute, so assistive technology ignores it (usually a typo). Use the correct aria-* attribute.
Unknown ARIA attribute "aria-label,voiceover" apps/app/src/routes/welcome-page.tsx:2197— This is not a valid WAI-ARIA attribute, so assistive technology ignores it (usually a typo). Use the correct aria-* attribute.
Unknown ARIA attribute "aria-label,跟" apps/app/src/routes/world-characters-page.tsx:380— This is not a valid WAI-ARIA attribute, so assistive technology ignores it (usually a typo). Use the correct aria-* attribute.
Unknown ARIA attribute "aria-hidden,把" apps/wiki/src/components/root-layout.tsx:487— This is not a valid WAI-ARIA attribute, so assistive technology ignores it (usually a typo). Use the correct aria-* attribute.
Unlisted import 'better-sqlite3' scripts/migrate-channels-to-global.mjs:22— Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
Import cycle (4 files) api/src/modules/chat/character-social-context.service.ts:12— api/src/modules/chat/character-social-context.service.ts → api/src/modules/tenancy/tenant.service.ts → api/src/modules/social/social.service.ts → api/src/modules/chat/chat.service.ts → api/src/modules/chat/character-social-context.service.ts (one verified cycle inside a mutually-dependent group of 8 files)
S1 · Web-Security Posture· Cryptographic key material is a compile-time constant · ×1
Cryptographic key material is a compile-time constant apps/cloud-api/src/orchestration/local-process-compute-provider.service.ts:93— `key` is the symmetric cipher key, and its shipped DEFAULT is a compile-time constant — an installation that never overrides it encrypts with a value published in this repository, and the code cannot distinguish that state from a configured one. A key that ships with the source is not secret: every contributor, fork, mirror and released binary carries it, so anyone holding the repository can decrypt what any installation encrypted, and there is no way to invalidate what was already protected because every deployment built from this source shares the value. Where the constant is a password salt the consequence differs but is no smaller — one global salt means precomputation amortises across every installation, which is the property salting exists to destroy. Read the value from configuration, an environment variable or a secrets manager at startup and FAIL FAST when it is absent, so a missing key stops the process instead of silently falling back to a shared default; treat the committed value as disclosed and rotate it rather than only deleting the line. For a salt, generate a fresh random one per password and store it alongside the hash.
FunctionTooLong: chat-message-list.ChatMessageList apps/app/src/components/chat-message-list.tsx:355— FunctionTooLong — ChatMessageList runs 3101 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3001 over it, 31.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: sticker-panel.StickerPanel apps/app/src/features/chat/stickers/sticker-panel.tsx:73— FunctionTooLong — StickerPanel runs 2583 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2483 over it, 25.83× 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: chat-composer.ChatComposer apps/app/src/components/chat-composer.tsx:304— FunctionTooLong — ChatComposer runs 2538 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2438 over it, 25.38× 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: contacts-page.ContactsPage apps/app/src/routes/contacts-page.tsx:295— FunctionTooLong — ContactsPage runs 1912 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1812 over it, 19.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: discover-feed-page.DiscoverFeedPage apps/app/src/routes/discover-feed-page.tsx:99— FunctionTooLong — DiscoverFeedPage runs 1846 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1746 over it, 18.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: admin-sessions-page.AdminSessionsPage apps/cloud-console/src/routes/admin-sessions-page.tsx:1110— FunctionTooLong — AdminSessionsPage runs 1801 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1701 over it, 18.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: desktop-chat-workspace.DesktopChatWorkspace apps/app/src/features/desktop/chat/desktop-chat-workspace.tsx:222— FunctionTooLong — DesktopChatWorkspace runs 1782 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1682 over it, 17.82× 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: character-detail-page.CharacterDetailPage apps/app/src/routes/character-detail-page.tsx:134— FunctionTooLong — CharacterDetailPage runs 1765 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1665 over it, 17.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: channels-page.ChannelsPage apps/app/src/routes/channels-page.tsx:107— FunctionTooLong — ChannelsPage runs 1724 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1624 over it, 17.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: welcome-page.WelcomePage apps/app/src/routes/welcome-page.tsx:397— FunctionTooLong — WelcomePage runs 1421 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1321 over it, 14.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: character-edit-form.CharacterEditForm apps/wiki/src/components/character-edit-form.tsx:319— FunctionTooLong — CharacterEditForm runs 1401 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1301 over it, 14.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: moments-page.MomentsPage apps/app/src/routes/moments-page.tsx:117— FunctionTooLong — MomentsPage runs 1377 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1277 over it, 13.77× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: waiting-session-sync-page.WaitingSessionSyncPage apps/cloud-console/src/routes/waiting-session-sync-page.tsx:315— FunctionTooLong — WaitingSessionSyncPage runs 1328 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1228 over it, 13.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: chat-composer.DesktopScreenshotEditor apps/app/src/components/chat-composer.tsx:4506— FunctionTooLong — DesktopScreenshotEditor runs 1306 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1206 over it, 13.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: group-chat-thread-panel.GroupChatThreadPanel apps/app/src/features/chat/group-chat-thread-panel.tsx:118— FunctionTooLong — GroupChatThreadPanel runs 1274 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1174 over it, 12.74× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: desktop-mobile-page.DesktopMobilePage apps/app/src/routes/desktop-mobile-page.tsx:184— FunctionTooLong — DesktopMobilePage runs 1248 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1148 over it, 12.48× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: world-detail-page.WorldDetailPage apps/cloud-console/src/routes/world-detail-page.tsx:254— FunctionTooLong — WorldDetailPage runs 1136 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1036 over it, 11.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: chat-details-page.MobileChatDetailsPage apps/app/src/routes/chat-details-page.tsx:92— FunctionTooLong — MobileChatDetailsPage runs 1133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1033 over it, 11.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: chat-list-page.MobileChatListPage apps/app/src/routes/chat-list-page.tsx:228— FunctionTooLong — MobileChatListPage runs 1118 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1018 over it, 11.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: desktop-search-workspace.DesktopSearchWorkspace apps/app/src/features/search/desktop-search-workspace.tsx:145— FunctionTooLong — DesktopSearchWorkspace runs 1051 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 951 over it, 10.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: profile-moments-page.ProfileMomentsPage apps/app/src/routes/profile-moments-page.tsx:95— FunctionTooLong — ProfileMomentsPage runs 941 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 841 over it, 9.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.
FunctionTooLong: mobile-note-editor-page.MobileNoteEditor REDACTED:151— FunctionTooLong — MobileNoteEditor runs 926 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 826 over it, 9.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: mobile-friend-moments-page.MobileFriendMomentsPage apps/app/src/routes/mobile-friend-moments-page.tsx:61— FunctionTooLong — MobileFriendMomentsPage runs 901 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 801 over it, 9.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: desktop-create-group-dialog.DesktopCreateGroupDialog apps/app/src/features/desktop/chat/desktop-create-group-dialog.tsx:53— FunctionTooLong — DesktopCreateGroupDialog runs 898 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 798 over it, 8.98× 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: desktop-notes-workspace.DesktopNotesWorkspace REDACTED:105— FunctionTooLong — DesktopNotesWorkspace runs 874 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 774 over it, 8.74× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Hotspot: apps/app/src/components/chat-message-list.tsx apps/app/src/components/chat-message-list.tsx:355— apps/app/src/components/chat-message-list.tsx changed 351 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 603 in chat-message-list.ChatMessageList at line 355. 135 of those changes were fix/bug commits, and the other 216 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/components/chat-message-list.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: apps/app/src/components/chat-composer.tsx apps/app/src/components/chat-composer.tsx:304— apps/app/src/components/chat-composer.tsx changed 217 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 544 in chat-composer.ChatComposer at line 304. 66 of those changes were fix/bug commits, and the other 151 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/components/chat-composer.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: apps/app/src/features/chat/stickers/sticker-panel.tsx apps/app/src/features/chat/stickers/sticker-panel.tsx:73— apps/app/src/features/chat/stickers/sticker-panel.tsx changed 123 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 588 in sticker-panel.StickerPanel at line 73. 19 of those changes were fix/bug commits, and the other 104 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/features/chat/stickers/sticker-panel.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: apps/app/src/routes/channels-page.tsx apps/app/src/routes/channels-page.tsx:107— apps/app/src/routes/channels-page.tsx changed 240 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 276 in channels-page.ChannelsPage at line 107. 161 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/routes/channels-page.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: apps/app/src/routes/contacts-page.tsx apps/app/src/routes/contacts-page.tsx:295— apps/app/src/routes/contacts-page.tsx changed 188 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 295 in contacts-page.ContactsPage at line 295. 80 of those changes were fix/bug commits, and the other 108 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/routes/contacts-page.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: apps/app/src/routes/discover-feed-page.tsx apps/app/src/routes/discover-feed-page.tsx:99— apps/app/src/routes/discover-feed-page.tsx changed 179 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 295 in discover-feed-page.DiscoverFeedPage at line 99. 119 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/routes/discover-feed-page.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: apps/app/src/features/desktop/chat/desktop-chat-workspace.tsx apps/app/src/features/desktop/chat/desktop-chat-workspace.tsx:222— apps/app/src/features/desktop/chat/desktop-chat-workspace.tsx changed 173 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 259 in desktop-chat-workspace.DesktopChatWorkspace at line 222. 47 of those changes were fix/bug commits, and the other 126 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/features/desktop/chat/desktop-chat-workspace.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: apps/app/src/routes/moments-page.tsx apps/app/src/routes/moments-page.tsx:117— apps/app/src/routes/moments-page.tsx changed 166 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 246 in moments-page.MomentsPage at line 117. 96 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/routes/moments-page.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: apps/app/src/routes/character-detail-page.tsx apps/app/src/routes/character-detail-page.tsx:134— apps/app/src/routes/character-detail-page.tsx changed 127 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 293 in character-detail-page.CharacterDetailPage at line 134. 56 of those changes were fix/bug commits, and the other 71 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/routes/character-detail-page.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: apps/app/src/routes/chat-list-page.tsx apps/app/src/routes/chat-list-page.tsx:228— apps/app/src/routes/chat-list-page.tsx changed 178 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 180 in chat-list-page.MobileChatListPage at line 228. 67 of those changes were fix/bug commits, and the other 111 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/routes/chat-list-page.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: apps/app/src/features/chat/group-chat-thread-panel.tsx apps/app/src/features/chat/group-chat-thread-panel.tsx:118— apps/app/src/features/chat/group-chat-thread-panel.tsx changed 162 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 197 in group-chat-thread-panel.GroupChatThreadPanel at line 118. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/features/chat/group-chat-thread-panel.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: apps/app/src/routes/welcome-page.tsx apps/app/src/routes/welcome-page.tsx:397— apps/app/src/routes/welcome-page.tsx changed 94 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 265 in welcome-page.WelcomePage at line 397. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/routes/welcome-page.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: apps/app/src/features/chat/conversation-thread-panel.tsx apps/app/src/features/chat/conversation-thread-panel.tsx:95— apps/app/src/features/chat/conversation-thread-panel.tsx changed 143 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 141 in conversation-thread-panel.ConversationThreadPanel at line 95. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/features/chat/conversation-thread-panel.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: apps/app/src/routes/chat-details-page.tsx apps/app/src/routes/chat-details-page.tsx:92— apps/app/src/routes/chat-details-page.tsx changed 93 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 202 in chat-details-page.MobileChatDetailsPage at line 92. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/routes/chat-details-page.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx:151— apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx changed 144 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 103 in desktop-channels-workspace.DesktopChannelsWorkspace at line 151. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: apps/app/src/features/chat/mobile-ai-call-screen.tsx apps/app/src/features/chat/mobile-ai-call-screen.tsx:76— apps/app/src/features/chat/mobile-ai-call-screen.tsx changed 93 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 133 in mobile-ai-call-screen.MobileAiCallScreen at line 76. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/features/chat/mobile-ai-call-screen.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:177— apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx changed 99 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 120 in desktop-chat-details-panel.DirectChatDetailsPanel at line 177. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: apps/app/src/features/search/desktop-search-workspace.tsx apps/app/src/features/search/desktop-search-workspace.tsx:145— apps/app/src/features/search/desktop-search-workspace.tsx changed 63 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 181 in desktop-search-workspace.DesktopSearchWorkspace at line 145. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/features/search/desktop-search-workspace.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: apps/app/src/features/chat/mobile-group-call-screen.tsx apps/app/src/features/chat/mobile-group-call-screen.tsx:67— apps/app/src/features/chat/mobile-group-call-screen.tsx changed 79 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 140 in mobile-group-call-screen.MobileGroupCallScreen at line 67. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/features/chat/mobile-group-call-screen.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: apps/app/src/features/desktop/chat/desktop-create-group-dialog.tsx apps/app/src/features/desktop/chat/desktop-create-group-dialog.tsx:53— apps/app/src/features/desktop/chat/desktop-create-group-dialog.tsx changed 71 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 148 in desktop-create-group-dialog.DesktopCreateGroupDialog at line 53. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/features/desktop/chat/desktop-create-group-dialog.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: apps/app/src/routes/mobile-friend-moments-page.tsx apps/app/src/routes/mobile-friend-moments-page.tsx:61— apps/app/src/routes/mobile-friend-moments-page.tsx changed 60 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 165 in mobile-friend-moments-page.MobileFriendMomentsPage at line 61. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/routes/mobile-friend-moments-page.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: apps/app/src/routes/discover-page.tsx apps/app/src/routes/discover-page.tsx:275— apps/app/src/routes/discover-page.tsx changed 86 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 115 in discover-page.DesktopDiscoverWorkspace at line 275. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/routes/discover-page.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: apps/app/src/routes/desktop-mobile-page.tsx apps/app/src/routes/desktop-mobile-page.tsx:184— apps/app/src/routes/desktop-mobile-page.tsx changed 66 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 134 in desktop-mobile-page.DesktopMobilePage at line 184. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/routes/desktop-mobile-page.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: apps/app/src/routes/group-chat-details-page.tsx apps/app/src/routes/group-chat-details-page.tsx:63— apps/app/src/routes/group-chat-details-page.tsx changed 74 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 112 in group-chat-details-page.MobileGroupChatDetailsPage 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/routes/group-chat-details-page.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: apps/app/src/lib/error-translate.ts apps/app/src/lib/error-translate.ts:22— apps/app/src/lib/error-translate.ts changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 281 in error-translate.translateAppErrorCode at line 22. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/lib/error-translate.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.
FileTooLong: components/chat-message-list.tsx apps/app/src/components/chat-message-list.tsx— FileTooLong — 6348 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 5848 over it, 12.70× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: components/chat-composer.tsx apps/app/src/components/chat-composer.tsx— FileTooLong — 5438 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 4938 over it, 10.88× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: routes/channels-page.tsx apps/app/src/routes/channels-page.tsx— FileTooLong — 3801 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3301 over it, 7.60× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 3602 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3102 over it, 7.20× 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: feed/feed.service.ts api/src/modules/feed/feed.service.ts— FileTooLong — 3601 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: FeedService (198-5233). The bar is 500 significant lines; this is 3101 over it, 7.20× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: ai/ai-orchestrator.service.ts api/src/modules/ai/ai-orchestrator.service.ts— FileTooLong — 3111 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: AiOrchestratorService (239-4459). The bar is 500 significant lines; this is 2611 over it, 6.22× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: stickers/sticker-panel.tsx apps/app/src/features/chat/stickers/sticker-panel.tsx— FileTooLong — 3016 significant lines (blank, comment-only and punctuation-only lines excluded), about 86% of them inside a single declaration: StickerPanel (73-3200). The bar is 500 significant lines; this is 2516 over it, 6.03× 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: system/system.service.ts api/src/modules/system/system.service.ts— FileTooLong — 2934 significant lines (blank, comment-only and punctuation-only lines excluded), about 83% of them inside a single declaration: SystemService (627-3838). The bar is 500 significant lines; this is 2434 over it, 5.87× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: REDACTED REDACTED— FileTooLong — 2840 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: ActionRuntimeService (139-3863). The bar is 500 significant lines; this is 2340 over it, 5.68× 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: routes/admin-sessions-page.tsx apps/cloud-console/src/routes/admin-sessions-page.tsx— FileTooLong — 2613 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2113 over it, 5.23× 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 — 2565 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: ReminderRuntimeService (430-3513). The bar is 500 significant lines; this is 2065 over it, 5.13× 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/desktop-channels-workspace.tsx apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx— FileTooLong — 2507 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2007 over it, 5.01× 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: moments/moments.service.ts api/src/modules/moments/moments.service.ts— FileTooLong — 2449 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1949 over it, 4.90× 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: chat/desktop-chat-workspace.tsx apps/app/src/features/desktop/chat/desktop-chat-workspace.tsx— FileTooLong — 2417 significant lines (blank, comment-only and punctuation-only lines excluded), about 74% of them inside a single declaration: DesktopChatWorkspace (222-2840). The bar is 500 significant lines; this is 1917 over it, 4.83× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: search/desktop-search-workspace.tsx apps/app/src/features/search/desktop-search-workspace.tsx— FileTooLong — 2326 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1826 over it, 4.65× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: routes/contacts-page.tsx apps/app/src/routes/contacts-page.tsx— FileTooLong — 2308 significant lines (blank, comment-only and punctuation-only lines excluded), about 83% of them inside a single declaration: ContactsPage (295-3025). The bar is 500 significant lines; this is 1808 over it, 4.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: lib/cloud-console-i18n.ts apps/cloud-console/src/lib/cloud-console-i18n.ts— FileTooLong — 2265 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: cloudConsoleRuntimeText (21-2048). The bar is 500 significant lines; this is 1765 over it, 4.53× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: chat/desktop-chat-details-panel.tsx apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx— FileTooLong — 2260 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1760 over it, 4.52× 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: inference/inference.service.ts api/src/modules/inference/inference.service.ts— FileTooLong — 2215 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: InferenceService (303-3014). The bar is 500 significant lines; this is 1715 over it, 4.43× 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/chat.service.ts api/src/modules/chat/chat.service.ts— FileTooLong — 2204 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: ChatService (186-3020). The bar is 500 significant lines; this is 1704 over it, 4.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: routes/character-detail-page.tsx apps/app/src/routes/character-detail-page.tsx— FileTooLong — 2180 significant lines (blank, comment-only and punctuation-only lines excluded), about 81% of them inside a single declaration: CharacterDetailPage (134-2510). The bar is 500 significant lines; this is 1680 over it, 4.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: components/character-edit-form.tsx apps/wiki/src/components/character-edit-form.tsx— FileTooLong — 2171 significant lines (blank, comment-only and punctuation-only lines excluded), about 65% of them inside a single declaration: CharacterEditForm (319-2012). The bar is 500 significant lines; this is 1671 over it, 4.34× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: routes/moments-page.tsx apps/app/src/routes/moments-page.tsx— FileTooLong — 1997 significant lines (blank, comment-only and punctuation-only lines excluded), about 69% of them inside a single declaration: MomentsPage (117-2532). The bar is 500 significant lines; this is 1497 over it, 3.99× 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: routes/discover-feed-page.tsx apps/app/src/routes/discover-feed-page.tsx— FileTooLong — 1996 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: DiscoverFeedPage (99-3132). The bar is 500 significant lines; this is 1496 over it, 3.99× 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: analytics/ai-usage-ledger.service.ts api/src/modules/analytics/ai-usage-ledger.service.ts— FileTooLong — 1978 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: AiUsageLedgerService (287-2623). The bar is 500 significant lines; this is 1478 over it, 3.96× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
Repeated repair: apps/app/scripts/audit-desktop-web-routing.mjs apps/app/scripts/audit-desktop-web-routing.mjs:9— apps/app/scripts/audit-desktop-web-routing.mjs changed 54 times in last 90 days and 49 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 1 (its worst body is audit-desktop-web-routing.loadTypeScriptModule at line 9), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix desktop QA audit and remote diagnostics”; “fix app desktop web navigation state normalization”; “fix desktop return path trailing slash normalization”; “fix: prepare mobile web bug sweep”. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/scripts/audit-desktop-web-routing.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: apps/ios-shell/plugins/swift-stub/YinjieMobileBridgePlugin.swift apps/ios-shell/plugins/swift-stub/YinjieMobileBridgePlugin.swift:566— apps/ios-shell/plugins/swift-stub/YinjieMobileBridgePlugin.swift changed 36 times in last 90 days and 25 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 YinjieMobileBridgePlugin.showLocalNotification at line 566), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(ios-shell/真机走查): R2 — R1 引入的后台 purge 跟 picker write 时序竞态”; “fix(ios-shell/真机走查): R1 — plugin load 同步阻塞 main thread 清 tmp 拉长冷启黑屏窗口”; “fix(ios-shell/YinjieMobileBridge): 真机走查 Round 1 — iPad 上 share/shareFile popover 箭头指向乱飞”; “fix(ios-shell+app): 真机走查 Round 4 — 前台横幅点击 → 没有 navigate 的死链”. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/ios-shell/plugins/swift-stub/YinjieMobileBridgePlugin.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: apps/app/src/components/wechat-moment-card.tsx apps/app/src/components/wechat-moment-card.tsx:90— apps/app/src/components/wechat-moment-card.tsx changed 33 times in last 90 days and 24 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is wechat-moment-card.arePropsEqual at line 90), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(app/朋友圈+广场): 走查多轮收尾——破图token刷新可复位/夜间链接蓝达标AA/大图不露UUID/评论按压反馈”; “fix(app/朋友圈): 卡片正文/评论/时间戳改走语义token——夜间外观不再近黑不可见 + 隐形分隔线 + 破图露UUID文件名兜底”; “fix(app): 复原上一条 i18n commit 误带的 23 个 .tsx 回退(未读角标实心化被 clobber)”; “fix(app/UI统一 走查3-4): 修token化引入的对比度/夜间不可见缺陷”. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/components/wechat-moment-card.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: apps/ios-shell/scripts/doctor-ios.mjs apps/ios-shell/scripts/doctor-ios.mjs:43— apps/ios-shell/scripts/doctor-ios.mjs changed 32 times in last 90 days and 20 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is doctor-ios.resolveConfiguredApiBaseUrl at line 43), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(ios-shell/真机走查): R1 — AppDelegatePush 模板跟 configure 产物漂移 4 轮真机修复”; “fix(ios-shell/真机走查): R9 — R2 用 contentModificationDateKey 触发 Apple FileTimestamp 申报要求漏声明”; “fix(ios-shell/真机走查): R6 — configure patcher 跟 doctor 没盯 R4/R5 新加的 register-on-transition 路径”; “fix(ios-shell): 真机走查 Round 48 — 4 个 yinjie-* tmp 子目录从来没人清理,pickImages/captureImage/pickFile/shareFile/openFile 每次都留一份临时副本,日活用户一个月堆 GB 级 tmp”. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/ios-shell/scripts/doctor-ios.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: apps/app/src/features/contacts/management/management-permissions-screen.tsx apps/app/src/features/contacts/management/management-permissions-screen.tsx:25— apps/app/src/features/contacts/management/management-permissions-screen.tsx changed 21 times in last 90 days and 16 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is management-permissions-screen.ManagementPermissionsScreen at line 25), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(app/世界改造 走查R4): 残留琥珀阴影/边框 rgba(180,130,20)→紫调 rgba(60,40,110)”; “fix(app/世界改造 走查R1): 深色逐页 QA 收口 —— 全 app 浅色硬编码面→surface token”; “fix(移动端/UI): 修复 402 处带空格的 rgba 任意值类名(此前静默不渲染)”; “fix(app/移动端/通讯录/新一轮走查 R6): 通讯录管理 modal/screen 残留装饰 icon 补 aria-hidden”. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/features/contacts/management/management-permissions-screen.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: REDACTED REDACTED:461— REDACTED changed 19 times in last 90 days and 15 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is search-navigation.resolveDesktopOfficialNavigationTarget at line 461), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: prepare mobile web bug sweep”; “fix desktop legacy root workspace routes”; “fix desktop search shared tool return context”; “fix desktop search create-group return context”. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: apps/android-shell/android/app/src/main/java/com/yinjie/mobile/YinjieMobileBridgePlugin.java apps/android-shell/android/app/src/main/java/com/yinjie/mobile/YinjieMobileBridgePlugin.java:833— apps/android-shell/android/app/src/main/java/com/yinjie/mobile/YinjieMobileBridgePlugin.java changed 23 times in last 90 days and 13 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 YinjieMobileBridgePlugin.cacheLaunchTarget at line 833), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(app/移动端/发现/视频号): 重走查 R11 — 评论 textarea 没卡 maxLength,超 500 字提交才报错”; “fix(android-shell): 真机走查 Round 33 — captureImage 给 EXTRA_OUTPUT 塞 FileProvider URI 但只在 intent 上 addFlags(GRANT_WRITE),按 Android 文档 grant flag 不传递给 extras URI,MIUI/EMUI/OxygenOS 自带相机写 cache:// 时 SecurityException 拍完回来一张空文件”; “fix(android-shell): 真机走查 Round 30 — readNotificationPermissionState 漏看 yinjie_messages channel 级开关,用户在系统设置单独关掉这条 channel 时 state 还是 granted,本地推送 + FCM 静默丢”; “fix(android-shell): 真机走查 Round 25 — pickImagesResult 漏调 persistReadPermission,选完图后台回来 webview 加载 / 上传 content:// 拿 SecurityException”. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/android-shell/android/app/src/main/java/com/yinjie/mobile/YinjieMobileBridgePlugin.java`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: packages/i18n/src/runtime/surface-text-dictionaries.ts packages/i18n/src/runtime/surface-text-dictionaries.ts:29— packages/i18n/src/runtime/surface-text-dictionaries.ts changed 21 times in last 90 days and 13 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is surface-text-dictionaries.getSurfaceTextDictionary at line 29), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(cloud-console): 修复 Telemetry 与 Revenue Sharing 多语言”; “fix(cloud-console/worlds): 修复 Managed worlds 面板多语言问题”; “fix(cloud-console/i18n): 补 zh-CN 'Provider:'/'Executor:' 字典”; “fix(cloud-console/i18n): drop dup absent/unknown overrides”. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- packages/i18n/src/runtime/surface-text-dictionaries.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: api/src/modules/wiki/wiki.types.ts api/src/modules/wiki/wiki.types.ts:497— api/src/modules/wiki/wiki.types.ts changed 19 times in last 90 days and 11 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is wiki.types.diffPaths at line 497), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(wiki/创建角色): newcomer 走查 — name/bio 无长度上限撑爆 title/列表/巡查队列”; “fix(wiki/角色目录): newcomer 走查二轮 — 修复 wiki 创建角色 personality 丢失”; “fix(wiki + region 走查): 4 个 region 残漏 + 1 个 clobber 修复”; “fix(app/移动端/发现-发布广场动态走查 R1): 闭包死代码让 mid-flight 切账户的视频/图片塞进新账户 draft”. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- api/src/modules/wiki/wiki.types.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: apps/app/src/features/moments/moment-compose-media.ts apps/app/src/features/moments/moment-compose-media.ts:70— apps/app/src/features/moments/moment-compose-media.ts changed 18 times in last 90 days and 11 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is moment-compose-media.useMomentComposeDraft.hydrateFromStored at line 70), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(app/移动端/发现-朋友圈/最新一轮 R1): 3 处隐藏 bug”; “fix(app/移动端/发现-发布广场动态走查 R1): 闭包死代码让 mid-flight 切账户的视频/图片塞进新账户 draft”; “fix(app/移动端/朋友圈/发布走查 R3): 视频上传 + 封面 capture 两处兜底”; “fix(app/移动端/朋友圈/发布走查 R2): readVideoMetadata / readImageDimensions 加超时兜底”. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/features/moments/moment-compose-media.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: apps/app/src/features/chat/mobile-mention-picker-sheet.tsx apps/app/src/features/chat/mobile-mention-picker-sheet.tsx:29— apps/app/src/features/chat/mobile-mention-picker-sheet.tsx changed 16 times in last 90 days and 9 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is mobile-mention-picker-sheet.MobileMentionPickerSheet at line 29), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(app/世界改造 走查R4): 残留琥珀阴影/边框 rgba(180,130,20)→紫调 rgba(60,40,110)”; “fix(移动端/UI): 修复 402 处带空格的 rgba 任意值类名(此前静默不渲染)”; “fix(app/移动端/群聊): 走查 R1 — mention picker 候选项缺同帧双击 guard”; “fix(app/电脑端/群聊): 走查 R3 — @mention 用 friend.remarkName 插入时 server 不识别角色 → 拿不到 mention 加权”. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/features/chat/mobile-mention-picker-sheet.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: REDACTED REDACTED:275— REDACTED changed 16 times in last 90 days and 9 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is ensure-local-web-nginx.runNginx at line 275), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(公网/avatar): 头像保存卡死——app-web-nginx 跑在 ps 用户但 proxy_temp 默认 /var/lib/nginx/proxy 是 root:www-data drwx------,>32K 的上游响应一 spool 就 EPERM 把连接吊住;把 proxy/fastcgi/scgi/uwsgi 四个 temp 都重指到 runtime-data 下”; “fix(app+nginx): 头像 SVG / WebSocket 也走 cloud-api 反代”; “fix(app+nginx): 公网入口禁止匿名直通本机 owner db,强制走 cloud 多租户反代”; “perf+fix: 主 CSS 异步加载 + nginx 用 \$http_host 精确分流 site/app 两条隧道”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: apps/wiki/src/routes/admin-reports-page.tsx apps/wiki/src/routes/admin-reports-page.tsx:26— apps/wiki/src/routes/admin-reports-page.tsx changed 15 times in last 90 days and 9 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is admin-reports-page.AdminReportsPage at line 26), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(wiki/角色管理平台): 新会话 4 轮走查 — 5 处 mutation 静默失败 + 回滚原因丢稿”; “fix(app/电脑端/单聊): 走查 R130 — NoteViewerOverlay 内嵌图片漏 draggable={false}”; “fix(app/电脑端/视频号): 走查第八轮 R2 — 评论 drawer 全 CoT prose 被过滤时空态不冒”; “fix(app/电脑端/群聊): 走查 R104 — FeatureUnavailableDialog backdrop button 漏 tabIndex={-1}”. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/wiki/src/routes/admin-reports-page.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: apps/wiki/src/routes/admin-abuse-filters-page.tsx apps/wiki/src/routes/admin-abuse-filters-page.tsx:308— apps/wiki/src/routes/admin-abuse-filters-page.tsx changed 14 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is admin-abuse-filters-page.CreateFilterForm at line 308), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(app/电脑端/单聊): 走查 R130 — NoteViewerOverlay 内嵌图片漏 draggable={false}”; “fix+a11y(wiki/角色管理平台): R4 走查 — 17 处 mutation/validation 错误反馈 InlineNotice 漏 role + 用户菜单 aria-label”; “fix(app/电脑端/群聊): 走查 R85 — desktop-mobile-page 4 处 ErrorBlock 缺 role="alert"”; “fix(wiki/角色管理平台): 新会话 R1 走查 — 30 处 ErrorBlock 缺 role=alert + character-page state 跨角色残留”. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/wiki/src/routes/admin-abuse-filters-page.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: apps/cloud-api/src/invite/invite.service.ts apps/cloud-api/src/invite/invite.service.ts:131— apps/cloud-api/src/invite/invite.service.ts changed 11 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is InviteService.assessAndRecordRedemption at line 131), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(cloud-api/invite): rejected 路径不再 bump redeemCount,让"成功邀请"真等于成功数”; “fix(cloud-api/invite): admin 拒兑后 code 累计统计回滚 + /subscription inviteCode 跟 /summary 对齐”; “fix(cloud-api/invite): admin 拒兑后受邀人不再被永久挡”; “fix(cloud-api/invite+subscription): admin 拒兑双边回滚 + invite_reward 真正叠加 + grant per-user 串行”. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/cloud-api/src/invite/invite.service.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: api/src/modules/ai/web-search.service.ts api/src/modules/ai/web-search.service.ts:97— api/src/modules/ai/web-search.service.ts changed 8 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is WebSearchService.searchAndFormat at line 97), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(web-search): R2 走查 — empty-result 60s 缓存避免 cron 周期内 same query 重复 burn”; “fix(api/cloud-api): MiniMax 2056 5h-window 解析 reset 时间,不再把全 fleet 锁到明天”; “fix(api): TTS HD/web-search 走查新一轮 R1 — web-search 注入未 sanitize 第三方文本,间接 prompt injection 风险”; “fix(api): TTS HD/web-search 新一轮 R2 — quota 善后 DB 错别替原 innerErr”. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- api/src/modules/ai/web-search.service.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: apps/cloud-console/src/lib/world-lifecycle-actions.ts apps/cloud-console/src/lib/world-lifecycle-actions.ts:111— apps/cloud-console/src/lib/world-lifecycle-actions.ts changed 9 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is world-lifecycle-actions.createWorldActionLabel at line 111), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(分身相遇提交误带): 还原 world-lifecycle-actions.ts 被并发 race 回退的 archived 兜底修复”; “fix(cloud-console/用户世界): archived 世界无生命周期操作 + getAllowedWorldActions 兜底空数组,修复整页崩”; “fix(app/电脑端/广场): 新一轮走查 R2 — 后台 refetch 失败时 toolbar 顶部红条和列表内容并排,跟移动端 R1 同坑”; “fix(i18n): cloud-console/cloud-api 硬编码扫描归零 — 添加合理 ignore 注释”. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/cloud-console/src/lib/world-lifecycle-actions.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: apps/app/src/features/games/tank-war/use-tank-war-world.ts apps/app/src/features/games/tank-war/use-tank-war-world.ts:43— apps/app/src/features/games/tank-war/use-tank-war-world.ts changed 7 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is use-tank-war-world.useTankWarWorld at line 43), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(app/移动端/消息/+面板/收藏): 走查新一轮 R2 — 收藏文本 description == title 时去重”; “fix(app/games/tank-war): RAF 每 120ms cancel+restart——HUD 投影把整个 loop 抖回原点”; “fix(app/games/tank-war): iOS Safari 整局哑——第一发 fire 在 RAF 里调 ctx.resume 不算 gesture”; “fix(app/games/tank-war): 通关 unlock 在动画里被点 "下一关" 会丢”. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/features/games/tank-war/use-tank-war-world.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: apps/app/src/features/shell/desktop-nav-matching.ts apps/app/src/features/shell/desktop-nav-matching.ts:152— apps/app/src/features/shell/desktop-nav-matching.ts changed 7 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is desktop-nav-matching.matchesDesktopNavPath at line 152), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(app/desktop): 修复桌面端代码质量问题使 audit:desktop-web 全链路通过”; “fix(shell): 桌面侧栏「小程序面板」label 改成「小程序」,避免 5 字超出 92px 侧栏被裁掉末字”; “fix: localize app shell language switching”; “fix desktop legacy moments friend nav”. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/features/shell/desktop-nav-matching.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: apps/app/src/components/wechat-moments-cover.tsx apps/app/src/components/wechat-moments-cover.tsx:172— apps/app/src/components/wechat-moments-cover.tsx changed 11 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is wechat-moments-cover.isLikelyImageSource at line 172), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(app/世界改造 走查R4): 残留琥珀阴影/边框 rgba(180,130,20)→紫调 rgba(60,40,110)”; “fix(移动端/UI): 修复 402 处带空格的 rgba 任意值类名(此前静默不渲染)”; “fix(app/移动端/我 tab Round 2 走查): 朋友圈封面 emoji 起头名昵 surrogate pair 砍半 + 我的朋友圈 mobile 红条漏渲重试按钮逼用户重开 ⋯ 菜单”; “fix(app/moments/cover): 好友朋友圈封面头像对 emoji / 加载失败的形态不再破图”. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/components/wechat-moments-cover.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: api/src/modules/minimax/minimax-quota.service.ts api/src/modules/minimax/minimax-quota.service.ts:314— api/src/modules/minimax/minimax-quota.service.ts changed 10 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is MinimaxQuotaService.tryReserve at line 314), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(api/cloud-api): MiniMax 2056 5h-window 解析 reset 时间,不再把全 fleet 锁到明天”; “fix(api): TTS HD/web-search/图片理解 走查 R4 — tryReserve DB 错抛到 caller,TTS HD/VLM 把 DB 错当 provider 错”; “fix(api): TTS HD/web-search 走查本次 R1 — cloud-sync fetch 漏 timeout + reserve 后置步骤 DB 错泄漏”; “fix(minimax-quota): availableToday 短路 exhaustedAt + tryReserve 事务内 re-check”. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- api/src/modules/minimax/minimax-quota.service.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: apps/cloud-api/src/auth/email-auth.service.ts apps/cloud-api/src/auth/email-auth.service.ts:100— apps/cloud-api/src/auth/email-auth.service.ts changed 10 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is EmailAuthService.verifyCode at line 100), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(web-search): R2 走查 — empty-result 60s 缓存避免 cron 周期内 same query 重复 burn”; “fix(app/电脑端/单聊): 走查 R2 — 「聊天信息」侧栏 8 处行进二级页缺同帧双击 ref 守”; “fix(cloud-api/auth): setPasswordOnRegister 超 72 字节不再静默吞错”; “fix(auth/password): 验证码只在操作真正成功后才作废 + 放开密码字符种类要求”. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/cloud-api/src/auth/email-auth.service.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: apps/ios-shell/ios/App/App/AppDelegate.swift apps/ios-shell/ios/App/App/AppDelegate.swift:198— apps/ios-shell/ios/App/App/AppDelegate.swift changed 9 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is AppDelegate.cacheLaunchTarget at line 198), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(ios-shell/真机走查): R5 — R4 的 didBecomeActive register 每次切回前台都打 cloud-api POST”; “fix(ios-shell/真机走查): R4 — Settings 里手动开通知后回到 app 永远拿不到 APNs token”; “fix(ios-shell+app): 真机走查 Round 4 — 前台横幅点击 → 没有 navigate 的死链”; “fix(ios-shell/AppDelegate): 真机走查 Round 3 — app 图标 badge 永远不清,桌面"5"挂死”. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/ios-shell/ios/App/App/AppDelegate.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: apps/wiki/src/components/form-row.tsx apps/wiki/src/components/form-row.tsx:62— apps/wiki/src/components/form-row.tsx changed 8 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is form-row.HintTooltip at line 62), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix+a11y(wiki/角色管理平台): R2 走查第二批 — 3 处 disclosure/menu 焦点与关联缺失”; “fix(wiki): 走查 R2 — 把移动端 tap-target 都提到 ≥32px”; “fix(wiki/form-row): hint 气泡定位错位——tooltip 在 wrap 内部一帧"撑大"了 wrap”; “fix(wiki/form-row): hint 气泡走查修两处真问题”. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/wiki/src/components/form-row.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: apps/app/src/features/favorites/favorites-storage.ts apps/app/src/features/favorites/favorites-storage.ts:22— apps/app/src/features/favorites/favorites-storage.ts changed 8 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is favorites-storage.normalizeDesktopFavorites at line 22), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(app/电脑端/单聊): 走查 R23 — favorites-storage removeItem 裸抛兜底”; “fix(app/电脑端/单聊): 走查 R19 — readDesktopFavorites localStorage.getItem 裸抛炸 composer 收藏面板”; “fix(app/移动端/视频号): 走查 R2 — 收藏取消失败兜底丢 collectedAt”; “fix(app/移动端/消息/+面板/收藏): 走查新一轮 R2 — 收藏文本 description == title 时去重”. 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-03-28..2026-06-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-28 15:45:14 +08:00' --until='2026-06-26 15:45:14 +08:00' --full-history --no-merges -- apps/app/src/features/favorites/favorites-storage.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.
MethodTooLong: ChatService.sendMessageDetailed api/src/modules/chat/chat.service.ts:1159— MethodTooLong — sendMessageDetailed runs 352 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 252 over it, 3.52× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: NeedDiscoveryService.collectSignals api/src/modules/need-discovery/need-discovery.service.ts:420— MethodTooLong — collectSignals runs 313 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 213 over it, 3.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: FollowupRuntimeService.runScan api/src/modules/followup-runtime/followup-runtime.service.ts:273— MethodTooLong — runScan runs 297 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 197 over it, 2.97× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CharactersService.importPersonalCharacter api/src/modules/characters/characters.service.ts:586— MethodTooLong — importPersonalCharacter runs 273 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 173 over it, 2.73× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ShakeDiscoveryService.collectSignals api/src/modules/social/shake-discovery.service.ts:781— MethodTooLong — collectSignals runs 252 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 152 over it, 2.52× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ShakeDiscoveryService.createSessionPreview api/src/modules/social/shake-discovery.service.ts:160— MethodTooLong — createSessionPreview runs 243 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 143 over it, 2.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: AiUsageLedgerService.getDowngradeQuality api/src/modules/analytics/ai-usage-ledger.service.ts:801— MethodTooLong — getDowngradeQuality runs 241 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 141 over it, 2.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.
MethodTooLong: PromptBuilderService.buildChatSystemPromptSectionsFromTemplates api/src/modules/ai/prompt-builder.service.ts:545— MethodTooLong — buildChatSystemPromptSectionsFromTemplates runs 237 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 137 over it, 2.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CyberAvatarService.executeRefresh api/src/modules/cyber-avatar/cyber-avatar.service.ts:505— MethodTooLong — executeRefresh runs 210 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 110 over it, 2.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: AiUsageLedgerService.buildDowngradeCharacterQualityItems api/src/modules/analytics/ai-usage-ledger.service.ts:1145— MethodTooLong — buildDowngradeCharacterQualityItems runs 203 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 103 over it, 2.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SystemService.evaluateLegacyEvalOutput api/src/modules/system/system.service.ts:1596— MethodTooLong — evaluateLegacyEvalOutput runs 201 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 101 over it, 2.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CyberAvatarRealWorldService.runSync REDACTED:302— MethodTooLong — runSync runs 192 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 92 over it, 1.92× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: FeedService.runChannelProactiveForwardTick api/src/modules/feed/feed.service.ts:3116— MethodTooLong — runChannelProactiveForwardTick runs 192 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 92 over it, 1.92× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: WikiEditService.submitRecipeEdit api/src/modules/wiki/services/wiki-edit.service.ts:865— MethodTooLong — submitRecipeEdit runs 192 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 92 over it, 1.92× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: NeedDiscoveryService.runCadence api/src/modules/need-discovery/need-discovery.service.ts:167— MethodTooLong — runCadence runs 184 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 84 over it, 1.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.
MethodTooLong: ReminderRuntimeService.parseCreateIntent REDACTED:2479— MethodTooLong — parseCreateIntent runs 181 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 81 over it, 1.81× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: AiOrchestratorService.generateReply api/src/modules/ai/ai-orchestrator.service.ts:2594— MethodTooLong — generateReply runs 171 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 71 over it, 1.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: WorldLifecycleWorkerService.reconcileObservedWorld apps/cloud-api/src/orchestration/world-lifecycle-worker.service.ts:827— MethodTooLong — reconcileObservedWorld runs 171 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 71 over it, 1.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: WechatSyncAdminService.normalizeCharacterDraft api/src/modules/admin/wechat-sync-admin.service.ts:632— MethodTooLong — normalizeCharacterDraft runs 168 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 68 over it, 1.68× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: WikiEditService.submit api/src/modules/wiki/services/wiki-edit.service.ts:84— MethodTooLong — submit runs 162 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 62 over it, 1.62× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ActionRuntimeService.handleConversationTurn REDACTED:154— MethodTooLong — handleConversationTurn runs 160 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 60 over it, 1.60× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: AiOrchestratorService.generateMoment api/src/modules/ai/ai-orchestrator.service.ts:2817— MethodTooLong — generateMoment runs 156 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 56 over it, 1.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: AiOrchestratorService.synthesizeSpeech api/src/modules/ai/ai-orchestrator.service.ts:4183— MethodTooLong — synthesizeSpeech runs 154 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 54 over it, 1.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: GroupReplyPlannerService.selectReplyActorsForTurn api/src/modules/chat/group-reply-planner.service.ts:15— MethodTooLong — selectReplyActorsForTurn runs 150 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 50 over it, 1.50× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SystemService.getStatus api/src/modules/system/system.service.ts:2576— MethodTooLong — getStatus runs 150 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 50 over it, 1.50× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
ClassTooLong: FeedService api/src/modules/feed/feed.service.ts:197— ClassTooLong — 3365 significant lines (blank, comment-only and punctuation-only lines excluded), 102 methods. The bar is 400 significant lines; this is 2965 over it, 8.41× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: AiOrchestratorService api/src/modules/ai/ai-orchestrator.service.ts:238— ClassTooLong — 2911 significant lines (blank, comment-only and punctuation-only lines excluded), 97 methods. The bar is 400 significant lines; this is 2511 over it, 7.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: ActionRuntimeService REDACTED:138— ClassTooLong — 2748 significant lines (blank, comment-only and punctuation-only lines excluded), 92 methods. The bar is 400 significant lines; this is 2348 over it, 6.87× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: SystemService api/src/modules/system/system.service.ts:626— ClassTooLong — 2440 significant lines (blank, comment-only and punctuation-only lines excluded), 86 methods. The bar is 400 significant lines; this is 2040 over it, 6.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: ReminderRuntimeService REDACTED:429— ClassTooLong — 2242 significant lines (blank, comment-only and punctuation-only lines excluded), 79 methods. The bar is 400 significant lines; this is 1842 over it, 5.61× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ChatService api/src/modules/chat/chat.service.ts:185— ClassTooLong — 2022 significant lines (blank, comment-only and punctuation-only lines excluded), 76 methods. The bar is 400 significant lines; this is 1622 over it, 5.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: InferenceService api/src/modules/inference/inference.service.ts:302— ClassTooLong — 1970 significant lines (blank, comment-only and punctuation-only lines excluded), 70 methods. The bar is 400 significant lines; this is 1570 over it, 4.93× 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: AiUsageLedgerService api/src/modules/analytics/ai-usage-ledger.service.ts:286— ClassTooLong — 1744 significant lines (blank, comment-only and punctuation-only lines excluded), 74 methods. The bar is 400 significant lines; this is 1344 over it, 4.36× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: CloudService apps/cloud-api/src/cloud/cloud.service.ts:94— ClassTooLong — 1726 significant lines (blank, comment-only and punctuation-only lines excluded), 78 methods. The bar is 400 significant lines; this is 1326 over it, 4.32× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: SchedulerService api/src/modules/scheduler/scheduler.service.ts:103— ClassTooLong — 1593 significant lines (blank, comment-only and punctuation-only lines excluded), 62 methods. The bar is 400 significant lines; this is 1193 over it, 3.98× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ReplyLogicAdminService api/src/modules/admin/reply-logic-admin.service.ts:91— ClassTooLong — 1364 significant lines (blank, comment-only and punctuation-only lines excluded), 45 methods. The bar is 400 significant lines; this is 964 over it, 3.41× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: RealWorldSyncService REDACTED:549— ClassTooLong — 1346 significant lines (blank, comment-only and punctuation-only lines excluded), 41 methods. The bar is 400 significant lines; this is 946 over it, 3.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: GamesService api/src/modules/games/games.service.ts:305— ClassTooLong — 1262 significant lines (blank, comment-only and punctuation-only lines excluded), 65 methods. The bar is 400 significant lines; this is 862 over it, 3.16× 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: GroupService api/src/modules/chat/group.service.ts:145— ClassTooLong — 1226 significant lines (blank, comment-only and punctuation-only lines excluded), 53 methods. The bar is 400 significant lines; this is 826 over it, 3.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: SocialService api/src/modules/social/social.service.ts:85— ClassTooLong — 1219 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 819 over it, 3.05× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ChatRecordsAdminService api/src/modules/admin/chat-records-admin.service.ts:293— ClassTooLong — 1106 significant lines (blank, comment-only and punctuation-only lines excluded), 62 methods. The bar is 400 significant lines; this is 706 over it, 2.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: FollowupRuntimeService api/src/modules/followup-runtime/followup-runtime.service.ts:80— ClassTooLong — 1095 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. The bar is 400 significant lines; this is 695 over it, 2.74× 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: CyberAvatarService api/src/modules/cyber-avatar/cyber-avatar.service.ts:130— ClassTooLong — 1047 significant lines (blank, comment-only and punctuation-only lines excluded), 49 methods. The bar is 400 significant lines; this is 647 over it, 2.62× 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: FarmStateService api/src/modules/games/farm/farm-state.service.ts:75— ClassTooLong — 1021 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 621 over it, 2.55× 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: AdminAuthService apps/cloud-api/src/auth/admin-auth.service.ts:95— ClassTooLong — 929 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 529 over it, 2.32× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: WikiEditService api/src/modules/wiki/services/wiki-edit.service.ts:61— ClassTooLong — 929 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. The bar is 400 significant lines; this is 529 over it, 2.32× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ParkingWarStateService api/src/modules/games/parking-war/parking-war-state.service.ts:72— ClassTooLong — 926 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 526 over it, 2.32× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: NeedDiscoveryService api/src/modules/need-discovery/need-discovery.service.ts:62— ClassTooLong — 894 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 494 over it, 2.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: WorldLifecycleWorkerService apps/cloud-api/src/orchestration/world-lifecycle-worker.service.ts:22— ClassTooLong — 887 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 487 over it, 2.22× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: LocalUpstreamServiceManager apps/wechat-connector/src/upstream-service-manager.ts:86— ClassTooLong — 821 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 400 significant lines; this is 421 over it, 2.05× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Cross-slice coupling: chat-details → chat apps/app/src/features/chat-details/chat-call-fallback-section.tsx:12— `ChatCallFallbackSectionProps` (slice 'chat-details') depends on `ChatCallFallbackKind` from slice 'chat'.
Cross-slice coupling: chat-details → chat apps/app/src/features/chat-details/chat-call-fallback-section.tsx:73— `ChatCallFallbackSection` (slice 'chat-details') depends on `ChatCallFallbackNotice` from slice 'chat'.
Cross-slice coupling: chat → chat-details apps/app/src/features/chat/chat-message-search-panel.tsx:433— `ChatMessageSearchPanel` (slice 'chat') depends on `ChatDetailsShell` from slice 'chat-details'.
Cross-slice coupling: chat → chat-details apps/app/src/features/chat/chat-message-search-panel.tsx:438— `ChatMessageSearchPanel` (slice 'chat') depends on `ChatDetailsSection` from slice 'chat-details'.
Cross-slice coupling: chat → desktop apps/app/src/features/chat/conversation-thread-panel.tsx:72— `ConversationThreadPanelProps` (slice 'chat') depends on `DesktopChatCallAction` from slice 'desktop'.
Cross-slice coupling: chat → shop apps/app/src/features/chat/conversation-thread-panel.tsx:1247— `ConversationThreadPanel` (slice 'chat') depends on `GiftToFriendSheet` from slice 'shop'.
Cross-slice coupling: chat → desktop apps/app/src/features/chat/group-chat-thread-panel.tsx:107— `GroupChatThreadPanelProps` (slice 'chat') depends on `DesktopChatCallAction` from slice 'desktop'.
Cross-slice coupling: chat → desktop apps/app/src/features/chat/group-chat-thread-panel.tsx:1540— `GroupChatThreadPanel` (slice 'chat') depends on `buildDesktopChatRouteHash` from slice 'desktop'.
Cross-slice coupling: chat → shell apps/app/src/features/chat/mobile-ai-call-screen.tsx:94— `MobileAiCallScreen` (slice 'chat') depends on `useDesktopLayout` from slice 'shell'.
Cross-slice coupling: chat → desktop apps/app/src/features/chat/mobile-ai-call-screen.tsx:106— `MobileAiCallScreen` (slice 'chat') depends on `buildDesktopChatThreadPath` from slice 'desktop'.
Cross-slice coupling: chat → desktop apps/app/src/features/chat/mobile-ai-call-screen.tsx:113— `MobileAiCallScreen` (slice 'chat') depends on `buildDesktopChatRouteHash` from slice 'desktop'.
Cross-slice coupling: chat → shell apps/app/src/features/chat/mobile-group-call-screen.tsx:77— `MobileGroupCallScreen` (slice 'chat') depends on `useDesktopLayout` from slice 'shell'.
Cross-slice coupling: chat → desktop apps/app/src/features/chat/mobile-group-call-screen.tsx:89— `MobileGroupCallScreen` (slice 'chat') depends on `buildDesktopChatThreadPath` from slice 'desktop'.
Cross-slice coupling: chat → desktop apps/app/src/features/chat/mobile-group-call-screen.tsx:96— `MobileGroupCallScreen` (slice 'chat') depends on `buildDesktopChatRouteHash` from slice 'desktop'.
Cross-slice coupling: contacts → desktop apps/app/src/features/contacts/contacts-workspace-shell.tsx:13— `ContactsWorkspaceShellProps` (slice 'contacts') depends on `DesktopContactsWorkspaceProps` from slice 'desktop'.
Cross-slice coupling: contacts → search apps/app/src/features/contacts/contacts-workspace-shell.tsx:24— `ContactsWorkspaceShellProps` (slice 'contacts') depends on `SearchRouteSource` from slice 'search'.
Cross-slice coupling: contacts → search apps/app/src/features/contacts/contacts-workspace-shell.tsx:33— `ContactsWorkspaceShell` (slice 'contacts') depends on `useDesktopSearchLauncher` from slice 'search'.
Cross-slice coupling: contacts → desktop apps/app/src/features/contacts/contacts-workspace-shell.tsx:52— `ContactsWorkspaceShell` (slice 'contacts') depends on `DesktopContactsWorkspace` from slice 'desktop'.
Cross-slice coupling: contacts → search apps/app/src/features/contacts/contacts-workspace-shell.tsx:61— `ContactsWorkspaceShell` (slice 'contacts') depends on `DesktopSearchDropdownPanel` from slice 'search'.
Cross-slice coupling: contacts → shell apps/app/src/features/contacts/management/contacts-management-modal.tsx:39— `ContactsManagementModal` (slice 'contacts') depends on `useDesktopLayout` from slice 'shell'.
Cross-slice coupling: desktop → moments apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx:327— `DesktopChannelsWorkspace` (slice 'desktop') depends on `stripToolCallSyntax` from slice 'moments'.
Cross-slice coupling: desktop → channels apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx:353— `DesktopChannelsWorkspace` (slice 'desktop') depends on `getChannelsSectionBadge` from slice 'channels'.
Cross-slice coupling: desktop → channels apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx:1025— `DesktopChannelsWorkspace` (slice 'desktop') depends on `getChannelsEmptyState` from slice 'channels'.
Cross-slice coupling: desktop → chat apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:209— `DirectChatDetailsPanel` (slice 'desktop') depends on `useConversationBackground` from slice 'chat'.
Cross-slice coupling: desktop → chat apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:333— `DirectChatDetailsPanel` (slice 'desktop') depends on `getChatBackgroundLabel` from slice 'chat'.
+ 15 more in this group — see findings.md.
R4 · Test Coverage· No test reaches this file · ×40
No test reaches this file apps/wiki/src/components/character-edit-form.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/app/scripts/audit-desktop-web-routing.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/cloud-api/scripts/cloud-api-e2e.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/wiki/src/lib/wiki-api.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/wechat-connector/src/upstream-service-manager.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/android-shell/scripts/run-capacitor.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/ios-shell/scripts/configure-ios-project.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/wiki/src/routes/character-page.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/cloud-api/src/revenue-sharing/revenue-sharing.service.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/wechat-connector/src/contact-import-parser.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/wechat-connector/src/weflow-http-provider.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/app/src/i18n/static-dom-seed.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/ios-shell/scripts/doctor-ios.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/cloud-api/src/users/users.service.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/cloud-api/src/telemetry/telemetry.service.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/wiki/src/components/root-layout.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/cloud-api/src/token-usage/token-usage.service.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 apps/wiki/src/components/talk-panel.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/wiki/src/routes/account-page.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/app/scripts/lib/mobile-audit-fixtures.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/wiki/src/routes/admin-abuse-filters-page.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/cloud-api/src/invite/invite.service.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/cloud-api/src/auth/email-auth.service.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/desktop/scripts/run-tauri.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.
+ 15 more in this group — see findings.md.
X2 · Cancellation propagation· Async function without AbortSignal · ×38
Async function without AbortSignal: loginAndGetSession apps/wiki/screenshot-wiki.mjs:38— `loginAndGetSession` 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: exportMyCharacter apps/wiki/src/lib/wiki-api.ts:1176— `exportMyCharacter` 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: uploadAvatar apps/wiki/src/lib/wiki-api.ts:1225— `uploadAvatar` 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: downloadCommunityCharacter apps/wiki/src/lib/wiki-api.ts:1330— `downloadCommunityCharacter` 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: probeWeFlowReadiness apps/wechat-connector/src/upstream-service-manager.ts:772— `probeWeFlowReadiness` 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: POST apps/site/src/app/api/cloud-waitlist/route.ts:35— `POST` holds an AbortSignal but calls `fetch(…)` without it, so its caller's cancellation never reaches that call and it runs to its end after whatever wanted it has given up. Hand the signal on: `fetch(…, { signal })`.
Async function without AbortSignal: fetchHtml apps/site/scripts/audit-headings.mjs:21— `fetchHtml` 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: issueCloudAdminAccessToken apps/cloud-console/src/lib/cloud-admin-api.ts:493— `issueCloudAdminAccessToken` 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: refreshCloudAdminAccessToken apps/cloud-console/src/lib/cloud-admin-api.ts:563— `refreshCloudAdminAccessToken` 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: revokeCloudAdminSession apps/cloud-console/src/lib/cloud-admin-api.ts:621— `revokeCloudAdminSession` 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: sendAdminRequest apps/cloud-console/src/lib/cloud-admin-api.ts:712— `sendAdminRequest` 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: readNativeBridgeImageAssetFile apps/app/src/runtime/native-image-picker.ts:128— `readNativeBridgeImageAssetFile` 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: readNativeRuntimeConfig apps/app/src/runtime/native-runtime.ts:53— `readNativeRuntimeConfig` 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: openRemoteFile apps/app/src/runtime/open-remote-file.ts:31— `openRemoteFile` 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: syncNativePushTokenCore apps/app/src/runtime/push-token-sync.ts:113— `syncNativePushTokenCore` 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: saveRemoteFileWithNativeShell apps/app/src/runtime/save-remote-file.ts:71— `saveRemoteFileWithNativeShell` 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: probeWorldEndpoint apps/app/src/lib/world-entry.ts:15— `probeWorldEndpoint` 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: prepareRemoteCustomStickerUpload apps/app/src/features/chat/stickers/prepare-custom-sticker-upload.ts:104— `prepareRemoteCustomStickerUpload` 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: readNativeBridgeFileAsset apps/app/src/components/chat-composer.tsx:6274— `readNativeBridgeFileAsset` 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: run apps/app/src/components/share-card-modal.tsx:177— `run` 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: publish api/src/modules/wiki/services/wiki-character-video-publish-sync.service.ts:26— `publish` 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: push api/src/modules/wiki/services/wiki-game-publish-sync.service.ts:36— `push` 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: lookup api/src/modules/subscription/cloud-subscription.client.ts:56— `lookup` 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: fetchFeedEntries REDACTED:1872— `fetchFeedEntries` 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: postOnce api/src/modules/minimax/minimax-usage-reporter.service.ts:133— `postOnce` 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: character-blueprint.types.ts ↔ character-blueprints.ts api/src/modules/characters/character-blueprint.types.ts:1— `api/src/modules/characters/character-blueprint.types.ts` and `packages/contracts/src/character-blueprints.ts` change together 100% of the time (18 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 18 shared commits counted here, the most recent 3 are `bf50578d` feat(wiki/characters): 后端加私有角色 CRUD + app 端 import-personal 端点; `8bbccfc2` feat: implement wiki character management platform; `a5e8c21c` feat: add behavior-driven shake discovery — run `git show` on any of them.
Change coupling: official-accounts.service.ts ↔ official-accounts.ts api/src/modules/official-accounts/official-accounts.service.ts:1— `api/src/modules/official-accounts/official-accounts.service.ts` and `packages/contracts/src/official-accounts.ts` change together 100% of the time (10 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 10 shared commits counted here, the most recent 3 are `e22b2fce` feat: flatten desktop subscription feed; `e913fbe3` feat: flatten desktop subscription feed; `a94c38b8` feat: add desktop service account workspace — run `git show` on any of them.
Change coupling: profile-info-name-page.tsx ↔ profile-info-signature-page.tsx apps/app/src/routes/profile-info-name-page.tsx:1— `apps/app/src/routes/profile-info-name-page.tsx` and `apps/app/src/routes/profile-info-signature-page.tsx` change together 83% of the time (15 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 15 shared commits counted here, the most recent 3 are `ae4cbd18` fix(app/移动端/个人信息): 名字 / 个性签名 两页「完成」按钮 + Enter 提交都补 sync ref 守卫——React…; `d745430d` fix(app/移动端/我/资料): R1 走查 — signature sanitize 对齐服务端 + name/signature …; `83aa7eb3` fix(app/移动端/我): 新轮次 R1 — 收藏 refetch 失败兜底 + 资料编辑非 API 错走 i18n — run `git show` on any of them.
Change coupling: conversation-thread-panel.tsx ↔ digital-human-entry-notice.tsx apps/app/src/features/chat/conversation-thread-panel.tsx:1— `apps/app/src/features/chat/conversation-thread-panel.tsx` and `apps/app/src/features/chat/digital-human-entry-notice.tsx` change together 83% of the time (10 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `0a18ca08` refactor: tighten mobile thread notices; `bbe38009` refactor: tighten mobile thread notices; `ba725c3f` refactor: soften mobile thread route notices — run `git show` on any of them.
Change coupling: character-blueprint.service.ts ↔ character-blueprints.ts api/src/modules/characters/character-blueprint.service.ts:1— `api/src/modules/characters/character-blueprint.service.ts` and `packages/contracts/src/character-blueprints.ts` change together 80% of the time (16 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 16 shared commits counted here, the most recent 3 are `a5e8c21c` feat: add behavior-driven shake discovery; `13f044de` feat(admin): add wechat contact import workflow; `385bbff5` feat: add Karpathy preset and blueprint prompt support — run `git show` on any of them.
Change coupling: cloud.service.ts ↔ world-access.service.ts apps/cloud-api/src/cloud/cloud.service.ts:1— `apps/cloud-api/src/cloud/cloud.service.ts` and `apps/cloud-api/src/world-access/world-access.service.ts` change together 80% of the time (8 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — 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 `13066bde` feat: add manual docker cloud provider; `c753ec11` feat: add manual docker cloud provider; `5cf5390f` feat: add provider-aware world orchestration — run `git show` on any of them.
Change coupling: world-lifecycle-worker.service.ts ↔ world-access.service.ts apps/cloud-api/src/orchestration/world-lifecycle-worker.service.ts:1— `apps/cloud-api/src/orchestration/world-lifecycle-worker.service.ts` and `apps/cloud-api/src/world-access/world-access.service.ts` change together 80% of the time (8 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — 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 `13066bde` feat: add manual docker cloud provider; `c753ec11` feat: add manual docker cloud provider; `5cf5390f` feat: add provider-aware world orchestration — run `git show` on any of them.
Change coupling: character-avatar-assets.ts ↔ character-bios.ts api/src/modules/characters/character-avatar-assets.ts:1— `api/src/modules/characters/character-avatar-assets.ts` and `api/src/modules/characters/character-bios.ts` change together 73% of the time (8 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 `5034be2f` feat(characters): 居民池扩容 14 位日常生活搭子 (autoSeed: false); `21fda20d` feat(characters): 新增 9 个陪伴/亲密陪伴/恋爱助手预设角色; `68ecde10` feat: add optional study support teacher presets — run `git show` on any of them.
Change coupling: onboarding-page.tsx ↔ setup-page.tsx apps/app/src/routes/onboarding-page.tsx:1— `apps/app/src/routes/onboarding-page.tsx` and `apps/app/src/routes/setup-page.tsx` change together 71% of the time (10 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `b47f7849` refactor(app): thin legacy entry routes; `43112647` refactor(app): thin legacy entry routes; `44b7d626` fix(app): strengthen web surface contrast — run `git show` on any of them.
Change coupling: wiki-api.ts ↔ router.tsx apps/wiki/src/lib/wiki-api.ts:1— `apps/wiki/src/lib/wiki-api.ts` and `apps/wiki/src/router.tsx` change together 71% of the time (12 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 12 shared commits counted here, the most recent 3 are `b01da8a2` feat(wiki/草稿): 前端「我的草稿」列表页 + nav 入口 + draft API client; `7363b2c6` feat(wiki): 账户设置页 + 邮箱验证码改/设密码; `814ed451` feat(wiki): 加「我的私有角色」tab + CRUD/导入/导出 UI — run `git show` on any of them.
Change coupling: official-account-service-page.tsx ↔ subscription-inbox-page.tsx apps/app/src/routes/official-account-service-page.tsx:1— `apps/app/src/routes/official-account-service-page.tsx` and `apps/app/src/routes/subscription-inbox-page.tsx` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 7 shared commits counted here, the most recent 3 are `020a61d5` refactor: share official account route shells; `cd47900c` perf: lazy load desktop chat route shells; `944959dd` perf(app): lazy-load remaining desktop route workspaces — run `git show` on any of them.
Change coupling: static-dom-seed.ts ↔ REDACTED apps/app/src/i18n/static-dom-seed.ts:1— `apps/app/src/i18n/static-dom-seed.ts` and `REDACTED` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 `d55337cc` fix: close app i18n interaction gaps; `cbf4a8af` fix: cover remaining app i18n fallbacks; `a1e9710c` fix: expand app i18n secondary coverage — run `git show` on any of them.
Change coupling: chat-room-page.tsx ↔ group-chat-page.tsx apps/app/src/routes/chat-room-page.tsx:1— `apps/app/src/routes/chat-room-page.tsx` and `apps/app/src/routes/group-chat-page.tsx` change together 68% of the time (41 of the 60 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 41 shared commits counted here, the most recent 3 are `0b890fef` chore(app/单聊/群聊): 走查清残——resolveRouteContext 的死参数 + 多余 dep 清掉; `097eb64a` feat(app/群聊): 下线群二维码/邀请卡功能——页面/路由/入口/最近投递 banner 一并拆; `de2bdf15` fix(app/back-nav): 聊天主线/群聊主线/角色详情返回也校验 previousPath — run `git show` on any of them.
Change coupling: desktop-group-member-picker.tsx ↔ desktop-group-member-removal-picker.tsx apps/app/src/features/desktop/chat/desktop-group-member-picker.tsx:1— `apps/app/src/features/desktop/chat/desktop-group-member-picker.tsx` and `apps/app/src/features/desktop/chat/desktop-group-member-removal-picker.tsx` change together 68% of the time (15 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 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 15 shared commits counted here, the most recent 3 are `0ba08bc0` fix(app/电脑端/群聊): 走查 R101+R102 — 添加/移除群成员 picker backdrop button 漏 tab…; `912a5d2d` fix(app/电脑端/群聊): 走查 R78 — 添加/移除群成员 picker 左列 row 是 toggle 但缺 aria-pre…; `086e2162` fix(app/电脑端/视频号): 走查第二轮 R13 — "楼中楼" disclosure 按钮缺 aria-expanded + 解 … — run `git show` on any of them.
Change coupling: scheduler-telemetry.types.ts ↔ scheduler.module.ts api/src/modules/scheduler/scheduler-telemetry.types.ts:1— `api/src/modules/scheduler/scheduler-telemetry.types.ts` and `api/src/modules/scheduler/scheduler.module.ts` 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 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 `aff4d69a` feat(npc): 拉式巡查 cron + 前端按 canInteract 置灰; `8c9a1cbd` Pr/self agent runtime admin (#14); `66ed73d1` feat: add self agent admin console and heartbeat — run `git show` on any of them.
Change coupling: chat-details-section.tsx ↔ chat-details-shell.tsx apps/app/src/features/chat-details/chat-details-section.tsx:1— `apps/app/src/features/chat-details/chat-details-section.tsx` and `apps/app/src/features/chat-details/chat-details-shell.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 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 `bd213124` refactor: simplify mobile chat details sections; `b7df3b71` refactor: simplify mobile chat details sections; `835df355` feat(app): polish chat detail shared surfaces — run `git show` on any of them.
Change coupling: chat-message-search-page.tsx ↔ group-message-search-page.tsx apps/app/src/routes/chat-message-search-page.tsx:1— `apps/app/src/routes/chat-message-search-page.tsx` and `apps/app/src/routes/group-message-search-page.tsx` change together 66% of the time (19 of the 29 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 19 shared commits counted here, the most recent 3 are `83eb6b24` feat: localize chat message search panel; `cc48e0d2` feat: localize chat message search panel; `83c7a486` fix: tighten chat detail and search backstack — run `git show` on any of them.
Change coupling: system.service.ts ↔ system.ts api/src/modules/system/system.service.ts:1— `api/src/modules/system/system.service.ts` and `packages/contracts/src/system.ts` change together 62% of the time (15 of the 24 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are `9d7124a0` feat: add native audio multimodal checks; `e92013bd` feat: add multimodal diagnostic snapshots; `0d299ce2` feat: add real multimodal inference diagnostics — run `git show` on any of them.
Change coupling: chat-details-shell.tsx ↔ chat-member-grid.tsx apps/app/src/features/chat-details/chat-details-shell.tsx:1— `apps/app/src/features/chat-details/chat-details-shell.tsx` and `apps/app/src/features/chat-details/chat-member-grid.tsx` 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 `0bef534f` refactor: soften mobile chat detail utility blocks; `d13a56ad` refactor: soften mobile chat detail utility blocks; `835df355` feat(app): polish chat detail shared surfaces — run `git show` on any of them.
Change coupling: chat.service.ts ↔ group-reply-orchestrator.service.ts api/src/modules/chat/chat.service.ts:1— `api/src/modules/chat/chat.service.ts` and `api/src/modules/chat/group-reply-orchestrator.service.ts` change together 61% of the time (14 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 14 shared commits counted here, the most recent 3 are `3c5fc88e` feat(world/单人世界中枢 P5): 语义相关召回,突破最近 N 条记忆窗口; `76010301` feat(world/单人世界中枢 P3): 角色互知 + 用户社交全景; `46337583` feat(world/单人世界中枢 P2): 跨角色共享记忆 <world_recent_episodes> — run `git show` on any of them.
Change coupling: desktop-games-workspace.tsx ↔ game-center-storage.ts apps/app/src/features/desktop/games/desktop-games-workspace.tsx:1— `apps/app/src/features/desktop/games/desktop-games-workspace.tsx` and `apps/app/src/features/games/game-center-storage.ts` change together 57% of the time (8 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 `7c57e8b0` feat: jump back to delivered game invite chats; `5be2c6af` feat: jump back to delivered game invite chats; `4c8f7d81` feat: track delivered game invite chats — run `git show` on any of them.
Change coupling: admin.controller.ts ↔ token-usage.ts api/src/modules/admin/admin.controller.ts:1— `api/src/modules/admin/admin.controller.ts` and `packages/contracts/src/token-usage.ts` change together 57% of the time (13 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 — 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 13 shared commits counted here, the most recent 3 are `a4a99923` feat(token-usage): 平台预算/定价拉取通道(Phase B 第 9 步); `190f97ff` feat: 合并角色中心,统一世界角色视图; `1870625d` feat: 合并角色中心,统一世界角色视图 — run `git show` on any of them.
Change coupling: admin-cloud.controller.ts ↔ world-lifecycle-worker.service.ts apps/cloud-api/src/admin/admin-cloud.controller.ts:1— `apps/cloud-api/src/admin/admin-cloud.controller.ts` and `apps/cloud-api/src/orchestration/world-lifecycle-worker.service.ts` change together 56% of the time (10 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 10 shared commits counted here, the most recent 3 are `30af673c` feat: add cloud world reconcile loop; `0aea14b4` feat: add cloud world reconcile loop; `13066bde` feat: add manual docker cloud provider — run `git show` on any of them.
Change coupling: official-service-conversation-card.tsx ↔ subscription-inbox-card.tsx apps/app/src/components/official-service-conversation-card.tsx:1— `apps/app/src/components/official-service-conversation-card.tsx` and `apps/app/src/components/subscription-inbox-card.tsx` change together 56% of the time (10 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `fd59166f` refactor(app): unify official message entry rows; `bff77210` refactor(app): unify official message entry rows; `1fe188c7` feat: add desktop official message context menus — run `git show` on any of them.
Change coupling: desktop-chat-image-viewer-route-state.ts ↔ desktop-chat-window-route-state.ts apps/app/src/features/desktop/chat/desktop-chat-image-viewer-route-state.ts:1— `apps/app/src/features/desktop/chat/desktop-chat-image-viewer-route-state.ts` and `apps/app/src/features/desktop/chat/desktop-chat-window-route-state.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 between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `40281157` fix(app): open desktop popups synchronously on web; `90403138` fix(app): open desktop popups synchronously on web; `6107566e` feat(app): use native desktop chat windows — run `git show` on any of them.
+ 12 more in this group — see findings.md.
D30 · Dependency Vulnerabilities· Medium CVE · ×33
Focus outline removed inline apps/app/src/components/chat-composer.tsx:3636— <textarea> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline apps/app/src/components/chat-composer.tsx:3887— <textarea> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline apps/app/src/components/chat-composer.tsx:5307— <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline apps/app/src/components/wechat-comment-bar.tsx:240— <textarea> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline apps/app/src/features/chat/chat-message-search-panel.tsx:445— <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline apps/app/src/features/chat/chat-message-search-panel.tsx:569— <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline apps/app/src/features/chat/chat-message-search-panel.tsx:587— <select> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline apps/app/src/features/chat/message-quote-selection-sheet.tsx:175— <textarea> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline apps/app/src/features/chat/stickers/sticker-panel.tsx:2025— <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline apps/app/src/features/contacts/management/management-permissions-screen.tsx:87— <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline apps/app/src/features/contacts/voice-picker.tsx:400— <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:2810— <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline apps/app/src/features/desktop/chat/desktop-chat-history-panel.tsx:405— <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline apps/app/src/features/desktop/chat/desktop-chat-history-panel.tsx:668— <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline apps/app/src/features/desktop/chat/desktop-chat-history-panel.tsx:902— <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline apps/app/src/features/desktop/chat/desktop-create-group-dialog.tsx:885— <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline apps/app/src/features/desktop/chat/desktop-group-member-picker.tsx:256— <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline apps/app/src/features/desktop/chat/desktop-group-member-removal-picker.tsx:214— <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline REDACTED:1284— <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline REDACTED:1363— <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 apps/app/src/features/desktop/contacts/desktop-add-friend-send-dialog.tsx:161— <textarea> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline apps/app/src/features/desktop/contacts/desktop-add-friend-workspace.tsx:538— <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline apps/app/src/features/desktop/contacts/desktop-contacts-groups-pane.tsx:102— <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline apps/app/src/features/desktop/contacts/desktop-contacts-starred-friends-pane.tsx:142— <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline apps/app/src/features/desktop/contacts/desktop-contacts-tags-pane.tsx:419— <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).
+ 7 more in this group — see findings.md.
IC1 · Incompleteness & stubs· Both branches are identical · ×31
Both branches are identical — the condition decides nothing api/src/modules/chat/message-search.utils.ts:138— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing apps/app/src/components/chat-message-list.tsx:4986— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing apps/app/src/components/group-avatar-chip.tsx:44— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing apps/app/src/features/chat/conversation-thread-panel.tsx:780— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing apps/app/src/features/chat/conversation-thread-panel.tsx:949— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing apps/app/src/features/chat/digital-human-player.tsx:50— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing apps/app/src/features/chat/digital-human-stage.tsx:67— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing apps/app/src/features/chat/group-chat-thread-panel.tsx:1671— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing apps/app/src/features/chat/message-quote-selection-sheet.tsx:204— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing apps/app/src/features/chat/mobile-message-reminder-sheet.tsx:209— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing apps/app/src/features/chat/reminder-task-panel.tsx:192— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing apps/app/src/features/chat/stickers/sticker-panel.tsx:2395— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing apps/app/src/features/desktop/chat/desktop-chat-side-panel.tsx:68— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing apps/app/src/features/games/farm/components/dog-house.tsx:60— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing apps/app/src/features/games/farm/components/farm-notification-banner.tsx:134— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing apps/app/src/features/games/game-center-session-panel.tsx:56— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing apps/app/src/features/games/parking-war/parking-war-game.tsx:1037— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing apps/app/src/features/games/parking-war/parking-war-game.tsx:1346— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing apps/app/src/features/games/pixel-arena/pixel-arena-game.tsx:332— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing apps/app/src/features/games/pixel-arena/pixel-arena-game.tsx:355— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing apps/app/src/features/games/pixel-arena/pixel-arena-game.tsx:361— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing apps/app/src/features/games/pixel-arena/pixel-arena-game.tsx:388— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing apps/app/src/features/games/signal-squad/signal-squad-game.tsx:324— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing apps/app/src/features/games/sky-rally/sky-rally-game.tsx:143— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing apps/app/src/features/mini-programs/mini-program-open-panel.tsx:121— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Swallowed exception (empty catch) packages/ui/src/components/telemetry-error-boundary.tsx:32— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) packages/i18n/src/locales.ts:126— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) packages/i18n/src/runtime/app-locale-provider.tsx:120— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) packages/i18n/src/runtime/app-locale-provider.tsx:123— 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:578— 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:619— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) packages/analytics/src/anon-id.ts:7— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) packages/analytics/src/auto-capture.ts:306— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) packages/analytics/src/auto-capture.ts:316— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) packages/analytics/src/auto-capture.ts:331— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) packages/analytics/src/contracts-bridge.ts:73— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) packages/analytics/src/index.ts:147— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) packages/analytics/src/index.ts:152— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) packages/analytics/src/index.ts:155— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) packages/analytics/src/index.ts:267— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) packages/analytics/src/session.ts:5— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) packages/analytics/src/transport.ts:78— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) packages/analytics/src/transport.ts:100— 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) download/_shared/marketing/jike-assets/_capture.mjs:87— `.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) apps/wiki/screenshot-detail.mjs:27— 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) apps/wiki/screenshot-viewport.mjs:44— 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) apps/wiki/screenshot-wiki.mjs:64— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) apps/wiki/src/routes/admin-abuse-filters-page.tsx:368— 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) apps/wiki/src/routes/character-page.tsx:506— `.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) apps/wiki/src/routes/character-page.tsx:1221— 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.
TooManyMethods: FeedService api/src/modules/feed/feed.service.ts:197— TooManyMethods — 102 methods. The bar is 30 methods; this is 72 over it, 3.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AdminController api/src/modules/admin/admin.controller.ts:58— TooManyMethods — 101 methods. The bar is 30 methods; this is 71 over it, 3.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AiOrchestratorService api/src/modules/ai/ai-orchestrator.service.ts:238— TooManyMethods — 97 methods. The bar is 30 methods; this is 67 over it, 3.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ActionRuntimeService REDACTED:138— TooManyMethods — 92 methods. The bar is 30 methods; this is 62 over it, 3.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SystemService api/src/modules/system/system.service.ts:626— TooManyMethods — 86 methods. The bar is 30 methods; this is 56 over it, 2.87× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ReminderRuntimeService REDACTED:429— TooManyMethods — 79 methods. The bar is 30 methods; this is 49 over it, 2.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: CloudService apps/cloud-api/src/cloud/cloud.service.ts:94— TooManyMethods — 78 methods. The bar is 30 methods; this is 48 over it, 2.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ChatService api/src/modules/chat/chat.service.ts:185— TooManyMethods — 76 methods. The bar is 30 methods; this is 46 over it, 2.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AiUsageLedgerService api/src/modules/analytics/ai-usage-ledger.service.ts:286— TooManyMethods — 74 methods. The bar is 30 methods; this is 44 over it, 2.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: MomentsService api/src/modules/moments/moments.service.ts:183— TooManyMethods — 73 methods. The bar is 30 methods; this is 43 over it, 2.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: InferenceService api/src/modules/inference/inference.service.ts:302— TooManyMethods — 70 methods. The bar is 30 methods; this is 40 over it, 2.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: GamesService api/src/modules/games/games.service.ts:305— TooManyMethods — 65 methods. The bar is 30 methods; this is 35 over it, 2.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.
TooManyMethods: ChatRecordsAdminService api/src/modules/admin/chat-records-admin.service.ts:293— TooManyMethods — 62 methods. The bar is 30 methods; this is 32 over it, 2.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SchedulerService api/src/modules/scheduler/scheduler.service.ts:103— TooManyMethods — 62 methods. The bar is 30 methods; this is 32 over it, 2.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: GroupService api/src/modules/chat/group.service.ts:145— TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: CyberAvatarService api/src/modules/cyber-avatar/cyber-avatar.service.ts:130— TooManyMethods — 49 methods. The bar is 30 methods; this is 19 over it, 1.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RevenueSharingService apps/cloud-api/src/revenue-sharing/revenue-sharing.service.ts:143— TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: YinjieMobileBridgePlugin apps/ios-shell/plugins/swift-stub/YinjieMobileBridgePlugin.swift:9— TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ReplyLogicAdminService api/src/modules/admin/reply-logic-admin.service.ts:91— TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RealWorldSyncService REDACTED:549— TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AdminAuthService apps/cloud-api/src/auth/admin-auth.service.ts:95— TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AdminCloudController apps/cloud-api/src/admin/admin-cloud.controller.ts:37— TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: YinjieMobileBridgePlugin apps/android-shell/android/app/src/main/java/com/yinjie/mobile/YinjieMobileBridgePlugin.java:51— TooManyMethods — 36 methods. The bar is 30 methods; this is 6 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.
TooManyMethods: FollowupRuntimeService api/src/modules/followup-runtime/followup-runtime.service.ts:80— TooManyMethods — 34 methods. The bar is 30 methods; this is 4 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.
TooManyMethods: OfficialAccountsService api/src/modules/official-accounts/official-accounts.service.ts:121— TooManyMethods — 34 methods. The bar is 30 methods; this is 4 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.
+ 3 more in this group — see findings.md.
AC4 · Keyboard semantics· Modal dialog does not manage focus · ×23
Modal dialog does not manage focus apps/app/src/components/chat-composer.tsx:5187— This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, 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 apps/app/src/components/chat-message-list.tsx:7973— 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 apps/app/src/components/chat-message-list.tsx:8211— 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 apps/app/src/components/chat-message-list.tsx:8420— 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 apps/app/src/components/feature-unavailable-dialog.tsx:104— 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 apps/app/src/components/mobile-speech-input-sheet.tsx:197— 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 apps/app/src/components/moment-media-gallery.tsx:613— 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 apps/app/src/components/moment-media-gallery.tsx:758— 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 apps/app/src/components/share-card-modal.tsx:368— 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 apps/app/src/components/wechat-comment-bar.tsx:209— This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, 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 apps/app/src/features/chat-details/mobile-details-action-sheet.tsx:178— This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens, 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 apps/app/src/features/chat/message-quote-selection-sheet.tsx:130— This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, 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 apps/app/src/features/chat/mobile-mention-picker-sheet.tsx:132— 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 apps/app/src/features/chat/mobile-message-action-sheet.tsx:212— 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 apps/app/src/features/chat/mobile-message-reminder-sheet.tsx:140— 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 apps/app/src/features/chat/stickers/sticker-panel.tsx:1892— This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, 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 apps/app/src/features/contacts/desktop-contact-text-edit-dialog.tsx:162— This <form role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, 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 apps/app/src/features/contacts/management/contacts-management-modal.tsx:310— 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 apps/app/src/features/contacts/management/contacts-management-modal.tsx:337— 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 apps/app/src/features/desktop/chat/desktop-chat-confirm-dialog.tsx:201— This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, 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 apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:2761— This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, 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 apps/app/src/features/desktop/chat/desktop-chat-history-dialog.tsx:103— 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 apps/app/src/features/desktop/chat/desktop-chat-text-edit-dialog.tsx:193— This <form role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, 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.
Outbound HTTP without resilience api/src/modules/ai/minimax-native.client.ts:134— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience api/src/modules/characters/character-import-register.client.ts:47— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience api/src/modules/chat/document-extraction.service.ts:285— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience api/src/modules/chat/hongbao-cloud.client.ts:98— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience api/src/modules/chat/hongbao-cloud.client.ts:180— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience api/src/modules/cloud-runtime/cloud-runtime-reporting.service.ts:354— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience api/src/modules/cloud-runtime/cloud-runtime-reporting.service.ts:392— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience api/src/modules/cloud-runtime/cloud-token-usage-sync.service.ts:251— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience api/src/modules/cloud-runtime/cloud-token-usage-sync.service.ts:344— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience api/src/modules/config/video-channel-prompt.client.ts:120— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience REDACTED:909— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience REDACTED:51— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience REDACTED:100— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience api/src/modules/minimax/minimax-usage-reporter.service.ts:138— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience REDACTED:1874— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience api/src/modules/social/cloud-gift.client.ts:58— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience api/src/modules/subscription/cloud-subscription.client.ts:65— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience api/src/modules/wiki/services/wiki-character-video-publish-sync.service.ts:85— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience api/src/modules/wiki/services/wiki-game-publish-sync.service.ts:66— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience apps/cloud-api/src/world-api-proxy/world-api-proxy.service.ts:114— `http.request(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience apps/wechat-connector/src/upstream-service-manager.ts:778— `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.
AC2 · Forms & labels· <TextField> field component without a label · ×13
<TextField> field component without a label apps/app/src/features/contacts/desktop-contact-text-edit-dialog.tsx:206— 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.
<TextField> field component without a label apps/app/src/features/desktop/official-accounts/desktop-official-accounts-workspace.tsx:704— 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.
<TextField> field component without a label apps/app/src/features/shell/desktop-shell.tsx:754— 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.
<TextField> field component without a label apps/app/src/features/shell/desktop-shell.tsx:773— 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.
<TextField> field component without a label apps/app/src/features/shell/desktop-shell.tsx:812— 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.
<TextField> field component without a label apps/app/src/routes/desktop-feedback-page.tsx:468— 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.
<TextField> field component without a label apps/app/src/routes/live-companion-page.tsx:496— 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.
<TextField> field component without a label apps/app/src/routes/live-companion-page.tsx:511— 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.
<TextField> field component without a label apps/app/src/routes/live-companion-page.tsx:528— 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.
<TextField> field component without a label apps/app/src/routes/mobile-favorites-page.tsx:374— 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.
<TextField> field component without a label apps/app/src/routes/profile-info-contact-page.tsx:194— 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.
<TextField> field component without a label apps/app/src/routes/profile-info-field-page.tsx:322— 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.
<TextField> field component without a label apps/app/src/routes/profile-info-name-page.tsx:187— 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.
Sync-over-async blocking apps/app/scripts/lib/mobile-audit-fixtures.mjs:419— `existsSync` in `resolveAuditServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking apps/cloud-api/src/orchestration/local-process-compute-provider.service.ts:131— `existsSync` in `onModuleInit` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking apps/cloud-api/src/orchestration/local-process-compute-provider.service.ts:237— `mkdirSync` in `createInstance` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking apps/cloud-api/src/orchestration/local-process-compute-provider.service.ts:314— `mkdirSync` in `startInstance` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking apps/cloud-api/src/orchestration/local-process-compute-provider.service.ts:706— `mkdirSync` in `spawnChild` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking apps/cloud-api/src/orchestration/local-process-compute-provider.service.ts:707— `openSync` in `spawnChild` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking apps/cloud-api/src/orchestration/local-process-compute-provider.service.ts:711— `openSync` in `spawnChild` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking apps/cloud-api/src/wiki-public/wiki-public.controller.ts:64— `existsSync` in `serve` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking apps/wechat-connector/src/upstream-service-manager.ts:175— `rmSync` in `startService` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking apps/wechat-connector/src/upstream-service-manager.ts:176— `rmSync` in `startService` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking apps/wechat-connector/src/upstream-service-manager.ts:1082— `existsSync` in `ensureWeFlowBuild` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking apps/wechat-connector/src/upstream-service-manager.ts:1087— `existsSync` in `ensureWeFlowBuild` 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.
Weak hash algorithm api/scripts/migrations/2026-mt-step0-remap-owner-id.mjs:70— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm api/scripts/migrations/2026-mt-step3-copy-media.mjs:22— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm api/src/common/cron-jitter.util.ts:13— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm REDACTED:999— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm api/src/modules/followup-runtime/followup-runtime.service.ts:1583— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm api/src/modules/inference/inference.service.ts:2470— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm api/src/modules/minimax/minimax-key-pool.service.ts:84— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm api/src/modules/moments/music-theme-catalog.ts:57— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm api/src/modules/need-discovery/need-discovery.service.ts:1787— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm api/src/modules/social/shake-discovery.service.ts:2023— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm apps/cloud-api/src/cloud-world-slug.ts:6— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm apps/cloud-api/src/orchestration/minimax-key-pool.ts:49— 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.
D30 · Dependency Vulnerabilities· Medium advisory (unmaintained) · ×10
Swallowed exception (caught, then discarded) packages/analytics/src/contracts-bridge.ts:30— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
Swallowed exception (caught, then discarded) apps/ios-shell/plugins/swift-stub/YinjieMobileBridgePlugin.swift:1051— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) apps/ios-shell/plugins/swift-stub/YinjieMobileBridgePlugin.swift:1102— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) apps/ios-shell/plugins/swift-stub/YinjieMobileBridgePlugin.swift:1134— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) apps/ios-shell/plugins/swift-stub/YinjieMobileBridgePlugin.swift:1154— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) apps/ios-shell/ios/App/App/Plugins/YinjieMobileBridgePlugin.swift:1051— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) apps/ios-shell/ios/App/App/Plugins/YinjieMobileBridgePlugin.swift:1102— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) apps/ios-shell/ios/App/App/Plugins/YinjieMobileBridgePlugin.swift:1134— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) apps/ios-shell/ios/App/App/Plugins/YinjieMobileBridgePlugin.swift:1154— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
AC6 · Visual & motion safety· Animation without a prefers-reduced-motion guard · ×7
Animation without a prefers-reduced-motion guard apps/app/index.html:168— `.boot-logo` moves (`animation: boot-pulse 1.2s 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 apps/app/src/components/avatar-encounter-transcript.tsx:32— <span> moves — its `animate-bounce` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard apps/app/src/components/route-transition-indicator.tsx:42— <div> moves — its inline style sets `animation: yinjie-route-progress 1.1s cubic-bezier(0.4, 0, 0.2, 1) 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 apps/app/src/components/wechat-comment-bar.tsx:209— <div> moves — its inline style sets `transition: transform 120ms ease-out` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard apps/app/src/features/chat/digital-human-stage.tsx:90— <div> moves — its `animate-ping` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard apps/app/src/features/chat/wechat-call/speaking-indicator.tsx:85— <span> moves — its `animate-ping` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard apps/app/src/features/games/farm/components/decoration-layer.tsx:27— <button> moves — its inline style sets `animation: p.type` — 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:.
D30 · Dependency Vulnerabilities· Medium advisory (unsound) · ×7
Dead file (~4 LoC) apps/app/src/features/desktop/chat/desktop-chat-route-redirect-shell.tsx— no import path from any entry point (268 application, 92 tooling, 83 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~4 LoC) apps/app/src/features/desktop/chat/desktop-chat-tab-shell.tsx— no import path from any entry point (268 application, 92 tooling, 83 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~4 LoC) apps/app/src/features/desktop/chat/desktop-official-message-workspace-shell.tsx— no import path from any entry point (268 application, 92 tooling, 83 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~4 LoC) apps/app/src/features/desktop/contacts/desktop-contacts-route-redirect-shell.tsx— no import path from any entry point (268 application, 92 tooling, 83 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~4 LoC) apps/app/src/features/desktop/contacts/desktop-contacts-workspace-shell.tsx— no import path from any entry point (268 application, 92 tooling, 83 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~4 LoC) apps/app/src/features/desktop/official-accounts/desktop-official-article-route-shell.tsx— no import path from any entry point (268 application, 92 tooling, 83 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~4 LoC) apps/app/src/features/search/desktop-search-quick-links.ts— no import path from any entry point (268 application, 92 tooling, 83 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
D30 · Dependency Vulnerabilities· Medium vulnerability · ×6
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
X24 · Document value interpolated into markup unescaped· Untrusted text written into markup unescaped · ×6
Untrusted text written into markup unescaped apps/app/src/components/chat-message-list.tsx:8487— `document!.contentHtml` 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:407— `article.contentHtml` 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:235— `nextState.contentHtml` 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:614— `input.state.contentHtml` 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:308— `nextState.contentHtml` 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:735— `input.state.contentHtml` 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.
chat-message-list.ChatMessageList::handleRecallSelectedMessages (cognitive 43) apps/app/src/components/chat-message-list.tsx:3368— chat-message-list.ChatMessageList::handleRecallSelectedMessages has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (20 pts), ternaries 5 (10 pts), error handling 2 (6 pts), loops 2 (4 pts), boolean chains 3 (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. This shape REPEATS in the file: 5 other methods here (chat-message-list.ChatMessageList, chat-message-list.ChatMessageList::speakMessage, chat-message-list.ChatMessageList::openAttachment, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 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.
chat-message-list.ChatMessageList::handleDeleteSelectedMessages (cognitive 41) apps/app/src/components/chat-message-list.tsx:3207— chat-message-list.ChatMessageList::handleDeleteSelectedMessages has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (25 pts), ternaries 3 (6 pts), loops 2 (4 pts), boolean chains 3, error handling 1 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 5 other methods here (chat-message-list.ChatMessageList, chat-message-list.ChatMessageList::speakMessage, chat-message-list.ChatMessageList::openAttachment, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 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.
chat-message-list.ChatMessageList::openAttachment (cognitive 33) apps/app/src/components/chat-message-list.tsx:2342— chat-message-list.ChatMessageList::openAttachment has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (26 pts), ternaries 2 (5 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. This shape REPEATS in the file: 5 other methods here (chat-message-list.ChatMessageList, chat-message-list.ChatMessageList::speakMessage, chat-message-list.ChatMessageList::handleFavoriteSelectedMessages, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 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.
chat-message-list.ChatMessageList::handleFavoriteSelectedMessages (cognitive 28) apps/app/src/components/chat-message-list.tsx:3083— chat-message-list.ChatMessageList::handleFavoriteSelectedMessages has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 4 (10 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 5 other methods here (chat-message-list.ChatMessageList, chat-message-list.ChatMessageList::speakMessage, chat-message-list.ChatMessageList::openAttachment, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 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.
chat-message-list.ChatMessageList::speakMessage (cognitive 17) apps/app/src/components/chat-message-list.tsx:1451— chat-message-list.ChatMessageList::speakMessage has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (8 pts), if/else 4 (5 pts), boolean chains 3, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 5 other methods here (chat-message-list.ChatMessageList, chat-message-list.ChatMessageList::openAttachment, chat-message-list.ChatMessageList::handleFavoriteSelectedMessages, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 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.
Low cohesion: WorldLanguageService (LCOM4 5) api/src/modules/config/world-language.service.ts:79— WorldLanguageService's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: AdminService (LCOM4 5) api/src/modules/admin/admin.service.ts:16— AdminService's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CloudAlertNotifierService (LCOM4 5) apps/cloud-api/src/alerts/cloud-alert-notifier.service.ts:38— CloudAlertNotifierService's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CharacterBehaviorBlueprintService (LCOM4 4) api/src/modules/characters/character-behavior-blueprint.service.ts:19— CharacterBehaviorBlueprintService's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: TenantOwnershipSubscriber (LCOM4 4) api/src/modules/tenancy/tenant-ownership.subscriber.ts:23— TenantOwnershipSubscriber's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
AC1 · Text alternatives· <canvas> without a text alternative · ×4
<canvas> without a text alternative apps/app/src/features/games/tank-war/tank-war-bake-sprites.ts:73— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative apps/app/src/features/games/tank-war/tank-war-bake-sprites.ts:153— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative apps/app/src/features/games/tank-war/tank-war-bake-sprites.ts:161— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative apps/app/src/features/games/tank-war/tank-war-game.tsx:135— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
AC3 · Page structure· Heading level jumps from h2 to h4 · ×4
Heading level jumps from h2 to h4 apps/wiki/public/tutorial-en-US.html:225— Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
Heading level jumps from h2 to h4 apps/wiki/public/tutorial-ja-JP.html:216— Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
Heading level jumps from h2 to h4 apps/wiki/public/tutorial-ko-KR.html:216— Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
Heading level jumps from h2 to h4 apps/wiki/public/tutorial-zh-CN.html:336— Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
chat-message-list.ChatMessageList::handleRecallSelectedMessages (cyclomatic 23) apps/app/src/components/chat-message-list.tsx:3368— chat-message-list.ChatMessageList::handleRecallSelectedMessages 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. This shape REPEATS in the file: 4 other methods here (chat-message-list.ChatMessageList, chat-message-list.ChatMessageList::openAttachment, chat-message-list.ChatMessageList::handleFavoriteSelectedMessages, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
chat-message-list.ChatMessageList::handleDeleteSelectedMessages (cyclomatic 22) apps/app/src/components/chat-message-list.tsx:3207— chat-message-list.ChatMessageList::handleDeleteSelectedMessages has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 4 other methods here (chat-message-list.ChatMessageList, chat-message-list.ChatMessageList::openAttachment, chat-message-list.ChatMessageList::handleFavoriteSelectedMessages, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
chat-message-list.ChatMessageList::openAttachment (cyclomatic 20) apps/app/src/components/chat-message-list.tsx:2342— chat-message-list.ChatMessageList::openAttachment 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. This shape REPEATS in the file: 4 other methods here (chat-message-list.ChatMessageList, chat-message-list.ChatMessageList::handleFavoriteSelectedMessages, chat-message-list.ChatMessageList::handleDeleteSelectedMessages, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
chat-message-list.ChatMessageList::handleFavoriteSelectedMessages (cyclomatic 17) apps/app/src/components/chat-message-list.tsx:3083— chat-message-list.ChatMessageList::handleFavoriteSelectedMessages has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 4 other methods here (chat-message-list.ChatMessageList, chat-message-list.ChatMessageList::openAttachment, chat-message-list.ChatMessageList::handleDeleteSelectedMessages, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
IC1 · Incompleteness & stubs· Markup wires an event to an empty handler · ×4
Markup wires an event to an empty handler apps/app/src/components/moment-media-gallery.tsx:234— `onError` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
Markup wires an event to an empty handler apps/app/src/components/moment-share-card-modal.tsx:62— `onOpenActionMenu` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
Markup wires an event to an empty handler apps/app/src/routes/character-detail-page.tsx:1422— `onOpenProfile` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
Markup wires an event to an empty handler apps/app/src/routes/character-detail-page.tsx:1428— `onOpenProfile` 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.
AC1 · Text alternatives· <video> without a captions track · ×3
<video> without a captions track apps/app/src/components/moment-compose-media-preview.tsx:444— Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation).
<video> without a captions track apps/app/src/components/moment-media-gallery.tsx:818— Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation).
<video> without a captions track apps/app/src/routes/channels-page.tsx:3770— Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation).
AC3 · Page structure· Page without a main landmark · ×3
Page without a main landmark apps/app/index.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark apps/site/src/app/global-error.tsx:29— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark REDACTED:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
welcome-page.WelcomePage::continueWithCloudWorld (cyclomatic 48) apps/app/src/routes/welcome-page.tsx:1178— welcome-page.WelcomePage::continueWithCloudWorld has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (welcome-page.WelcomePage, welcome-page.WelcomePage::renderModeFields, welcome-page.WelcomePage::renderEntryStep) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
welcome-page.WelcomePage::renderModeFields (cyclomatic 39) apps/app/src/routes/welcome-page.tsx:1561— welcome-page.WelcomePage::renderModeFields has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (welcome-page.WelcomePage, welcome-page.WelcomePage::continueWithCloudWorld, welcome-page.WelcomePage::renderEntryStep) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
welcome-page.WelcomePage::renderEntryStep (cyclomatic 39) apps/app/src/routes/welcome-page.tsx:2192— welcome-page.WelcomePage::renderEntryStep has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (welcome-page.WelcomePage, welcome-page.WelcomePage::continueWithCloudWorld, welcome-page.WelcomePage::renderModeFields) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
welcome-page.WelcomePage::renderModeFields (cognitive 72) apps/app/src/routes/welcome-page.tsx:1561— welcome-page.WelcomePage::renderModeFields has cognitive complexity 72 (threshold 15). Drivers by points: ternaries 28 (65 pts), boolean chains 6, if/else 1 (nesting depth added 37). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: 3 other methods here (welcome-page.WelcomePage, welcome-page.WelcomePage::continueWithCloudWorld, welcome-page.WelcomePage::renderEntryStep) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
welcome-page.WelcomePage::continueWithCloudWorld (cognitive 71) apps/app/src/routes/welcome-page.tsx:1178— welcome-page.WelcomePage::continueWithCloudWorld has cognitive complexity 71 (threshold 15). Drivers by points: if/else 20 (32 pts), ternaries 8 (21 pts), boolean chains 17, error handling 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 3 other methods here (welcome-page.WelcomePage, welcome-page.WelcomePage::renderModeFields, welcome-page.WelcomePage::renderEntryStep) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
welcome-page.WelcomePage::renderEntryStep (cognitive 49) apps/app/src/routes/welcome-page.tsx:2192— welcome-page.WelcomePage::renderEntryStep has cognitive complexity 49 (threshold 15). Drivers by points: ternaries 20 (39 pts), boolean chains 10 (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. This shape REPEATS in the file: 3 other methods here (welcome-page.WelcomePage, welcome-page.WelcomePage::continueWithCloudWorld, welcome-page.WelcomePage::renderModeFields) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Change-coupling hub: REDACTED → admin-cloud.controller.ts, cloud.service.ts, world-lifecycle-worker.service.ts, world-access.service.ts REDACTED— `REDACTED` changes together with 4 other files — `apps/cloud-api/src/admin/admin-cloud.controller.ts`, `apps/cloud-api/src/cloud/cloud.service.ts`, `apps/cloud-api/src/orchestration/world-lifecycle-worker.service.ts`, `apps/cloud-api/src/world-access/world-access.service.ts` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
Change-coupling hub: REDACTED → conversation.entity.ts, REDACTED, REDACTED REDACTED— `REDACTED` changes together with 3 other files — `api/src/modules/chat/conversation.entity.ts`, `REDACTED`, `REDACTED` — 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: ws.ts → REDACTED, chat.service.ts, group.service.ts, stickers.ts packages/contracts/src/ws.ts— `packages/contracts/src/ws.ts` changes together with 4 other files — `REDACTED`, `api/src/modules/chat/chat.service.ts`, `api/src/modules/chat/group.service.ts`, `packages/contracts/src/stickers.ts` — 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.
Duplicated block (9 lines × 3) apps/ios-shell/ios/App/App/AppDelegate.swift:17— apps/ios-shell/ios/App/App/AppDelegate.swift:17-31 | apps/ios-shell/ios/App/App/AppDelegatePush.example.swift:23-31 | apps/ios-shell/xcode-template/AppDelegatePush.example.swift:40-52 — before extracting anything, compare `apps/ios-shell/ios/App/App/AppDelegate.swift` and `apps/ios-shell/ios/App/App/AppDelegatePush.example.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `apps/ios-shell/ios/App/App/AppDelegate.swift:17` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 3) apps/ios-shell/ios/App/App/AppDelegate.swift:58— apps/ios-shell/ios/App/App/AppDelegate.swift:58-66 | apps/ios-shell/ios/App/App/AppDelegatePush.example.swift:53-61 | apps/ios-shell/xcode-template/AppDelegatePush.example.swift:75-83 — before extracting anything, compare `apps/ios-shell/ios/App/App/AppDelegate.swift` and `apps/ios-shell/ios/App/App/AppDelegatePush.example.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 3) apps/ios-shell/ios/App/App/AppDelegate.swift:48— apps/ios-shell/ios/App/App/AppDelegate.swift:48-56 | apps/ios-shell/ios/App/App/AppDelegatePush.example.swift:43-51 | apps/ios-shell/xcode-template/AppDelegatePush.example.swift:65-73 — before extracting anything, compare `apps/ios-shell/ios/App/App/AppDelegate.swift` and `apps/ios-shell/ios/App/App/AppDelegatePush.example.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
R6 · Tooling· This package's lint script runs in no CI job · ×3
This package's lint script runs in no CI job api/package.json:25— The package in `api` declares the lint script `lint` (`eslint "{src,apps,libs,test}/**/*.ts" --fix`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run lint` in `api` (or the workspace's task runner).
This package's lint script runs in no CI job apps/app/package.json:16— The package in `apps/app` declares the lint script `lint` (`eslint .`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run lint` in `apps/app` (or the workspace's task runner).
This package's lint script runs in no CI job apps/wiki/package.json:11— The package in `apps/wiki` declares the lint script `lint` (`eslint .`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run lint` in `apps/wiki` (or the workspace's task runner).
Dead file (~12 LoC) apps/app/src/lib/desktop-runtime.ts— no import path from any entry point (268 application, 92 tooling, 83 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 (~12 LoC) apps/app/src/routes/onboarding-page.tsx— no import path from any entry point (268 application, 92 tooling, 83 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 (~12 LoC) apps/app/src/routes/setup-page.tsx— no import path from any entry point (268 application, 92 tooling, 83 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
contact-import-parser.inferContactImportPlatform (cyclomatic 20) apps/wechat-connector/src/contact-import-parser.ts:268— contact-import-parser.inferContactImportPlatform has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
contact-import-parser.inferContactImportPlatform (cyclomatic 20) packages/contracts/src/contact-import-parser.ts:274— contact-import-parser.inferContactImportPlatform has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TodoComment api/src/modules/wiki/services/wiki-character-video.service.ts:171— // TODO(WS5): 通知 cloud-api 下架 + 各 world 隐藏对应帖子。 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment REDACTED:79— // TODO:支付成功回调里调 characterUnlock.grantUnlock(owner, char, {source:'purchase', orderId})。 — 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.
contact-import-parser.inferContactImportPlatform (cognitive 18) apps/wechat-connector/src/contact-import-parser.ts:268— contact-import-parser.inferContactImportPlatform has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, 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.
contact-import-parser.inferContactImportPlatform (cognitive 18) packages/contracts/src/contact-import-parser.ts:274— contact-import-parser.inferContactImportPlatform has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, 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.
D4 · Code Duplication· Edited copies of one member (3 members, 3+ corresponding lines) · ×2
Edited copies of one member (3 members, 3+ corresponding lines) apps/ios-shell/ios/App/App/AppDelegate.swift:159— apps/ios-shell/ios/App/App/AppDelegate.swift:159-163 | apps/ios-shell/ios/App/App/AppDelegatePush.example.swift:87-89 | apps/ios-shell/xcode-template/AppDelegatePush.example.swift:142-144 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 3+ corresponding lines) apps/ios-shell/ios/App/App/AppDelegate.swift:165— apps/ios-shell/ios/App/App/AppDelegate.swift:165-170 | apps/ios-shell/ios/App/App/AppDelegatePush.example.swift:91-93 | apps/ios-shell/xcode-template/AppDelegatePush.example.swift:146-148 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Duplicated block (5 lines × 2) download/_shared/marketing/jike-assets/_build.py:113— download/_shared/marketing/jike-assets/_build.py:113-117 | download/_shared/marketing/jike-assets/_build.py:175-179 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `download/_shared/marketing/jike-assets/_build.py:121` calls `mkdir` and `download/_shared/marketing/jike-assets/_build.py:183` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) download/_shared/marketing/jike-assets/_build.py:165— download/_shared/marketing/jike-assets/_build.py:165-169 | download/_shared/marketing/jike-assets/_build.py:212-216 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `download/_shared/marketing/jike-assets/_build.py:165` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) apps/ios-shell/plugins/swift-stub/YinjieMobileBridgePlugin.swift:917— apps/ios-shell/plugins/swift-stub/YinjieMobileBridgePlugin.swift:917-924 | apps/ios-shell/plugins/swift-stub/YinjieMobileBridgePlugin.swift:1041-1048 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) apps/desktop/src-tauri/src/main.rs:1072— apps/desktop/src-tauri/src/main.rs:1072-1079 | apps/desktop/src-tauri/src/main.rs:1092-1099 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `apps/desktop/src-tauri/src/main.rs:1072` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `input` to `DesktopSaveTextFileInput` in one and `DesktopSaveBinaryFileInput` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (8 lines × 3) apps/ios-shell/ios/App/App/AppDelegate.swift:172— apps/ios-shell/ios/App/App/AppDelegate.swift:172-179 | apps/ios-shell/ios/App/App/AppDelegatePush.example.swift:78-85 | apps/ios-shell/xcode-template/AppDelegatePush.example.swift:133-140 — before extracting anything, compare `apps/ios-shell/ios/App/App/AppDelegate.swift` and `apps/ios-shell/ios/App/App/AppDelegatePush.example.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (8 lines × 3) apps/ios-shell/ios/App/App/AppDelegate.swift:268— apps/ios-shell/ios/App/App/AppDelegate.swift:268-275 | apps/ios-shell/ios/App/App/AppDelegatePush.example.swift:145-152 | apps/ios-shell/xcode-template/AppDelegatePush.example.swift:211-218 — before extracting anything, compare `apps/ios-shell/ios/App/App/AppDelegate.swift` and `apps/ios-shell/ios/App/App/AppDelegatePush.example.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Off the main sequence: @yinjie/config — @yinjie/config: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Off the main sequence: @yinjie/i18n — @yinjie/i18n: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
P8 · Schema migrations· Schema created by TypeORM synchronize · ×2
Schema created by TypeORM synchronize: true outside the migrations api/src/wiki-app.module.ts:314— This repository versions its schema (TypeORM migrations), but TypeORM synchronize: true here builds or alters the schema from the model as well, outside that history — the two paths can disagree about the shape, and a change made this way is never a reviewed migration. Turn it off and let TypeORM migrations own the schema.
Schema created by TypeORM synchronize: true outside the migrations api/scripts/migrations/2026-mt-prep-schema-catchup.mjs:74— This repository versions its schema (TypeORM migrations), but TypeORM synchronize: true here builds or alters the schema from the model as well, outside that history — the two paths can disagree about the shape, and a change made this way is never a reviewed migration. Turn it off and let TypeORM migrations own the schema.
Dead file (~276 LoC) apps/app/src/features/games/game-center-session-panel.tsx— no import path from any entry point (268 application, 92 tooling, 83 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 (~276 LoC) scripts/_tmp-msg-tab-walk.mjs— no import path from any entry point (268 application, 92 tooling, 83 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 (~5 LoC) apps/app/src/features/desktop/chat/desktop-official-message-route-state.ts— no import path from any entry point (268 application, 92 tooling, 83 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 (~5 LoC) apps/app/src/features/desktop/moments/desktop-moments-route-state.ts— no import path from any entry point (268 application, 92 tooling, 83 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 '@capacitor/keyboard' apps/android-shell/package.json:23— Declared in apps/android-shell/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency '@capacitor/keyboard' apps/ios-shell/package.json:26— Declared in apps/ios-shell/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency '@capacitor/splash-screen' apps/android-shell/package.json:24— Declared in apps/android-shell/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency '@capacitor/splash-screen' apps/ios-shell/package.json:27— Declared in apps/ios-shell/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency '@capacitor/status-bar' apps/android-shell/package.json:25— Declared in apps/android-shell/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency '@capacitor/status-bar' apps/ios-shell/package.json:28— Declared in apps/ios-shell/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
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 apps/wiki/src/lib/recipe-diff.ts:24— `diffPaths` is exported and takes `left: unknown` from its caller, and it calls itself at line 24 (`diffPaths`) with a piece of `left` — and nowhere in `diffPaths` 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 `diffPaths` 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 api/src/modules/wiki/wiki.types.ts:511— `diffPaths` is exported and takes `left: unknown` from its caller, and it calls itself at line 511 (`diffPaths`) with a piece of `left` — and nowhere in `diffPaths` 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 `diffPaths` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Low contrast Tailwind colour pair (4.4:1) apps/app/src/components/share-card-modal.tsx:491— 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.
sticker-panel.StickerPanel (cyclomatic 376) apps/app/src/features/chat/stickers/sticker-panel.tsx:73— sticker-panel.StickerPanel has cyclomatic complexity 376 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (sticker-panel.StickerPanel::handleSearchInputKeyDown) 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.
discover-feed-page.DiscoverFeedPage (cyclomatic 295) apps/app/src/routes/discover-feed-page.tsx:99— discover-feed-page.DiscoverFeedPage has cyclomatic complexity 295 (threshold 15). Of this number, 69 points are the body's own statements and 226 belong to 89 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.
contacts-page.ContactsPage (cyclomatic 295) apps/app/src/routes/contacts-page.tsx:295— contacts-page.ContactsPage has cyclomatic complexity 295 (threshold 15). Of this number, 96 points are the body's own statements and 199 belong to 83 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.
character-detail-page.CharacterDetailPage (cyclomatic 293) apps/app/src/routes/character-detail-page.tsx:134— character-detail-page.CharacterDetailPage has cyclomatic complexity 293 (threshold 15). Of this number, 200 points are the body's own statements and 93 belong to 39 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.
error-translate.translateAppErrorCode (cyclomatic 281) apps/app/src/lib/error-translate.ts:22— error-translate.translateAppErrorCode has cyclomatic complexity 281 (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.
channels-page.ChannelsPage (cyclomatic 276) apps/app/src/routes/channels-page.tsx:107— channels-page.ChannelsPage has cyclomatic complexity 276 (threshold 15). Of this number, 83 points are the body's own statements and 193 belong to 100 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.
dom-text-localizer.translateKnownPattern (cyclomatic 267) REDACTED:199— dom-text-localizer.translateKnownPattern has cyclomatic complexity 267 (threshold 15). Of this number, 262 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.
desktop-chat-workspace.DesktopChatWorkspace (cyclomatic 259) apps/app/src/features/desktop/chat/desktop-chat-workspace.tsx:222— desktop-chat-workspace.DesktopChatWorkspace has cyclomatic complexity 259 (threshold 15). Of this number, 54 points are the body's own statements and 205 belong to 61 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.
moments-page.MomentsPage (cyclomatic 246) apps/app/src/routes/moments-page.tsx:117— moments-page.MomentsPage has cyclomatic complexity 246 (threshold 15). Of this number, 44 points are the body's own statements and 202 belong to 88 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.
chat-details-page.MobileChatDetailsPage (cyclomatic 202) apps/app/src/routes/chat-details-page.tsx:92— chat-details-page.MobileChatDetailsPage has cyclomatic complexity 202 (threshold 15). Of this number, 103 points are the body's own statements and 99 belong to 45 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.
group-chat-thread-panel.GroupChatThreadPanel (cyclomatic 197) apps/app/src/features/chat/group-chat-thread-panel.tsx:118— group-chat-thread-panel.GroupChatThreadPanel has cyclomatic complexity 197 (threshold 15). Of this number, 71 points are the body's own statements and 126 belong to 45 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.
admin-sessions-page.AdminSessionsPage (cyclomatic 186) apps/cloud-console/src/routes/admin-sessions-page.tsx:1110— admin-sessions-page.AdminSessionsPage has cyclomatic complexity 186 (threshold 15). Of this number, 82 points are the body's own statements and 104 belong to 41 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.
chat-composer.DesktopScreenshotEditor (cyclomatic 182) apps/app/src/components/chat-composer.tsx:4506— chat-composer.DesktopScreenshotEditor has cyclomatic complexity 182 (threshold 15). Of this number, 67 points are the body's own statements and 115 belong to 30 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
desktop-search-workspace.DesktopSearchWorkspace (cyclomatic 181) apps/app/src/features/search/desktop-search-workspace.tsx:145— desktop-search-workspace.DesktopSearchWorkspace has cyclomatic complexity 181 (threshold 15). Of this number, 45 points are the body's own statements and 136 belong to 36 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.
chat-list-page.MobileChatListPage (cyclomatic 180) apps/app/src/routes/chat-list-page.tsx:228— chat-list-page.MobileChatListPage has cyclomatic complexity 180 (threshold 15). Of this number, 29 points are the body's own statements and 151 belong to 55 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.
mobile-friend-moments-page.MobileFriendMomentsPage (cyclomatic 165) apps/app/src/routes/mobile-friend-moments-page.tsx:61— mobile-friend-moments-page.MobileFriendMomentsPage has cyclomatic complexity 165 (threshold 15). Of this number, 70 points are the body's own statements and 95 belong to 42 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.
mobile-note-editor-page.MobileNoteEditor (cyclomatic 155) REDACTED:151— mobile-note-editor-page.MobileNoteEditor has cyclomatic complexity 155 (threshold 15). Of this number, 32 points are the body's own statements and 123 belong to 37 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.
desktop-notes-workspace.DesktopNotesWorkspace (cyclomatic 144) REDACTED:105— desktop-notes-workspace.DesktopNotesWorkspace has cyclomatic complexity 144 (threshold 15). Of this number, 34 points are the body's own statements and 110 belong to 35 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.
conversation-thread-panel.ConversationThreadPanel (cyclomatic 141) apps/app/src/features/chat/conversation-thread-panel.tsx:95— conversation-thread-panel.ConversationThreadPanel has cyclomatic complexity 141 (threshold 15). Of this number, 68 points are the body's own statements and 73 belong to 29 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.
mobile-group-call-screen.MobileGroupCallScreen (cyclomatic 140) apps/app/src/features/chat/mobile-group-call-screen.tsx:67— mobile-group-call-screen.MobileGroupCallScreen has cyclomatic complexity 140 (threshold 15). Of this number, 65 points are the body's own statements and 75 belong to 22 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.
profile-moments-page.ProfileMomentsPage (cyclomatic 138) apps/app/src/routes/profile-moments-page.tsx:95— profile-moments-page.ProfileMomentsPage has cyclomatic complexity 138 (threshold 15). Of this number, 41 points are the body's own statements and 97 belong to 59 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.
desktop-direct-call-panel.DesktopDirectCallPanel (cyclomatic 137) apps/app/src/features/desktop/chat/desktop-direct-call-panel.tsx:53— desktop-direct-call-panel.DesktopDirectCallPanel has cyclomatic complexity 137 (threshold 15). Of this number, 66 points are the body's own statements and 71 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.
desktop-mobile-page.DesktopMobilePage (cyclomatic 134) apps/app/src/routes/desktop-mobile-page.tsx:184— desktop-mobile-page.DesktopMobilePage has cyclomatic complexity 134 (threshold 15). Of this number, 68 points are the body's own statements and 66 belong to 26 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
mobile-ai-call-screen.MobileAiCallScreen (cyclomatic 133) apps/app/src/features/chat/mobile-ai-call-screen.tsx:76— mobile-ai-call-screen.MobileAiCallScreen has cyclomatic complexity 133 (threshold 15). Of this number, 76 points are the body's own statements and 57 belong to 16 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
desktop-official-accounts-workspace.DesktopOfficialAccountsWorkspace (cyclomatic 128) apps/app/src/features/desktop/official-accounts/desktop-official-accounts-workspace.tsx:56— desktop-official-accounts-workspace.DesktopOfficialAccountsWorkspace has cyclomatic complexity 128 (threshold 15). Of this number, 65 points are the body's own statements and 63 belong to 26 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
desktop-chat-details-panel.DirectChatDetailsPanel (cyclomatic 120) apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:177— desktop-chat-details-panel.DirectChatDetailsPanel has cyclomatic complexity 120 (threshold 15). Of this number, 87 points are the body's own statements and 33 belong to 24 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
desktop-chat-details-panel.GroupChatDetailsPanel (cyclomatic 117) apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:1163— desktop-chat-details-panel.GroupChatDetailsPanel has cyclomatic complexity 117 (threshold 15). Of this number, 56 points are the body's own statements and 61 belong to 22 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.
desktop-message-avatar-popover.DesktopMessageAvatarPopover (cyclomatic 115) apps/app/src/features/desktop/chat/desktop-message-avatar-popover.tsx:72— desktop-message-avatar-popover.DesktopMessageAvatarPopover has cyclomatic complexity 115 (threshold 15). Of this number, 95 points are the body's own statements and 20 belong to 15 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.
discover-page.DesktopDiscoverWorkspace (cyclomatic 115) apps/app/src/routes/discover-page.tsx:275— discover-page.DesktopDiscoverWorkspace has cyclomatic complexity 115 (threshold 15). Of this number, 50 points are the body's own statements and 65 belong to 31 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
chat-message-list.ChatMessageList (cyclomatic 113) apps/app/src/components/chat-message-list.tsx:355— chat-message-list.ChatMessageList has cyclomatic complexity 113 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 4 other methods here (chat-message-list.ChatMessageList::openAttachment, chat-message-list.ChatMessageList::handleFavoriteSelectedMessages, chat-message-list.ChatMessageList::handleDeleteSelectedMessages, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
group-chat-details-page.MobileGroupChatDetailsPage (cyclomatic 112) apps/app/src/routes/group-chat-details-page.tsx:63— group-chat-details-page.MobileGroupChatDetailsPage has cyclomatic complexity 112 (threshold 15). Of this number, 53 points are the body's own statements and 59 belong to 37 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.
friend-moments-page.FriendMomentsPage (cyclomatic 111) apps/app/src/routes/friend-moments-page.tsx:89— friend-moments-page.FriendMomentsPage has cyclomatic complexity 111 (threshold 15). Of this number, 30 points are the body's own statements and 81 belong to 41 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.
SystemService.evaluateLegacyEvalOutput (cyclomatic 108) api/src/modules/system/system.service.ts:1596— SystemService.evaluateLegacyEvalOutput has cyclomatic complexity 108 (threshold 15). Of this number, 91 points are the body's own statements and 17 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.
chat-composer.ChatComposer (cyclomatic 103) apps/app/src/components/chat-composer.tsx:304— chat-composer.ChatComposer has cyclomatic complexity 103 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (chat-composer.ChatComposer::handleDesktopInputKeyDown) 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.
desktop-channels-workspace.DesktopChannelsWorkspace (cyclomatic 103) apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx:151— desktop-channels-workspace.DesktopChannelsWorkspace has cyclomatic complexity 103 (threshold 15). Of this number, 24 points are the body's own statements and 79 belong to 28 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.
profile-settings-desktop.ProfileSettingsDesktop (cyclomatic 103) apps/app/src/routes/profile-settings-desktop.tsx:155— profile-settings-desktop.ProfileSettingsDesktop has cyclomatic complexity 103 (threshold 15). Of this number, 72 points are the body's own statements and 31 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.
channels-page.MobileChannelCommentsSheet (cyclomatic 100) apps/app/src/routes/channels-page.tsx:4869— channels-page.MobileChannelCommentsSheet has cyclomatic complexity 100 (threshold 15). Of this number, 27 points are the body's own statements and 73 belong to 32 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.
chat-background-page.ChatBackgroundPage (cyclomatic 100) apps/app/src/routes/chat-background-page.tsx:51— chat-background-page.ChatBackgroundPage has cyclomatic complexity 100 (threshold 15). Of this number, 63 points are the body's own statements and 37 belong to 24 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
desktop-search-launcher.DesktopSearchDropdownPanel (cyclomatic 97) apps/app/src/features/search/desktop-search-launcher.tsx:324— desktop-search-launcher.DesktopSearchDropdownPanel has cyclomatic complexity 97 (threshold 15). Of this number, 33 points are the body's own statements and 64 belong to 21 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.
desktop-shell.DesktopShell (cyclomatic 95) apps/app/src/features/shell/desktop-shell.tsx:52— desktop-shell.DesktopShell has cyclomatic complexity 95 (threshold 15). Of this number, 42 points are the body's own statements and 53 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.
official-account-service-thread.OfficialAccountServiceThread (cyclomatic 94) apps/app/src/features/official-accounts/service/official-account-service-thread.tsx:37— official-account-service-thread.OfficialAccountServiceThread has cyclomatic complexity 94 (threshold 15). Of this number, 63 points are the body's own statements and 31 belong to 15 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.
official-article-viewer.OfficialArticleViewer (cyclomatic 92) REDACTED:19— official-article-viewer.OfficialArticleViewer has cyclomatic complexity 92 (threshold 15). Of this number, 61 points are the body's own statements and 31 belong to 5 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.
desktop-chat-files-page.DesktopChatFilesPage (cyclomatic 90) apps/app/src/routes/desktop-chat-files-page.tsx:90— desktop-chat-files-page.DesktopChatFilesPage has cyclomatic complexity 90 (threshold 15). Of this number, 31 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.
waiting-session-sync-page.WaitingSessionSyncPage (cyclomatic 88) apps/cloud-console/src/routes/waiting-session-sync-page.tsx:315— waiting-session-sync-page.WaitingSessionSyncPage has cyclomatic complexity 88 (threshold 15). Of this number, 36 points are the body's own statements and 52 belong to 26 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
group-chat-background-page.GroupChatBackgroundPage (cyclomatic 87) apps/app/src/routes/group-chat-background-page.tsx:50— group-chat-background-page.GroupChatBackgroundPage has cyclomatic complexity 87 (threshold 15). Of this number, 61 points are the body's own statements and 26 belong to 15 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.
group-member-picker-page.MobileGroupMemberPickerPage (cyclomatic 87) apps/app/src/routes/group-member-picker-page.tsx:101— group-member-picker-page.MobileGroupMemberPickerPage has cyclomatic complexity 87 (threshold 15). Of this number, 44 points are the body's own statements and 43 belong to 19 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.
world-detail-page.WorldDetailPage (cyclomatic 85) apps/cloud-console/src/routes/world-detail-page.tsx:254— world-detail-page.WorldDetailPage has cyclomatic complexity 85 (threshold 15). Of this number, 72 points are the body's own statements and 13 belong to 7 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
desktop-chat-history-panel.DesktopChatHistoryPanel (cyclomatic 83) apps/app/src/features/desktop/chat/desktop-chat-history-panel.tsx:60— desktop-chat-history-panel.DesktopChatHistoryPanel has cyclomatic complexity 83 (threshold 15). Of this number, 52 points are the body's own statements and 31 belong to 15 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.
favorites-page.DesktopFavoritesPage (cyclomatic 83) apps/app/src/routes/favorites-page.tsx:100— favorites-page.DesktopFavoritesPage has cyclomatic complexity 83 (threshold 15). Of this number, 38 points are the body's own statements and 45 belong to 25 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.
mobile-chat-plus-panel.MobileChatPlusPanel (cyclomatic 81) apps/app/src/components/mobile-chat-plus-panel.tsx:216— mobile-chat-plus-panel.MobileChatPlusPanel has cyclomatic complexity 81 (threshold 15). Of this number, 29 points are the body's own statements and 52 belong to 14 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.
desktop-chat-details-panel.DesktopGroupMemberBrowserDialog (cyclomatic 81) apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:2404— desktop-chat-details-panel.DesktopGroupMemberBrowserDialog has cyclomatic complexity 81 (threshold 15). Most of this is not in the body itself: 7 of the 81 points are its own statements and the rest belongs to 20 function items inside it that branch (a function literal at line 2890, a function literal at line 2572, handleSearchKeyDown, …). 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.
moment-media-gallery.MomentMediaGalleryInner (cyclomatic 79) apps/app/src/components/moment-media-gallery.tsx:69— moment-media-gallery.MomentMediaGalleryInner has cyclomatic complexity 79 (threshold 15). Of this number, 53 points are the body's own statements and 26 belong to 13 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.
CharactersService.importPersonalCharacter (cyclomatic 77) api/src/modules/characters/characters.service.ts:586— CharactersService.importPersonalCharacter has cyclomatic complexity 77 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
chat-message-search-panel.ChatMessageSearchPanel (cyclomatic 77) apps/app/src/features/chat/chat-message-search-panel.tsx:155— chat-message-search-panel.ChatMessageSearchPanel has cyclomatic complexity 77 (threshold 15). Of this number, 40 points are the body's own statements and 37 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.
mobile-moments-publish-page.MobileMomentsPublishPage (cyclomatic 77) apps/app/src/routes/mobile-moments-publish-page.tsx:70— mobile-moments-publish-page.MobileMomentsPublishPage has cyclomatic complexity 77 (threshold 15). Of this number, 26 points are the body's own statements and 51 belong to 21 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
worlds-page.WorldsPage (cyclomatic 76) apps/cloud-console/src/routes/worlds-page.tsx:223— worlds-page.WorldsPage has cyclomatic complexity 76 (threshold 15). Of this number, 27 points are the body's own statements and 49 belong to 19 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.
contact-detail-pane.ContactDetailPane (cyclomatic 72) apps/app/src/features/contacts/contact-detail-pane.tsx:84— contact-detail-pane.ContactDetailPane has cyclomatic complexity 72 (threshold 15). Of this number, 63 points are the body's own statements and 9 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
desktop-add-friend-workspace.DesktopAddFriendWorkspace (cyclomatic 72) apps/app/src/features/desktop/contacts/desktop-add-friend-workspace.tsx:58— desktop-add-friend-workspace.DesktopAddFriendWorkspace has cyclomatic complexity 72 (threshold 15). Of this number, 45 points are the body's own statements and 27 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.
official-account-detail-page.MobileOfficialAccountDetailPage (cyclomatic 72) apps/app/src/routes/official-account-detail-page.tsx:93— official-account-detail-page.MobileOfficialAccountDetailPage has cyclomatic complexity 72 (threshold 15). Of this number, 43 points are the body's own statements and 29 belong to 10 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
desktop-contacts-tags-pane.DesktopContactsTagsPane (cyclomatic 70) apps/app/src/features/desktop/contacts/desktop-contacts-tags-pane.tsx:37— desktop-contacts-tags-pane.DesktopContactsTagsPane has cyclomatic complexity 70 (threshold 15). Of this number, 40 points are the body's own statements and 30 belong to 22 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.
create-group-page.CreateGroupPage (cyclomatic 70) apps/app/src/routes/create-group-page.tsx:58— create-group-page.CreateGroupPage has cyclomatic complexity 70 (threshold 15). Of this number, 35 points are the body's own statements and 35 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.
mobile-add-friend-page.MobileAddFriend (cyclomatic 67) apps/app/src/routes/mobile-add-friend-page.tsx:108— mobile-add-friend-page.MobileAddFriend has cyclomatic complexity 67 (threshold 15). Of this number, 35 points are the body's own statements and 32 belong to 18 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.
mobile-feed-publish-page.MobileFeedPublishPage (cyclomatic 65) apps/app/src/routes/mobile-feed-publish-page.tsx:34— mobile-feed-publish-page.MobileFeedPublishPage has cyclomatic complexity 65 (threshold 15). Of this number, 25 points are the body's own statements and 40 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.
desktop-chat-image-viewer-page.DesktopChatImageViewerPage (cyclomatic 65) apps/app/src/routes/desktop-chat-image-viewer-page.tsx:52— desktop-chat-image-viewer-page.DesktopChatImageViewerPage has cyclomatic complexity 65 (threshold 15). Most of this is not in the body itself: 12 of the 65 points are its own statements and the rest belongs to 18 function literals inside it that branch (lines 310, 221, 367, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
ChatService.sendMessageDetailed (cyclomatic 64) api/src/modules/chat/chat.service.ts:1159— ChatService.sendMessageDetailed has cyclomatic complexity 64 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
use-conversation-thread.useConversationThread (cyclomatic 64) apps/app/src/features/chat/use-conversation-thread.ts:71— use-conversation-thread.useConversationThread has cyclomatic complexity 64 (threshold 15). Most of this is not in the body itself: 4 of the 64 points are its own statements and the rest belongs to 27 function literals inside it that branch (lines 604, 688, 424, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
channel-author-page.ChannelAuthorPage (cyclomatic 64) apps/app/src/routes/channel-author-page.tsx:56— channel-author-page.ChannelAuthorPage has cyclomatic complexity 64 (threshold 15). Of this number, 39 points are the body's own statements and 25 belong to 16 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WorldLifecycleWorkerService.reconcileObservedWorld (cyclomatic 64) apps/cloud-api/src/orchestration/world-lifecycle-worker.service.ts:827— WorldLifecycleWorkerService.reconcileObservedWorld has cyclomatic complexity 64 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
desktop-feed-row.DesktopFeedRowInner (cyclomatic 63) apps/app/src/features/desktop/feed/desktop-feed-row.tsx:75— desktop-feed-row.DesktopFeedRowInner has cyclomatic complexity 63 (threshold 15). Of this number, 39 points are the body's own statements and 24 belong to 10 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
desktop-moment-row.DesktopMomentRowInner (cyclomatic 63) apps/app/src/features/desktop/moments/desktop-moment-row.tsx:73— desktop-moment-row.DesktopMomentRowInner has cyclomatic complexity 63 (threshold 15). Of this number, 41 points are the body's own statements and 22 belong to 10 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
channels-page.ChannelAudioPictorial (cyclomatic 63) apps/app/src/routes/channels-page.tsx:3193— channels-page.ChannelAudioPictorial has cyclomatic complexity 63 (threshold 15). Of this number, 19 points are the body's own statements and 44 belong to 19 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.
discover-scene-page.MobileDiscoverScenePage (cyclomatic 63) apps/app/src/routes/discover-scene-page.tsx:175— discover-scene-page.MobileDiscoverScenePage has cyclomatic complexity 63 (threshold 15). Of this number, 37 points are the body's own statements and 26 belong to 11 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.
desktop-chat-history-page.DesktopChatHistoryPage (cyclomatic 62) apps/app/src/routes/desktop-chat-history-page.tsx:51— desktop-chat-history-page.DesktopChatHistoryPage has cyclomatic complexity 62 (threshold 15). Of this number, 35 points are the body's own statements and 27 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.
desktop-message-forward-dialog.DesktopMessageForwardDialog (cyclomatic 61) apps/app/src/features/desktop/chat/desktop-message-forward-dialog.tsx:50— desktop-message-forward-dialog.DesktopMessageForwardDialog has cyclomatic complexity 61 (threshold 15). Of this number, 35 points are the body's own statements and 26 belong to 11 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.
moments-page.MobileMomentsView (cyclomatic 61) apps/app/src/routes/moments-page.tsx:2585— moments-page.MobileMomentsView has cyclomatic complexity 61 (threshold 15). Of this number, 42 points are the body's own statements and 19 belong to 11 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
jobs-page.JobsPage (cyclomatic 61) apps/cloud-console/src/routes/jobs-page.tsx:151— jobs-page.JobsPage has cyclomatic complexity 61 (threshold 15). Of this number, 18 points are the body's own statements and 43 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.
characters.service.assertPrivateCharacterFieldLimits (cyclomatic 60) api/src/modules/characters/characters.service.ts:1517— characters.service.assertPrivateCharacterFieldLimits has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
desktop-runtime-guard.DesktopRuntimeGuard (cyclomatic 60) apps/app/src/features/shell/desktop-runtime-guard.tsx:16— desktop-runtime-guard.DesktopRuntimeGuard has cyclomatic complexity 60 (threshold 15). Of this number, 42 points are the body's own statements and 18 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.
character-edit-form.CharacterEditForm (cyclomatic 60) apps/wiki/src/components/character-edit-form.tsx:319— character-edit-form.CharacterEditForm has cyclomatic complexity 60 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (character-edit-form.CharacterEditForm::overlaySnapshotToForm) 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.
desktop-mobile-page.resolveMobileHandoffCategory (cyclomatic 59) apps/app/src/routes/desktop-mobile-page.tsx:1982— desktop-mobile-page.resolveMobileHandoffCategory has cyclomatic complexity 59 (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.
desktop-feedback-page.DesktopFeedbackPage (cyclomatic 59) apps/app/src/routes/desktop-feedback-page.tsx:109— desktop-feedback-page.DesktopFeedbackPage has cyclomatic complexity 59 (threshold 15). Most of this is not in the body itself: 9 of the 59 points are its own statements and the rest belongs to 18 function items inside it that branch (handleSubmitFeedback, buildFeedbackPackage, handleSaveFeedbackPackage, …). 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.
live-companion-page.LiveCompanionPage (cyclomatic 58) apps/app/src/routes/live-companion-page.tsx:70— live-companion-page.LiveCompanionPage has cyclomatic complexity 58 (threshold 15). Of this number, 24 points are the body's own statements and 34 belong to 20 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.
root-layout.RootLayoutContent (cyclomatic 58) apps/cloud-console/src/components/root-layout.tsx:311— root-layout.RootLayoutContent has cyclomatic complexity 58 (threshold 15). Of this number, 50 points are the body's own statements and 8 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
discover-encounter-page.MobileDiscoverEncounterPage (cyclomatic 56) apps/app/src/routes/discover-encounter-page.tsx:86— discover-encounter-page.MobileDiscoverEncounterPage has cyclomatic complexity 56 (threshold 15). Of this number, 28 points are the body's own statements and 28 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.
desktop-contacts-starred-friends-pane.DesktopContactsStarredFriendsPane (cyclomatic 54) apps/app/src/features/desktop/contacts/desktop-contacts-starred-friends-pane.tsx:51— desktop-contacts-starred-friends-pane.DesktopContactsStarredFriendsPane has cyclomatic complexity 54 (threshold 15). Of this number, 42 points are the body's own statements and 12 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.
profile-info-field-page.ProfileInfoFieldPage (cyclomatic 54) apps/app/src/routes/profile-info-field-page.tsx:127— profile-info-field-page.ProfileInfoFieldPage has cyclomatic complexity 54 (threshold 15). Of this number, 31 points are the body's own statements and 23 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.
desktop-group-call-panel.DesktopGroupCallPanel (cyclomatic 53) apps/app/src/features/desktop/chat/desktop-group-call-panel.tsx:51— desktop-group-call-panel.DesktopGroupCallPanel has cyclomatic complexity 53 (threshold 15). Of this number, 16 points are the body's own statements and 37 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.
official-account-article-page.MobileOfficialAccountArticlePage (cyclomatic 53) apps/app/src/routes/official-account-article-page.tsx:76— official-account-article-page.MobileOfficialAccountArticlePage has cyclomatic complexity 53 (threshold 15). Of this number, 26 points are the body's own statements and 27 belong to 11 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.
dashboard-page.DashboardPage (cyclomatic 53) apps/cloud-console/src/routes/dashboard-page.tsx:205— dashboard-page.DashboardPage has cyclomatic complexity 53 (threshold 15). Of this number, 18 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.
desktop-channels-workspace.DesktopChannelCommentsPanel (cyclomatic 52) apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx:3202— desktop-channels-workspace.DesktopChannelCommentsPanel has cyclomatic complexity 52 (threshold 15). Of this number, 16 points are the body's own statements and 36 belong to 19 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.
mobile-search-workspace.MobileSearchWorkspace (cyclomatic 52) apps/app/src/features/search/mobile-search-workspace.tsx:109— mobile-search-workspace.MobileSearchWorkspace has cyclomatic complexity 52 (threshold 15). Of this number, 35 points are the body's own statements and 17 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.
group-chat-edit-page.MobileGroupChatEditPage (cyclomatic 52) apps/app/src/routes/group-chat-edit-page.tsx:71— group-chat-edit-page.MobileGroupChatEditPage has cyclomatic complexity 52 (threshold 15). Of this number, 31 points are the body's own statements and 21 belong to 11 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.
character-page.ReadView (cyclomatic 51) apps/wiki/src/routes/character-page.tsx:428— character-page.ReadView has cyclomatic complexity 51 (threshold 15). Of this number, 33 points are the body's own statements and 18 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.
desktop-subscription-workspace.DesktopSubscriptionWorkspace (cyclomatic 50) apps/app/src/features/desktop/official-accounts/desktop-subscription-workspace.tsx:23— desktop-subscription-workspace.DesktopSubscriptionWorkspace has cyclomatic complexity 50 (threshold 15). Of this number, 22 points are the body's own statements and 28 belong to 8 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
mini-program-open-panel.MiniProgramOpenPanel (cyclomatic 50) apps/app/src/features/mini-programs/mini-program-open-panel.tsx:48— mini-program-open-panel.MiniProgramOpenPanel has cyclomatic complexity 50 (threshold 15). Of this number, 42 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
chat-list-page.ConversationListItemLinkImpl (cyclomatic 50) apps/app/src/routes/chat-list-page.tsx:1951— chat-list-page.ConversationListItemLinkImpl has cyclomatic complexity 50 (threshold 15). Of this number, 33 points are the body's own statements and 17 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
profile-feed-page.ProfileFeedPage (cyclomatic 50) apps/app/src/routes/profile-feed-page.tsx:52— profile-feed-page.ProfileFeedPage has cyclomatic complexity 50 (threshold 15). Most of this is not in the body itself: 6 of the 50 points are its own statements and the rest belongs to 18 function items inside it that branch (a function literal at line 387, renderContent, handleExpandComments, …). 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.
friend-requests-page.MobileFriendRequestsPage (cyclomatic 50) apps/app/src/routes/friend-requests-page.tsx:61— friend-requests-page.MobileFriendRequestsPage has cyclomatic complexity 50 (threshold 15). Most of this is not in the body itself: 14 of the 50 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 311, navigateToRouteStateReturn, a function literal at line 122, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
ChatService.buildMessagePromptText (cyclomatic 49) api/src/modules/chat/chat.service.ts:2858— ChatService.buildMessagePromptText 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.
world-characters-page.MobileWorldCharactersPage (cyclomatic 49) apps/app/src/routes/world-characters-page.tsx:87— world-characters-page.MobileWorldCharactersPage has cyclomatic complexity 49 (threshold 15). Of this number, 27 points are the body's own statements and 22 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.
WorldOwnerService.updateOwner (cyclomatic 48) api/src/modules/auth/world-owner.service.ts:689— WorldOwnerService.updateOwner has cyclomatic complexity 48 (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.
GroupService.buildMessagePromptText (cyclomatic 48) api/src/modules/chat/group.service.ts:1401— GroupService.buildMessagePromptText has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
channels-forward-picker.ChannelsForwardPicker (cyclomatic 48) apps/app/src/components/channels-forward-picker.tsx:55— channels-forward-picker.ChannelsForwardPicker has cyclomatic complexity 48 (threshold 15). Most of this is not in the body itself: 8 of the 48 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 246, handlePick, a function literal at line 185, …). 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.
ShakeDiscoveryService.createSessionPreview (cyclomatic 47) api/src/modules/social/shake-discovery.service.ts:160— ShakeDiscoveryService.createSessionPreview has cyclomatic complexity 47 (threshold 15). Of this number, 46 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.
WechatSyncAdminService.normalizeCharacterDraft (cyclomatic 47) api/src/modules/admin/wechat-sync-admin.service.ts:632— WechatSyncAdminService.normalizeCharacterDraft has cyclomatic complexity 47 (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.
BehaviorRecordsAdminService.collectOwnerRecords (cyclomatic 46) api/src/modules/admin/behavior-records-admin.service.ts:363— BehaviorRecordsAdminService.collectOwnerRecords has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
use-continuous-voice-loop.useContinuousVoiceLoop (cyclomatic 46) apps/app/src/features/chat/use-continuous-voice-loop.ts:56— use-continuous-voice-loop.useContinuousVoiceLoop has cyclomatic complexity 46 (threshold 15). Most of this is not in the body itself: 2 of the 46 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 156, 328, 305, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
desktop-create-group-dialog.DesktopCreateGroupDialog (cyclomatic 46) apps/app/src/features/desktop/chat/desktop-create-group-dialog.tsx:53— desktop-create-group-dialog.DesktopCreateGroupDialog has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (desktop-create-group-dialog.DesktopCreateGroupDialog::handleDialogKeyDown) 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.
contact-shortcut-list.ContactShortcutList (cyclomatic 46) apps/app/src/features/contacts/contact-shortcut-list.tsx:19— contact-shortcut-list.ContactShortcutList has cyclomatic complexity 46 (threshold 15). Most of this is not in the body itself: 4 of the 46 points are its own statements and the rest belongs to one function literal inside it that branches (line 42). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
use-digital-human-call-session.useDigitalHumanCallSession (cyclomatic 45) apps/app/src/features/chat/use-digital-human-call-session.ts:42— use-digital-human-call-session.useDigitalHumanCallSession has cyclomatic complexity 45 (threshold 15). Most of this is not in the body itself: 7 of the 45 points are its own statements and the rest belongs to 17 function literals inside it that branch (lines 419, 246, 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.
plot-action-bar.PlotActionBar (cyclomatic 45) apps/app/src/features/games/farm/components/plot-action-bar.tsx:48— plot-action-bar.PlotActionBar has cyclomatic complexity 45 (threshold 15). Of this number, 36 points are the body's own statements and 9 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.
characters.controller.parsePrivateCharacterImportBody (cyclomatic 43) REDACTED:225— characters.controller.parsePrivateCharacterImportBody has cyclomatic complexity 43 (threshold 15). Of this number, 38 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
mobile-favorites-page.MobileFavoritesPage (cyclomatic 43) apps/app/src/routes/mobile-favorites-page.tsx:100— mobile-favorites-page.MobileFavoritesPage has cyclomatic complexity 43 (threshold 15). Of this number, 20 points are the body's own statements and 23 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.
PromptBuilderService.buildChatSystemPromptSectionsFromTemplates (cyclomatic 42) api/src/modules/ai/prompt-builder.service.ts:545— PromptBuilderService.buildChatSystemPromptSectionsFromTemplates has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SystemService.generateFallbackEvalOutput (cyclomatic 42) api/src/modules/system/system.service.ts:1447— SystemService.generateFallbackEvalOutput has cyclomatic complexity 42 (threshold 15). Of this number, 40 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
use-island-concert-state.reducer (cyclomatic 42) apps/app/src/features/games/island-concert/use-island-concert-state.ts:200— use-island-concert-state.reducer has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
profile-xhs-reward-page.ProfileXhsRewardPage (cyclomatic 42) apps/app/src/routes/profile-xhs-reward-page.tsx:55— profile-xhs-reward-page.ProfileXhsRewardPage has cyclomatic complexity 42 (threshold 15). Of this number, 27 points are the body's own statements and 15 belong to 8 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.
share-card-modal.ShareCardModal (cyclomatic 41) apps/app/src/components/share-card-modal.tsx:111— share-card-modal.ShareCardModal has cyclomatic complexity 41 (threshold 15). Most of this is not in the body itself: 8 of the 41 points are its own statements and the rest belongs to 12 function items inside it that branch (handleSaveOrShare, a function literal at line 177, a function literal at line 210, …). 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.
desktop-friend-moments-workspace.DesktopFriendMomentsWorkspace (cyclomatic 41) apps/app/src/features/desktop/moments/desktop-friend-moments-workspace.tsx:91— desktop-friend-moments-workspace.DesktopFriendMomentsWorkspace has cyclomatic complexity 41 (threshold 15). Of this number, 25 points are the body's own statements and 16 belong to 5 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.
GroupVoiceCallsService.createTurn (cyclomatic 40) api/src/modules/chat/group-voice-calls.service.ts:79— GroupVoiceCallsService.createTurn has cyclomatic complexity 40 (threshold 15). Of this number, 29 points are the body's own statements and 11 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
profile-feedback-page.ProfileFeedbackPage (cyclomatic 40) apps/app/src/routes/profile-feedback-page.tsx:43— profile-feedback-page.ProfileFeedbackPage has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 7 of the 40 points are its own statements and the rest belongs to 8 function items inside it that branch (handleSubmit, a function literal at line 64, a function literal at line 95, …). 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.
CyberAvatarService.executeRefresh (cyclomatic 39) api/src/modules/cyber-avatar/cyber-avatar.service.ts:505— CyberAvatarService.executeRefresh has cyclomatic complexity 39 (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.
FollowupRuntimeService.runScan (cyclomatic 39) api/src/modules/followup-runtime/followup-runtime.service.ts:273— FollowupRuntimeService.runScan has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
screenshot-mobile-routes.collectDiagnostics (cyclomatic 39) apps/app/scripts/screenshot-mobile-routes.mjs:205— screenshot-mobile-routes.collectDiagnostics has cyclomatic complexity 39 (threshold 15). Of this number, 28 points are the body's own statements and 11 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.
account-security-panel.AccountSecurityPanel (cyclomatic 39) REDACTED:93— account-security-panel.AccountSecurityPanel has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 14 of the 39 points are its own statements and the rest belongs to 10 function items inside it that branch (handleSubmit, a function literal at line 185, a function literal at line 196, …). 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.
character-page.CharacterPage (cyclomatic 39) apps/wiki/src/routes/character-page.tsx:67— character-page.CharacterPage has cyclomatic complexity 39 (threshold 15). Of this number, 35 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.
contacts-bulk-action-bar.ContactsBulkActionBar (cyclomatic 38) apps/app/src/features/contacts/management/contacts-bulk-action-bar.tsx:40— contacts-bulk-action-bar.ContactsBulkActionBar has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 12 of the 38 points are its own statements and the rest belongs to 14 function items inside it that branch (a function literal at line 67, runStar, a function literal at line 280, …). 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.
sky-rally-game.SkyRallyGame (cyclomatic 38) apps/app/src/features/games/sky-rally/sky-rally-game.tsx:52— sky-rally-game.SkyRallyGame has cyclomatic complexity 38 (threshold 15). Of this number, 21 points are the body's own statements and 17 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
profile-info-page.ProfileInfoPage (cyclomatic 38) apps/app/src/routes/profile-info-page.tsx:38— profile-info-page.ProfileInfoPage has cyclomatic complexity 38 (threshold 15). Of this number, 16 points are the body's own statements and 22 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.
ActionRuntimeService.buildHomeAssistantRegistrySnapshot (cyclomatic 37) REDACTED:3195— ActionRuntimeService.buildHomeAssistantRegistrySnapshot has cyclomatic complexity 37 (threshold 15). Of this number, 32 points are the body's own statements and 5 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FeedService.scheduleChannelsCharacterReactions (cyclomatic 37) api/src/modules/feed/feed.service.ts:2543— FeedService.scheduleChannelsCharacterReactions has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 11 of the 37 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 2620, 2594, 2567). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
reminder-task-panel.ReminderTaskPanel (cyclomatic 37) apps/app/src/features/chat/reminder-task-panel.tsx:31— reminder-task-panel.ReminderTaskPanel has cyclomatic complexity 37 (threshold 15). Of this number, 19 points are the body's own statements and 18 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
desktop-profile-moments-workspace.DesktopProfileMomentsWorkspace (cyclomatic 37) apps/app/src/features/desktop/moments/desktop-profile-moments-workspace.tsx:84— desktop-profile-moments-workspace.DesktopProfileMomentsWorkspace has cyclomatic complexity 37 (threshold 15). Of this number, 30 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ActionRuntimeService.resolveHomeAssistantTarget (cyclomatic 36) REDACTED:2495— ActionRuntimeService.resolveHomeAssistantTarget has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ActionRuntimeService.buildHomeAssistantDiscoveryItem (cyclomatic 36) REDACTED:2782— ActionRuntimeService.buildHomeAssistantDiscoveryItem has cyclomatic complexity 36 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ChatService.getConversations (cyclomatic 36) api/src/modules/chat/chat.service.ts:313— ChatService.getConversations has cyclomatic complexity 36 (threshold 15). Of this number, 24 points are the body's own statements and 12 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.
group-message-context-menu.GroupMessageContextMenu (cyclomatic 36) apps/app/src/features/chat/group-message-context-menu.tsx:62— group-message-context-menu.GroupMessageContextMenu has cyclomatic complexity 36 (threshold 15). Of this number, 34 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
moment-compose-media-preview.MomentComposeMediaPreview (cyclomatic 36) apps/app/src/components/moment-compose-media-preview.tsx:30— moment-compose-media-preview.MomentComposeMediaPreview has cyclomatic complexity 36 (threshold 15). Of this number, 21 points are the body's own statements and 15 belong to 7 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.
forest-train-game.ForestTrainGame (cyclomatic 36) apps/app/src/features/games/forest-train/forest-train-game.tsx:41— forest-train-game.ForestTrainGame has cyclomatic complexity 36 (threshold 15). Of this number, 17 points are the body's own statements and 19 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.
splash-page.SplashPage (cyclomatic 36) apps/app/src/routes/splash-page.tsx:25— splash-page.SplashPage has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 1 of the 36 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 32, 141, 116, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
AiUsageLedgerService.buildDowngradeCharacterQualityItems (cyclomatic 35) api/src/modules/analytics/ai-usage-ledger.service.ts:1145— AiUsageLedgerService.buildDowngradeCharacterQualityItems has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 1 of the 35 points is its own statement and the rest belongs to 5 function items inside it that branch (a function literal at line 1250, a function literal at line 1299, ensureBucket, …). 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.
WikiPrivateCharacterService.applyDto (cyclomatic 35) api/src/modules/wiki/services/wiki-private-character.service.ts:733— WikiPrivateCharacterService.applyDto 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.
use-forest-train-state.reducer (cyclomatic 35) apps/app/src/features/games/forest-train/use-forest-train-state.ts:97— use-forest-train-state.reducer has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
farm-iso-tile.FarmIsoTile (cyclomatic 35) apps/app/src/features/games/farm/components/farm-iso-tile.tsx:30— farm-iso-tile.FarmIsoTile has cyclomatic complexity 35 (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.
neighbor-farm-modal.NeighborFarmModal (cyclomatic 35) apps/app/src/features/games/farm/components/neighbor-farm-modal.tsx:33— neighbor-farm-modal.NeighborFarmModal has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 15 of the 35 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 161, a function literal at line 46, a function literal at line 57, …). 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.
seed-shop-sheet.SeedShopSheet (cyclomatic 35) apps/app/src/features/games/farm/components/seed-shop-sheet.tsx:31— seed-shop-sheet.SeedShopSheet has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 8 of the 35 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 166, 235, 291, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
subscription-panel.SubscriptionPanel (cyclomatic 35) apps/app/src/features/subscription/subscription-panel.tsx:356— subscription-panel.SubscriptionPanel has cyclomatic complexity 35 (threshold 15). Of this number, 27 points are the body's own statements and 8 belong to 6 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
profile-subscription-page.ProfileSubscriptionPage (cyclomatic 35) apps/app/src/routes/profile-subscription-page.tsx:374— profile-subscription-page.ProfileSubscriptionPage has cyclomatic complexity 35 (threshold 15). Of this number, 27 points are the body's own statements and 8 belong to 6 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
home-page.HomePage (cyclomatic 35) apps/wiki/src/routes/home-page.tsx:19— home-page.HomePage has cyclomatic complexity 35 (threshold 15). Of this number, 18 points are the body's own statements and 17 belong to 9 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.
desktop-group-member-picker.DesktopGroupMemberPicker (cyclomatic 34) apps/app/src/features/desktop/chat/desktop-group-member-picker.tsx:32— desktop-group-member-picker.DesktopGroupMemberPicker has cyclomatic complexity 34 (threshold 15). Of this number, 16 points are the body's own statements and 18 belong to 11 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.
contacts-management-modal.ContactsManagementModal (cyclomatic 34) apps/app/src/features/contacts/management/contacts-management-modal.tsx:32— contacts-management-modal.ContactsManagementModal has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 7 of the 34 points are its own statements and the rest belongs to 14 function literals inside it that branch (lines 232, 247, 93, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
use-search-index.useSearchIndex.indexedResults (cyclomatic 34) apps/app/src/features/search/use-search-index.ts:253— use-search-index.useSearchIndex.indexedResults has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 1 of the 34 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 350, 421, 259, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
channels-page.MobileChannelsViewport (cyclomatic 34) apps/app/src/routes/channels-page.tsx:3939— channels-page.MobileChannelsViewport has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 2 of the 34 points are its own statements and the rest belongs to 20 function items inside it that branch (a function literal at line 4068, registerCardRef, a function literal at line 4187, …). 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.
channels-page.MobileChannelsCard (cyclomatic 34) apps/app/src/routes/channels-page.tsx:4337— channels-page.MobileChannelsCard has cyclomatic complexity 34 (threshold 15). Of this number, 20 points are the body's own statements and 14 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.
desktop-official-article-window-page.DesktopOfficialArticleWindowPage (cyclomatic 34) apps/app/src/routes/desktop-official-article-window-page.tsx:40— desktop-official-article-window-page.DesktopOfficialArticleWindowPage has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 9 of the 34 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 111, a function literal at line 98, handleOpenInBrowser, …). 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.
cloud-api-i18n.translateKnownDynamicMessage (cyclomatic 34) REDACTED:406— cloud-api-i18n.translateKnownDynamicMessage has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
index.init (cyclomatic 34) packages/analytics/src/index.ts:46— index.init has cyclomatic complexity 34 (threshold 15). Of this number, 20 points are the body's own statements and 14 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.
InferenceService.normalizeProviderPayload (cyclomatic 33) api/src/modules/inference/inference.service.ts:546— InferenceService.normalizeProviderPayload has cyclomatic complexity 33 (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.
ActionRuntimeService.executeHttpBridgeOperation (cyclomatic 33) REDACTED:3407— ActionRuntimeService.executeHttpBridgeOperation has cyclomatic complexity 33 (threshold 15). Of this number, 31 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
mobile-reminder-toast-host.MobileReminderToastHost (cyclomatic 33) apps/app/src/features/chat/mobile-reminder-toast-host.tsx:32— mobile-reminder-toast-host.MobileReminderToastHost has cyclomatic complexity 33 (threshold 15). Of this number, 17 points are the body's own statements and 16 belong to 9 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
desktop-channels-workspace.DesktopChannelAuthorPanel (cyclomatic 33) apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx:2836— desktop-channels-workspace.DesktopChannelAuthorPanel has cyclomatic complexity 33 (threshold 15). Of this number, 23 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.
CloudService.getWorldDriftSummary (cyclomatic 33) apps/cloud-api/src/cloud/cloud.service.ts:407— CloudService.getWorldDriftSummary has cyclomatic complexity 33 (threshold 15). Of this number, 30 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
user-detail-page.UserDetailPage (cyclomatic 33) apps/cloud-console/src/routes/user-detail-page.tsx:16— user-detail-page.UserDetailPage has cyclomatic complexity 33 (threshold 15). Of this number, 30 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, 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.
root-layout.RootLayout (cyclomatic 33) apps/wiki/src/components/root-layout.tsx:186— root-layout.RootLayout has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 14 of the 33 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 229, a function literal at line 194, a function literal at line 208, …). 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.
mobile-message-action-sheet.MobileMessageActionSheet (cyclomatic 32) apps/app/src/features/chat/mobile-message-action-sheet.tsx:47— mobile-message-action-sheet.MobileMessageActionSheet has cyclomatic complexity 32 (threshold 15). Of this number, 20 points are the body's own statements and 12 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.
chat-message-list.GroupRelaySummaryMessage (cyclomatic 32) apps/app/src/components/chat-message-list.tsx:7016— chat-message-list.GroupRelaySummaryMessage has cyclomatic complexity 32 (threshold 15). Of this number, 29 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
delete-account-panel.DeleteAccountPanel (cyclomatic 32) apps/app/src/features/account-security/delete-account-panel.tsx:60— delete-account-panel.DeleteAccountPanel has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 15 of the 32 points are its own statements and the rest belongs to 9 function items inside it that branch (handleConfirmDelete, a function literal at line 123, a function literal at line 117, …). 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.
tank-war-engine.resolveBulletTank (cyclomatic 32) apps/app/src/features/games/tank-war/tank-war-engine.ts:646— tank-war-engine.resolveBulletTank has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
gift-sheet.GiftSheet (cyclomatic 32) apps/app/src/features/games/farm/components/gift-sheet.tsx:25— gift-sheet.GiftSheet has cyclomatic complexity 32 (threshold 15). Of this number, 21 points are the body's own statements and 11 belong to 8 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
game-center-session-panel.GameCenterSessionPanel (cyclomatic 32) apps/app/src/features/games/game-center-session-panel.tsx:32— game-center-session-panel.GameCenterSessionPanel has cyclomatic complexity 32 (threshold 15). Of this number, 31 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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.
profile-info-name-page.ProfileInfoNamePage (cyclomatic 32) apps/app/src/routes/profile-info-name-page.tsx:37— profile-info-name-page.ProfileInfoNamePage has cyclomatic complexity 32 (threshold 15). Of this number, 19 points are the body's own statements and 13 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.
chat-room-page.ChatRoomPage (cyclomatic 32) apps/app/src/routes/chat-room-page.tsx:41— chat-room-page.ChatRoomPage has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 7 of the 32 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 110, a function literal at line 330, a function literal at line 146, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
LocalUpstreamServiceManager.startService (cyclomatic 32) apps/wechat-connector/src/upstream-service-manager.ts:101— LocalUpstreamServiceManager.startService has cyclomatic complexity 32 (threshold 15). Of this number, 28 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
chat-message-list.ImageViewerOverlay (cyclomatic 31) apps/app/src/components/chat-message-list.tsx:7822— chat-message-list.ImageViewerOverlay has cyclomatic complexity 31 (threshold 15). Of this number, 16 points are the body's own statements and 15 belong to 7 function items inside it that branch. To reduce it, split the body: 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.
mobile-details-action-sheet.MobileDetailsActionSheet (cyclomatic 31) apps/app/src/features/chat-details/mobile-details-action-sheet.tsx:25— mobile-details-action-sheet.MobileDetailsActionSheet has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 7 of the 31 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 133, 207, 150, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
island-concert-game.IslandConcertGame (cyclomatic 31) apps/app/src/features/games/island-concert/island-concert-game.tsx:45— island-concert-game.IslandConcertGame has cyclomatic complexity 31 (threshold 15). Of this number, 22 points are the body's own statements and 9 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.
discover-avatar-encounter-page.DiscoverTab (cyclomatic 31) apps/app/src/routes/discover-avatar-encounter-page.tsx:260— discover-avatar-encounter-page.DiscoverTab has cyclomatic complexity 31 (threshold 15). Of this number, 26 points are the body's own statements and 5 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.
official-accounts-page.MobileOfficialAccountsPage (cyclomatic 31) apps/app/src/routes/official-accounts-page.tsx:64— official-accounts-page.MobileOfficialAccountsPage has cyclomatic complexity 31 (threshold 15). Of this number, 17 points are the body's own statements and 14 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.
knowledge-base-page.KnowledgeBasePage (cyclomatic 31) apps/app/src/routes/knowledge-base-page.tsx:70— knowledge-base-page.KnowledgeBasePage has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 15 of the 31 points are its own statements and the rest belongs to 8 function items inside it that branch (handleFileSelected, handleSubmitText, handleSubmitUrl, …). 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.
group-announcement-page.MobileGroupAnnouncementPage (cyclomatic 31) apps/app/src/routes/group-announcement-page.tsx:46— group-announcement-page.MobileGroupAnnouncementPage has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (group-announcement-page.MobileGroupAnnouncementPage::handleShareAnnouncement) 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.
seed.seedCharacters (cyclomatic 30) api/src/database/seed.ts:30— seed.seedCharacters has cyclomatic complexity 30 (threshold 15). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NeedDiscoveryService.runCadence (cyclomatic 30) api/src/modules/need-discovery/need-discovery.service.ts:167— NeedDiscoveryService.runCadence has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SystemService.buildEvalPromptMessages (cyclomatic 30) api/src/modules/system/system.service.ts:1023— SystemService.buildEvalPromptMessages has cyclomatic complexity 30 (threshold 15). Of this number, 27 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.
use-speech-input.useSpeechInput.startMediaRecorder (cyclomatic 30) apps/app/src/features/chat/use-speech-input.ts:434— use-speech-input.useSpeechInput.startMediaRecorder has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 14 of the 30 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 495, 483). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
contact-index-list.ContactIndexList (cyclomatic 30) apps/app/src/features/contacts/contact-index-list.tsx:8— contact-index-list.ContactIndexList has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 4 of the 30 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 125, resolveItemFromClientY, a function literal at line 149, …). 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.
games-page.GamesPage (cyclomatic 30) apps/app/src/routes/games-page.tsx:63— games-page.GamesPage has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (games-page.GamesPage::handleCopyGameToMobile) 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.
starred-friends-page.MobileStarredFriendsPage (cyclomatic 30) apps/app/src/routes/starred-friends-page.tsx:82— starred-friends-page.MobileStarredFriendsPage has cyclomatic complexity 30 (threshold 15). Of this number, 18 points are the body's own statements and 12 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.
group-contacts-page.MobileGroupContactsPage (cyclomatic 30) apps/app/src/routes/group-contacts-page.tsx:72— group-contacts-page.MobileGroupContactsPage has cyclomatic complexity 30 (threshold 15). Of this number, 17 points are the body's own statements and 13 belong to 10 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
subscription-inbox-page.MobileSubscriptionInboxPage (cyclomatic 30) apps/app/src/routes/subscription-inbox-page.tsx:61— subscription-inbox-page.MobileSubscriptionInboxPage has cyclomatic complexity 30 (threshold 15). Of this number, 17 points are the body's own statements and 13 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.
WorldAccessService.prepareWorldForAccess (cyclomatic 30) apps/cloud-api/src/world-access/world-access.service.ts:270— WorldAccessService.prepareWorldForAccess has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
auto-capture.attachAutoCapture (cyclomatic 30) packages/analytics/src/auto-capture.ts:207— auto-capture.attachAutoCapture has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 9 of the 30 points are its own statements and the rest belongs to 9 function items inside it that branch (tryEmit, a function literal at line 254, a function literal at line 275, …). 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.
PromptBuilderService.buildSceneSystemPrompt (cyclomatic 29) api/src/modules/ai/prompt-builder.service.ts:174— PromptBuilderService.buildSceneSystemPrompt 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.
attachment-semantic-text.buildAttachmentFallbackLabel (cyclomatic 29) api/src/modules/chat/attachment-semantic-text.ts:268— attachment-semantic-text.buildAttachmentFallbackLabel 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.
CharacterSocialContextService.buildCrossCharacterInteractionBlock (cyclomatic 29) api/src/modules/chat/character-social-context.service.ts:183— CharacterSocialContextService.buildCrossCharacterInteractionBlock has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 14 of the 29 points are its own statements and the rest belongs to 2 function items inside it that branch (pushIfRelevant, a function literal at line 274). 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.
NeedDiscoveryService.collectSignals (cyclomatic 29) api/src/modules/need-discovery/need-discovery.service.ts:420— NeedDiscoveryService.collectSignals has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 9 of the 29 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 498, 662, 679, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
desktop-chat-route-state.parseDesktopChatRouteHash (cyclomatic 29) apps/app/src/features/desktop/chat/desktop-chat-route-state.ts:28— desktop-chat-route-state.parseDesktopChatRouteHash 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.
desktop-feed-workspace.DesktopFeedWorkspace (cyclomatic 29) apps/app/src/features/desktop/feed/desktop-feed-workspace.tsx:103— desktop-feed-workspace.DesktopFeedWorkspace has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 9 of the 29 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 170, 211, 243, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
desktop-games-workspace.DesktopGamesWorkspace (cyclomatic 29) apps/app/src/features/desktop/games/desktop-games-workspace.tsx:49— desktop-games-workspace.DesktopGamesWorkspace has cyclomatic complexity 29 (threshold 15). Of this number, 25 points are the body's own statements and 4 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
mobile-mini-programs-workspace.MobileMiniProgramsWorkspace (cyclomatic 29) apps/app/src/features/mini-programs/mobile-mini-programs-workspace.tsx:60— mobile-mini-programs-workspace.MobileMiniProgramsWorkspace has cyclomatic complexity 29 (threshold 15). Of this number, 23 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.
channels-page.ChannelVideoSurface (cyclomatic 29) apps/app/src/routes/channels-page.tsx:3631— channels-page.ChannelVideoSurface has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 9 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 3665, handleTap, a function literal at line 3713, …). 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.
CloudService.buildWorldAttentionItem (cyclomatic 29) apps/cloud-api/src/cloud/cloud.service.ts:2211— CloudService.buildWorldAttentionItem 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.
wechat-comment-bar.WeChatCommentBar (cyclomatic 28) apps/app/src/components/wechat-comment-bar.tsx:42— wechat-comment-bar.WeChatCommentBar has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 9 of the 28 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 255, a function literal at line 96, a function literal at line 137, …). 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.
desktop-channels-workspace.ChannelCommentsDrawer (cyclomatic 28) apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx:2274— desktop-channels-workspace.ChannelCommentsDrawer 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 5 function literals inside it that branch (lines 2435, 2372, 2347, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
use-tank-war-input.useTankWarInput (cyclomatic 28) apps/app/src/features/games/tank-war/use-tank-war-input.ts:46— use-tank-war-input.useTankWarInput 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 5 function literals inside it that branch (lines 55, 88, 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.
desktop-chat-window-page.DesktopChatWindowPage (cyclomatic 28) apps/app/src/routes/desktop-chat-window-page.tsx:26— desktop-chat-window-page.DesktopChatWindowPage has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 12 of the 28 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 68, 94, 130, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
audit-desktop-text.findArmEnd (cyclomatic 28) REDACTED:256— audit-desktop-text.findArmEnd has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
account-page.ChangePasswordPanel (cyclomatic 28) apps/wiki/src/routes/account-page.tsx:176— account-page.ChangePasswordPanel has cyclomatic complexity 28 (threshold 15). Of this number, 17 points are the body's own statements and 11 belong to 5 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.
ReminderRuntimeService.evaluateConversationTurnFromRules (cyclomatic 27) REDACTED:1373— ReminderRuntimeService.evaluateConversationTurnFromRules 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.
SocialService.sendFriendRequest (cyclomatic 27) api/src/modules/social/social.service.ts:981— SocialService.sendFriendRequest 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.
FeedService.runChannelProactiveForwardTick (cyclomatic 27) api/src/modules/feed/feed.service.ts:3116— FeedService.runChannelProactiveForwardTick has cyclomatic complexity 27 (threshold 15). Of this number, 21 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.
GamesService.updateAdminCatalogItem (cyclomatic 27) api/src/modules/games/games.service.ts:639— GamesService.updateAdminCatalogItem has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
WikiPrivateCharacterService.parseImportBundle (cyclomatic 27) api/src/modules/wiki/services/wiki-private-character.service.ts:668— WikiPrivateCharacterService.parseImportBundle has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
tokenize-named-colors-codemod.pickToken (cyclomatic 27) apps/app/scripts/tokenize-named-colors-codemod.mjs:37— tokenize-named-colors-codemod.pickToken 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.
walkthrough-mobile-i18n.visitRoute (cyclomatic 27) apps/app/scripts/walkthrough-mobile-i18n.mjs:189— walkthrough-mobile-i18n.visitRoute has cyclomatic complexity 27 (threshold 15). Of this number, 19 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
mobile-speech-input-sheet.MobileSpeechInputSheet (cyclomatic 27) apps/app/src/components/mobile-speech-input-sheet.tsx:97— mobile-speech-input-sheet.MobileSpeechInputSheet has cyclomatic complexity 27 (threshold 15). Of this number, 21 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
chat-message-delivery.attachmentsEqual (cyclomatic 27) apps/app/src/features/chat/chat-message-delivery.ts:561— chat-message-delivery.attachmentsEqual has cyclomatic complexity 27 (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.
chat-message-list.NoteViewerOverlay (cyclomatic 27) apps/app/src/components/chat-message-list.tsx:8323— chat-message-list.NoteViewerOverlay has cyclomatic complexity 27 (threshold 15). Of this number, 17 points are the body's own statements and 10 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.
digital-human-player.DigitalHumanPlayer (cyclomatic 27) apps/app/src/features/chat/digital-human-player.tsx:21— digital-human-player.DigitalHumanPlayer 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.
use-voice-activity-detection.useVoiceActivityDetection (cyclomatic 27) apps/app/src/features/chat/use-voice-activity-detection.ts:65— use-voice-activity-detection.useVoiceActivityDetection 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 5 function literals inside it that branch (lines 148, 240, 204, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
desktop-conversation-context-menu.DesktopConversationContextMenu (cyclomatic 27) apps/app/src/features/desktop/chat/desktop-conversation-context-menu.tsx:44— desktop-conversation-context-menu.DesktopConversationContextMenu 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.
signal-squad-game.SignalSquadGame (cyclomatic 27) apps/app/src/features/games/signal-squad/signal-squad-game.tsx:57— signal-squad-game.SignalSquadGame has cyclomatic complexity 27 (threshold 15). Of this number, 17 points are the body's own statements and 10 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
cat-inn-game.CatInnGame (cyclomatic 27) apps/app/src/features/games/cat-inn/cat-inn-game.tsx:36— cat-inn-game.CatInnGame has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 12 of the 27 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 169, 333, 143, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
event-log-panel.summarize (cyclomatic 27) apps/app/src/features/games/farm/components/event-log-panel.tsx:59— event-log-panel.summarize has cyclomatic complexity 27 (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.
admin-protection-page.AdminProtectionPage (cyclomatic 27) apps/wiki/src/routes/admin-protection-page.tsx:22— admin-protection-page.AdminProtectionPage has cyclomatic complexity 27 (threshold 15). Of this number, 16 points are the body's own statements and 11 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.
dom-text-localizer.DomTextLocalizer (cyclomatic 27) REDACTED:38— dom-text-localizer.DomTextLocalizer 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 99, 154, 78, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
AiUsageLedgerService.parseUsageAuditPayload (cyclomatic 26) api/src/modules/analytics/ai-usage-ledger.service.ts:1905— AiUsageLedgerService.parseUsageAuditPayload has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
InferenceService.ensureDefaultProviderAccount (cyclomatic 26) api/src/modules/inference/inference.service.ts:783— InferenceService.ensureDefaultProviderAccount has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
GroupReplyPlannerService.selectReplyActorsForTurn (cyclomatic 26) api/src/modules/chat/group-reply-planner.service.ts:15— GroupReplyPlannerService.selectReplyActorsForTurn has cyclomatic complexity 26 (threshold 15). Of this number, 17 points are the body's own statements and 9 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.
abuse-filter.service.assertValidFilterPattern (cyclomatic 26) REDACTED:61— abuse-filter.service.assertValidFilterPattern has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
WikiEditService.submit (cyclomatic 26) api/src/modules/wiki/services/wiki-edit.service.ts:84— WikiEditService.submit has cyclomatic complexity 26 (threshold 15). Of this number, 21 points are the body's own statements and 5 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.
WikiEditService.submitRecipeEdit (cyclomatic 26) api/src/modules/wiki/services/wiki-edit.service.ts:865— WikiEditService.submitRecipeEdit has cyclomatic complexity 26 (threshold 15). Of this number, 19 points are the body's own statements and 7 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.
tokenize-colors-codemod.classifyRgba (cyclomatic 26) apps/app/scripts/tokenize-colors-codemod.mjs:245— tokenize-colors-codemod.classifyRgba 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.
sticker-panel.StickerButton (cyclomatic 26) apps/app/src/features/chat/stickers/sticker-panel.tsx:3202— sticker-panel.StickerButton has cyclomatic complexity 26 (threshold 15). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
official-service-message-bubble.OfficialServiceMessageBubble (cyclomatic 26) apps/app/src/components/official-service-message-bubble.tsx:10— official-service-message-bubble.OfficialServiceMessageBubble 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.
chat-setting-row.ChatSettingRow (cyclomatic 26) apps/app/src/features/chat-details/chat-setting-row.tsx:17— chat-setting-row.ChatSettingRow has cyclomatic complexity 26 (threshold 15). Of this number, 24 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
voice-picker.VoicePickerModal (cyclomatic 26) apps/app/src/features/contacts/voice-picker.tsx:61— voice-picker.VoicePickerModal has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 5 of the 26 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 304, 197, 92, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
desktop-channels-workspace.ChannelMediaSurface (cyclomatic 26) apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx:1434— desktop-channels-workspace.ChannelMediaSurface has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
subscription-panel.InviteShareCard (cyclomatic 26) apps/app/src/features/subscription/subscription-panel.tsx:117— subscription-panel.InviteShareCard has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 11 of the 26 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 182, 138, 172, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
tags-page.MobileTagsPage (cyclomatic 26) apps/app/src/routes/tags-page.tsx:83— tags-page.MobileTagsPage has cyclomatic complexity 26 (threshold 15). Of this number, 18 points are the body's own statements and 8 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.
MinimaxJobService.advanceVideoJob (cyclomatic 25) api/src/modules/minimax/minimax-job.service.ts:285— MinimaxJobService.advanceVideoJob 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.
VoiceCallsService.createTurn (cyclomatic 25) api/src/modules/chat/voice-calls.service.ts:49— VoiceCallsService.createTurn has cyclomatic complexity 25 (threshold 15). Of this number, 21 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MomentsService.normalizeMomentMediaAsset (cyclomatic 25) api/src/modules/moments/moments.service.ts:2084— MomentsService.normalizeMomentMediaAsset has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
audio-card.AudioCard (cyclomatic 25) apps/app/src/components/audio-card.tsx:38— audio-card.AudioCard has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 12 of the 25 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 85, a function literal at line 97, handleToggle, …). 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.
avatar-encounter-transcript.AvatarEncounterTranscript (cyclomatic 25) apps/app/src/components/avatar-encounter-transcript.tsx:49— avatar-encounter-transcript.AvatarEncounterTranscript has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 12 of the 25 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 155, a function literal at line 72, skipReveal, …). 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.
message-quote-selection-sheet.MessageQuoteSelectionSheet (cyclomatic 25) apps/app/src/features/chat/message-quote-selection-sheet.tsx:18— message-quote-selection-sheet.MessageQuoteSelectionSheet has cyclomatic complexity 25 (threshold 15). Of this number, 16 points are the body's own statements and 9 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.
desktop-note-send-dialog.DesktopNoteSendDialog (cyclomatic 25) apps/app/src/features/desktop/chat/desktop-note-send-dialog.tsx:41— desktop-note-send-dialog.DesktopNoteSendDialog has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 12 of the 25 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 101, 289, 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.
desktop-contacts-friend-requests-pane.DesktopContactsFriendRequestsPane (cyclomatic 25) apps/app/src/features/desktop/contacts/desktop-contacts-friend-requests-pane.tsx:26— desktop-contacts-friend-requests-pane.DesktopContactsFriendRequestsPane has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 11 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 126). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
use-cloud-farm-state.reducer (cyclomatic 25) apps/app/src/features/games/cloud-farm/use-cloud-farm-state.ts:167— use-cloud-farm-state.reducer 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.
desktop-mini-programs-workspace.DesktopMiniProgramsWorkspace (cyclomatic 25) apps/app/src/features/desktop/mini-programs/desktop-mini-programs-workspace.tsx:54— desktop-mini-programs-workspace.DesktopMiniProgramsWorkspace has cyclomatic complexity 25 (threshold 15). Of this number, 21 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
mini-programs-page.MiniProgramsPage (cyclomatic 25) apps/app/src/routes/mini-programs-page.tsx:52— mini-programs-page.MiniProgramsPage has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (mini-programs-page.MiniProgramsPage::handleCopyMiniProgramToMobile) 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.
profile-info-signature-page.ProfileInfoSignaturePage (cyclomatic 25) apps/app/src/routes/profile-info-signature-page.tsx:40— profile-info-signature-page.ProfileInfoSignaturePage has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 12 of the 25 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 200, handleSave, a function literal at line 138, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
profile-info-contact-page.ProfileInfoContactPage (cyclomatic 25) apps/app/src/routes/profile-info-contact-page.tsx:41— profile-info-contact-page.ProfileInfoContactPage has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 11 of the 25 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 210, handleSave, 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.
CloudService.updateWorld (cyclomatic 25) apps/cloud-api/src/cloud/cloud.service.ts:647— CloudService.updateWorld has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
cloud-auth.controller.extractIp (cyclomatic 25) REDACTED:110— cloud-auth.controller.extractIp has cyclomatic complexity 25 (threshold 15). Of this number, 22 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
users-page.UsersPage (cyclomatic 25) apps/cloud-console/src/routes/users-page.tsx:110— users-page.UsersPage has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 11 of the 25 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 143, a function literal at line 382, deviceLabelFormatter, …). 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.
wiki-api.request (cyclomatic 25) apps/wiki/src/lib/wiki-api.ts:48— wiki-api.request 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.
character-edit-form.CharacterEditForm::overlaySnapshotToForm (cyclomatic 25) apps/wiki/src/components/character-edit-form.tsx:575— character-edit-form.CharacterEditForm::overlaySnapshotToForm has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (character-edit-form.CharacterEditForm) 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.
talk-panel.ThreadDetail (cyclomatic 25) apps/wiki/src/components/talk-panel.tsx:192— talk-panel.ThreadDetail has cyclomatic complexity 25 (threshold 15). Of this number, 17 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
AiUsageLedgerService.getDowngradeQuality (cyclomatic 24) api/src/modules/analytics/ai-usage-ledger.service.ts:801— AiUsageLedgerService.getDowngradeQuality has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 10 of the 24 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 930, 947, 958, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
attachment-semantic-text.resolveAttachmentSemanticText (cyclomatic 24) api/src/modules/chat/attachment-semantic-text.ts:159— attachment-semantic-text.resolveAttachmentSemanticText has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ActionRuntimeService.fetchHomeAssistantRegistrySnapshot (cyclomatic 24) REDACTED:3042— ActionRuntimeService.fetchHomeAssistantRegistrySnapshot has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 3098, 3080, 3171, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
SocialService.triggerSceneFriendRequest (cyclomatic 24) api/src/modules/social/social.service.ts:693— SocialService.triggerSceneFriendRequest has cyclomatic complexity 24 (threshold 15). 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ShakeDiscoveryService.collectSignals (cyclomatic 24) api/src/modules/social/shake-discovery.service.ts:781— ShakeDiscoveryService.collectSignals has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 9 of the 24 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 1003, 1018, 1048, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
SchedulerService.tryGenerateMinimaxMomentsThisTick (cyclomatic 24) api/src/modules/scheduler/scheduler.service.ts:1209— SchedulerService.tryGenerateMinimaxMomentsThisTick has cyclomatic complexity 24 (threshold 15). Of this number, 22 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.
SystemService.getStatus (cyclomatic 24) api/src/modules/system/system.service.ts:2576— SystemService.getStatus has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
wiki-private-character-ai.service.mergeDrafts (cyclomatic 24) api/src/modules/wiki/services/wiki-private-character-ai.service.ts:433— wiki-private-character-ai.service.mergeDrafts has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
chat-message-list.VoiceMessage (cyclomatic 24) apps/app/src/components/chat-message-list.tsx:6870— chat-message-list.VoiceMessage has cyclomatic complexity 24 (threshold 15). Of this number, 20 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
desktop-channels-workspace.ChannelVideoPlayer (cyclomatic 24) apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx:1736— desktop-channels-workspace.ChannelVideoPlayer has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 6 of the 24 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 1783, 1824, 1856, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
desktop-channels-workspace.ChannelAuthorOverlay (cyclomatic 24) apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx:2564— desktop-channels-workspace.ChannelAuthorOverlay has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 2714, 2644, 2611, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
tank-war-engine.moveBullets (cyclomatic 24) apps/app/src/features/games/tank-war/tank-war-engine.ts:520— tank-war-engine.moveBullets has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
profile-subscription-page.InviteShareCard (cyclomatic 24) apps/app/src/routes/profile-subscription-page.tsx:129— profile-subscription-page.InviteShareCard has cyclomatic complexity 24 (threshold 15). Of this number, 12 points are the body's own statements and 12 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.
feedbacks-page.FeedbacksPage (cyclomatic 24) apps/cloud-console/src/routes/feedbacks-page.tsx:90— feedbacks-page.FeedbacksPage has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 11 of the 24 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 112, 263, 192, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
configure-ios-project.ensureAppDelegatePushHooks (cyclomatic 24) apps/ios-shell/scripts/configure-ios-project.mjs:610— configure-ios-project.ensureAppDelegatePushHooks 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.
character-page.RevisionCard (cyclomatic 24) apps/wiki/src/routes/character-page.tsx:1017— character-page.RevisionCard has cyclomatic complexity 24 (threshold 15). 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, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
create-character-page.CreateCharacterPage (cyclomatic 24) apps/wiki/src/routes/create-character-page.tsx:38— create-character-page.CreateCharacterPage has cyclomatic complexity 24 (threshold 15). Of this number, 18 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
client.request (cyclomatic 24) REDACTED:485— client.request has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AiOrchestratorService.synthesizeSpeech (cyclomatic 23) api/src/modules/ai/ai-orchestrator.service.ts:4183— AiOrchestratorService.synthesizeSpeech 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. This is NOT this file's highest cyclomatic complexity: AiOrchestratorService.inferMimeTypeFromFileName (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
ReminderRuntimeService.describeSchedule (cyclomatic 23) REDACTED:3058— ReminderRuntimeService.describeSchedule has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
FeedService.scheduleAiChannelsCommentReplies (cyclomatic 23) api/src/modules/feed/feed.service.ts:2736— FeedService.scheduleAiChannelsCommentReplies has cyclomatic complexity 23 (threshold 15). Of this number, 14 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
feed.service.normalizeFeedMediaAsset (cyclomatic 23) api/src/modules/feed/feed.service.ts:5241— feed.service.normalizeFeedMediaAsset has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
GamesService.serializeGameCenterCuration (cyclomatic 23) api/src/modules/games/games.service.ts:1738— GamesService.serializeGameCenterCuration has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 6 of the 23 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 1754, 1765, 1775, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
WechatSyncAdminService.import (cyclomatic 23) api/src/modules/admin/wechat-sync-admin.service.ts:257— WechatSyncAdminService.import 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.
WikiReviewService.revert (cyclomatic 23) api/src/modules/wiki/services/wiki-review.service.ts:419— WikiReviewService.revert has cyclomatic complexity 23 (threshold 15). Of this number, 18 points are the body's own statements and 5 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.
WikiSyncAdminService.applyOne (cyclomatic 23) api/src/modules/admin/wiki-sync-admin.service.ts:300— WikiSyncAdminService.applyOne has cyclomatic complexity 23 (threshold 15). Of this number, 19 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
chat-composer.ChatComposer::handleDesktopInputKeyDown (cyclomatic 23) apps/app/src/components/chat-composer.tsx:3029— chat-composer.ChatComposer::handleDesktopInputKeyDown 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. This shape REPEATS in the file: one other method here (chat-composer.ChatComposer) 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.
message-attachment-semantic.resolveAttachmentSemanticText (cyclomatic 23) apps/app/src/lib/message-attachment-semantic.ts:162— message-attachment-semantic.resolveAttachmentSemanticText 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.
use-cat-inn-state.reducer (cyclomatic 23) apps/app/src/features/games/cat-inn/use-cat-inn-state.ts:126— use-cat-inn-state.reducer 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.
embedded-game-host.EmbeddedGameHost (cyclomatic 23) apps/app/src/features/games/embedded/embedded-game-host.tsx:29— embedded-game-host.EmbeddedGameHost has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 3 of the 23 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 71, 47, 109, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
use-pull-to-refresh.usePullToRefresh (cyclomatic 23) apps/app/src/features/moments/use-pull-to-refresh.ts:68— use-pull-to-refresh.usePullToRefresh has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to 9 function literals inside it that branch (lines 157, 135, 199, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
shop-page.ShopPage (cyclomatic 23) apps/app/src/routes/shop-page.tsx:65— shop-page.ShopPage has cyclomatic complexity 23 (threshold 15). Of this number, 19 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.
group-chat-page.GroupChatPage (cyclomatic 23) apps/app/src/routes/group-chat-page.tsx:30— group-chat-page.GroupChatPage has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 7 of the 23 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 60, a function literal at line 99, navigateToRouteStateReturn, …). 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.
group-message-search-page.MobileGroupMessageSearchPage (cyclomatic 23) apps/app/src/routes/group-message-search-page.tsx:43— group-message-search-page.MobileGroupMessageSearchPage has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 8 of the 23 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 92, 122, 113, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
WorldRuntimeService.handleRuntimeSignal (cyclomatic 23) apps/cloud-api/src/runtime-callbacks/world-runtime.service.ts:114— WorldRuntimeService.handleRuntimeSignal 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.
UsersService.ensureUserByEmail (cyclomatic 23) apps/cloud-api/src/users/users.service.ts:253— UsersService.ensureUserByEmail 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.
server.createConnectorServer (cyclomatic 23) REDACTED:10— server.createConnectorServer has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to one function literal inside it that branches (line 11). 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.
my-drafts-page.MyDraftsPage (cyclomatic 23) apps/wiki/src/routes/my-drafts-page.tsx:28— my-drafts-page.MyDraftsPage has cyclomatic complexity 23 (threshold 15). Of this number, 12 points are the body's own statements and 11 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.
client.normalizeFeedPost (cyclomatic 23) REDACTED:1022— client.normalizeFeedPost has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
app-locale-provider.AppLocaleProvider (cyclomatic 23) packages/i18n/src/runtime/app-locale-provider.tsx:76— app-locale-provider.AppLocaleProvider has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 3 of the 23 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 207, 152, 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.
AiUsageLedgerService.getBudgetExecutionDecision (cyclomatic 22) api/src/modules/analytics/ai-usage-ledger.service.ts:435— AiUsageLedgerService.getBudgetExecutionDecision has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
InferenceService.rebindModelPersonas (cyclomatic 22) api/src/modules/inference/inference.service.ts:2883— InferenceService.rebindModelPersonas has cyclomatic complexity 22 (threshold 15). Of this number, 13 points are the body's own statements and 9 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.
MomentsService.scheduleCharacterInteractions (cyclomatic 22) api/src/modules/moments/moments.service.ts:1135— MomentsService.scheduleCharacterInteractions has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 4 of the 22 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1205, 1177, 1151). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
MomentsService.runNpcAutonomyTick (cyclomatic 22) api/src/modules/moments/moments.service.ts:2573— MomentsService.runNpcAutonomyTick has cyclomatic complexity 22 (threshold 15). Of this number, 17 points are the body's own statements and 5 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.
ParkingWarTickService.maybeFineOrTowPlayerOnNpcHome (cyclomatic 22) api/src/modules/games/parking-war/parking-war-tick.service.ts:245— ParkingWarTickService.maybeFineOrTowPlayerOnNpcHome 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.
tokenize-game-named-codemod.pickToken (cyclomatic 22) apps/app/scripts/tokenize-game-named-codemod.mjs:28— tokenize-game-named-codemod.pickToken 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.
walkthrough-mobile-i18n.buildTextScraper.<returned closure> (cyclomatic 22) apps/app/scripts/walkthrough-mobile-i18n.mjs:56— walkthrough-mobile-i18n.buildTextScraper.<returned closure> has cyclomatic complexity 22 (threshold 15). Of this number, 15 points are the body's own statements and 7 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.
chat-message-list.NoteCardMessage (cyclomatic 22) apps/app/src/components/chat-message-list.tsx:6288— chat-message-list.NoteCardMessage has cyclomatic complexity 22 (threshold 15). 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: 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.
official-article-card.OfficialArticleCard (cyclomatic 22) apps/app/src/components/official-article-card.tsx:10— official-article-card.OfficialArticleCard 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.
desktop-group-member-removal-picker.DesktopGroupMemberRemovalPicker (cyclomatic 22) apps/app/src/features/desktop/chat/desktop-group-member-removal-picker.tsx:32— desktop-group-member-removal-picker.DesktopGroupMemberRemovalPicker has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 8 of the 22 points are its own statements and the rest belongs to 9 function items inside it that branch (handleConfirm, a function literal at line 128, a function literal at line 61, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
use-pixel-arena-state.reducer (cyclomatic 22) apps/app/src/features/games/pixel-arena/use-pixel-arena-state.ts:132— use-pixel-arena-state.reducer 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.
pixel-arena-game.PixelArenaGame (cyclomatic 22) apps/app/src/features/games/pixel-arena/pixel-arena-game.tsx:49— pixel-arena-game.PixelArenaGame has cyclomatic complexity 22 (threshold 15). Of this number, 16 points are the body's own statements and 6 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.
dog-house.DogHouse (cyclomatic 22) apps/app/src/features/games/farm/components/dog-house.tsx:21— dog-house.DogHouse has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
use-search-index.useSearchIndex (cyclomatic 22) apps/app/src/features/search/use-search-index.ts:86— use-search-index.useSearchIndex has cyclomatic complexity 22 (threshold 15). Of this number, 16 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
cyber-avatar-page.MobileCyberAvatarPage (cyclomatic 22) apps/app/src/routes/cyber-avatar-page.tsx:60— cyber-avatar-page.MobileCyberAvatarPage has cyclomatic complexity 22 (threshold 15). Of this number, 16 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.
mobile-notes-page.MobileNotesPage (cyclomatic 22) apps/app/src/routes/mobile-notes-page.tsx:51— mobile-notes-page.MobileNotesPage has cyclomatic complexity 22 (threshold 15). Of this number, 12 points are the body's own statements and 10 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
root-layout.getRouteMeta (cyclomatic 22) apps/cloud-console/src/components/root-layout.tsx:36— root-layout.getRouteMeta has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
YinjieRuntimePlugin.resolveSupportedLocale (cyclomatic 22) apps/ios-shell/plugins/swift-stub/YinjieRuntimePlugin.swift:155— YinjieRuntimePlugin.resolveSupportedLocale 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.
character-behavior-blueprint.service.normalizeBehaviorDefinition (cyclomatic 21) api/src/modules/characters/character-behavior-blueprint.service.ts:186— character-behavior-blueprint.service.normalizeBehaviorDefinition has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, 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.
ActionRuntimeService.buildTicketPlan (cyclomatic 21) REDACTED:1496— ActionRuntimeService.buildTicketPlan 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.
ActionRuntimeService.normalizeLlmPlan (cyclomatic 21) REDACTED:1691— ActionRuntimeService.normalizeLlmPlan has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MinimaxQuotaCloudSyncService.pullOnceInner (cyclomatic 21) api/src/modules/minimax/minimax-quota-cloud-sync.service.ts:183— MinimaxQuotaCloudSyncService.pullOnceInner has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GamesService.updateAdminGameSubmission (cyclomatic 21) api/src/modules/games/games.service.ts:864— GamesService.updateAdminGameSubmission has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AbuseFilterService.evaluatePattern (cyclomatic 21) REDACTED:275— AbuseFilterService.evaluatePattern 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.
WikiReviewService.decide (cyclomatic 21) api/src/modules/wiki/services/wiki-review.service.ts:171— WikiReviewService.decide has cyclomatic complexity 21 (threshold 15). Of this number, 14 points are the body's own statements and 7 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.
mobile-message-reminder-sheet.MobileMessageReminderSheet (cyclomatic 21) apps/app/src/features/chat/mobile-message-reminder-sheet.tsx:26— mobile-message-reminder-sheet.MobileMessageReminderSheet has cyclomatic complexity 21 (threshold 15). Of this number, 11 points are the body's own statements and 10 belong to 6 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
chat-message-list.FeedPostCardMessage (cyclomatic 21) apps/app/src/components/chat-message-list.tsx:6458— chat-message-list.FeedPostCardMessage has cyclomatic complexity 21 (threshold 15). Of this number, 16 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
chat-message-list.GroupCallInviteMessage (cyclomatic 21) apps/app/src/components/chat-message-list.tsx:7423— chat-message-list.GroupCallInviteMessage has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
wechat-action-bubble.WeChatActionBubble (cyclomatic 21) apps/app/src/components/wechat-action-bubble.tsx:37— wechat-action-bubble.WeChatActionBubble has cyclomatic complexity 21 (threshold 15). Of this number, 11 points are the body's own statements and 10 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.
desktop-feed-list.DesktopFeedList (cyclomatic 21) apps/app/src/features/desktop/feed/desktop-feed-list.tsx:72— desktop-feed-list.DesktopFeedList has cyclomatic complexity 21 (threshold 15). Of this number, 16 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
cloud-farm-game.PlotCard (cyclomatic 21) apps/app/src/features/games/cloud-farm/cloud-farm-game.tsx:296— cloud-farm-game.PlotCard 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.
tank-war-engine.processInputForPlayer (cyclomatic 21) apps/app/src/features/games/tank-war/tank-war-engine.ts:430— tank-war-engine.processInputForPlayer has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
tank-war-game.TankWarGame (cyclomatic 21) apps/app/src/features/games/tank-war/tank-war-game.tsx:35— tank-war-game.TankWarGame has cyclomatic complexity 21 (threshold 15). Of this number, 17 points are the body's own statements and 4 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.
farm-mascot.buildMessages (cyclomatic 21) apps/app/src/features/games/farm/components/farm-mascot.tsx:66— farm-mascot.buildMessages has cyclomatic complexity 21 (threshold 15). Of this number, 13 points are the body's own statements and 8 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.
farm-notification-banner.FarmNotificationBanner (cyclomatic 21) apps/app/src/features/games/farm/components/farm-notification-banner.tsx:21— farm-notification-banner.FarmNotificationBanner 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 7 function literals inside it that branch (lines 29, 34, 94, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
mini-programs-page.MiniProgramsPage::handleCopyMiniProgramToMobile (cyclomatic 21) apps/app/src/routes/mini-programs-page.tsx:370— mini-programs-page.MiniProgramsPage::handleCopyMiniProgramToMobile 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. This shape REPEATS in the file: one other method here (mini-programs-page.MiniProgramsPage) 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.
CloudService.syncWorldForRequest (cyclomatic 21) apps/cloud-api/src/cloud/cloud.service.ts:1206— CloudService.syncWorldForRequest has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
UsersService.ensureUser (cyclomatic 21) apps/cloud-api/src/users/users.service.ts:161— UsersService.ensureUser 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.
root-layout.UserMenu (cyclomatic 21) apps/wiki/src/components/root-layout.tsx:543— root-layout.UserMenu 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 5 function items inside it that branch (onMenuKeyDown, a function literal at line 580, a function literal at line 560, …). 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.
auto-capture.buildResourceErrorProps (cyclomatic 21) packages/analytics/src/auto-capture.ts:156— auto-capture.buildResourceErrorProps has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
CyberAvatarService.buildFallbackProfile (cyclomatic 20) api/src/modules/cyber-avatar/cyber-avatar.service.ts:1217— CyberAvatarService.buildFallbackProfile has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
character-blueprint.service.summarizeValue (cyclomatic 20) api/src/modules/characters/character-blueprint.service.ts:609— character-blueprint.service.summarizeValue 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.
RealWorldSyncService.createDigest (cyclomatic 20) REDACTED:2098— RealWorldSyncService.createDigest 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.
scene-matching.scoreCharacterForScene (cyclomatic 20) api/src/modules/social/scene-matching.ts:259— scene-matching.scoreCharacterForScene has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CyberAvatarRealWorldService.runSync (cyclomatic 20) REDACTED:302— CyberAvatarRealWorldService.runSync has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ShakeDiscoveryService.keepSession (cyclomatic 20) api/src/modules/social/shake-discovery.service.ts:560— ShakeDiscoveryService.keepSession 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.
FeedService.runFeedNpcAutonomyTick (cyclomatic 20) api/src/modules/feed/feed.service.ts:2893— FeedService.runFeedNpcAutonomyTick has cyclomatic complexity 20 (threshold 15). Of this number, 18 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.
ParkingWarStateService.tickPlayerHomeOccupancies (cyclomatic 20) api/src/modules/games/parking-war/parking-war-state.service.ts:304— ParkingWarStateService.tickPlayerHomeOccupancies 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.
wechat-sync-admin.service.inferImportedPlatform (cyclomatic 20) api/src/modules/admin/wechat-sync-admin.service.ts:1629— wechat-sync-admin.service.inferImportedPlatform has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SystemService.runSingleEvalDataset (cyclomatic 20) api/src/modules/system/system.service.ts:2230— SystemService.runSingleEvalDataset 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.
tokenize-colors-codemod.classifyHex (cyclomatic 20) apps/app/scripts/tokenize-colors-codemod.mjs:117— tokenize-colors-codemod.classifyHex 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.
message-attachment-semantic.buildAttachmentFallbackLabel (cyclomatic 20) apps/app/src/lib/message-attachment-semantic.ts:283— message-attachment-semantic.buildAttachmentFallbackLabel 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.
desktop-chat-text-edit-dialog.DesktopChatTextEditDialog (cyclomatic 20) apps/app/src/features/desktop/chat/desktop-chat-text-edit-dialog.tsx:22— desktop-chat-text-edit-dialog.DesktopChatTextEditDialog has cyclomatic complexity 20 (threshold 15). Of this number, 10 points are the body's own statements and 10 belong to 6 function items inside it that branch. To reduce it, split the body: 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.
desktop-chat-workspace.ConversationCardLink (cyclomatic 20) apps/app/src/features/desktop/chat/desktop-chat-workspace.tsx:3094— desktop-chat-workspace.ConversationCardLink has cyclomatic complexity 20 (threshold 15). Of this number, 18 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.
desktop-contacts-workspace.DesktopContactsWorkspace (cyclomatic 20) apps/app/src/features/desktop/contacts/desktop-contacts-workspace.tsx:74— desktop-contacts-workspace.DesktopContactsWorkspace has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
management-permissions-detail-screen.ManagementPermissionsDetailScreen (cyclomatic 20) apps/app/src/features/contacts/management/management-permissions-detail-screen.tsx:25— management-permissions-detail-screen.ManagementPermissionsDetailScreen has cyclomatic complexity 20 (threshold 15). Of this number, 11 points are the body's own statements and 9 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
desktop-channels-workspace.ChannelFeedSlide (cyclomatic 20) apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx:1917— desktop-channels-workspace.ChannelFeedSlide has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
desktop-add-friend-result-card.DesktopAddFriendResultCard (cyclomatic 20) apps/app/src/features/desktop/contacts/desktop-add-friend-result-card.tsx:39— desktop-add-friend-result-card.DesktopAddFriendResultCard 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.
parking-war-game.RankTab (cyclomatic 20) apps/app/src/features/games/parking-war/parking-war-game.tsx:1208— parking-war-game.RankTab has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 1235, a function literal at line 1281, a function literal at line 1333, …). 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.
desktop-moments-toolbar.DesktopMomentsToolbar (cyclomatic 20) apps/app/src/features/desktop/moments/desktop-moments-toolbar.tsx:36— desktop-moments-toolbar.DesktopMomentsToolbar has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
welcome-page.WelcomePage (cyclomatic 20) apps/app/src/routes/welcome-page.tsx:397— welcome-page.WelcomePage 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. This shape REPEATS in the file: 3 other methods here (welcome-page.WelcomePage::continueWithCloudWorld, welcome-page.WelcomePage::renderModeFields, welcome-page.WelcomePage::renderEntryStep) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
search-page.SearchPage::applySearchNavigationContext (cyclomatic 20) apps/app/src/routes/search-page.tsx:296— search-page.SearchPage::applySearchNavigationContext has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
mobile-add-friend-page.MobileAddFriendSendSheet (cyclomatic 20) apps/app/src/routes/mobile-add-friend-page.tsx:1136— mobile-add-friend-page.MobileAddFriendSendSheet has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 1162, 1209, 1223, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
capture-app-screenshots.main (cyclomatic 20) apps/site/scripts/capture-app-screenshots.mjs:130— capture-app-screenshots.main has cyclomatic complexity 20 (threshold 15). Of this number, 15 points are the body's own statements and 5 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.
search-page.SearchPage (cyclomatic 20) apps/wiki/src/routes/search-page.tsx:17— search-page.SearchPage has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ai-text-sanitizer.repairTruncatedJson (cyclomatic 19) api/src/modules/ai/ai-text-sanitizer.ts:78— ai-text-sanitizer.repairTruncatedJson 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.
MinimaxClient.requestJson (cyclomatic 19) api/src/modules/minimax/minimax.client.ts:501— MinimaxClient.requestJson 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.
AiOrchestratorService.generateMoment (cyclomatic 19) api/src/modules/ai/ai-orchestrator.service.ts:2817— AiOrchestratorService.generateMoment has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 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. This is NOT this file's highest cyclomatic complexity: AiOrchestratorService.inferMimeTypeFromFileName (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
AiOrchestratorService.generateImage (cyclomatic 19) api/src/modules/ai/ai-orchestrator.service.ts:3816— AiOrchestratorService.generateImage 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. This is NOT this file's highest cyclomatic complexity: AiOrchestratorService.inferMimeTypeFromFileName (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
ReminderRuntimeService.handleConversationTurn (cyclomatic 19) REDACTED:843— ReminderRuntimeService.handleConversationTurn 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.
ReminderRuntimeService.buildPreviewResult (cyclomatic 19) REDACTED:1936— ReminderRuntimeService.buildPreviewResult 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.
DocumentExtractionService.extractFromBuffer (cyclomatic 19) api/src/modules/chat/document-extraction.service.ts:137— DocumentExtractionService.extractFromBuffer 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.
GroupReplyTaskService.mergeArchiveBucket (cyclomatic 19) api/src/modules/chat/group-reply-task.service.ts:758— GroupReplyTaskService.mergeArchiveBucket 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.
MomentsService.generateMomentForCharacter (cyclomatic 19) api/src/modules/moments/moments.service.ts:850— MomentsService.generateMomentForCharacter 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.
SystemService.resolveDigitalHumanConfig (cyclomatic 19) api/src/modules/system/system.service.ts:2478— SystemService.resolveDigitalHumanConfig 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.
WikiPageService.getPageView (cyclomatic 19) api/src/modules/wiki/services/wiki-page.service.ts:144— WikiPageService.getPageView 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.
chat-composer.resolveMimeTypeFromFileName (cyclomatic 19) apps/app/src/components/chat-composer.tsx:6356— chat-composer.resolveMimeTypeFromFileName 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.
request-error.describeRequestError (cyclomatic 19) apps/app/src/lib/request-error.ts:30— request-error.describeRequestError 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.
chat-message-delivery.buildDirectRetryPayload (cyclomatic 19) apps/app/src/features/chat/chat-message-delivery.ts:270— chat-message-delivery.buildDirectRetryPayload 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.
signal-squad-engine.respondToEvent (cyclomatic 19) apps/app/src/features/games/signal-squad/signal-squad-engine.ts:329— signal-squad-engine.respondToEvent 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.
cloud-farm-game.CloudFarmGame (cyclomatic 19) apps/app/src/features/games/cloud-farm/cloud-farm-game.tsx:45— cloud-farm-game.CloudFarmGame has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 117, 276, 203, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
tank-war-engine.tick (cyclomatic 19) apps/app/src/features/games/tank-war/tank-war-engine.ts:912— tank-war-engine.tick has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
desktop-moments-feed.DesktopMomentsFeed (cyclomatic 19) apps/app/src/features/desktop/moments/desktop-moments-feed.tsx:64— desktop-moments-feed.DesktopMomentsFeed has cyclomatic complexity 19 (threshold 15). Of this number, 11 points are the body's own statements and 8 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.
leaderboard-sheet.LeaderboardSheet (cyclomatic 19) apps/app/src/features/games/farm/components/leaderboard-sheet.tsx:20— leaderboard-sheet.LeaderboardSheet has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 87, 24, 26, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
farm-page.FarmPageInner (cyclomatic 19) apps/app/src/features/games/farm/farm-page.tsx:44— farm-page.FarmPageInner has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 55, 85, 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.
mobile-note-send-sheet.MobileNoteSendSheet (cyclomatic 19) apps/app/src/features/notes/mobile-note-send-sheet.tsx:28— mobile-note-send-sheet.MobileNoteSendSheet has cyclomatic complexity 19 (threshold 15). Of this number, 12 points are the body's own statements and 7 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.
use-shake-detector.useShakeDetector (cyclomatic 19) apps/app/src/hooks/use-shake-detector.ts:23— use-shake-detector.useShakeDetector 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 99, 82, 145, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
discover-avatar-encounter-page.ReceivedDetail (cyclomatic 19) apps/app/src/routes/discover-avatar-encounter-page.tsx:628— discover-avatar-encounter-page.ReceivedDetail has cyclomatic complexity 19 (threshold 15). Of this number, 14 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.
audit-desktop-text.readBalancedBraces (cyclomatic 19) REDACTED:121— audit-desktop-text.readBalancedBraces 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.
conflict-resolver.ConflictResolver (cyclomatic 19) apps/wiki/src/components/conflict-resolver.tsx:40— conflict-resolver.ConflictResolver 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 items inside it that branch (a function literal at line 94, a function literal at line 124, commit, …). 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.
my-characters-page.MyCharactersPage (cyclomatic 19) apps/wiki/src/routes/my-characters-page.tsx:26— my-characters-page.MyCharactersPage has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 belong to 5 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
PromptBuilderService.buildMomentSystemPrompt (cyclomatic 18) api/src/modules/ai/prompt-builder.service.ts:936— PromptBuilderService.buildMomentSystemPrompt 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.
InferenceService.runTtsDiagnostic (cyclomatic 18) api/src/modules/inference/inference.service.ts:1915— InferenceService.runTtsDiagnostic has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
attachment-semantic-text.resolveAttachmentSearchableText (cyclomatic 18) api/src/modules/chat/attachment-semantic-text.ts:31— attachment-semantic-text.resolveAttachmentSearchableText 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.
ReminderRuntimeService.extractClock (cyclomatic 18) REDACTED:2828— ReminderRuntimeService.extractClock has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ActionRuntimeService.discoverHomeAssistantConnector (cyclomatic 18) REDACTED:2653— ActionRuntimeService.discoverHomeAssistantConnector has cyclomatic complexity 18 (threshold 15). Of this number, 12 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
OwnerOpenQuestionService.runForCurrentOwner (cyclomatic 18) api/src/modules/cyber-avatar/owner-open-question.service.ts:81— OwnerOpenQuestionService.runForCurrentOwner has cyclomatic complexity 18 (threshold 15). Of this number, 15 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.
FeedPreferenceDigestService.runForCurrentOwner (cyclomatic 18) api/src/modules/cyber-avatar/feed-preference-digest.service.ts:73— FeedPreferenceDigestService.runForCurrentOwner has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MinimaxJobService.advanceMusicJob (cyclomatic 18) api/src/modules/minimax/minimax-job.service.ts:489— MinimaxJobService.advanceMusicJob has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
shake-discovery.service.normalizeGeneratedCharacterDraft (cyclomatic 18) api/src/modules/social/shake-discovery.service.ts:1608— shake-discovery.service.normalizeGeneratedCharacterDraft 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.
MomentsService.scheduleAiCommentReplies (cyclomatic 18) api/src/modules/moments/moments.service.ts:1302— MomentsService.scheduleAiCommentReplies has cyclomatic complexity 18 (threshold 15). Of this number, 12 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MomentsService.ensureMomentImageCaptions (cyclomatic 18) api/src/modules/moments/moments.service.ts:2393— MomentsService.ensureMomentImageCaptions has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SchedulerService.runScheduledJob (cyclomatic 18) api/src/modules/scheduler/scheduler.service.ts:576— SchedulerService.runScheduledJob has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: SchedulerService.executeManualJob (cyclomatic 23) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
SchedulerService.generateMomentForChar (cyclomatic 18) api/src/modules/scheduler/scheduler.service.ts:2052— SchedulerService.generateMomentForChar 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. This is NOT this file's highest cyclomatic complexity: SchedulerService.executeManualJob (cyclomatic 23) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
ReplyLogicAdminService.buildGroupReplyActorDriftSummary (cyclomatic 18) api/src/modules/admin/reply-logic-admin.service.ts:1523— ReplyLogicAdminService.buildGroupReplyActorDriftSummary 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 3 function literals inside it that branch (lines 1568, 1663, 1570). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
SystemService.listEvalComparisons (cyclomatic 18) api/src/modules/system/system.service.ts:3702— SystemService.listEvalComparisons 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 one function literal inside it that branches (line 3710). 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.
WikiAntivandalBotService.evaluate (cyclomatic 18) api/src/modules/wiki/services/wiki-antivandal-bot.service.ts:82— WikiAntivandalBotService.evaluate 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.
wiki-private-character-ai.service.mergeDraftWithUpdates (cyclomatic 18) api/src/modules/wiki/services/wiki-private-character-ai.service.ts:319— wiki-private-character-ai.service.mergeDraftWithUpdates has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
avatar-chip.AvatarChip (cyclomatic 18) apps/app/src/components/avatar-chip.tsx:26— avatar-chip.AvatarChip 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.
chat-message-delivery.buildGroupRetryPayload (cyclomatic 18) apps/app/src/features/chat/chat-message-delivery.ts:376— chat-message-delivery.buildGroupRetryPayload 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.
tab-page-top-bar.TabPageTopBar (cyclomatic 18) apps/app/src/components/tab-page-top-bar.tsx:18— tab-page-top-bar.TabPageTopBar has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
mobile-discover-tool-shell.MobileDiscoverToolShell::handleShare (cyclomatic 18) apps/app/src/components/mobile-discover-tool-shell.tsx:56— mobile-discover-tool-shell.MobileDiscoverToolShell::handleShare has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
official-message-entry-row.OfficialMessageEntryRow (cyclomatic 18) apps/app/src/components/official-message-entry-row.tsx:12— official-message-entry-row.OfficialMessageEntryRow has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
digital-human-stage.DigitalHumanStage (cyclomatic 18) apps/app/src/features/chat/digital-human-stage.tsx:21— digital-human-stage.DigitalHumanStage has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
use-self-camera-preview.useSelfCameraPreview (cyclomatic 18) apps/app/src/features/chat/use-self-camera-preview.ts:19— use-self-camera-preview.useSelfCameraPreview 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 4 function literals inside it that branch (lines 62, 116, 32, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
use-voice-call-session.useVoiceCallSession (cyclomatic 18) apps/app/src/features/chat/use-voice-call-session.ts:29— use-voice-call-session.useVoiceCallSession 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 7 function literals inside it that branch (lines 267, 156, 175, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
desktop-chat-confirm-dialog.DesktopChatConfirmDialog (cyclomatic 18) apps/app/src/features/desktop/chat/desktop-chat-confirm-dialog.tsx:19— desktop-chat-confirm-dialog.DesktopChatConfirmDialog 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 7 function literals inside it that branch (lines 83, 119, 63, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
use-group-voice-call-session.useGroupVoiceCallSession (cyclomatic 18) apps/app/src/features/chat/use-group-voice-call-session.ts:40— use-group-voice-call-session.useGroupVoiceCallSession 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 7 function literals inside it that branch (lines 268, 172, 192, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
desktop-feed-compose-panel.DesktopFeedComposePanel (cyclomatic 18) apps/app/src/features/desktop/feed/desktop-feed-compose-panel.tsx:36— desktop-feed-compose-panel.DesktopFeedComposePanel has cyclomatic complexity 18 (threshold 15). Of this number, 13 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.
checkin-sheet.CheckinSheet (cyclomatic 18) apps/app/src/features/games/farm/components/checkin-sheet.tsx:15— checkin-sheet.CheckinSheet has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
quest-sheet.QuestSheet (cyclomatic 18) apps/app/src/features/games/farm/components/quest-sheet.tsx:13— quest-sheet.QuestSheet has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 95, 19, 22). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
profile-character-import-page.FilePreviewCard (cyclomatic 18) apps/app/src/routes/profile-character-import-page.tsx:503— profile-character-import-page.FilePreviewCard 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.
AdminAuthService.buildSessionSourceGroupSummaries (cyclomatic 18) apps/cloud-api/src/auth/admin-auth.service.ts:908— AdminAuthService.buildSessionSourceGroupSummaries has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
world-api-ws-proxy.setupWorldApiWsProxy (cyclomatic 18) apps/cloud-api/src/world-api-proxy/world-api-ws-proxy.ts:73— world-api-ws-proxy.setupWorldApiWsProxy 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 6 function literals inside it that branch (lines 88, 128, 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.
admin-sessions-route-search.buildAdminSessionsPermalink (cyclomatic 18) apps/cloud-console/src/lib/admin-sessions-route-search.ts:311— admin-sessions-route-search.buildAdminSessionsPermalink 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.
waiting-session-sync-page.buildWaitingSessionSyncContextGroups (cyclomatic 18) apps/cloud-console/src/routes/waiting-session-sync-page.tsx:221— waiting-session-sync-page.buildWaitingSessionSyncContextGroups has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
configure-ios-project.ensurePluginTargetMembership (cyclomatic 18) apps/ios-shell/scripts/configure-ios-project.mjs:996— configure-ios-project.ensurePluginTargetMembership 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.
contracts-bridge.attachContractsBridge (cyclomatic 18) packages/analytics/src/contracts-bridge.ts:19— contracts-bridge.attachContractsBridge 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 one function literal inside it that branches (line 35). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
WorldLanguageService.formatPostCommentTask (cyclomatic 17) api/src/modules/config/world-language.service.ts:144— WorldLanguageService.formatPostCommentTask 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 one function literal inside it that branches (line 151). 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.
AiOrchestratorService.requestReplyFromProvider (cyclomatic 17) api/src/modules/ai/ai-orchestrator.service.ts:1604— AiOrchestratorService.requestReplyFromProvider 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, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: AiOrchestratorService.inferMimeTypeFromFileName (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
AiOrchestratorService.generateReply (cyclomatic 17) api/src/modules/ai/ai-orchestrator.service.ts:2594— AiOrchestratorService.generateReply has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: AiOrchestratorService.inferMimeTypeFromFileName (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
AiOrchestratorService.transcribeAudio (cyclomatic 17) api/src/modules/ai/ai-orchestrator.service.ts:3995— AiOrchestratorService.transcribeAudio has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: AiOrchestratorService.inferMimeTypeFromFileName (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
ReminderRuntimeService.getMomentCommentNudgeTemplates (cyclomatic 17) REDACTED:3258— ReminderRuntimeService.getMomentCommentNudgeTemplates 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.
ChatService.normalizeOutgoingMessageInput (cyclomatic 17) api/src/modules/chat/chat.service.ts:2557— ChatService.normalizeOutgoingMessageInput 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.
SocialService.bulkFriendshipAction (cyclomatic 17) api/src/modules/social/social.service.ts:1526— SocialService.bulkFriendshipAction 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.
FeedService.viewOwnerPost (cyclomatic 17) api/src/modules/feed/feed.service.ts:1759— FeedService.viewOwnerPost 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.
FeedService.isPostMediaPlayable (cyclomatic 17) api/src/modules/feed/feed.service.ts:3865— FeedService.isPostMediaPlayable has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 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.
FeedService.getVisibleFeedPosts (cyclomatic 17) api/src/modules/feed/feed.service.ts:3996— FeedService.getVisibleFeedPosts has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 4052, 4028). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
FeedService.normalizeCreatePostInput (cyclomatic 17) api/src/modules/feed/feed.service.ts:4419— FeedService.normalizeCreatePostInput has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MomentsService.backfillMomentAuthorAvatars (cyclomatic 17) api/src/modules/moments/moments.service.ts:1918— MomentsService.backfillMomentAuthorAvatars has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 4 function items inside it that branch (resolveAvatar, a function literal at line 1951, a function literal at line 1965, …). 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.
CharacterVideoPullClient.backfillOnce (cyclomatic 17) REDACTED:38— CharacterVideoPullClient.backfillOnce 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.
ReplyLogicAdminService.classifyGroupReplyActorDrift (cyclomatic 17) api/src/modules/admin/reply-logic-admin.service.ts:1680— ReplyLogicAdminService.classifyGroupReplyActorDrift 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.
push-token-sync.syncNativePushTokenCore (cyclomatic 17) apps/app/src/runtime/push-token-sync.ts:113— push-token-sync.syncNativePushTokenCore has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
chat-message-list.DirectCallInviteMessage (cyclomatic 17) apps/app/src/components/chat-message-list.tsx:7633— chat-message-list.DirectCallInviteMessage has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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.
mobile-document-shell.MobileDocumentShell::handleShareDocument (cyclomatic 17) apps/app/src/components/mobile-document-shell.tsx:57— mobile-document-shell.MobileDocumentShell::handleShareDocument 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.
mobile-shell.MobileShell (cyclomatic 17) apps/app/src/components/mobile-shell.tsx:40— mobile-shell.MobileShell has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 167, 91, 81, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
desktop-mobile-official-handoff-route-state.parseDesktopMobileOfficialHandoffHash (cyclomatic 17) apps/app/src/features/desktop/official-accounts/desktop-mobile-official-handoff-route-state.ts:40— desktop-mobile-official-handoff-route-state.parseDesktopMobileOfficialHandoffHash 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.
desktop-create-group-dialog.DesktopCreateGroupDialog::handleDialogKeyDown (cyclomatic 17) apps/app/src/features/desktop/chat/desktop-create-group-dialog.tsx:560— desktop-create-group-dialog.DesktopCreateGroupDialog::handleDialogKeyDown has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (desktop-create-group-dialog.DesktopCreateGroupDialog) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
add-friend-search.matchCharacter (cyclomatic 17) apps/app/src/features/contacts/add-friend-search.ts:137— add-friend-search.matchCharacter 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.
desktop-add-friend-workspace.matchCharacter (cyclomatic 17) apps/app/src/features/desktop/contacts/desktop-add-friend-workspace.tsx:1018— desktop-add-friend-workspace.matchCharacter 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.
parking-war-game.ParkingWarGame (cyclomatic 17) apps/app/src/features/games/parking-war/parking-war-game.tsx:85— parking-war-game.ParkingWarGame has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
night-market-game.NightMarketGame (cyclomatic 17) apps/app/src/features/games/night-market/night-market-game.tsx:53— night-market-game.NightMarketGame has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 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.
pixel-arena-data.resolveMoves (cyclomatic 17) apps/app/src/features/games/pixel-arena/pixel-arena-data.ts:98— pixel-arena-data.resolveMoves 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.
pixel-arena-data.pickNpcMove (cyclomatic 17) apps/app/src/features/games/pixel-arena/pixel-arena-data.ts:159— pixel-arena-data.pickNpcMove 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.
desktop-moment-compose-panel.DesktopMomentComposePanel (cyclomatic 17) apps/app/src/features/desktop/moments/desktop-moment-compose-panel.tsx:36— desktop-moment-compose-panel.DesktopMomentComposePanel has cyclomatic complexity 17 (threshold 15). Of this number, 13 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.
mobile-favorites-page.FavoriteRow (cyclomatic 17) apps/app/src/routes/mobile-favorites-page.tsx:520— mobile-favorites-page.FavoriteRow has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to 4 function items inside it that branch. To reduce it, 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.
desktop-chat-image-viewer-page.resolveChatImageViewerReturnPath (cyclomatic 17) apps/app/src/routes/desktop-chat-image-viewer-page.tsx:694— desktop-chat-image-viewer-page.resolveChatImageViewerReturnPath 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.
profile-character-import-page.ProfileCharacterImportPage::readFile (cyclomatic 17) apps/app/src/routes/profile-character-import-page.tsx:86— profile-character-import-page.ProfileCharacterImportPage::readFile has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
group-announcement-page.MobileGroupAnnouncementPage::handleShareAnnouncement (cyclomatic 17) apps/app/src/routes/group-announcement-page.tsx:224— group-announcement-page.MobileGroupAnnouncementPage::handleShareAnnouncement has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (group-announcement-page.MobileGroupAnnouncementPage) 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.
LocalProcessComputeProviderService.syncProviderMinimaxKey (cyclomatic 17) apps/cloud-api/src/orchestration/local-process-compute-provider.service.ts:571— LocalProcessComputeProviderService.syncProviderMinimaxKey has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, 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.
UsersService.listUsersAdmin (cyclomatic 17) apps/cloud-api/src/users/users.service.ts:432— UsersService.listUsersAdmin has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
admin-sessions-route-search.buildCompactAdminSessionsRouteSearch (cyclomatic 17) apps/cloud-console/src/lib/admin-sessions-route-search.ts:237— admin-sessions-route-search.buildCompactAdminSessionsRouteSearch has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
revenue-sharing-page.RevenueSharingPage (cyclomatic 17) apps/cloud-console/src/routes/revenue-sharing-page.tsx:120— revenue-sharing-page.RevenueSharingPage has cyclomatic complexity 17 (threshold 15). Of this number, 10 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.
feedbacks-page.FeedbackDetailPanel (cyclomatic 17) apps/cloud-console/src/routes/feedbacks-page.tsx:440— feedbacks-page.FeedbackDetailPanel has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
login-page.EmailCodeForm (cyclomatic 17) apps/wiki/src/routes/login-page.tsx:173— login-page.EmailCodeForm has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 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.
admin-blocks-page.AdminBlocksPage (cyclomatic 17) apps/wiki/src/routes/admin-blocks-page.tsx:32— admin-blocks-page.AdminBlocksPage has cyclomatic complexity 17 (threshold 15). Of this number, 13 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.
client.normalizeAttachmentAssetUrl (cyclomatic 17) REDACTED:719— client.normalizeAttachmentAssetUrl 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.
InferenceService.runAudioInputDiagnostic (cyclomatic 16) api/src/modules/inference/inference.service.ts:1708— InferenceService.runAudioInputDiagnostic 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.
RealWorldSyncService.enrichFeedEntry (cyclomatic 16) REDACTED:1632— RealWorldSyncService.enrichFeedEntry 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.
ReminderRuntimeService.parseCreateIntent (cyclomatic 16) REDACTED:2479— ReminderRuntimeService.parseCreateIntent 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.
chat-attachment-file.utils.guessChatAttachmentExtension (cyclomatic 16) api/src/modules/chat/chat-attachment-file.utils.ts:12— chat-attachment-file.utils.guessChatAttachmentExtension 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.
SocialService.ensureDefaultFriendships (cyclomatic 16) api/src/modules/social/social.service.ts:569— SocialService.ensureDefaultFriendships 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.
FarmStateService.stealFromNpc (cyclomatic 16) api/src/modules/games/farm/farm-state.service.ts:521— FarmStateService.stealFromNpc has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FarmStateService.giftItemToNeighbor (cyclomatic 16) api/src/modules/games/farm/farm-state.service.ts:1212— FarmStateService.giftItemToNeighbor 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.
WikiWatchlistService.feed (cyclomatic 16) api/src/modules/wiki/services/wiki-watchlist.service.ts:135— WikiWatchlistService.feed has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, 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.
WikiPrivateCharacterAiService.runJobInBackground (cyclomatic 16) api/src/modules/wiki/services/wiki-private-character-ai.service.ts:237— WikiPrivateCharacterAiService.runJobInBackground 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.
WikiCharacterVideoPublishSyncService.publish (cyclomatic 16) api/src/modules/wiki/services/wiki-character-video-publish-sync.service.ts:26— WikiCharacterVideoPublishSyncService.publish 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.
use-speech-input.useSpeechInput (cyclomatic 16) apps/app/src/features/chat/use-speech-input.ts:233— use-speech-input.useSpeechInput has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
sticker-panel.StickerPanel::handleSearchInputKeyDown (cyclomatic 16) apps/app/src/features/chat/stickers/sticker-panel.tsx:1613— sticker-panel.StickerPanel::handleSearchInputKeyDown has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (sticker-panel.StickerPanel) 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.
message-attachment-semantic.resolveAttachmentSearchableText (cyclomatic 16) apps/app/src/lib/message-attachment-semantic.ts:38— message-attachment-semantic.resolveAttachmentSearchableText 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.
note-drafts-storage.normalizeDesktopNoteDraftRecord (cyclomatic 16) apps/app/src/features/favorites/note-drafts-storage.ts:52— note-drafts-storage.normalizeDesktopNoteDraftRecord has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
desktop-chat-route-state.buildDesktopChatRouteHash (cyclomatic 16) apps/app/src/features/desktop/chat/desktop-chat-route-state.ts:84— desktop-chat-route-state.buildDesktopChatRouteHash 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.
chat-message-list.ContactCardMessage (cyclomatic 16) apps/app/src/components/chat-message-list.tsx:6172— chat-message-list.ContactCardMessage has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
desktop-contact-text-edit-dialog.DesktopContactTextEditDialog (cyclomatic 16) apps/app/src/features/contacts/desktop-contact-text-edit-dialog.tsx:24— desktop-contact-text-edit-dialog.DesktopContactTextEditDialog 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 6 function literals inside it that branch (lines 70, 91, 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.
desktop-chat-details-panel.DesktopWechatGroupRow (cyclomatic 16) apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:2247— desktop-chat-details-panel.DesktopWechatGroupRow has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
management-blacklist-screen.ManagementBlacklistScreen (cyclomatic 16) apps/app/src/features/contacts/management/management-blacklist-screen.tsx:15— management-blacklist-screen.ManagementBlacklistScreen has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
cyber-avatar-report-sheet.CyberAvatarReportSheet (cyclomatic 16) apps/app/src/features/cyber-avatar/cyber-avatar-report-sheet.tsx:25— cyber-avatar-report-sheet.CyberAvatarReportSheet 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.
desktop-add-friend-send-dialog.DesktopAddFriendSendDialog (cyclomatic 16) apps/app/src/features/desktop/contacts/desktop-add-friend-send-dialog.tsx:19— desktop-add-friend-send-dialog.DesktopAddFriendSendDialog 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 4 function literals inside it that branch (lines 54, 33, 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.
checkout-contact-dialog.CheckoutContactDialog (cyclomatic 16) apps/app/src/features/subscription/checkout-contact-dialog.tsx:83— checkout-contact-dialog.CheckoutContactDialog has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 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.
channels-page.MobileChannelMediaSurface (cyclomatic 16) apps/app/src/routes/channels-page.tsx:2930— channels-page.MobileChannelMediaSurface 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.
channels-page.MediaProgressBar (cyclomatic 16) apps/app/src/routes/channels-page.tsx:3066— channels-page.MediaProgressBar 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 items inside it that branch (handlePointerEnd, a function literal at line 3082, computeRatio, …). 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.
games-page.GamesPage::handleCopyGameToMobile (cyclomatic 16) apps/app/src/routes/games-page.tsx:426— games-page.GamesPage::handleCopyGameToMobile has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (games-page.GamesPage) 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.
chat-message-search-page.MobileChatMessageSearchPage (cyclomatic 16) apps/app/src/routes/chat-message-search-page.tsx:40— chat-message-search-page.MobileChatMessageSearchPage has cyclomatic complexity 16 (threshold 15). Of this number, 8 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.
ip-region.classifyLocalIp (cyclomatic 16) apps/cloud-console/src/lib/ip-region.ts:14— ip-region.classifyLocalIp 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.
invite-audit-page.InviteAuditPage (cyclomatic 16) apps/cloud-console/src/routes/invite-audit-page.tsx:16— invite-audit-page.InviteAuditPage 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 80, 115, 24). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
pending-reviews-page.PendingReviewsPage (cyclomatic 16) apps/wiki/src/routes/pending-reviews-page.tsx:33— pending-reviews-page.PendingReviewsPage has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
No assertions: self-heals legacy desktop paths into desktop workspace protocols apps/app/tests/desktop.desktop.browser.spec.ts:64— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
sticker-panel.StickerPanel (cognitive 677) apps/app/src/features/chat/stickers/sticker-panel.tsx:73— sticker-panel.StickerPanel has cognitive complexity 677 (threshold 15). Drivers by points: ternaries 286 (683 pts), boolean chains 122, if/else 95 (108 pts), loops 1 (nesting depth added 410). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (sticker-panel.StickerPanel::handleSearchInputKeyDown) 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.
contacts-page.ContactsPage (cognitive 517) apps/app/src/routes/contacts-page.tsx:295— contacts-page.ContactsPage has cognitive complexity 517 (threshold 15). Drivers by points: ternaries 115 (288 pts), if/else 101 (150 pts), boolean chains 65, loops 10 (14 pts) (nesting depth added 226). Of this number, 224 points are the body's own statements and 293 belong to 83 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
dom-text-localizer.translateKnownPattern (cognitive 445) REDACTED:199— dom-text-localizer.translateKnownPattern has cognitive complexity 445 (threshold 15). Drivers by points: if/else 242 (399 pts), ternaries 17 (39 pts), boolean chains 6, loops 1 (nesting depth added 179). Of this number, 439 points are the body's own statements and 6 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.
character-detail-page.CharacterDetailPage (cognitive 372) apps/app/src/routes/character-detail-page.tsx:134— character-detail-page.CharacterDetailPage has cognitive complexity 372 (threshold 15). Drivers by points: ternaries 159 (355 pts), boolean chains 75, if/else 44 (57 pts), error handling 1 (nesting depth added 209). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (character-detail-page.CharacterDetailPage::handleShareCharacterCard) 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.
desktop-chat-workspace.DesktopChatWorkspace (cognitive 357) apps/app/src/features/desktop/chat/desktop-chat-workspace.tsx:222— desktop-chat-workspace.DesktopChatWorkspace has cognitive complexity 357 (threshold 15). Drivers by points: ternaries 90 (227 pts), if/else 79 (82 pts), boolean chains 43, match/switch 3 (4 pts), error handling 1 (nesting depth added 141). Of this number, 127 points are the body's own statements and 230 belong to 61 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.
channels-page.ChannelsPage (cognitive 320) apps/app/src/routes/channels-page.tsx:107— channels-page.ChannelsPage has cognitive complexity 320 (threshold 15). Drivers by points: if/else 123 (152 pts), ternaries 77 (111 pts), boolean chains 54, error handling 2 (3 pts) (nesting depth added 64). Of this number, 84 points are the body's own statements and 236 belong to 100 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.
moments-page.MomentsPage (cognitive 286) apps/app/src/routes/moments-page.tsx:117— moments-page.MomentsPage has cognitive complexity 286 (threshold 15). Drivers by points: if/else 97 (117 pts), ternaries 66 (104 pts), boolean chains 53, error handling 9, loops 2 (3 pts) (nesting depth added 59). Of this number, 55 points are the body's own statements and 231 belong to 88 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.
chat-list-page.MobileChatListPage (cognitive 247) apps/app/src/routes/chat-list-page.tsx:228— chat-list-page.MobileChatListPage has cognitive complexity 247 (threshold 15). Drivers by points: ternaries 69 (129 pts), if/else 53 (67 pts), boolean chains 43, error handling 3 (4 pts), loops 4 (nesting depth added 75). Of this number, 38 points are the body's own statements and 209 belong to 55 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.
desktop-search-workspace.DesktopSearchWorkspace (cognitive 235) apps/app/src/features/search/desktop-search-workspace.tsx:145— desktop-search-workspace.DesktopSearchWorkspace has cognitive complexity 235 (threshold 15). Drivers by points: if/else 84 (111 pts), ternaries 60 (100 pts), boolean chains 23, loops 1 (nesting depth added 67). Of this number, 52 points are the body's own statements and 183 belong to 36 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.
admin-sessions-page.AdminSessionsPage (cognitive 229) apps/cloud-console/src/routes/admin-sessions-page.tsx:1110— admin-sessions-page.AdminSessionsPage has cognitive complexity 229 (threshold 15). Drivers by points: ternaries 77 (142 pts), boolean chains 57, if/else 29, loops 1 (nesting depth added 65). Of this number, 88 points are the body's own statements and 141 belong to 41 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.
desktop-official-accounts-workspace.DesktopOfficialAccountsWorkspace (cognitive 204) apps/app/src/features/desktop/official-accounts/desktop-official-accounts-workspace.tsx:56— desktop-official-accounts-workspace.DesktopOfficialAccountsWorkspace has cognitive complexity 204 (threshold 15). Drivers by points: ternaries 56 (139 pts), if/else 32 (36 pts), boolean chains 27, loops 2 (nesting depth added 87). Of this number, 141 points are the body's own statements and 63 belong to 26 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
chat-composer.DesktopScreenshotEditor (cognitive 192) apps/app/src/components/chat-composer.tsx:4506— chat-composer.DesktopScreenshotEditor has cognitive complexity 192 (threshold 15). Drivers by points: ternaries 66 (98 pts), if/else 48 (51 pts), boolean chains 43 (nesting depth added 35). Of this number, 75 points are the body's own statements and 117 belong to 30 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.
conversation-thread-panel.ConversationThreadPanel (cognitive 185) apps/app/src/features/chat/conversation-thread-panel.tsx:95— conversation-thread-panel.ConversationThreadPanel has cognitive complexity 185 (threshold 15). Drivers by points: ternaries 64 (109 pts), if/else 31 (40 pts), boolean chains 31, error handling 4, loops 1 (nesting depth added 54). Of this number, 103 points are the body's own statements and 82 belong to 29 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.
mobile-friend-moments-page.MobileFriendMomentsPage (cognitive 183) apps/app/src/routes/mobile-friend-moments-page.tsx:61— mobile-friend-moments-page.MobileFriendMomentsPage has cognitive complexity 183 (threshold 15). Drivers by points: ternaries 47 (68 pts), if/else 56 (67 pts), boolean chains 41, error handling 4 (7 pts) (nesting depth added 35). Of this number, 71 points are the body's own statements and 112 belong to 42 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.
profile-moments-page.ProfileMomentsPage (cognitive 168) apps/app/src/routes/profile-moments-page.tsx:95— profile-moments-page.ProfileMomentsPage has cognitive complexity 168 (threshold 15). Drivers by points: ternaries 49 (74 pts), if/else 53 (64 pts), boolean chains 26, error handling 2 (4 pts) (nesting depth added 38). Of this number, 54 points are the body's own statements and 114 belong to 59 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.
group-chat-details-page.MobileGroupChatDetailsPage (cognitive 166) apps/app/src/routes/group-chat-details-page.tsx:63— group-chat-details-page.MobileGroupChatDetailsPage has cognitive complexity 166 (threshold 15). Drivers by points: ternaries 58 (114 pts), boolean chains 29, if/else 20 (23 pts) (nesting depth added 59). Of this number, 71 points are the body's own statements and 95 belong to 37 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.
desktop-create-group-dialog.DesktopCreateGroupDialog (cognitive 164) apps/app/src/features/desktop/chat/desktop-create-group-dialog.tsx:53— desktop-create-group-dialog.DesktopCreateGroupDialog has cognitive complexity 164 (threshold 15). Drivers by points: ternaries 50 (79 pts), if/else 51 (57 pts), boolean chains 28 (nesting depth added 35). Of this number, 52 points are the body's own statements and 112 belong to 37 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.
desktop-chat-details-panel.GroupChatDetailsPanel (cognitive 164) apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:1163— desktop-chat-details-panel.GroupChatDetailsPanel has cognitive complexity 164 (threshold 15). Drivers by points: ternaries 44 (94 pts), boolean chains 42, if/else 28 (nesting depth added 50). Of this number, 54 points are the body's own statements and 110 belong to 22 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.
chat-composer.ChatComposer (cognitive 159) apps/app/src/components/chat-composer.tsx:304— chat-composer.ChatComposer has cognitive complexity 159 (threshold 15). Drivers by points: if/else 244 (268 pts), ternaries 115 (214 pts), boolean chains 136, error handling 11 (12 pts), loops 4 (6 pts) (nesting depth added 126). To reduce it, split the body into named stages: move each independent 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 (chat-composer.ChatComposer::handleDesktopInputKeyDown) 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.
mobile-ai-call-screen.MobileAiCallScreen (cognitive 151) apps/app/src/features/chat/mobile-ai-call-screen.tsx:76— mobile-ai-call-screen.MobileAiCallScreen has cognitive complexity 151 (threshold 15). Drivers by points: ternaries 43 (89 pts), if/else 35 (36 pts), boolean chains 25, match/switch 1 (nesting depth added 47). Of this number, 109 points are the body's own statements and 42 belong to 16 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.
waiting-session-sync-page.WaitingSessionSyncPage (cognitive 148) apps/cloud-console/src/routes/waiting-session-sync-page.tsx:315— waiting-session-sync-page.WaitingSessionSyncPage has cognitive complexity 148 (threshold 15). Drivers by points: ternaries 52 (115 pts), boolean chains 23, if/else 10 (nesting depth added 63). Of this number, 60 points are the body's own statements and 88 belong to 26 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
mobile-group-call-screen.MobileGroupCallScreen (cognitive 147) apps/app/src/features/chat/mobile-group-call-screen.tsx:67— mobile-group-call-screen.MobileGroupCallScreen has cognitive complexity 147 (threshold 15). Drivers by points: ternaries 38 (68 pts), if/else 37 (41 pts), boolean chains 34, error handling 2, loops 2 (nesting depth added 34). Of this number, 89 points are the body's own statements and 58 belong to 22 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.
official-article-viewer.OfficialArticleViewer (cognitive 146) REDACTED:19— official-article-viewer.OfficialArticleViewer has cognitive complexity 146 (threshold 15). Drivers by points: ternaries 68 (128 pts), if/else 10, boolean chains 7, error handling 1 (nesting depth added 60). Of this number, 105 points are the body's own statements and 41 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.
desktop-mobile-page.DesktopMobilePage (cognitive 146) apps/app/src/routes/desktop-mobile-page.tsx:184— desktop-mobile-page.DesktopMobilePage has cognitive complexity 146 (threshold 15). Drivers by points: ternaries 59 (88 pts), if/else 30 (32 pts), boolean chains 26 (nesting depth added 31). Of this number, 87 points are the body's own statements and 59 belong to 26 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
chat-message-list.ChatMessageList (cognitive 145) apps/app/src/components/chat-message-list.tsx:355— chat-message-list.ChatMessageList has cognitive complexity 145 (threshold 15). Drivers by points: ternaries 233 (639 pts), if/else 173 (228 pts), boolean chains 132, error handling 14 (22 pts), loops 10 (15 pts) (nesting depth added 474). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: 5 other methods here (chat-message-list.ChatMessageList::speakMessage, chat-message-list.ChatMessageList::openAttachment, chat-message-list.ChatMessageList::handleFavoriteSelectedMessages, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 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.
desktop-direct-call-panel.DesktopDirectCallPanel (cognitive 143) apps/app/src/features/desktop/chat/desktop-direct-call-panel.tsx:53— desktop-direct-call-panel.DesktopDirectCallPanel has cognitive complexity 143 (threshold 15). Drivers by points: ternaries 49 (68 pts), if/else 36 (38 pts), boolean chains 36, error handling 1 (nesting depth added 21). Of this number, 62 points are the body's own statements and 81 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.
profile-settings-desktop.ProfileSettingsDesktop (cognitive 142) apps/app/src/routes/profile-settings-desktop.tsx:155— profile-settings-desktop.ProfileSettingsDesktop has cognitive complexity 142 (threshold 15). Drivers by points: ternaries 52 (100 pts), boolean chains 24, if/else 15 (16 pts), error handling 1 (2 pts) (nesting depth added 50). Of this number, 102 points are the body's own statements and 40 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.
desktop-chat-details-panel.DirectChatDetailsPanel (cognitive 140) apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:177— desktop-chat-details-panel.DirectChatDetailsPanel has cognitive complexity 140 (threshold 15). Drivers by points: ternaries 46 (73 pts), boolean chains 40, if/else 20 (26 pts), error handling 1 (nesting depth added 33). Of this number, 99 points are the body's own statements and 41 belong to 24 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
desktop-search-launcher.DesktopSearchDropdownPanel (cognitive 139) apps/app/src/features/search/desktop-search-launcher.tsx:324— desktop-search-launcher.DesktopSearchDropdownPanel has cognitive complexity 139 (threshold 15). Drivers by points: ternaries 25 (60 pts), if/else 39 (56 pts), boolean chains 19, loops 4 (nesting depth added 52). Of this number, 51 points are the body's own statements and 88 belong to 21 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.
discover-page.DesktopDiscoverWorkspace (cognitive 136) apps/app/src/routes/discover-page.tsx:275— discover-page.DesktopDiscoverWorkspace has cognitive complexity 136 (threshold 15). Drivers by points: ternaries 56 (79 pts), boolean chains 34, if/else 19 (20 pts), error handling 3 (nesting depth added 24). Of this number, 55 points are the body's own statements and 81 belong to 31 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
chat-details-page.MobileChatDetailsPage (cognitive 136) apps/app/src/routes/chat-details-page.tsx:92— chat-details-page.MobileChatDetailsPage has cognitive complexity 136 (threshold 15). Drivers by points: ternaries 91 (161 pts), boolean chains 49, if/else 38 (46 pts), error handling 1 (nesting depth added 78). To reduce it, split the body into named stages: move each independent 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 (chat-details-page.MobileChatDetailsPage::handleShareContact) 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.
mobile-chat-plus-panel.MobileChatPlusPanel (cognitive 135) apps/app/src/components/mobile-chat-plus-panel.tsx:216— mobile-chat-plus-panel.MobileChatPlusPanel has cognitive complexity 135 (threshold 15). Drivers by points: ternaries 43 (104 pts), boolean chains 17, if/else 9 (12 pts), match/switch 1 (2 pts) (nesting depth added 65). Of this number, 46 points are the body's own statements and 89 belong to 14 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.
moment-media-gallery.MomentMediaGalleryInner (cognitive 131) apps/app/src/components/moment-media-gallery.tsx:69— moment-media-gallery.MomentMediaGalleryInner has cognitive complexity 131 (threshold 15). Drivers by points: ternaries 39 (87 pts), if/else 17 (23 pts), boolean chains 21 (nesting depth added 54). Of this number, 86 points are the body's own statements and 45 belong to 13 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.
official-account-service-thread.OfficialAccountServiceThread (cognitive 131) apps/app/src/features/official-accounts/service/official-account-service-thread.tsx:37— official-account-service-thread.OfficialAccountServiceThread has cognitive complexity 131 (threshold 15). Drivers by points: ternaries 40 (83 pts), boolean chains 26, if/else 20 (22 pts) (nesting depth added 45). Of this number, 99 points are the body's own statements and 32 belong to 15 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.
desktop-shell.DesktopShell (cognitive 124) apps/app/src/features/shell/desktop-shell.tsx:52— desktop-shell.DesktopShell has cognitive complexity 124 (threshold 15). Drivers by points: ternaries 36 (61 pts), if/else 37 (45 pts), boolean chains 16, error handling 2 (nesting depth added 33). Of this number, 63 points are the body's own statements and 61 belong to 27 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.
favorites-page.DesktopFavoritesPage (cognitive 124) apps/app/src/routes/favorites-page.tsx:100— favorites-page.DesktopFavoritesPage has cognitive complexity 124 (threshold 15). Drivers by points: ternaries 34 (73 pts), if/else 22 (27 pts), boolean chains 22, loops 2 (nesting depth added 44). Of this number, 73 points are the body's own statements and 51 belong to 25 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.
channels-page.MobileChannelCommentsSheet (cognitive 123) apps/app/src/routes/channels-page.tsx:4869— channels-page.MobileChannelCommentsSheet has cognitive complexity 123 (threshold 15). Drivers by points: if/else 48 (62 pts), ternaries 19 (28 pts), boolean chains 27, loops 4 (6 pts) (nesting depth added 25). Of this number, 32 points are the body's own statements and 91 belong to 32 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.
CharactersService.importPersonalCharacter (cognitive 121) api/src/modules/characters/characters.service.ts:586— CharactersService.importPersonalCharacter has cognitive complexity 121 (threshold 15). Drivers by points: if/else 61 (97 pts), boolean chains 12, loops 4 (11 pts), ternaries 1 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SystemService.evaluateLegacyEvalOutput (cognitive 121) api/src/modules/system/system.service.ts:1596— SystemService.evaluateLegacyEvalOutput has cognitive complexity 121 (threshold 15). Drivers by points: if/else 43 (78 pts), boolean chains 33, ternaries 6 (7 pts), loops 2, match/switch 1 (nesting depth added 36). Of this number, 104 points are the body's own statements and 17 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.
desktop-message-avatar-popover.DesktopMessageAvatarPopover (cognitive 119) apps/app/src/features/desktop/chat/desktop-message-avatar-popover.tsx:72— desktop-message-avatar-popover.DesktopMessageAvatarPopover has cognitive complexity 119 (threshold 15). Drivers by points: ternaries 44 (65 pts), boolean chains 38, if/else 15 (16 pts) (nesting depth added 22). Of this number, 98 points are the body's own statements and 21 belong to 15 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.
friend-moments-page.FriendMomentsPage (cognitive 118) apps/app/src/routes/friend-moments-page.tsx:89— friend-moments-page.FriendMomentsPage has cognitive complexity 118 (threshold 15). Drivers by points: if/else 45 (47 pts), ternaries 33 (44 pts), boolean chains 25, error handling 2 (nesting depth added 13). Of this number, 28 points are the body's own statements and 90 belong to 41 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.
chat-background-page.ChatBackgroundPage (cognitive 117) apps/app/src/routes/chat-background-page.tsx:51— chat-background-page.ChatBackgroundPage has cognitive complexity 117 (threshold 15). Drivers by points: ternaries 35 (61 pts), if/else 29, boolean chains 27 (nesting depth added 26). Of this number, 79 points are the body's own statements and 38 belong to 24 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
group-chat-background-page.GroupChatBackgroundPage (cognitive 114) apps/app/src/routes/group-chat-background-page.tsx:50— group-chat-background-page.GroupChatBackgroundPage has cognitive complexity 114 (threshold 15). Drivers by points: ternaries 41 (77 pts), boolean chains 19, if/else 18 (nesting depth added 36). Of this number, 87 points are the body's own statements and 27 belong to 15 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.
desktop-chat-history-panel.DesktopChatHistoryPanel (cognitive 109) apps/app/src/features/desktop/chat/desktop-chat-history-panel.tsx:60— desktop-chat-history-panel.DesktopChatHistoryPanel has cognitive complexity 109 (threshold 15). Drivers by points: ternaries 38 (67 pts), boolean chains 21, if/else 18 (21 pts) (nesting depth added 32). Of this number, 71 points are the body's own statements and 38 belong to 15 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.
desktop-chat-details-panel.DesktopGroupMemberBrowserDialog (cognitive 107) apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:2404— desktop-chat-details-panel.DesktopGroupMemberBrowserDialog has cognitive complexity 107 (threshold 15). Drivers by points: ternaries 25 (46 pts), if/else 29 (37 pts), boolean chains 23, loops 1 (nesting depth added 29). Most of this is not in the body itself: 7 of the 107 points are its own statements and the rest belongs to 20 function items inside it that branch (a function literal at line 2890, a function literal at line 2572, handleSearchKeyDown, …). 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.
desktop-chat-files-page.DesktopChatFilesPage (cognitive 107) apps/app/src/routes/desktop-chat-files-page.tsx:90— desktop-chat-files-page.DesktopChatFilesPage has cognitive complexity 107 (threshold 15). Drivers by points: ternaries 50 (67 pts), if/else 24 (26 pts), boolean chains 14 (nesting depth added 19). Of this number, 32 points are the body's own statements and 75 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, 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.
desktop-channels-workspace.DesktopChannelsWorkspace (cognitive 104) apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx:151— desktop-channels-workspace.DesktopChannelsWorkspace has cognitive complexity 104 (threshold 15). Drivers by points: if/else 46 (47 pts), ternaries 23 (34 pts), boolean chains 23 (nesting depth added 12). Of this number, 29 points are the body's own statements and 75 belong to 28 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.
discover-feed-page.DiscoverFeedPage (cognitive 101) apps/app/src/routes/discover-feed-page.tsx:99— discover-feed-page.DiscoverFeedPage has cognitive complexity 101 (threshold 15). Drivers by points: if/else 124 (146 pts), ternaries 94 (145 pts), boolean chains 58, error handling 5, loops 3 (4 pts) (nesting depth added 74). To reduce it, split the body into named stages: move each independent 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 (discover-feed-page.DiscoverFeedPage::handleSharePostInner) 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.
WorldLifecycleWorkerService.reconcileObservedWorld (cognitive 101) apps/cloud-api/src/orchestration/world-lifecycle-worker.service.ts:827— WorldLifecycleWorkerService.reconcileObservedWorld has cognitive complexity 101 (threshold 15). Drivers by points: if/else 34 (70 pts), boolean chains 18, ternaries 5 (13 pts) (nesting depth added 44). 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.
group-chat-thread-panel.GroupChatThreadPanel (cognitive 100) apps/app/src/features/chat/group-chat-thread-panel.tsx:118— group-chat-thread-panel.GroupChatThreadPanel has cognitive complexity 100 (threshold 15). Drivers by points: ternaries 62 (101 pts), if/else 64 (80 pts), boolean chains 61, error handling 3, loops 3 (nesting depth added 55). To reduce it, split the body into named stages: move each independent 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 (group-chat-thread-panel.GroupChatThreadPanel::sendAttachmentMessage) 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.
group-member-picker-page.MobileGroupMemberPickerPage (cognitive 96) apps/app/src/routes/group-member-picker-page.tsx:101— group-member-picker-page.MobileGroupMemberPickerPage has cognitive complexity 96 (threshold 15). Drivers by points: ternaries 38 (50 pts), if/else 20 (25 pts), boolean chains 20, loops 1 (nesting depth added 17). Of this number, 46 points are the body's own statements and 50 belong to 19 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.
world-detail-page.WorldDetailPage (cognitive 96) apps/cloud-console/src/routes/world-detail-page.tsx:254— world-detail-page.WorldDetailPage has cognitive complexity 96 (threshold 15). Drivers by points: ternaries 42 (54 pts), if/else 17 (21 pts), boolean chains 19, loops 2 (nesting depth added 16). Of this number, 83 points are the body's own statements and 13 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.
contact-detail-pane.ContactDetailPane (cognitive 95) apps/app/src/features/contacts/contact-detail-pane.tsx:84— contact-detail-pane.ContactDetailPane has cognitive complexity 95 (threshold 15). Drivers by points: ternaries 34 (55 pts), boolean chains 27, if/else 8 (13 pts) (nesting depth added 26). Of this number, 80 points are the body's own statements and 15 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
chat-message-search-panel.ChatMessageSearchPanel (cognitive 94) apps/app/src/features/chat/chat-message-search-panel.tsx:155— chat-message-search-panel.ChatMessageSearchPanel has cognitive complexity 94 (threshold 15). Drivers by points: ternaries 29 (60 pts), boolean chains 20, if/else 12 (13 pts), loops 1 (nesting depth added 32). Of this number, 38 points are the body's own statements and 56 belong to 9 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
desktop-contacts-tags-pane.DesktopContactsTagsPane (cognitive 94) apps/app/src/features/desktop/contacts/desktop-contacts-tags-pane.tsx:37— desktop-contacts-tags-pane.DesktopContactsTagsPane has cognitive complexity 94 (threshold 15). Drivers by points: ternaries 44 (70 pts), boolean chains 13, if/else 11 (nesting depth added 26). Of this number, 56 points are the body's own statements and 38 belong to 22 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.
channel-author-page.ChannelAuthorPage (cognitive 93) apps/app/src/routes/channel-author-page.tsx:56— channel-author-page.ChannelAuthorPage has cognitive complexity 93 (threshold 15). Drivers by points: ternaries 34 (63 pts), if/else 14 (18 pts), boolean chains 12 (nesting depth added 33). Of this number, 54 points are the body's own statements and 39 belong to 16 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.
tank-war-engine.resolveBulletTank (cognitive 90) apps/app/src/features/games/tank-war/tank-war-engine.ts:646— tank-war-engine.resolveBulletTank has cognitive complexity 90 (threshold 15). Drivers by points: if/else 26 (81 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 57). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
desktop-contacts-starred-friends-pane.DesktopContactsStarredFriendsPane (cognitive 89) apps/app/src/features/desktop/contacts/desktop-contacts-starred-friends-pane.tsx:51— desktop-contacts-starred-friends-pane.DesktopContactsStarredFriendsPane has cognitive complexity 89 (threshold 15). Drivers by points: ternaries 33 (70 pts), boolean chains 14, if/else 5 (nesting depth added 37). Of this number, 65 points are the body's own statements and 24 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.
desktop-add-friend-workspace.DesktopAddFriendWorkspace (cognitive 88) apps/app/src/features/desktop/contacts/desktop-add-friend-workspace.tsx:58— desktop-add-friend-workspace.DesktopAddFriendWorkspace has cognitive complexity 88 (threshold 15). Drivers by points: ternaries 20 (35 pts), if/else 19 (31 pts), boolean chains 21, loops 1 (nesting depth added 27). Of this number, 50 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.
mobile-moments-publish-page.MobileMomentsPublishPage (cognitive 88) apps/app/src/routes/mobile-moments-publish-page.tsx:70— mobile-moments-publish-page.MobileMomentsPublishPage has cognitive complexity 88 (threshold 15). Drivers by points: if/else 34 (38 pts), ternaries 22 (32 pts), boolean chains 15, error handling 3 (nesting depth added 14). Of this number, 30 points are the body's own statements and 58 belong to 21 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
ChatService.buildMessagePromptText (cognitive 83) api/src/modules/chat/chat.service.ts:2858— ChatService.buildMessagePromptText has cognitive complexity 83 (threshold 15). Drivers by points: ternaries 28 (59 pts), if/else 15 (19 pts), boolean chains 5 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
desktop-moment-row.DesktopMomentRowInner (cognitive 81) apps/app/src/features/desktop/moments/desktop-moment-row.tsx:73— desktop-moment-row.DesktopMomentRowInner has cognitive complexity 81 (threshold 15). Drivers by points: ternaries 36 (53 pts), if/else 11 (15 pts), boolean chains 11, loops 2 (nesting depth added 21). Of this number, 51 points are the body's own statements and 30 belong to 10 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.
cloud-api-i18n.translateKnownDynamicMessage (cognitive 81) REDACTED:406— cloud-api-i18n.translateKnownDynamicMessage has cognitive complexity 81 (threshold 15). Drivers by points: ternaries 24 (72 pts), if/else 8, boolean chains 1 (nesting depth added 48). 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.
worlds-page.WorldsPage (cognitive 80) apps/cloud-console/src/routes/worlds-page.tsx:223— worlds-page.WorldsPage has cognitive complexity 80 (threshold 15). Drivers by points: if/else 29 (32 pts), ternaries 27 (32 pts), boolean chains 14, loops 2 (nesting depth added 8). Of this number, 28 points are the body's own statements and 52 belong to 19 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.
contact-shortcut-list.ContactShortcutList (cognitive 78) apps/app/src/features/contacts/contact-shortcut-list.tsx:19— contact-shortcut-list.ContactShortcutList has cognitive complexity 78 (threshold 15). Drivers by points: ternaries 36 (69 pts), boolean chains 9 (nesting depth added 33). Most of this is not in the body itself: 3 of the 78 points are its own statements and the rest belongs to one function literal inside it that branches (line 42). 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.
desktop-feed-row.DesktopFeedRowInner (cognitive 78) apps/app/src/features/desktop/feed/desktop-feed-row.tsx:75— desktop-feed-row.DesktopFeedRowInner has cognitive complexity 78 (threshold 15). Drivers by points: ternaries 39 (50 pts), if/else 12 (18 pts), boolean chains 9, loops 1 (nesting depth added 17). Of this number, 45 points are the body's own statements and 33 belong to 10 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.
characters.service.assertPrivateCharacterFieldLimits (cognitive 77) api/src/modules/characters/characters.service.ts:1517— characters.service.assertPrivateCharacterFieldLimits has cognitive complexity 77 (threshold 15). Drivers by points: if/else 32 (49 pts), boolean chains 19, loops 3 (5 pts), error handling 2 (4 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
moments-page.MobileMomentsView (cognitive 76) apps/app/src/routes/moments-page.tsx:2585— moments-page.MobileMomentsView has cognitive complexity 76 (threshold 15). Drivers by points: ternaries 27 (47 pts), boolean chains 17, if/else 12 (nesting depth added 20). Of this number, 59 points are the body's own statements and 17 belong to 11 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatService.sendMessageDetailed (cognitive 74) api/src/modules/chat/chat.service.ts:1159— ChatService.sendMessageDetailed has cognitive complexity 74 (threshold 15). Drivers by points: if/else 21 (38 pts), ternaries 13 (19 pts), boolean chains 17 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BehaviorRecordsAdminService.collectOwnerRecords (cognitive 74) api/src/modules/admin/behavior-records-admin.service.ts:363— BehaviorRecordsAdminService.collectOwnerRecords has cognitive complexity 74 (threshold 15). Drivers by points: ternaries 28 (53 pts), loops 10 (11 pts), if/else 5 (8 pts), boolean chains 2 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
create-group-page.CreateGroupPage (cognitive 74) apps/app/src/routes/create-group-page.tsx:58— create-group-page.CreateGroupPage has cognitive complexity 74 (threshold 15). Drivers by points: ternaries 25 (36 pts), if/else 21, boolean chains 17 (nesting depth added 11). Of this number, 39 points are the body's own statements and 35 belong to 14 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
official-account-detail-page.MobileOfficialAccountDetailPage (cognitive 74) apps/app/src/routes/official-account-detail-page.tsx:93— official-account-detail-page.MobileOfficialAccountDetailPage has cognitive complexity 74 (threshold 15). Drivers by points: ternaries 45 (82 pts), if/else 13 (15 pts), boolean chains 10, error handling 1 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (official-account-detail-page.MobileOfficialAccountDetailPage::handleShareAccount) 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.
channels-page.ChannelAudioPictorial (cognitive 73) apps/app/src/routes/channels-page.tsx:3193— channels-page.ChannelAudioPictorial has cognitive complexity 73 (threshold 15). Drivers by points: if/else 35 (42 pts), ternaries 16 (20 pts), boolean chains 11 (nesting depth added 11). Of this number, 19 points are the body's own statements and 54 belong to 19 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.
profile-info-field-page.ProfileInfoFieldPage (cognitive 72) apps/app/src/routes/profile-info-field-page.tsx:127— profile-info-field-page.ProfileInfoFieldPage has cognitive complexity 72 (threshold 15). Drivers by points: ternaries 23 (38 pts), if/else 15 (22 pts), boolean chains 12 (nesting depth added 22). Of this number, 38 points are the body's own statements and 34 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.
desktop-chat-history-page.DesktopChatHistoryPage (cognitive 69) apps/app/src/routes/desktop-chat-history-page.tsx:51— desktop-chat-history-page.DesktopChatHistoryPage has cognitive complexity 69 (threshold 15). Drivers by points: ternaries 26 (33 pts), if/else 19 (22 pts), boolean chains 14 (nesting depth added 10). Of this number, 37 points are the body's own statements and 32 belong to 13 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
friend-requests-page.MobileFriendRequestsPage (cognitive 69) apps/app/src/routes/friend-requests-page.tsx:61— friend-requests-page.MobileFriendRequestsPage has cognitive complexity 69 (threshold 15). Drivers by points: ternaries 27 (50 pts), boolean chains 13, if/else 6 (nesting depth added 23). Most of this is not in the body itself: 14 of the 69 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 311, navigateToRouteStateReturn, a function literal at line 122, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
character-edit-form.CharacterEditForm (cognitive 69) apps/wiki/src/components/character-edit-form.tsx:319— character-edit-form.CharacterEditForm has cognitive complexity 69 (threshold 15). Drivers by points: if/else 81 (86 pts), ternaries 35 (68 pts), boolean chains 48, error handling 3, match/switch 1 (nesting depth added 38). 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 (character-edit-form.CharacterEditForm::overlaySnapshotToForm) 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.
FollowupRuntimeService.runScan (cognitive 68) api/src/modules/followup-runtime/followup-runtime.service.ts:273— FollowupRuntimeService.runScan has cognitive complexity 68 (threshold 15). Drivers by points: ternaries 10 (27 pts), if/else 12 (22 pts), error handling 5 (10 pts), boolean chains 8, loops 1 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
desktop-channels-workspace.DesktopChannelAuthorPanel (cognitive 68) apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx:2836— desktop-channels-workspace.DesktopChannelAuthorPanel has cognitive complexity 68 (threshold 15). Drivers by points: ternaries 22 (58 pts), boolean chains 7, if/else 1 (3 pts) (nesting depth added 38). Of this number, 36 points are the body's own statements and 32 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
live-companion-page.LiveCompanionPage (cognitive 68) apps/app/src/routes/live-companion-page.tsx:70— live-companion-page.LiveCompanionPage has cognitive complexity 68 (threshold 15). Drivers by points: ternaries 30 (40 pts), if/else 15 (16 pts), boolean chains 11, error handling 1 (nesting depth added 11). Of this number, 27 points are the body's own statements and 41 belong to 20 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.
use-conversation-thread.useConversationThread (cognitive 67) apps/app/src/features/chat/use-conversation-thread.ts:71— use-conversation-thread.useConversationThread has cognitive complexity 67 (threshold 15). Drivers by points: if/else 41 (44 pts), boolean chains 18, ternaries 3 (5 pts) (nesting depth added 5). Most of this is not in the body itself: 3 of the 67 points are its own statements and the rest belongs to 27 function literals inside it that branch (lines 688, 604, 424, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
desktop-contacts-friend-requests-pane.DesktopContactsFriendRequestsPane (cognitive 67) apps/app/src/features/desktop/contacts/desktop-contacts-friend-requests-pane.tsx:26— desktop-contacts-friend-requests-pane.DesktopContactsFriendRequestsPane has cognitive complexity 67 (threshold 15). Drivers by points: ternaries 19 (62 pts), boolean chains 5 (nesting depth added 43). Of this number, 17 points are the body's own statements and 50 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
desktop-message-forward-dialog.DesktopMessageForwardDialog (cognitive 66) apps/app/src/features/desktop/chat/desktop-message-forward-dialog.tsx:50— desktop-message-forward-dialog.DesktopMessageForwardDialog has cognitive complexity 66 (threshold 15). Drivers by points: ternaries 36 (44 pts), if/else 13 (14 pts), boolean chains 8 (nesting depth added 9). Of this number, 33 points are the body's own statements and 33 belong to 11 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
mobile-search-workspace.MobileSearchWorkspace (cognitive 66) apps/app/src/features/search/mobile-search-workspace.tsx:109— mobile-search-workspace.MobileSearchWorkspace has cognitive complexity 66 (threshold 15). Drivers by points: ternaries 23 (45 pts), boolean chains 17, if/else 4 (nesting depth added 22). Of this number, 45 points are the body's own statements and 21 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.
mobile-add-friend-page.MobileAddFriend (cognitive 66) apps/app/src/routes/mobile-add-friend-page.tsx:108— mobile-add-friend-page.MobileAddFriend has cognitive complexity 66 (threshold 15). Drivers by points: ternaries 18 (27 pts), boolean chains 20, if/else 15 (17 pts), loops 2 (nesting depth added 11). Of this number, 35 points are the body's own statements and 31 belong to 18 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.
desktop-subscription-workspace.DesktopSubscriptionWorkspace (cognitive 65) apps/app/src/features/desktop/official-accounts/desktop-subscription-workspace.tsx:23— desktop-subscription-workspace.DesktopSubscriptionWorkspace has cognitive complexity 65 (threshold 15). Drivers by points: ternaries 18 (38 pts), boolean chains 15, if/else 12 (nesting depth added 20). Of this number, 37 points are the body's own statements and 28 belong to 8 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
discover-scene-page.MobileDiscoverScenePage (cognitive 65) apps/app/src/routes/discover-scene-page.tsx:175— discover-scene-page.MobileDiscoverScenePage has cognitive complexity 65 (threshold 15). Drivers by points: ternaries 22 (33 pts), boolean chains 23, if/else 9 (nesting depth added 11). Of this number, 42 points are the body's own statements and 23 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.
use-island-concert-state.reducer (cognitive 64) apps/app/src/features/games/island-concert/use-island-concert-state.ts:200— use-island-concert-state.reducer has cognitive complexity 64 (threshold 15). Drivers by points: if/else 28 (55 pts), boolean chains 6, loops 1 (2 pts), match/switch 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
desktop-chat-image-viewer-page.DesktopChatImageViewerPage (cognitive 64) apps/app/src/routes/desktop-chat-image-viewer-page.tsx:52— desktop-chat-image-viewer-page.DesktopChatImageViewerPage has cognitive complexity 64 (threshold 15). Drivers by points: if/else 26 (27 pts), ternaries 19 (22 pts), boolean chains 14, error handling 1 (nesting depth added 4). Most of this is not in the body itself: 12 of the 64 points are its own statements and the rest belongs to 18 function literals inside it that branch (lines 310, 221, 367, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
use-forest-train-state.reducer (cognitive 63) apps/app/src/features/games/forest-train/use-forest-train-state.ts:97— use-forest-train-state.reducer has cognitive complexity 63 (threshold 15). Drivers by points: if/else 26 (54 pts), boolean chains 4, ternaries 1 (4 pts), match/switch 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GroupVoiceCallsService.createTurn (cognitive 62) api/src/modules/chat/group-voice-calls.service.ts:79— GroupVoiceCallsService.createTurn has cognitive complexity 62 (threshold 15). Drivers by points: if/else 19 (33 pts), ternaries 10 (16 pts), boolean chains 7, error handling 3, loops 1 (3 pts) (nesting depth added 22). Of this number, 45 points are the body's own statements and 17 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.
ShakeDiscoveryService.createSessionPreview (cognitive 62) api/src/modules/social/shake-discovery.service.ts:160— ShakeDiscoveryService.createSessionPreview has cognitive complexity 62 (threshold 15). Drivers by points: if/else 19 (29 pts), ternaries 9 (16 pts), boolean chains 13, error handling 2 (3 pts), loops 1 (nesting depth added 18). Of this number, 61 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.
mobile-feed-publish-page.MobileFeedPublishPage (cognitive 62) apps/app/src/routes/mobile-feed-publish-page.tsx:34— mobile-feed-publish-page.MobileFeedPublishPage has cognitive complexity 62 (threshold 15). Drivers by points: if/else 25 (27 pts), ternaries 15 (17 pts), boolean chains 15, error handling 3 (nesting depth added 4). Of this number, 20 points are the body's own statements and 42 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.
mini-program-open-panel.MiniProgramOpenPanel (cognitive 61) apps/app/src/features/mini-programs/mini-program-open-panel.tsx:48— mini-program-open-panel.MiniProgramOpenPanel has cognitive complexity 61 (threshold 15). Drivers by points: ternaries 40 (56 pts), boolean chains 5 (nesting depth added 16). Of this number, 46 points are the body's own statements and 15 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.
seed-shop-sheet.SeedShopSheet (cognitive 61) apps/app/src/features/games/farm/components/seed-shop-sheet.tsx:31— seed-shop-sheet.SeedShopSheet has cognitive complexity 61 (threshold 15). Drivers by points: ternaries 17 (47 pts), boolean chains 11, if/else 3 (nesting depth added 30). Most of this is not in the body itself: 8 of the 61 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 166, 235, 291, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
chat-list-page.ConversationListItemLinkImpl (cognitive 61) apps/app/src/routes/chat-list-page.tsx:1951— chat-list-page.ConversationListItemLinkImpl has cognitive complexity 61 (threshold 15). Drivers by points: ternaries 27 (40 pts), if/else 10 (12 pts), boolean chains 9 (nesting depth added 15). Of this number, 42 points are the body's own statements and 19 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
official-account-article-page.MobileOfficialAccountArticlePage (cognitive 61) apps/app/src/routes/official-account-article-page.tsx:76— official-account-article-page.MobileOfficialAccountArticlePage has cognitive complexity 61 (threshold 15). Drivers by points: ternaries 26 (38 pts), if/else 13, boolean chains 9, error handling 1 (nesting depth added 12). Of this number, 32 points are the body's own statements and 29 belong to 11 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
jobs-page.JobsPage (cognitive 61) apps/cloud-console/src/routes/jobs-page.tsx:151— jobs-page.JobsPage has cognitive complexity 61 (threshold 15). Drivers by points: ternaries 31, if/else 11 (15 pts), boolean chains 12, loops 3 (nesting depth added 4). Most of this is not in the body itself: 14 of the 61 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 328, a function literal at line 211, a function literal at line 244, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
ChatService.getConversations (cognitive 60) api/src/modules/chat/chat.service.ts:313— ChatService.getConversations has cognitive complexity 60 (threshold 15). Drivers by points: if/else 12 (24 pts), ternaries 12 (23 pts), loops 7 (9 pts), boolean chains 4 (nesting depth added 25). Of this number, 42 points are the body's own statements and 18 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.
discover-encounter-page.MobileDiscoverEncounterPage (cognitive 60) apps/app/src/routes/discover-encounter-page.tsx:86— discover-encounter-page.MobileDiscoverEncounterPage has cognitive complexity 60 (threshold 15). Drivers by points: ternaries 17 (26 pts), boolean chains 18, if/else 13 (14 pts), error handling 1, match/switch 1 (nesting depth added 10). Of this number, 34 points are the body's own statements and 26 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.
desktop-feedback-page.DesktopFeedbackPage (cognitive 60) apps/app/src/routes/desktop-feedback-page.tsx:109— desktop-feedback-page.DesktopFeedbackPage has cognitive complexity 60 (threshold 15). Drivers by points: ternaries 20 (23 pts), boolean chains 20, if/else 15, error handling 2 (nesting depth added 3). Most of this is not in the body itself: 9 of the 60 points are its own statements and the rest belongs to 18 function items inside it that branch (handleSubmitFeedback, buildFeedbackPackage, handleSaveFeedbackPackage, …). 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.
group-chat-edit-page.MobileGroupChatEditPage (cognitive 59) apps/app/src/routes/group-chat-edit-page.tsx:71— group-chat-edit-page.MobileGroupChatEditPage has cognitive complexity 59 (threshold 15). Drivers by points: ternaries 22 (30 pts), boolean chains 16, if/else 11 (13 pts) (nesting depth added 10). Of this number, 35 points are the body's own statements and 24 belong to 11 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
root-layout.RootLayoutContent (cognitive 59) apps/cloud-console/src/components/root-layout.tsx:311— root-layout.RootLayoutContent has cognitive complexity 59 (threshold 15). Drivers by points: ternaries 52 (54 pts), if/else 3, boolean chains 2 (nesting depth added 2). Of this number, 51 points are the body's own statements and 8 belong to 4 function items inside it that branch. To reduce it, split the body: 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.
PromptBuilderService.buildChatSystemPromptSectionsFromTemplates (cognitive 58) api/src/modules/ai/prompt-builder.service.ts:545— PromptBuilderService.buildChatSystemPromptSectionsFromTemplates has cognitive complexity 58 (threshold 15). Drivers by points: if/else 31 (48 pts), boolean chains 5, ternaries 4 (5 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.
dashboard-page.DashboardPage (cognitive 58) apps/cloud-console/src/routes/dashboard-page.tsx:205— dashboard-page.DashboardPage has cognitive complexity 58 (threshold 15). Drivers by points: if/else 17 (24 pts), ternaries 18 (19 pts), boolean chains 12, loops 3 (nesting depth added 8). Most of this is not in the body itself: 14 of the 58 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 244, a function literal at line 345, a function literal at line 276, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
wiki-private-character-ai.service.mergeDrafts (cognitive 57) api/src/modules/wiki/services/wiki-private-character-ai.service.ts:433— wiki-private-character-ai.service.mergeDrafts has cognitive complexity 57 (threshold 15). Drivers by points: if/else 15 (43 pts), loops 3 (11 pts), boolean chains 3 (nesting depth added 36). 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.
channels-forward-picker.ChannelsForwardPicker (cognitive 57) apps/app/src/components/channels-forward-picker.tsx:55— channels-forward-picker.ChannelsForwardPicker has cognitive complexity 57 (threshold 15). Drivers by points: if/else 31 (34 pts), ternaries 7 (13 pts), boolean chains 8, error handling 1, loops 1 (nesting depth added 9). Most of this is not in the body itself: 12 of the 57 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 246, handlePick, a function literal at line 185, …). 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.
reminder-task-panel.ReminderTaskPanel (cognitive 57) apps/app/src/features/chat/reminder-task-panel.tsx:31— reminder-task-panel.ReminderTaskPanel has cognitive complexity 57 (threshold 15). Drivers by points: ternaries 22 (45 pts), if/else 5, error handling 4, boolean chains 3 (nesting depth added 23). Of this number, 30 points are the body's own statements and 27 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
desktop-group-call-panel.DesktopGroupCallPanel (cognitive 57) apps/app/src/features/desktop/chat/desktop-group-call-panel.tsx:51— desktop-group-call-panel.DesktopGroupCallPanel has cognitive complexity 57 (threshold 15). Drivers by points: ternaries 26 (33 pts), if/else 16, boolean chains 8 (nesting depth added 7). Of this number, 19 points are the body's own statements and 38 belong to 13 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
MinimaxJobService.advanceVideoJob (cognitive 56) api/src/modules/minimax/minimax-job.service.ts:285— MinimaxJobService.advanceVideoJob has cognitive complexity 56 (threshold 15). Drivers by points: if/else 17 (37 pts), error handling 4 (10 pts), ternaries 1 (6 pts), boolean chains 3 (nesting depth added 31). 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.
mobile-favorites-page.MobileFavoritesPage (cognitive 56) apps/app/src/routes/mobile-favorites-page.tsx:100— mobile-favorites-page.MobileFavoritesPage has cognitive complexity 56 (threshold 15). Drivers by points: ternaries 20 (34 pts), if/else 11, boolean chains 9, error handling 1 (2 pts) (nesting depth added 15). Of this number, 31 points are the body's own statements and 25 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.
world-characters-page.MobileWorldCharactersPage (cognitive 56) apps/app/src/routes/world-characters-page.tsx:87— world-characters-page.MobileWorldCharactersPage has cognitive complexity 56 (threshold 15). Drivers by points: ternaries 20 (28 pts), if/else 14 (16 pts), boolean chains 11, loops 1 (nesting depth added 10). Of this number, 31 points are the body's own statements and 25 belong to 14 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
moment-compose-media-preview.MomentComposeMediaPreview (cognitive 55) apps/app/src/components/moment-compose-media-preview.tsx:30— moment-compose-media-preview.MomentComposeMediaPreview has cognitive complexity 55 (threshold 15). Drivers by points: ternaries 20 (40 pts), boolean chains 8, if/else 7 (nesting depth added 20). Of this number, 34 points are the body's own statements and 21 belong to 7 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.
desktop-runtime-guard.DesktopRuntimeGuard (cognitive 55) apps/app/src/features/shell/desktop-runtime-guard.tsx:16— desktop-runtime-guard.DesktopRuntimeGuard has cognitive complexity 55 (threshold 15). Drivers by points: boolean chains 21, ternaries 14 (18 pts), if/else 15 (16 pts) (nesting depth added 5). Of this number, 38 points are the body's own statements and 17 belong to 5 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
discover-avatar-encounter-page.DiscoverTab (cognitive 55) apps/app/src/routes/discover-avatar-encounter-page.tsx:260— discover-avatar-encounter-page.DiscoverTab has cognitive complexity 55 (threshold 15). Drivers by points: ternaries 14 (38 pts), boolean chains 10, if/else 4 (7 pts) (nesting depth added 27). Of this number, 47 points are the body's own statements and 8 belong to 4 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
screenshot-mobile-routes.collectDiagnostics (cognitive 54) apps/app/scripts/screenshot-mobile-routes.mjs:205— screenshot-mobile-routes.collectDiagnostics has cognitive complexity 54 (threshold 15). Drivers by points: if/else 22 (40 pts), boolean chains 11, loops 3 (nesting depth added 18). Of this number, 42 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.
GroupService.buildMessagePromptText (cognitive 53) api/src/modules/chat/group.service.ts:1401— GroupService.buildMessagePromptText has cognitive complexity 53 (threshold 15). Drivers by points: ternaries 15 (28 pts), if/else 18 (20 pts), boolean chains 5 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
profile-xhs-reward-page.ProfileXhsRewardPage (cognitive 53) apps/app/src/routes/profile-xhs-reward-page.tsx:55— profile-xhs-reward-page.ProfileXhsRewardPage has cognitive complexity 53 (threshold 15). Drivers by points: ternaries 21 (33 pts), if/else 14, boolean chains 6 (nesting depth added 12). Of this number, 38 points are the body's own statements and 15 belong to 8 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.
ActionRuntimeService.buildHomeAssistantRegistrySnapshot (cognitive 52) REDACTED:3195— ActionRuntimeService.buildHomeAssistantRegistrySnapshot has cognitive complexity 52 (threshold 15). Drivers by points: if/else 8 (18 pts), ternaries 6 (15 pts), boolean chains 14, loops 3 (5 pts) (nesting depth added 21). Of this number, 47 points are the body's own statements and 5 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SchedulerService.tryGenerateMinimaxMomentsThisTick (cognitive 52) api/src/modules/scheduler/scheduler.service.ts:1209— SchedulerService.tryGenerateMinimaxMomentsThisTick has cognitive complexity 52 (threshold 15). Drivers by points: if/else 13 (33 pts), loops 5 (11 pts), boolean chains 4, ternaries 2 (4 pts) (nesting depth added 28). Of this number, 50 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.
desktop-channels-workspace.DesktopChannelCommentsPanel (cognitive 52) apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx:3202— desktop-channels-workspace.DesktopChannelCommentsPanel has cognitive complexity 52 (threshold 15). Drivers by points: if/else 24 (25 pts), ternaries 13 (16 pts), boolean chains 11 (nesting depth added 4). Most of this is not in the body itself: 15 of the 52 points are its own statements and the rest belongs to 19 function items inside it that branch (a function literal at line 3508, handleSubmit, a function literal at line 3432, …). 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.
tokenize-game-named-codemod.pickToken (cognitive 50) apps/app/scripts/tokenize-game-named-codemod.mjs:28— tokenize-game-named-codemod.pickToken has cognitive complexity 50 (threshold 15). Drivers by points: ternaries 11 (35 pts), if/else 9 (14 pts), boolean chains 1 (nesting depth added 29). 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.
AiOrchestratorService.synthesizeSpeech (cognitive 49) api/src/modules/ai/ai-orchestrator.service.ts:4183— AiOrchestratorService.synthesizeSpeech has cognitive complexity 49 (threshold 15). Drivers by points: if/else 14 (37 pts), error handling 2 (5 pts), boolean chains 4, ternaries 1 (2 pts), loops 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WorldOwnerService.updateOwner (cognitive 49) api/src/modules/auth/world-owner.service.ts:689— WorldOwnerService.updateOwner has cognitive complexity 49 (threshold 15). Drivers by points: if/else 28 (30 pts), boolean chains 14, ternaries 4 (5 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.
FeedService.runFeedNpcAutonomyTick (cognitive 49) api/src/modules/feed/feed.service.ts:2893— FeedService.runFeedNpcAutonomyTick has cognitive complexity 49 (threshold 15). Drivers by points: if/else 13 (32 pts), error handling 2 (8 pts), ternaries 1 (4 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 29). Of this number, 45 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.
desktop-friend-moments-workspace.DesktopFriendMomentsWorkspace (cognitive 49) apps/app/src/features/desktop/moments/desktop-friend-moments-workspace.tsx:91— desktop-friend-moments-workspace.DesktopFriendMomentsWorkspace has cognitive complexity 49 (threshold 15). Drivers by points: ternaries 15 (25 pts), boolean chains 15, if/else 8 (9 pts) (nesting depth added 11). Of this number, 28 points are the body's own statements and 21 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.
profile-feed-page.ProfileFeedPage (cognitive 49) apps/app/src/routes/profile-feed-page.tsx:52— profile-feed-page.ProfileFeedPage has cognitive complexity 49 (threshold 15). Drivers by points: if/else 20 (21 pts), ternaries 14 (18 pts), boolean chains 8, error handling 1, loops 1 (nesting depth added 5). Most of this is not in the body itself: 7 of the 49 points are its own statements and the rest belongs to 18 function items inside it that branch (renderContent, a function literal at line 387, handleExpandComments, …). 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.
MomentsService.runNpcAutonomyTick (cognitive 48) api/src/modules/moments/moments.service.ts:2573— MomentsService.runNpcAutonomyTick has cognitive complexity 48 (threshold 15). Drivers by points: if/else 13 (33 pts), error handling 2 (8 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 27). Of this number, 42 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tokenize-named-colors-codemod.pickToken (cognitive 48) apps/app/scripts/tokenize-named-colors-codemod.mjs:37— tokenize-named-colors-codemod.pickToken has cognitive complexity 48 (threshold 15). Drivers by points: if/else 21 (40 pts), ternaries 3 (6 pts), boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
use-search-index.useSearchIndex.indexedResults (cognitive 48) apps/app/src/features/search/use-search-index.ts:253— use-search-index.useSearchIndex.indexedResults has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 24 (41 pts), boolean chains 7 (nesting depth added 17). None of this is in the body itself: all 48 points belong to 5 function literals inside it that branch (lines 421, 466, 350, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
character-page.ReadView (cognitive 48) apps/wiki/src/routes/character-page.tsx:428— character-page.ReadView has cognitive complexity 48 (threshold 15). Drivers by points: boolean chains 24, if/else 11 (12 pts), ternaries 9 (11 pts), error handling 1 (nesting depth added 3). Of this number, 28 points are the body's own statements and 20 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.
audit-desktop-text.findArmEnd (cognitive 46) REDACTED:256— audit-desktop-text.findArmEnd has cognitive complexity 46 (threshold 15). Drivers by points: if/else 20 (39 pts), loops 3 (4 pts), boolean chains 3 (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.
official-service-message-bubble.OfficialServiceMessageBubble (cognitive 45) apps/app/src/components/official-service-message-bubble.tsx:10— official-service-message-bubble.OfficialServiceMessageBubble has cognitive complexity 45 (threshold 15). Drivers by points: ternaries 23 (43 pts), boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sky-rally-game.SkyRallyGame (cognitive 45) apps/app/src/features/games/sky-rally/sky-rally-game.tsx:52— sky-rally-game.SkyRallyGame has cognitive complexity 45 (threshold 15). Drivers by points: ternaries 26 (35 pts), boolean chains 9, if/else 1 (nesting depth added 9). Of this number, 25 points are the body's own statements and 20 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.
SocialService.sendFriendRequest (cognitive 44) api/src/modules/social/social.service.ts:981— SocialService.sendFriendRequest has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 14 (28 pts), if/else 8 (11 pts), boolean chains 5 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
chat-message-list.GroupRelaySummaryMessage (cognitive 44) apps/app/src/components/chat-message-list.tsx:7016— chat-message-list.GroupRelaySummaryMessage has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 27 (37 pts), if/else 5 (7 pts) (nesting depth added 12). Of this number, 38 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
desktop-feed-list.DesktopFeedList (cognitive 44) apps/app/src/features/desktop/feed/desktop-feed-list.tsx:72— desktop-feed-list.DesktopFeedList has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 14 (38 pts), boolean chains 6 (nesting depth added 24). Of this number, 35 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
desktop-profile-moments-workspace.DesktopProfileMomentsWorkspace (cognitive 43) apps/app/src/features/desktop/moments/desktop-profile-moments-workspace.tsx:84— desktop-profile-moments-workspace.DesktopProfileMomentsWorkspace has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 13 (22 pts), boolean chains 17, if/else 3 (4 pts) (nesting depth added 10). Of this number, 33 points are the body's own statements and 10 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.
group-announcement-page.MobileGroupAnnouncementPage (cognitive 43) apps/app/src/routes/group-announcement-page.tsx:46— group-announcement-page.MobileGroupAnnouncementPage has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 32 (51 pts), boolean chains 16, if/else 15 (16 pts), error handling 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (group-announcement-page.MobileGroupAnnouncementPage::handleShareAnnouncement) 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.
CloudService.getWorldDriftSummary (cognitive 43) apps/cloud-api/src/cloud/cloud.service.ts:407— CloudService.getWorldDriftSummary has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 8, ternaries 5 (8 pts), loops 2, error handling 1 (nesting depth added 15). Of this number, 39 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.
auto-capture.attachAutoCapture (cognitive 43) packages/analytics/src/auto-capture.ts:207— auto-capture.attachAutoCapture has cognitive complexity 43 (threshold 15). Drivers by points: if/else 18 (28 pts), error handling 4 (8 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 16). Most of this is not in the body itself: 10 of the 43 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 254, a function literal at line 321, a function literal at line 275, …). 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.
attachment-semantic-text.buildAttachmentFallbackLabel (cognitive 42) api/src/modules/chat/attachment-semantic-text.ts:268— attachment-semantic-text.buildAttachmentFallbackLabel has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 11 (22 pts), if/else 14 (17 pts), boolean chains 3 (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.
characters.controller.parsePrivateCharacterImportBody (cognitive 42) REDACTED:225— characters.controller.parsePrivateCharacterImportBody has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 29 (32 pts), boolean chains 6, if/else 4 (nesting depth added 3). Of this number, 36 points are the body's own statements and 6 belong to 2 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.
FeedService.scheduleChannelsCharacterReactions (cognitive 42) api/src/modules/feed/feed.service.ts:2543— FeedService.scheduleChannelsCharacterReactions has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 9, ternaries 5 (7 pts), error handling 2, loops 1 (2 pts) (nesting depth added 7). Most of this is not in the body itself: 13 of the 42 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 2620, 2594, 2567). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
avatar-chip.AvatarChip (cognitive 42) apps/app/src/components/avatar-chip.tsx:26— avatar-chip.AvatarChip has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 11 (36 pts), boolean chains 4, if/else 2 (nesting depth added 25). Of this number, 41 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
island-concert-game.IslandConcertGame (cognitive 42) apps/app/src/features/games/island-concert/island-concert-game.tsx:45— island-concert-game.IslandConcertGame has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 19 (31 pts), boolean chains 10, if/else 1 (nesting depth added 12). Of this number, 31 points are the body's own statements and 11 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
channels-page.MobileChannelsCard (cognitive 42) apps/app/src/routes/channels-page.tsx:4337— channels-page.MobileChannelsCard has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 17 (26 pts), boolean chains 9, if/else 6 (7 pts) (nesting depth added 10). Of this number, 28 points are the body's own statements and 14 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.
cyber-avatar-page.MobileCyberAvatarPage (cognitive 42) apps/app/src/routes/cyber-avatar-page.tsx:60— cyber-avatar-page.MobileCyberAvatarPage has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 10 (34 pts), boolean chains 6, if/else 2 (nesting depth added 24). Of this number, 37 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ActionRuntimeService.resolveHomeAssistantTarget (cognitive 41) REDACTED:2495— ActionRuntimeService.resolveHomeAssistantTarget has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 15 (24 pts), boolean chains 12, if/else 2 (4 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FeedService.runChannelProactiveForwardTick (cognitive 41) api/src/modules/feed/feed.service.ts:3116— FeedService.runChannelProactiveForwardTick has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (28 pts), error handling 3 (6 pts), boolean chains 4, loops 2, ternaries 1 (nesting depth added 17). Of this number, 36 points are the body's own statements and 5 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tokenize-colors-codemod.classifyHex (cognitive 41) apps/app/scripts/tokenize-colors-codemod.mjs:117— tokenize-colors-codemod.classifyHex has cognitive complexity 41 (threshold 15). Drivers by points: if/else 18 (40 pts), ternaries 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
contacts-bulk-action-bar.ContactsBulkActionBar (cognitive 41) apps/app/src/features/contacts/management/contacts-bulk-action-bar.tsx:40— contacts-bulk-action-bar.ContactsBulkActionBar has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 14 (16 pts), if/else 13 (15 pts), boolean chains 10 (nesting depth added 4). Most of this is not in the body itself: 13 of the 41 points are its own statements and the rest belongs to 14 function items inside it that branch (a function literal at line 67, runStar, a function literal at line 280, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
profile-feedback-page.ProfileFeedbackPage (cognitive 41) apps/app/src/routes/profile-feedback-page.tsx:43— profile-feedback-page.ProfileFeedbackPage has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14, ternaries 9 (11 pts), boolean chains 10, error handling 5 (6 pts) (nesting depth added 3). Most of this is not in the body itself: 8 of the 41 points are its own statements and the rest belongs to 8 function items inside it that branch (handleSubmit, a function literal at line 64, a function literal at line 95, …). 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.
seed.seedCharacters (cognitive 40) api/src/database/seed.ts:30— seed.seedCharacters has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 6, ternaries 4 (6 pts), loops 2 (nesting depth added 13). Of this number, 39 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
digital-human-player.DigitalHumanPlayer (cognitive 40) apps/app/src/features/chat/digital-human-player.tsx:21— digital-human-player.DigitalHumanPlayer has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 20 (33 pts), boolean chains 4, if/else 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
use-digital-human-call-session.useDigitalHumanCallSession (cognitive 40) apps/app/src/features/chat/use-digital-human-call-session.ts:42— use-digital-human-call-session.useDigitalHumanCallSession has cognitive complexity 40 (threshold 15). Drivers by points: if/else 23 (24 pts), boolean chains 8, ternaries 4 (6 pts), error handling 2 (nesting depth added 3). Most of this is not in the body itself: 4 of the 40 points are its own statements and the rest belongs to 17 function literals inside it that branch (lines 307, 419, 246, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
subscription-panel.InviteShareCard (cognitive 40) apps/app/src/features/subscription/subscription-panel.tsx:117— subscription-panel.InviteShareCard has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 8 (18 pts), if/else 10 (14 pts), boolean chains 5, error handling 2 (3 pts) (nesting depth added 15). Of this number, 20 points are the body's own statements and 20 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
splash-page.SplashPage (cognitive 40) apps/app/src/routes/splash-page.tsx:25— splash-page.SplashPage has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 11, ternaries 7 (8 pts) (nesting depth added 8). None of this is in the body itself: all 40 points belong to 5 function literals inside it that branch (lines 32, 141, 116, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
ReminderRuntimeService.evaluateConversationTurnFromRules (cognitive 39) REDACTED:1373— ReminderRuntimeService.evaluateConversationTurnFromRules has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (22 pts), ternaries 6 (12 pts), boolean chains 5 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParkingWarTickService.maybeFineOrTowPlayerOnNpcHome (cognitive 39) api/src/modules/games/parking-war/parking-war-tick.service.ts:245— ParkingWarTickService.maybeFineOrTowPlayerOnNpcHome has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (33 pts), boolean chains 5, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sticker-panel.StickerButton (cognitive 39) apps/app/src/features/chat/stickers/sticker-panel.tsx:3202— sticker-panel.StickerButton has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 20 (34 pts), boolean chains 4, if/else 1 (nesting depth added 14). Of this number, 38 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.
forest-train-game.ForestTrainGame (cognitive 39) apps/app/src/features/games/forest-train/forest-train-game.tsx:41— forest-train-game.ForestTrainGame has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 22 (26 pts), boolean chains 10, if/else 2 (3 pts) (nesting depth added 5). Of this number, 18 points are the body's own statements and 21 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.
cloud-farm-game.PlotCard (cognitive 39) apps/app/src/features/games/cloud-farm/cloud-farm-game.tsx:296— cloud-farm-game.PlotCard has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 20 (39 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
profile-subscription-page.InviteShareCard (cognitive 39) apps/app/src/routes/profile-subscription-page.tsx:129— profile-subscription-page.InviteShareCard has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 9 (22 pts), if/else 10 (12 pts), boolean chains 4, error handling 1 (nesting depth added 15). Of this number, 24 points are the body's own statements and 15 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
knowledge-base-page.KnowledgeBasePage (cognitive 39) apps/app/src/routes/knowledge-base-page.tsx:70— knowledge-base-page.KnowledgeBasePage has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 14 (23 pts), if/else 9, boolean chains 7 (nesting depth added 9). Of this number, 20 points are the body's own statements and 19 belong to 8 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CloudService.buildWorldAttentionItem (cognitive 39) apps/cloud-api/src/cloud/cloud.service.ts:2211— CloudService.buildWorldAttentionItem has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 9 (22 pts), boolean chains 12, if/else 5 (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.
PromptBuilderService.buildSceneSystemPrompt (cognitive 38) api/src/modules/ai/prompt-builder.service.ts:174— PromptBuilderService.buildSceneSystemPrompt has cognitive complexity 38 (threshold 15). Drivers by points: if/else 19 (29 pts), boolean chains 7, ternaries 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.
desktop-notes-workspace.DesktopNotesWorkspace (cognitive 38) REDACTED:105— desktop-notes-workspace.DesktopNotesWorkspace has cognitive complexity 38 (threshold 15). Drivers by points: if/else 62 (77 pts), ternaries 37 (56 pts), boolean chains 28, error handling 2, loops 1 (nesting depth added 34). To reduce it, split the body into named stages: move each independent 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 (desktop-notes-workspace.DesktopNotesWorkspace::handleAttachmentSelection) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
use-pixel-arena-state.reducer (cognitive 38) apps/app/src/features/games/pixel-arena/use-pixel-arena-state.ts:132— use-pixel-arena-state.reducer has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 6 (19 pts), if/else 9 (16 pts), boolean chains 2, match/switch 1 (nesting depth added 20). 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.
plot-action-bar.PlotActionBar (cognitive 38) apps/app/src/features/games/farm/components/plot-action-bar.tsx:48— plot-action-bar.PlotActionBar has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 18, ternaries 10 (15 pts), if/else 5 (nesting depth added 5). Of this number, 29 points are the body's own statements and 9 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
profile-info-page.ProfileInfoPage (cognitive 38) apps/app/src/routes/profile-info-page.tsx:38— profile-info-page.ProfileInfoPage has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (16 pts), ternaries 13 (16 pts), boolean chains 5, error handling 1 (nesting depth added 4). Of this number, 18 points are the body's own statements and 20 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.
InferenceService.runTtsDiagnostic (cognitive 37) api/src/modules/inference/inference.service.ts:1915— InferenceService.runTtsDiagnostic has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (23 pts), ternaries 2 (8 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CyberAvatarService.executeRefresh (cognitive 37) api/src/modules/cyber-avatar/cyber-avatar.service.ts:505— CyberAvatarService.executeRefresh has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 12, ternaries 4 (6 pts), error handling 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ActionRuntimeService.executeHttpBridgeOperation (cognitive 37) REDACTED:3407— ActionRuntimeService.executeHttpBridgeOperation has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 12 (18 pts), boolean chains 11, if/else 5 (6 pts), error handling 1 (2 pts) (nesting depth added 8). Of this number, 34 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tokenize-colors-codemod.classifyRgba (cognitive 37) apps/app/scripts/tokenize-colors-codemod.mjs:245— tokenize-colors-codemod.classifyRgba has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (22 pts), ternaries 4 (10 pts), boolean chains 5 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
delete-account-panel.DeleteAccountPanel (cognitive 37) apps/app/src/features/account-security/delete-account-panel.tsx:60— delete-account-panel.DeleteAccountPanel has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 10 (17 pts), if/else 13 (14 pts), boolean chains 6 (nesting depth added 8). Of this number, 18 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.
tank-war-engine.moveBullets (cognitive 37) apps/app/src/features/games/tank-war/tank-war-engine.ts:520— tank-war-engine.moveBullets has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 4, loops 3 (4 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.
index.init (cognitive 37) packages/analytics/src/index.ts:46— index.init has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 7, error handling 4 (5 pts), ternaries 4 (nesting depth added 5). Of this number, 22 points are the body's own statements and 15 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.
WechatSyncAdminService.normalizeCharacterDraft (cognitive 36) api/src/modules/admin/wechat-sync-admin.service.ts:632— WechatSyncAdminService.normalizeCharacterDraft has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 29, ternaries 6 (7 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
WikiPrivateCharacterService.applyDto (cognitive 36) api/src/modules/wiki/services/wiki-private-character.service.ts:733— WikiPrivateCharacterService.applyDto has cognitive complexity 36 (threshold 15). Drivers by points: if/else 21 (27 pts), boolean chains 5, loops 1 (2 pts), ternaries 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.
chat-message-list.ImageViewerOverlay (cognitive 36) apps/app/src/components/chat-message-list.tsx:7822— chat-message-list.ImageViewerOverlay has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 13 (20 pts), if/else 9, boolean chains 7 (nesting depth added 7). Of this number, 22 points are the body's own statements and 14 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.
account-security-panel.AccountSecurityPanel (cognitive 36) REDACTED:93— account-security-panel.AccountSecurityPanel has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18, boolean chains 10, ternaries 6 (8 pts) (nesting depth added 2). Most of this is not in the body itself: 11 of the 36 points are its own statements and the rest belongs to 10 function items inside it that branch (handleSubmit, a function literal at line 185, a function literal at line 196, …). 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.
mobile-details-action-sheet.MobileDetailsActionSheet (cognitive 36) apps/app/src/features/chat-details/mobile-details-action-sheet.tsx:25— mobile-details-action-sheet.MobileDetailsActionSheet has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (19 pts), ternaries 7 (8 pts), boolean chains 7, loops 2 (nesting depth added 5). Most of this is not in the body itself: 6 of the 36 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 133, 150, 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.
group-contacts-page.MobileGroupContactsPage (cognitive 36) apps/app/src/routes/group-contacts-page.tsx:72— group-contacts-page.MobileGroupContactsPage has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 15 (22 pts), if/else 6 (7 pts), boolean chains 6, loops 1 (nesting depth added 8). Of this number, 20 points are the body's own statements and 16 belong to 10 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.
subscription-inbox-page.MobileSubscriptionInboxPage (cognitive 36) apps/app/src/routes/subscription-inbox-page.tsx:61— subscription-inbox-page.MobileSubscriptionInboxPage has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 16 (24 pts), boolean chains 8, if/else 4 (nesting depth added 8). Of this number, 22 points are the body's own statements and 14 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.
chat-message-list.NoteViewerOverlay (cognitive 35) apps/app/src/components/chat-message-list.tsx:8323— chat-message-list.NoteViewerOverlay has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 11 (22 pts), boolean chains 10, if/else 3 (nesting depth added 11). Of this number, 23 points are the body's own statements and 12 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.
official-message-entry-row.OfficialMessageEntryRow (cognitive 35) apps/app/src/components/official-message-entry-row.tsx:12— official-message-entry-row.OfficialMessageEntryRow has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 17 (35 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.
use-continuous-voice-loop.useContinuousVoiceLoop (cognitive 35) apps/app/src/features/chat/use-continuous-voice-loop.ts:56— use-continuous-voice-loop.useContinuousVoiceLoop has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 9, ternaries 2 (3 pts), match/switch 2 (nesting depth added 9). Most of this is not in the body itself: 1 of the 35 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 156, 328, 305, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
mobile-mini-programs-workspace.MobileMiniProgramsWorkspace (cognitive 35) apps/app/src/features/mini-programs/mobile-mini-programs-workspace.tsx:60— mobile-mini-programs-workspace.MobileMiniProgramsWorkspace has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 17 (22 pts), boolean chains 8, if/else 3 (5 pts) (nesting depth added 7). Of this number, 27 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.
profile-info-name-page.ProfileInfoNamePage (cognitive 35) apps/app/src/routes/profile-info-name-page.tsx:37— profile-info-name-page.ProfileInfoNamePage has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 10 (16 pts), if/else 10, boolean chains 9 (nesting depth added 6). Of this number, 23 points are the body's own statements and 12 belong to 6 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
AdminAuthService.buildSessionSourceGroupSummaries (cognitive 35) apps/cloud-api/src/auth/admin-auth.service.ts:908— AdminAuthService.buildSessionSourceGroupSummaries has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 5 (15 pts), boolean chains 2, loops 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LocalUpstreamServiceManager.startService (cognitive 35) apps/wechat-connector/src/upstream-service-manager.ts:101— LocalUpstreamServiceManager.startService has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 9 (16 pts), if/else 13, boolean chains 6 (nesting depth added 7). Of this number, 31 points are the body's own statements and 4 belong to 2 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.
MinimaxQuotaCloudSyncService.pullOnceInner (cognitive 34) api/src/modules/minimax/minimax-quota-cloud-sync.service.ts:183— MinimaxQuotaCloudSyncService.pullOnceInner has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 4, loops 2 (4 pts), ternaries 3 (4 pts), error handling 1 (nesting depth added 14). Of this number, 32 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.
SchedulerService.runScheduledJob (cognitive 34) api/src/modules/scheduler/scheduler.service.ts:576— SchedulerService.runScheduledJob has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 3 (9 pts), error handling 3 (6 pts), boolean chains 4 (nesting depth added 17). Of this number, 26 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mobile-speech-input-sheet.MobileSpeechInputSheet (cognitive 34) apps/app/src/components/mobile-speech-input-sheet.tsx:97— mobile-speech-input-sheet.MobileSpeechInputSheet has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 12 (21 pts), boolean chains 9, if/else 4 (nesting depth added 9). Of this number, 28 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
use-voice-activity-detection.useVoiceActivityDetection (cognitive 34) apps/app/src/features/chat/use-voice-activity-detection.ts:65— use-voice-activity-detection.useVoiceActivityDetection has cognitive complexity 34 (threshold 15). Drivers by points: if/else 18 (23 pts), boolean chains 5, error handling 3 (5 pts), loops 1 (nesting depth added 7). None of this is in the body itself: all 34 points belong to 5 function literals inside it that branch (lines 148, 240, 204, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
contact-index-list.ContactIndexList (cognitive 34) apps/app/src/features/contacts/contact-index-list.tsx:8— contact-index-list.ContactIndexList has cognitive complexity 34 (threshold 15). Drivers by points: if/else 19 (24 pts), ternaries 5 (6 pts), boolean chains 3, loops 1 (nesting depth added 6). Most of this is not in the body itself: 4 of the 34 points are its own statements and the rest belongs to 11 function items inside it that branch (resolveItemFromClientY, a function literal at line 125, a function literal at line 149, …). 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.
desktop-feed-workspace.DesktopFeedWorkspace (cognitive 34) apps/app/src/features/desktop/feed/desktop-feed-workspace.tsx:103— desktop-feed-workspace.DesktopFeedWorkspace has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15, ternaries 7 (13 pts), boolean chains 6 (nesting depth added 6). Most of this is not in the body itself: 14 of the 34 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 170, 211, 243, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
signal-squad-engine.respondToEvent (cognitive 34) apps/app/src/features/games/signal-squad/signal-squad-engine.ts:329— signal-squad-engine.respondToEvent has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (24 pts), loops 2 (6 pts), boolean chains 4 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
desktop-mini-programs-workspace.DesktopMiniProgramsWorkspace (cognitive 34) apps/app/src/features/desktop/mini-programs/desktop-mini-programs-workspace.tsx:54— desktop-mini-programs-workspace.DesktopMiniProgramsWorkspace has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 18 (28 pts), boolean chains 5, if/else 1 (nesting depth added 10). Of this number, 29 points are the body's own statements and 5 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
game-center-session-panel.GameCenterSessionPanel (cognitive 34) apps/app/src/features/games/game-center-session-panel.tsx:32— game-center-session-panel.GameCenterSessionPanel has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 27 (32 pts), boolean chains 2 (nesting depth added 5). Of this number, 33 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.
subscription-panel.SubscriptionPanel (cognitive 34) apps/app/src/features/subscription/subscription-panel.tsx:356— subscription-panel.SubscriptionPanel has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 17 (20 pts), boolean chains 9, if/else 5 (nesting depth added 3). Of this number, 26 points are the body's own statements and 8 belong to 6 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
channels-page.ChannelVideoSurface (cognitive 34) apps/app/src/routes/channels-page.tsx:3631— channels-page.ChannelVideoSurface has cognitive complexity 34 (threshold 15). Drivers by points: if/else 18 (23 pts), boolean chains 6, ternaries 5 (nesting depth added 5). Most of this is not in the body itself: 7 of the 34 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 3665, handleTap, a function literal at line 3718, …). 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.
starred-friends-page.MobileStarredFriendsPage (cognitive 34) apps/app/src/routes/starred-friends-page.tsx:82— starred-friends-page.MobileStarredFriendsPage has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 17 (23 pts), boolean chains 6, if/else 5 (nesting depth added 6). Of this number, 20 points are the body's own statements and 14 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.
root-layout.RootLayout (cognitive 34) apps/wiki/src/components/root-layout.tsx:186— root-layout.RootLayout has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13, ternaries 12 (13 pts), boolean chains 8 (nesting depth added 1). Most of this is not in the body itself: 13 of the 34 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 229, a function literal at line 266, a function literal at line 194, …). 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.
AiOrchestratorService.generateReply (cognitive 33) api/src/modules/ai/ai-orchestrator.service.ts:2594— AiOrchestratorService.generateReply has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (22 pts), error handling 2 (5 pts), loops 2 (3 pts), ternaries 2, boolean chains 1 (nesting depth added 17). 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.
mobile-message-action-sheet.MobileMessageActionSheet (cognitive 33) apps/app/src/features/chat/mobile-message-action-sheet.tsx:47— mobile-message-action-sheet.MobileMessageActionSheet has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 20 (23 pts), if/else 9, boolean chains 1 (nesting depth added 3). Of this number, 22 points are the body's own statements and 11 belong to 7 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
chat-setting-row.ChatSettingRow (cognitive 33) apps/app/src/features/chat-details/chat-setting-row.tsx:17— chat-setting-row.ChatSettingRow has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 12 (19 pts), boolean chains 10, if/else 2 (4 pts) (nesting depth added 9). Of this number, 29 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
desktop-moments-feed.DesktopMomentsFeed (cognitive 33) apps/app/src/features/desktop/moments/desktop-moments-feed.tsx:64— desktop-moments-feed.DesktopMomentsFeed has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 13 (30 pts), boolean chains 3 (nesting depth added 17). Of this number, 22 points are the body's own statements and 11 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
games-page.GamesPage (cognitive 33) apps/app/src/routes/games-page.tsx:63— games-page.GamesPage has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 25 (34 pts), if/else 29 (33 pts), boolean chains 25, error handling 3 (5 pts) (nesting depth added 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This shape REPEATS in the file: one other method here (games-page.GamesPage::handleCopyGameToMobile) 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.
official-accounts-page.MobileOfficialAccountsPage (cognitive 33) apps/app/src/routes/official-accounts-page.tsx:64— official-accounts-page.MobileOfficialAccountsPage has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 13 (18 pts), if/else 8, boolean chains 7 (nesting depth added 5). Of this number, 20 points are the body's own statements and 13 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.
profile-subscription-page.ProfileSubscriptionPage (cognitive 33) apps/app/src/routes/profile-subscription-page.tsx:374— profile-subscription-page.ProfileSubscriptionPage has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 16 (18 pts), boolean chains 9, if/else 6 (nesting depth added 2). Of this number, 25 points are the body's own statements and 8 belong to 6 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
UsersService.ensureUserByEmail (cognitive 33) apps/cloud-api/src/users/users.service.ts:253— UsersService.ensureUserByEmail has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 6, error handling 3 (6 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
user-detail-page.UserDetailPage (cognitive 33) apps/cloud-console/src/routes/user-detail-page.tsx:16— user-detail-page.UserDetailPage has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 17 (22 pts), boolean chains 9, if/else 2 (nesting depth added 5). Of this number, 30 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, 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.
audit-desktop-text.readBalancedBraces (cognitive 33) REDACTED:121— audit-desktop-text.readBalancedBraces has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 3, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dom-text-localizer.DomTextLocalizer (cognitive 33) REDACTED:38— dom-text-localizer.DomTextLocalizer has cognitive complexity 33 (threshold 15). Drivers by points: if/else 17 (24 pts), boolean chains 6, loops 3 (nesting depth added 7). None of this is in the body itself: all 33 points belong to 9 function literals inside it that branch (lines 99, 154, 78, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
InferenceService.normalizeProviderPayload (cognitive 32) api/src/modules/inference/inference.service.ts:546— InferenceService.normalizeProviderPayload has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 19 (24 pts), boolean chains 8 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
AiOrchestratorService.generateImage (cognitive 32) api/src/modules/ai/ai-orchestrator.service.ts:3816— AiOrchestratorService.generateImage has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 2, error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ActionRuntimeService.buildHomeAssistantDiscoveryItem (cognitive 32) REDACTED:2782— ActionRuntimeService.buildHomeAssistantDiscoveryItem has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 11 (15 pts), boolean chains 14, if/else 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
CharacterSocialContextService.buildCrossCharacterInteractionBlock (cognitive 32) api/src/modules/chat/character-social-context.service.ts:183— CharacterSocialContextService.buildCrossCharacterInteractionBlock has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 9, ternaries 4 (6 pts), loops 3 (nesting depth added 4). Of this number, 17 points are the body's own statements and 15 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.
wiki-private-character-ai.service.mergeDraftWithUpdates (cognitive 32) api/src/modules/wiki/services/wiki-private-character-ai.service.ts:319— wiki-private-character-ai.service.mergeDraftWithUpdates has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 2 (8 pts), boolean chains 3 (nesting depth added 17). 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.
use-cat-inn-state.reducer (cognitive 32) apps/app/src/features/games/cat-inn/use-cat-inn-state.ts:126— use-cat-inn-state.reducer has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (30 pts), boolean chains 1, match/switch 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
client.request (cognitive 32) REDACTED:485— client.request has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 3 (7 pts), ternaries 4 (7 pts), boolean chains 6 (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.
SocialService.triggerSceneFriendRequest (cognitive 31) api/src/modules/social/social.service.ts:693— SocialService.triggerSceneFriendRequest has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (20 pts), ternaries 5 (6 pts), boolean chains 4, error handling 1 (nesting depth added 8). Of this number, 29 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.
NeedDiscoveryService.runCadence (cognitive 31) api/src/modules/need-discovery/need-discovery.service.ts:167— NeedDiscoveryService.runCadence has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 8, ternaries 5 (7 pts), error handling 2 (3 pts), loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
AbuseFilterService.evaluatePattern (cognitive 31) REDACTED:275— AbuseFilterService.evaluatePattern has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (18 pts), ternaries 2 (5 pts), loops 2 (4 pts), boolean chains 3, match/switch 1 (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
contacts-management-modal.ContactsManagementModal (cognitive 31) apps/app/src/features/contacts/management/contacts-management-modal.tsx:32— contacts-management-modal.ContactsManagementModal has cognitive complexity 31 (threshold 15). Drivers by points: if/else 23 (25 pts), boolean chains 2, match/switch 2, ternaries 2 (nesting depth added 2). Most of this is not in the body itself: 6 of the 31 points are its own statements and the rest belongs to 14 function literals inside it that branch (lines 173, 93, 198, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
desktop-channels-workspace.ChannelCommentsDrawer (cognitive 31) apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx:2274— desktop-channels-workspace.ChannelCommentsDrawer has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (19 pts), boolean chains 6, ternaries 3 (5 pts), loops 1 (nesting depth added 4). Most of this is not in the body itself: 4 of the 31 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 2435, 2372, 2362, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
use-tank-war-input.useTankWarInput (cognitive 31) apps/app/src/features/games/tank-war/use-tank-war-input.ts:46— use-tank-war-input.useTankWarInput has cognitive complexity 31 (threshold 15). Drivers by points: if/else 23 (28 pts), ternaries 2, boolean chains 1 (nesting depth added 5). None of this is in the body itself: all 31 points belong to 5 function literals inside it that branch (lines 55, 88, 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.
desktop-official-article-window-page.DesktopOfficialArticleWindowPage (cognitive 31) apps/app/src/routes/desktop-official-article-window-page.tsx:40— desktop-official-article-window-page.DesktopOfficialArticleWindowPage has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14, ternaries 10 (11 pts), boolean chains 5, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 9 of the 31 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 111, handleOpenInBrowser, a function literal at line 98, …). 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.
mobile-note-editor-page.MobileNoteEditor (cognitive 31) REDACTED:151— mobile-note-editor-page.MobileNoteEditor has cognitive complexity 31 (threshold 15). Drivers by points: if/else 77 (94 pts), ternaries 34 (51 pts), boolean chains 27, error handling 3 (4 pts), loops 1 (nesting depth added 35). 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 (mobile-note-editor-page.MobileNoteEditor::handleAttachmentSelection) 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.
attachment-semantic-text.resolveAttachmentSemanticText (cognitive 30) api/src/modules/chat/attachment-semantic-text.ts:159— attachment-semantic-text.resolveAttachmentSemanticText has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (14 pts), ternaries 7 (14 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NeedDiscoveryService.collectSignals (cognitive 30) api/src/modules/need-discovery/need-discovery.service.ts:420— NeedDiscoveryService.collectSignals has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 13 (18 pts), boolean chains 9, if/else 3 (nesting depth added 5). Most of this is not in the body itself: 10 of the 30 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 498, 662, 679, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
ParkingWarStateService.tickPlayerHomeOccupancies (cognitive 30) api/src/modules/games/parking-war/parking-war-state.service.ts:304— ParkingWarStateService.tickPlayerHomeOccupancies has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 3, loops 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WikiEditService.submitRecipeEdit (cognitive 30) api/src/modules/wiki/services/wiki-edit.service.ts:865— WikiEditService.submitRecipeEdit has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 9 (12 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 6). Of this number, 22 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
WikiPrivateCharacterCleanupService.onApplicationBootstrap (cognitive 30) api/src/modules/wiki/services/wiki-private-character-cleanup.service.ts:33— WikiPrivateCharacterCleanupService.onApplicationBootstrap has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (21 pts), ternaries 1 (4 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mobile-reminder-toast-host.MobileReminderToastHost (cognitive 30) apps/app/src/features/chat/mobile-reminder-toast-host.tsx:32— mobile-reminder-toast-host.MobileReminderToastHost has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 13 (16 pts), if/else 9, boolean chains 5 (nesting depth added 3). Of this number, 15 points are the body's own statements and 15 belong to 9 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
official-article-card.OfficialArticleCard (cognitive 30) apps/app/src/components/official-article-card.tsx:10— official-article-card.OfficialArticleCard has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 20 (29 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
voice-picker.VoicePickerModal (cognitive 30) apps/app/src/features/contacts/voice-picker.tsx:61— voice-picker.VoicePickerModal has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 12 (20 pts), if/else 7 (8 pts), boolean chains 1, error handling 1 (nesting depth added 9). Most of this is not in the body itself: 4 of the 30 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 304, 197, 370, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
cat-inn-game.CatInnGame (cognitive 30) apps/app/src/features/games/cat-inn/cat-inn-game.tsx:36— cat-inn-game.CatInnGame has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 18 (22 pts), boolean chains 7, if/else 1 (nesting depth added 4). Most of this is not in the body itself: 12 of the 30 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 169, 333, 143, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
pixel-arena-game.PixelArenaGame (cognitive 30) apps/app/src/features/games/pixel-arena/pixel-arena-game.tsx:49— pixel-arena-game.PixelArenaGame has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 17 (26 pts), boolean chains 4 (nesting depth added 9). Of this number, 24 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
use-cloud-farm-state.reducer (cognitive 30) apps/app/src/features/games/cloud-farm/use-cloud-farm-state.ts:167— use-cloud-farm-state.reducer has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 4, loops 1 (2 pts), match/switch 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.
desktop-games-workspace.DesktopGamesWorkspace (cognitive 30) apps/app/src/features/desktop/games/desktop-games-workspace.tsx:49— desktop-games-workspace.DesktopGamesWorkspace has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 19 (21 pts), if/else 5 (6 pts), boolean chains 3 (nesting depth added 3). Of this number, 25 points are the body's own statements and 5 belong to 4 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.
channels-page.MobileChannelsViewport (cognitive 30) apps/app/src/routes/channels-page.tsx:3939— channels-page.MobileChannelsViewport has cognitive complexity 30 (threshold 15). Drivers by points: if/else 25 (27 pts), boolean chains 2, ternaries 1 (nesting depth added 2). Most of this is not in the body itself: 1 of the 30 points is its own statement and the rest belongs to 20 function items inside it that branch (a function literal at line 4068, registerCardRef, a function literal at line 4187, …). 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.
users-page.UsersPage (cognitive 30) apps/cloud-console/src/routes/users-page.tsx:110— users-page.UsersPage has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 12 (18 pts), boolean chains 8, if/else 4 (nesting depth added 6). Most of this is not in the body itself: 12 of the 30 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 143, a function literal at line 382, toggleSort, …). 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.
AiOrchestratorService.generateMoment (cognitive 29) api/src/modules/ai/ai-orchestrator.service.ts:2817— AiOrchestratorService.generateMoment has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 8 (15 pts), if/else 5 (8 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 11). Of this number, 18 points are the body's own statements and 11 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.
MomentsService.generateLyricsOrFallback (cognitive 29) api/src/modules/moments/moments.service.ts:2803— MomentsService.generateLyricsOrFallback has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (20 pts), error handling 2 (6 pts), boolean chains 3 (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.
SystemService.runSingleEvalDataset (cognitive 29) api/src/modules/system/system.service.ts:2230— SystemService.runSingleEvalDataset has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 10 (20 pts), boolean chains 4, if/else 2 (4 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
detailed-timestamp-mode.writeLocalState (cognitive 29) apps/app/src/features/chat/detailed-timestamp-mode.ts:110— detailed-timestamp-mode.writeLocalState has cognitive complexity 29 (threshold 15). Drivers by points: error handling 5 (17 pts), if/else 6 (9 pts), ternaries 1 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
desktop-group-member-picker.DesktopGroupMemberPicker (cognitive 29) apps/app/src/features/desktop/chat/desktop-group-member-picker.tsx:32— desktop-group-member-picker.DesktopGroupMemberPicker has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13, ternaries 10 (11 pts), boolean chains 5 (nesting depth added 1). Most of this is not in the body itself: 11 of the 29 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 82, a function literal at line 167, handleConfirm, …). 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.
cyber-avatar-report-sheet.CyberAvatarReportSheet (cognitive 29) apps/app/src/features/cyber-avatar/cyber-avatar-report-sheet.tsx:25— cyber-avatar-report-sheet.CyberAvatarReportSheet has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 10 (25 pts), boolean chains 3, if/else 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
desktop-channels-workspace.ChannelVideoPlayer (cognitive 29) apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx:1736— desktop-channels-workspace.ChannelVideoPlayer has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 6, ternaries 4 (nesting depth added 5). Most of this is not in the body itself: 5 of the 29 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 1783, 1824, 1861, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
discover-avatar-encounter-page.ReceivedDetail (cognitive 29) apps/app/src/routes/discover-avatar-encounter-page.tsx:628— discover-avatar-encounter-page.ReceivedDetail has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 7 (19 pts), boolean chains 7, if/else 3 (nesting depth added 12). Of this number, 24 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
chat-room-page.ChatRoomPage (cognitive 29) apps/app/src/routes/chat-room-page.tsx:41— chat-room-page.ChatRoomPage has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16, boolean chains 8, ternaries 4 (5 pts) (nesting depth added 1). Most of this is not in the body itself: 5 of the 29 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 110, a function literal at line 146, 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.
cloud-auth.controller.extractIp (cognitive 29) REDACTED:110— cloud-auth.controller.extractIp has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 7, loops 3 (4 pts) (nesting depth added 7). Of this number, 26 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UsersService.ensureUser (cognitive 29) apps/cloud-api/src/users/users.service.ts:161— UsersService.ensureUser has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 6, error handling 3 (6 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AiUsageLedgerService.buildDowngradeCharacterQualityItems (cognitive 28) api/src/modules/analytics/ai-usage-ledger.service.ts:1145— AiUsageLedgerService.buildDowngradeCharacterQualityItems has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15, ternaries 8, boolean chains 5. None of this is in the body itself: all 28 points belong to 5 function items inside it that branch (a function literal at line 1250, a function literal at line 1299, a function literal at line 1225, …). 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.
ReminderRuntimeService.extractClock (cognitive 28) REDACTED:2828— ReminderRuntimeService.extractClock has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 4 (14 pts), if/else 5 (11 pts), boolean chains 3 (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.
SocialService.ensureDefaultFriendships (cognitive 28) api/src/modules/social/social.service.ts:569— SocialService.ensureDefaultFriendships has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 2 (6 pts), boolean chains 5, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CyberAvatarRealWorldService.runSync (cognitive 28) REDACTED:302— CyberAvatarRealWorldService.runSync has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 3, loops 1 (2 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 9). Of this number, 27 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.
MinimaxJobService.advanceMusicJob (cognitive 28) api/src/modules/minimax/minimax-job.service.ts:489— MinimaxJobService.advanceMusicJob has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (21 pts), error handling 2 (4 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GroupReplyPlannerService.selectReplyActorsForTurn (cognitive 28) api/src/modules/chat/group-reply-planner.service.ts:15— GroupReplyPlannerService.selectReplyActorsForTurn has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 4, ternaries 3 (4 pts), loops 2 (nesting depth added 6). Of this number, 22 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ShakeDiscoveryService.keepSession (cognitive 28) api/src/modules/social/shake-discovery.service.ts:560— ShakeDiscoveryService.keepSession has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (21 pts), error handling 2 (4 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MomentsService.scheduleCharacterInteractions (cognitive 28) api/src/modules/moments/moments.service.ts:1135— MomentsService.scheduleCharacterInteractions has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (16 pts), ternaries 5 (7 pts), boolean chains 4, error handling 1 (nesting depth added 7). Most of this is not in the body itself: 3 of the 28 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1205, 1177, 1151). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
SchedulerService.handleUpdateAiActiveStatus (cognitive 28) api/src/modules/scheduler/scheduler.service.ts:992— SchedulerService.handleUpdateAiActiveStatus has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (17 pts), ternaries 2 (8 pts), boolean chains 2, loops 1 (nesting depth added 17). 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.
SystemService.generateFallbackEvalOutput (cognitive 28) api/src/modules/system/system.service.ts:1447— SystemService.generateFallbackEvalOutput has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 7 (10 pts), boolean chains 5, match/switch 1 (nesting depth added 5). Of this number, 27 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.
WikiEditService.submit (cognitive 28) api/src/modules/wiki/services/wiki-edit.service.ts:84— WikiEditService.submit has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (16 pts), ternaries 8 (9 pts), boolean chains 2, loops 1 (nesting depth added 3). Of this number, 21 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
walkthrough-mobile-i18n.visitRoute (cognitive 28) apps/app/scripts/walkthrough-mobile-i18n.mjs:189— walkthrough-mobile-i18n.visitRoute has cognitive complexity 28 (threshold 15). Drivers by points: error handling 7 (12 pts), boolean chains 7, if/else 5 (7 pts), loops 1, ternaries 1 (nesting depth added 7). Of this number, 25 points are the body's own statements and 3 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.
message-attachment-semantic.resolveAttachmentSemanticText (cognitive 28) apps/app/src/lib/message-attachment-semantic.ts:162— message-attachment-semantic.resolveAttachmentSemanticText has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (14 pts), ternaries 6 (12 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.
add-friend-search.matchCharacter (cognitive 28) apps/app/src/features/contacts/add-friend-search.ts:137— add-friend-search.matchCharacter has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 3 (10 pts), loops 2, 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.
desktop-add-friend-result-card.DesktopAddFriendResultCard (cognitive 28) apps/app/src/features/desktop/contacts/desktop-add-friend-result-card.tsx:39— desktop-add-friend-result-card.DesktopAddFriendResultCard has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 12 (22 pts), boolean chains 6 (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.
desktop-add-friend-workspace.matchCharacter (cognitive 28) apps/app/src/features/desktop/contacts/desktop-add-friend-workspace.tsx:1018— desktop-add-friend-workspace.matchCharacter has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 3 (10 pts), loops 2, 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.
desktop-contacts-groups-pane.DesktopContactsGroupsPane (cognitive 28) apps/app/src/features/desktop/contacts/desktop-contacts-groups-pane.tsx:25— desktop-contacts-groups-pane.DesktopContactsGroupsPane has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 8 (23 pts), if/else 3, boolean chains 2 (nesting depth added 15). Of this number, 15 points are the body's own statements and 13 belong to 4 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.
mini-programs-page.MiniProgramsPage (cognitive 28) apps/app/src/routes/mini-programs-page.tsx:52— mini-programs-page.MiniProgramsPage has cognitive complexity 28 (threshold 15). Drivers by points: if/else 28 (33 pts), ternaries 25 (33 pts), boolean chains 19, error handling 3 (5 pts) (nesting depth added 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This shape REPEATS in the file: one other method here (mini-programs-page.MiniProgramsPage::handleCopyMiniProgramToMobile) 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.
tags-page.MobileTagsPage (cognitive 28) apps/app/src/routes/tags-page.tsx:83— tags-page.MobileTagsPage has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 15 (19 pts), boolean chains 5, if/else 4 (nesting depth added 4). Of this number, 20 points are the body's own statements and 8 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.
shop-page.ShopPage (cognitive 28) apps/app/src/routes/shop-page.tsx:65— shop-page.ShopPage has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 15 (22 pts), if/else 5, boolean chains 1 (nesting depth added 7). Of this number, 24 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.
account-page.ChangePasswordPanel (cognitive 28) apps/wiki/src/routes/account-page.tsx:176— account-page.ChangePasswordPanel has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (9 pts), ternaries 6 (8 pts), error handling 2 (nesting depth added 5). Of this number, 16 points are the body's own statements and 12 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ActionRuntimeService.fetchHomeAssistantRegistrySnapshot (cognitive 27) REDACTED:3042— ActionRuntimeService.fetchHomeAssistantRegistrySnapshot has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9, ternaries 4 (7 pts), boolean chains 6, error handling 3, loops 1 (2 pts) (nesting depth added 4). None of this is in the body itself: all 27 points belong to 4 function literals inside it that branch (lines 3098, 3080, 3171, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
DocumentExtractionService.extractFromBuffer (cognitive 27) api/src/modules/chat/document-extraction.service.ts:137— DocumentExtractionService.extractFromBuffer has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 4 (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.
FarmNpcTickService.runTick (cognitive 27) api/src/modules/games/farm/farm-npc-tick.service.ts:74— FarmNpcTickService.runTick has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 2 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SystemService.buildEvalPromptMessages (cognitive 27) api/src/modules/system/system.service.ts:1023— SystemService.buildEvalPromptMessages has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 10, if/else 8, ternaries 6 (8 pts), loops 1 (nesting depth added 2). Of this number, 26 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.
WikiReviewService.revert (cognitive 27) api/src/modules/wiki/services/wiki-review.service.ts:419— WikiReviewService.revert has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 3, ternaries 3, error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 5). Of this number, 21 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
walkthrough-mobile-i18n.buildTextScraper.<returned closure> (cognitive 27) apps/app/scripts/walkthrough-mobile-i18n.mjs:56— walkthrough-mobile-i18n.buildTextScraper.<returned closure> has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 6, loops 4 (5 pts), ternaries 1 (2 pts) (nesting depth added 7). Of this number, 20 points are the body's own statements and 7 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.
message-attachment-semantic.buildAttachmentFallbackLabel (cognitive 27) apps/app/src/lib/message-attachment-semantic.ts:283— message-attachment-semantic.buildAttachmentFallbackLabel has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 5 (13 pts), if/else 11, boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
request-error.describeRequestError (cognitive 27) apps/app/src/lib/request-error.ts:30— request-error.describeRequestError has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 6 (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.
wechat-comment-bar.WeChatCommentBar (cognitive 27) apps/app/src/components/wechat-comment-bar.tsx:42— wechat-comment-bar.WeChatCommentBar has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15, boolean chains 6, ternaries 6. Most of this is not in the body itself: 8 of the 27 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 255, a function literal at line 96, a function literal at line 137, …). 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.
signal-squad-game.SignalSquadGame (cognitive 27) apps/app/src/features/games/signal-squad/signal-squad-game.tsx:57— signal-squad-game.SignalSquadGame has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 13 (16 pts), boolean chains 9, if/else 2 (nesting depth added 3). Of this number, 18 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
farm-iso-tile.FarmIsoTile (cognitive 27) apps/app/src/features/games/farm/components/farm-iso-tile.tsx:30— farm-iso-tile.FarmIsoTile has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 15, ternaries 9 (12 pts) (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.
gift-sheet.GiftSheet (cognitive 27) apps/app/src/features/games/farm/components/gift-sheet.tsx:25— gift-sheet.GiftSheet has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 15, ternaries 4 (7 pts), if/else 5 (nesting depth added 3). Of this number, 16 points are the body's own statements and 11 belong to 8 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
admin-sessions-page.buildSourceGroupRiskTimelineCsv (cognitive 27) apps/cloud-console/src/routes/admin-sessions-page.tsx:959— admin-sessions-page.buildSourceGroupRiskTimelineCsv has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 9 (26 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
waiting-session-sync-page.buildWaitingSessionSyncContextGroups (cognitive 27) apps/cloud-console/src/routes/waiting-session-sync-page.tsx:221— waiting-session-sync-page.buildWaitingSessionSyncContextGroups has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 4 (8 pts), boolean chains 2, loops 1 (nesting depth added 11). Of this number, 24 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
feedbacks-page.FeedbacksPage (cognitive 27) apps/cloud-console/src/routes/feedbacks-page.tsx:90— feedbacks-page.FeedbacksPage has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 11 (16 pts), boolean chains 11 (nesting depth added 5). Most of this is not in the body itself: 12 of the 27 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 112, 263, 192, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
app-locale-provider.AppLocaleProvider (cognitive 27) packages/i18n/src/runtime/app-locale-provider.tsx:76— app-locale-provider.AppLocaleProvider has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 4, error handling 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 6). Most of this is not in the body itself: 2 of the 27 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 207, 152, 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.
ReminderRuntimeService.getMomentCommentNudgeTemplates (cognitive 26) REDACTED:3258— ReminderRuntimeService.getMomentCommentNudgeTemplates has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (25 pts), match/switch 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.
GroupReplyTaskService.mergeArchiveBucket (cognitive 26) api/src/modules/chat/group-reply-task.service.ts:758— GroupReplyTaskService.mergeArchiveBucket has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (20 pts), loops 4 (6 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GamesService.updateAdminCatalogItem (cognitive 26) api/src/modules/games/games.service.ts:639— GamesService.updateAdminCatalogItem has cognitive complexity 26 (threshold 15). Drivers by points: if/else 25, boolean chains 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
WechatSyncAdminService.import (cognitive 26) api/src/modules/admin/wechat-sync-admin.service.ts:257— WechatSyncAdminService.import has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 8, ternaries 2 (4 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
audio-card.AudioCard (cognitive 26) apps/app/src/components/audio-card.tsx:38— audio-card.AudioCard has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12, ternaries 8 (9 pts), boolean chains 5 (nesting depth added 1). Most of this is not in the body itself: 12 of the 26 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 85, handleToggle, a function literal at line 97, …). 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.
avatar-encounter-transcript.AvatarEncounterTranscript (cognitive 26) apps/app/src/components/avatar-encounter-transcript.tsx:49— avatar-encounter-transcript.AvatarEncounterTranscript has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 13 (15 pts), boolean chains 4, if/else 3 (4 pts), loops 3 (nesting depth added 3). Of this number, 13 points are the body's own statements and 13 belong to 5 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
message-quote-selection-sheet.MessageQuoteSelectionSheet (cognitive 26) apps/app/src/features/chat/message-quote-selection-sheet.tsx:18— message-quote-selection-sheet.MessageQuoteSelectionSheet has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 14 (16 pts), if/else 8, boolean chains 2 (nesting depth added 2). Of this number, 17 points are the body's own statements and 9 belong to 6 function items inside it that branch. To reduce it, 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.
chat-message-list.VoiceMessage (cognitive 26) apps/app/src/components/chat-message-list.tsx:6870— chat-message-list.VoiceMessage has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 19 (22 pts), if/else 4 (nesting depth added 3). Of this number, 22 points are the body's own statements and 4 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.
desktop-conversation-context-menu.DesktopConversationContextMenu (cognitive 26) apps/app/src/features/desktop/chat/desktop-conversation-context-menu.tsx:44— desktop-conversation-context-menu.DesktopConversationContextMenu has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 14, ternaries 11, if/else 1. Of this number, 24 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.
desktop-channels-workspace.ChannelAuthorOverlay (cognitive 26) apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx:2564— desktop-channels-workspace.ChannelAuthorOverlay has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 5, ternaries 1 (2 pts), loops 1 (nesting depth added 3). None of this is in the body itself: all 26 points belong to 5 function literals inside it that branch (lines 2714, 2644, 2635, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
pixel-arena-data.pickNpcMove (cognitive 26) apps/app/src/features/games/pixel-arena/pixel-arena-data.ts:159— pixel-arena-data.pickNpcMove has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 6 (9 pts), boolean chains 4 (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.
use-pull-to-refresh.usePullToRefresh (cognitive 26) apps/app/src/features/moments/use-pull-to-refresh.ts:68— use-pull-to-refresh.usePullToRefresh has cognitive complexity 26 (threshold 15). Drivers by points: if/else 20 (24 pts), boolean chains 1, ternaries 1 (nesting depth added 4). None of this is in the body itself: all 26 points belong to 9 function literals inside it that branch (lines 157, 199, 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.
mini-programs-page.MiniProgramsPage::handleCopyMiniProgramToMobile (cognitive 26) apps/app/src/routes/mini-programs-page.tsx:370— mini-programs-page.MiniProgramsPage::handleCopyMiniProgramToMobile has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (14 pts), error handling 3 (5 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (mini-programs-page.MiniProgramsPage) 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.
telemetry-page.OverviewTab (cognitive 26) apps/cloud-console/src/routes/telemetry-page.tsx:107— telemetry-page.OverviewTab has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 13 (25 pts), boolean chains 1 (nesting depth added 12). Of this number, 23 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
configure-ios-project.ensureAppDelegatePushHooks (cognitive 26) apps/ios-shell/scripts/configure-ios-project.mjs:610— configure-ios-project.ensureAppDelegatePushHooks has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19 (21 pts), boolean chains 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
InferenceService.rebindModelPersonas (cognitive 25) api/src/modules/inference/inference.service.ts:2883— InferenceService.rebindModelPersonas has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 7, loops 2 (4 pts), ternaries 2 (nesting depth added 6). Of this number, 19 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
character-blueprint.service.summarizeValue (cognitive 25) api/src/modules/characters/character-blueprint.service.ts:609— character-blueprint.service.summarizeValue has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 5 (10 pts), boolean chains 3, error handling 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.
RealWorldSyncService.createDigest (cognitive 25) REDACTED:2098— RealWorldSyncService.createDigest has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 14 (20 pts), boolean chains 4, 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.
chat-composer.MobileComposerStatusRail (cognitive 25) apps/app/src/components/chat-composer.tsx:4288— chat-composer.MobileComposerStatusRail has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 11 (22 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
group-message-context-menu.GroupMessageContextMenu (cognitive 25) apps/app/src/features/chat/group-message-context-menu.tsx:62— group-message-context-menu.GroupMessageContextMenu has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 19, boolean chains 5, if/else 1. 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, 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.
chat-message-list.GroupCallInviteMessage (cognitive 25) apps/app/src/components/chat-message-list.tsx:7423— chat-message-list.GroupCallInviteMessage has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 16 (18 pts), if/else 5 (7 pts) (nesting depth added 4). Of this number, 19 points are the body's own statements and 6 belong to 2 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.
mobile-shell.MobileShell (cognitive 25) apps/app/src/components/mobile-shell.tsx:40— mobile-shell.MobileShell has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 10 (20 pts), boolean chains 3, if/else 2 (nesting depth added 10). Most of this is not in the body itself: 3 of the 25 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 167, 91, 81, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
add-friend-search.buildAddFriendSearchResults (cognitive 25) apps/app/src/features/contacts/add-friend-search.ts:66— add-friend-search.buildAddFriendSearchResults has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 6 (15 pts), if/else 4 (6 pts), boolean chains 3, loops 1 (nesting depth added 11). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
desktop-contacts-workspace.DesktopContactsWorkspace (cognitive 25) apps/app/src/features/desktop/contacts/desktop-contacts-workspace.tsx:74— desktop-contacts-workspace.DesktopContactsWorkspace has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 15 (21 pts), boolean chains 4 (nesting depth added 6). Of this number, 19 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
desktop-channels-workspace.ChannelFeedSlide (cognitive 25) apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx:1917— desktop-channels-workspace.ChannelFeedSlide has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 16 (22 pts), boolean chains 2, if/else 1 (nesting depth added 6). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
desktop-add-friend-workspace.buildSearchResults (cognitive 25) apps/app/src/features/desktop/contacts/desktop-add-friend-workspace.tsx:948— desktop-add-friend-workspace.buildSearchResults has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 6 (15 pts), if/else 4 (6 pts), boolean chains 3, loops 1 (nesting depth added 11). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
search-result-card.SearchResultCard (cognitive 25) apps/app/src/features/search/search-result-card.tsx:12— search-result-card.SearchResultCard has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 10 (25 pts) (nesting depth added 15). 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.
profile-info-signature-page.ProfileInfoSignaturePage (cognitive 25) apps/app/src/routes/profile-info-signature-page.tsx:40— profile-info-signature-page.ProfileInfoSignaturePage has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (12 pts), ternaries 7, boolean chains 6 (nesting depth added 1). Most of this is not in the body itself: 11 of the 25 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 200, handleSave, a function literal at line 138, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
profile-info-contact-page.ProfileInfoContactPage (cognitive 25) apps/app/src/routes/profile-info-contact-page.tsx:41— profile-info-contact-page.ProfileInfoContactPage has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (12 pts), ternaries 7, boolean chains 6 (nesting depth added 1). Most of this is not in the body itself: 10 of the 25 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 210, handleSave, 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.
wiki-api.request (cognitive 25) apps/wiki/src/lib/wiki-api.ts:48— wiki-api.request has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 6, ternaries 2 (5 pts), error handling 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.
FarmStateService.giftItemToNeighbor (cognitive 24) api/src/modules/games/farm/farm-state.service.ts:1212— FarmStateService.giftItemToNeighbor has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SystemService.resolveDigitalHumanConfig (cognitive 24) api/src/modules/system/system.service.ts:2478— SystemService.resolveDigitalHumanConfig has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 6 (12 pts), boolean chains 6, if/else 3 (4 pts), error handling 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
abuse-filter.service.assertValidFilterPattern (cognitive 24) REDACTED:61— abuse-filter.service.assertValidFilterPattern has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 8, error handling 1 (2 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WikiPrivateCharacterService.parseImportBundle (cognitive 24) api/src/modules/wiki/services/wiki-private-character.service.ts:668— WikiPrivateCharacterService.parseImportBundle has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 16 (17 pts), boolean chains 4, if/else 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
WikiCharacterVideoPublishSyncService.publish (cognitive 24) api/src/modules/wiki/services/wiki-character-video-publish-sync.service.ts:26— WikiCharacterVideoPublishSyncService.publish has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 3 (5 pts), ternaries 2 (5 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
chat-message-delivery.attachmentsEqual (cognitive 24) apps/app/src/features/chat/chat-message-delivery.ts:561— chat-message-delivery.attachmentsEqual has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 15, if/else 9. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
desktop-search-launcher.SearchLauncherStatusCard (cognitive 24) apps/app/src/features/search/desktop-search-launcher.tsx:1279— desktop-search-launcher.SearchLauncherStatusCard has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 12 (24 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
desktop-chat-workspace.ConversationCardLink (cognitive 24) apps/app/src/features/desktop/chat/desktop-chat-workspace.tsx:3094— desktop-chat-workspace.ConversationCardLink has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 15 (21 pts), if/else 2, boolean chains 1 (nesting depth added 6). Of this number, 22 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.
tank-war-game.TankWarGame (cognitive 24) apps/app/src/features/games/tank-war/tank-war-game.tsx:35— tank-war-game.TankWarGame has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 12 (16 pts), boolean chains 4, if/else 3 (4 pts) (nesting depth added 5). Of this number, 19 points are the body's own statements and 5 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.
leaderboard-sheet.LeaderboardSheet (cognitive 24) apps/app/src/features/games/farm/components/leaderboard-sheet.tsx:20— leaderboard-sheet.LeaderboardSheet has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 12 (18 pts), boolean chains 3, if/else 3 (nesting depth added 6). Most of this is not in the body itself: 4 of the 24 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 87, 24, 26, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
desktop-chat-image-viewer-page.resolveChatImageViewerReturnPath (cognitive 24) apps/app/src/routes/desktop-chat-image-viewer-page.tsx:694— desktop-chat-image-viewer-page.resolveChatImageViewerReturnPath has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 9 (15 pts), if/else 6 (8 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.
group-message-search-page.MobileGroupMessageSearchPage (cognitive 24) apps/app/src/routes/group-message-search-page.tsx:43— group-message-search-page.MobileGroupMessageSearchPage has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (8 pts), ternaries 6 (7 pts), loops 1 (nesting depth added 3). Most of this is not in the body itself: 7 of the 24 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 92, 122, 113, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
WorldRuntimeService.handleRuntimeSignal (cognitive 24) apps/cloud-api/src/runtime-callbacks/world-runtime.service.ts:114— WorldRuntimeService.handleRuntimeSignal has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 7, 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.
character-edit-form.CharacterEditForm::overlaySnapshotToForm (cognitive 24) apps/wiki/src/components/character-edit-form.tsx:575— character-edit-form.CharacterEditForm::overlaySnapshotToForm has cognitive complexity 24 (threshold 15). Drivers by points: if/else 24. 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. This shape REPEATS in the file: one other method here (character-edit-form.CharacterEditForm) 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.
character-page.CharacterPage (cognitive 24) apps/wiki/src/routes/character-page.tsx:67— character-page.CharacterPage has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 22, if/else 1, ternaries 1. Of this number, 20 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.
home-page.HomePage (cognitive 24) apps/wiki/src/routes/home-page.tsx:19— home-page.HomePage has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 12, if/else 6, ternaries 5 (6 pts) (nesting depth added 1). Of this number, 15 points are the body's own statements and 9 belong to 9 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
InferenceService.ensureDefaultProviderAccount (cognitive 23) api/src/modules/inference/inference.service.ts:783— InferenceService.ensureDefaultProviderAccount has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 16, ternaries 5, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
InferenceService.installVendorFamilyPersonas (cognitive 23) api/src/modules/inference/inference.service.ts:2655— InferenceService.installVendorFamilyPersonas has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CyberAvatarService.buildFallbackProfile (cognitive 23) api/src/modules/cyber-avatar/cyber-avatar.service.ts:1217— CyberAvatarService.buildFallbackProfile has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 17 (21 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
FeedPreferenceDigestService.runForCurrentOwner (cognitive 23) api/src/modules/cyber-avatar/feed-preference-digest.service.ts:73— FeedPreferenceDigestService.runForCurrentOwner has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 5 (7 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VoiceCallsService.createTurn (cognitive 23) api/src/modules/chat/voice-calls.service.ts:49— VoiceCallsService.createTurn has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (11 pts), ternaries 6, boolean chains 5, error handling 1 (nesting depth added 1). Of this number, 21 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ShakeDiscoveryService.collectSignals (cognitive 23) api/src/modules/social/shake-discovery.service.ts:781— ShakeDiscoveryService.collectSignals has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 8 (11 pts), boolean chains 9, if/else 3 (nesting depth added 3). Most of this is not in the body itself: 10 of the 23 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 1003, 1018, 864, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
MomentsService.normalizeMomentMediaAsset (cognitive 23) api/src/modules/moments/moments.service.ts:2084— MomentsService.normalizeMomentMediaAsset has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 20, if/else 2, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
SchedulerService.handleTriggerMemoryProactiveMessages (cognitive 23) api/src/modules/scheduler/scheduler.service.ts:1667— SchedulerService.handleTriggerMemoryProactiveMessages has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 2 (5 pts), loops 2 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
walkthrough-mobile-i18n.main (cognitive 23) apps/app/scripts/walkthrough-mobile-i18n.mjs:360— walkthrough-mobile-i18n.main has cognitive complexity 23 (threshold 15). Drivers by points: loops 4 (11 pts), if/else 3 (8 pts), ternaries 3, 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.
chat-composer.ChatComposer::handleDesktopInputKeyDown (cognitive 23) apps/app/src/components/chat-composer.tsx:3029— chat-composer.ChatComposer::handleDesktopInputKeyDown has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 7 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (chat-composer.ChatComposer) 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.
error-translate.translateAppErrorCode (cognitive 23) apps/app/src/lib/error-translate.ts:22— error-translate.translateAppErrorCode has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 8 (16 pts), boolean chains 4, if/else 2, match/switch 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.
desktop-chat-route-state.parseDesktopChatRouteHash (cognitive 23) apps/app/src/features/desktop/chat/desktop-chat-route-state.ts:28— desktop-chat-route-state.parseDesktopChatRouteHash has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 11, ternaries 11, if/else 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
chat-message-list.NoteCardMessage (cognitive 23) apps/app/src/components/chat-message-list.tsx:6288— chat-message-list.NoteCardMessage has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 13 (16 pts), boolean chains 4, if/else 2 (3 pts) (nesting depth added 4). Of this number, 20 points are the body's own statements and 3 belong to 2 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.
backfill-cloud-saas-users.run (cognitive 23) apps/cloud-api/scripts/backfill-cloud-saas-users.mjs:202— backfill-cloud-saas-users.run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (4 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
audit-desktop-text.extractMatchArms (cognitive 23) REDACTED:172— audit-desktop-text.extractMatchArms has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
capture-app-screenshots.main (cognitive 23) apps/site/scripts/capture-app-screenshots.mjs:130— capture-app-screenshots.main has cognitive complexity 23 (threshold 15). Drivers by points: if/else 3 (7 pts), error handling 2 (6 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 11). Of this number, 17 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
server.createConnectorServer (cognitive 23) REDACTED:10— server.createConnectorServer has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 10, if/else 10, ternaries 1 (2 pts), error handling 1 (nesting depth added 1). None of this is in the body itself: all 23 points belong to one function literal inside it that branches (line 11). 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.
WorldLanguageService.formatPostCommentTask (cognitive 22) api/src/modules/config/world-language.service.ts:144— WorldLanguageService.formatPostCommentTask has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 8 (20 pts), match/switch 2 (nesting depth added 12). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to one function literal inside it that branches (line 151). 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.
ai-text-sanitizer.repairTruncatedJson (cognitive 22) api/src/modules/ai/ai-text-sanitizer.ts:78— ai-text-sanitizer.repairTruncatedJson has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, error handling 2, loops 2, 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.
attachment-semantic-text.resolveAttachmentSearchableText (cognitive 22) api/src/modules/chat/attachment-semantic-text.ts:31— attachment-semantic-text.resolveAttachmentSearchableText has cognitive complexity 22 (threshold 15). Drivers by points: if/else 17 (22 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
scene-matching.scoreCharacterForScene (cognitive 22) api/src/modules/social/scene-matching.ts:259— scene-matching.scoreCharacterForScene has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (18 pts), loops 3, boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
FeedService.getVisibleFeedPosts (cognitive 22) api/src/modules/feed/feed.service.ts:3996— FeedService.getVisibleFeedPosts has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 2, ternaries 1 (nesting depth added 6). Most of this is not in the body itself: 3 of the 22 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 4052, 4028). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
ParkingWarTickService.runTick (cognitive 22) api/src/modules/games/parking-war/parking-war-tick.service.ts:86— ParkingWarTickService.runTick has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 2 (6 pts), error handling 2 (4 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SystemService.loadEvalCharacter (cognitive 22) api/src/modules/system/system.service.ts:835— SystemService.loadEvalCharacter has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 6 (9 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tab-page-top-bar.TabPageTopBar (cognitive 22) apps/app/src/components/tab-page-top-bar.tsx:18— tab-page-top-bar.TabPageTopBar has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 13 (18 pts), if/else 4 (nesting depth added 5). Of this number, 17 points are the body's own statements and 5 belong to 2 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.
parking-war-game.RankTab (cognitive 22) apps/app/src/features/games/parking-war/parking-war-game.tsx:1208— parking-war-game.RankTab has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 6 (12 pts), boolean chains 9, error handling 1 (nesting depth added 6). Most of this is not in the body itself: 3 of the 22 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 1281, a function literal at line 1235, handleClaim, …). 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.
tank-war-renderer.drawExplosions (cognitive 22) apps/app/src/features/games/tank-war/tank-war-renderer.ts:192— tank-war-renderer.drawExplosions has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 7 (19 pts), if/else 1 (2 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
use-shake-detector.useShakeDetector (cognitive 22) apps/app/src/hooks/use-shake-detector.ts:23— use-shake-detector.useShakeDetector has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 5, ternaries 1 (nesting depth added 6). None of this is in the body itself: all 22 points belong to 4 function literals inside it that branch (lines 99, 82, 145, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
CloudService.syncWorldForRequest (cognitive 22) apps/cloud-api/src/cloud/cloud.service.ts:1206— CloudService.syncWorldForRequest has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
waiting-session-sync-notices.createWaitingSessionSyncSnapshotNotice (cognitive 22) apps/cloud-console/src/lib/waiting-session-sync-notices.ts:174— waiting-session-sync-notices.createWaitingSessionSyncSnapshotNotice has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 10 (22 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
admin-sessions-page.buildSourceGroupRiskTimeline (cognitive 22) apps/cloud-console/src/routes/admin-sessions-page.tsx:608— admin-sessions-page.buildSourceGroupRiskTimeline has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 1 (3 pts), boolean chains 2, loops 2 (nesting depth added 8). Most of this is not in the body itself: 10 of the 22 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 657, addEventLabel). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
create-character-page.CreateCharacterPage (cognitive 22) apps/wiki/src/routes/create-character-page.tsx:38— create-character-page.CreateCharacterPage has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 8, ternaries 6 (8 pts), if/else 5 (6 pts) (nesting depth added 3). Of this number, 15 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
search-page.SearchPage (cognitive 22) apps/wiki/src/routes/search-page.tsx:17— search-page.SearchPage has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, ternaries 5 (11 pts) (nesting depth added 6). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
AiUsageLedgerService.getDowngradeQuality (cognitive 21) api/src/modules/analytics/ai-usage-ledger.service.ts:801— AiUsageLedgerService.getDowngradeQuality has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8, ternaries 8, boolean chains 5. Most of this is not in the body itself: 9 of the 21 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 930, 947, 958, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
AiOrchestratorService.transcribeAudio (cognitive 21) api/src/modules/ai/ai-orchestrator.service.ts:3995— AiOrchestratorService.transcribeAudio has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 7, error handling 1 (2 pts), loops 1 (nesting depth added 5). Of this number, 19 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.
relationship-seed.ensureAiRelationshipSeed (cognitive 21) api/src/database/relationship-seed.ts:7— relationship-seed.ensureAiRelationshipSeed has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 4 (7 pts), ternaries 2 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
feed.service.normalizeFeedMediaAsset (cognitive 21) api/src/modules/feed/feed.service.ts:5241— feed.service.normalizeFeedMediaAsset has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 18, if/else 2, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
MomentsMinimaxCallbacks.onCompleted (cognitive 21) api/src/modules/moments/moments-minimax.callbacks.ts:32— MomentsMinimaxCallbacks.onCompleted has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), error handling 2 (4 pts), boolean chains 2, loops 1 (2 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.
SchedulerService.handleUpdateCharacterStatus (cognitive 21) api/src/modules/scheduler/scheduler.service.ts:1558— SchedulerService.handleUpdateCharacterStatus has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). Of this number, 17 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.
SystemService.getStatus (cognitive 21) api/src/modules/system/system.service.ts:2576— SystemService.getStatus has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 10 (13 pts), boolean chains 8 (nesting depth added 3). Of this number, 20 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: 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.
WikiPrivateCharacterAiService.runJobInBackground (cognitive 21) api/src/modules/wiki/services/wiki-private-character-ai.service.ts:237— WikiPrivateCharacterAiService.runJobInBackground has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 5 (11 pts), error handling 5 (6 pts), boolean chains 2, if/else 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.
WikiSyncAdminService.applyOne (cognitive 21) api/src/modules/admin/wiki-sync-admin.service.ts:300— WikiSyncAdminService.applyOne has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10, boolean chains 7, ternaries 2, error handling 1, loops 1. Of this number, 17 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: 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.
sticker-panel.StickerPanel::handleSearchInputKeyDown (cognitive 21) apps/app/src/features/chat/stickers/sticker-panel.tsx:1613— sticker-panel.StickerPanel::handleSearchInputKeyDown has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (sticker-panel.StickerPanel) 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.
mobile-message-reminder-sheet.MobileMessageReminderSheet (cognitive 21) apps/app/src/features/chat/mobile-message-reminder-sheet.tsx:26— mobile-message-reminder-sheet.MobileMessageReminderSheet has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 12 (13 pts), if/else 6, boolean chains 2 (nesting depth added 1). Of this number, 11 points are the body's own statements and 10 belong to 6 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.
chat-message-list.FeedPostCardMessage (cognitive 21) apps/app/src/components/chat-message-list.tsx:6458— chat-message-list.FeedPostCardMessage has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 9 (11 pts), if/else 6 (7 pts), boolean chains 3 (nesting depth added 3). Of this number, 15 points are the body's own statements and 6 belong to 2 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.
mobile-discover-tool-shell.MobileDiscoverToolShell::handleShare (cognitive 21) apps/app/src/components/mobile-discover-tool-shell.tsx:56— mobile-discover-tool-shell.MobileDiscoverToolShell::handleShare has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 8 (12 pts), if/else 5 (6 pts), boolean chains 2, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mobile-document-shell.MobileDocumentShell::handleShareDocument (cognitive 21) apps/app/src/components/mobile-document-shell.tsx:57— mobile-document-shell.MobileDocumentShell::handleShareDocument has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 8 (13 pts), if/else 4 (5 pts), boolean chains 2, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
desktop-channels-workspace.ChannelMediaSurface (cognitive 21) apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx:1434— desktop-channels-workspace.ChannelMediaSurface has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 11, ternaries 3 (6 pts), if/else 4 (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.
desktop-note-send-dialog.DesktopNoteSendDialog (cognitive 21) apps/app/src/features/desktop/chat/desktop-note-send-dialog.tsx:41— desktop-note-send-dialog.DesktopNoteSendDialog has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10, ternaries 6, boolean chains 5. Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 101, 289, 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.
cloud-farm-game.CloudFarmGame (cognitive 21) apps/app/src/features/games/cloud-farm/cloud-farm-game.tsx:45— cloud-farm-game.CloudFarmGame has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 9 (11 pts), if/else 5 (6 pts), boolean chains 3, loops 1 (nesting depth added 3). Most of this is not in the body itself: 5 of the 21 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 117, 203, 276, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
tank-war-engine.tick (cognitive 21) apps/app/src/features/games/tank-war/tank-war-engine.ts:912— tank-war-engine.tick has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5, loops 2, ternaries 1 (nesting depth added 4). 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.
use-tank-war-world.useTankWarWorld (cognitive 21) apps/app/src/features/games/tank-war/use-tank-war-world.ts:43— use-tank-war-world.useTankWarWorld has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 1, ternaries 1 (nesting depth added 6). None of this is in the body itself: all 21 points belong to 5 function literals inside it that branch (lines 77, 152, 130, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
desktop-moments-toolbar.DesktopMomentsToolbar (cognitive 21) apps/app/src/features/desktop/moments/desktop-moments-toolbar.tsx:36— desktop-moments-toolbar.DesktopMomentsToolbar has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 10 (12 pts), boolean chains 9 (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.
gift-cabinet-page.GiftCabinetPage (cognitive 21) apps/app/src/routes/gift-cabinet-page.tsx:38— gift-cabinet-page.GiftCabinetPage has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 10 (18 pts), boolean chains 2, if/else 1 (nesting depth added 8). Of this number, 11 points are the body's own statements and 10 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.
desktop-chat-window-page.DesktopChatWindowPage (cognitive 21) apps/app/src/routes/desktop-chat-window-page.tsx:26— desktop-chat-window-page.DesktopChatWindowPage has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10, boolean chains 7, ternaries 3, error handling 1. Most of this is not in the body itself: 7 of the 21 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 68, 94, 130, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
LocalProcessComputeProviderService.onModuleInit (cognitive 21) apps/cloud-api/src/orchestration/local-process-compute-provider.service.ts:130— LocalProcessComputeProviderService.onModuleInit has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 3 (6 pts), boolean chains 4, 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.
LocalProcessComputeProviderService.allocatePort (cognitive 21) apps/cloud-api/src/orchestration/local-process-compute-provider.service.ts:423— LocalProcessComputeProviderService.allocatePort has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 5 (6 pts), error handling 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
root-layout.getRouteMeta (cognitive 21) apps/cloud-console/src/components/root-layout.tsx:36— root-layout.getRouteMeta has cognitive complexity 21 (threshold 15). Drivers by points: if/else 21. 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.
YinjieRuntimePlugin.resolveSupportedLocale (cognitive 21) apps/ios-shell/plugins/swift-stub/YinjieRuntimePlugin.swift:155— YinjieRuntimePlugin.resolveSupportedLocale has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 15, if/else 6. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
PromptBuilderService.buildMomentSystemPrompt (cognitive 20) api/src/modules/ai/prompt-builder.service.ts:936— PromptBuilderService.buildMomentSystemPrompt has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
AiUsageLedgerService.getBudgetExecutionDecision (cognitive 20) api/src/modules/analytics/ai-usage-ledger.service.ts:435— AiUsageLedgerService.getBudgetExecutionDecision has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (7 pts), ternaries 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
MinimaxClient.requestJson (cognitive 20) api/src/modules/minimax/minimax.client.ts:501— MinimaxClient.requestJson has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 6, if/else 5 (6 pts), ternaries 3 (6 pts), error handling 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RealWorldSyncService.buildWorldNewsDeskSignals (cognitive 20) REDACTED:1097— RealWorldSyncService.buildWorldNewsDeskSignals has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 9). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
character-behavior-blueprint.service.normalizeBehaviorDefinition (cognitive 20) api/src/modules/characters/character-behavior-blueprint.service.ts:186— character-behavior-blueprint.service.normalizeBehaviorDefinition has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12, boolean chains 7, ternaries 1. Of this number, 19 points are the body's own statements and 1 belongs to one function item 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.
ActionRuntimeService.normalizeLlmPlan (cognitive 20) REDACTED:1691— ActionRuntimeService.normalizeLlmPlan has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 9 (10 pts), boolean chains 6, if/else 4 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ActionRuntimeService.resolveMissingSlots (cognitive 20) REDACTED:2178— ActionRuntimeService.resolveMissingSlots has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ActionRuntimeService.executeMockOperation (cognitive 20) REDACTED:3535— ActionRuntimeService.executeMockOperation has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (13 pts), if/else 6, 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.
OwnerOpenQuestionService.runForCurrentOwner (cognitive 20) api/src/modules/cyber-avatar/owner-open-question.service.ts:81— OwnerOpenQuestionService.runForCurrentOwner has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 6, ternaries 5, loops 2 (nesting depth added 3). Of this number, 17 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.
SocialService.activateFriendship (cognitive 20) api/src/modules/social/social.service.ts:1757— SocialService.activateFriendship has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 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.
GroupReplyOrchestratorService.executeTurn (cognitive 20) api/src/modules/chat/group-reply-orchestrator.service.ts:138— GroupReplyOrchestratorService.executeTurn has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FeedService.scheduleAiChannelsCommentReplies (cognitive 20) api/src/modules/feed/feed.service.ts:2736— FeedService.scheduleAiChannelsCommentReplies has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 4, error handling 2 (nesting depth added 2). Of this number, 13 points are the body's own statements and 7 belong to 2 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.
MomentsService.ensureMomentImageCaptions (cognitive 20) api/src/modules/moments/moments.service.ts:2393— MomentsService.ensureMomentImageCaptions has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 3, error handling 1, ternaries 1 (nesting depth added 4). Of this number, 18 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.
GamesService.updateAdminGameSubmission (cognitive 20) api/src/modules/games/games.service.ts:864— GamesService.updateAdminGameSubmission has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20. 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.
ParkingWarTickService.bumpWarningLevels (cognitive 20) api/src/modules/games/parking-war/parking-war-tick.service.ts:528— ParkingWarTickService.bumpWarningLevels has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 3, 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.
WikiReviewService.decide (cognitive 20) api/src/modules/wiki/services/wiki-review.service.ts:171— WikiReviewService.decide has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11, boolean chains 4, ternaries 3, error handling 1 (2 pts) (nesting depth added 1). Of this number, 13 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, 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.
message-attachment-semantic.resolveAttachmentSearchableText (cognitive 20) apps/app/src/lib/message-attachment-semantic.ts:38— message-attachment-semantic.resolveAttachmentSearchableText has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (20 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.
wechat-action-bubble.WeChatActionBubble (cognitive 20) apps/app/src/components/wechat-action-bubble.tsx:37— wechat-action-bubble.WeChatActionBubble has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 7 (9 pts), if/else 7, boolean chains 4 (nesting depth added 2). Of this number, 11 points are the body's own statements and 9 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.
digital-human-stage.DigitalHumanStage (cognitive 20) apps/app/src/features/chat/digital-human-stage.tsx:21— digital-human-stage.DigitalHumanStage has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 15 (18 pts), boolean chains 2 (nesting depth added 3). Of this number, 15 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
desktop-group-member-removal-picker.DesktopGroupMemberRemovalPicker (cognitive 20) apps/app/src/features/desktop/chat/desktop-group-member-removal-picker.tsx:32— desktop-group-member-removal-picker.DesktopGroupMemberRemovalPicker has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11, ternaries 5, boolean chains 4. Most of this is not in the body itself: 7 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 128, a function literal at line 61, handleConfirm, …). 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.
desktop-chat-details-panel.DesktopWechatGroupRow (cognitive 20) apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:2247— desktop-chat-details-panel.DesktopWechatGroupRow has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 11 (16 pts), boolean chains 2, if/else 2 (nesting depth added 5). Of this number, 18 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.
management-permissions-detail-screen.ManagementPermissionsDetailScreen (cognitive 20) apps/app/src/features/contacts/management/management-permissions-detail-screen.tsx:25— management-permissions-detail-screen.ManagementPermissionsDetailScreen has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 8, error handling 1, ternaries 1 (nesting depth added 1). Of this number, 11 points are the body's own statements and 9 belong to 4 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
embedded-game-host.EmbeddedGameHost (cognitive 20) apps/app/src/features/games/embedded/embedded-game-host.tsx:29— embedded-game-host.EmbeddedGameHost has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 3 (5 pts), boolean chains 2, error handling 2, match/switch 1 (nesting depth added 3). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 47, 109, 71, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
welcome-page.WelcomePage (cognitive 20) apps/app/src/routes/welcome-page.tsx:397— welcome-page.WelcomePage has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 79 (155 pts), if/else 90 (132 pts), boolean chains 68, error handling 6 (7 pts), loops 1 (nesting depth added 119). To reduce it, split the body into named stages: move each independent 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: 3 other methods here (welcome-page.WelcomePage::continueWithCloudWorld, welcome-page.WelcomePage::renderModeFields, welcome-page.WelcomePage::renderEntryStep) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
group-chat-page.GroupChatPage (cognitive 20) apps/app/src/routes/group-chat-page.tsx:30— group-chat-page.GroupChatPage has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10, boolean chains 5, ternaries 4 (5 pts) (nesting depth added 1). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 60, a function literal at line 99, navigateToRouteStateReturn, …). 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.
mobile-notes-page.MobileNotesPage (cognitive 20) apps/app/src/routes/mobile-notes-page.tsx:51— mobile-notes-page.MobileNotesPage has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 12 (13 pts), boolean chains 5, if/else 2 (nesting depth added 1). Of this number, 10 points are the body's own statements and 10 belong to 4 function items inside it that branch. To reduce it, 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.
mobile-note-editor-page.MobileNoteEditor::handleAttachmentSelection (cognitive 20) REDACTED:797— mobile-note-editor-page.MobileNoteEditor::handleAttachmentSelection has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 3 (5 pts), error handling 2 (3 pts), boolean chains 2, 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. This shape REPEATS in the file: one other method here (mobile-note-editor-page.MobileNoteEditor) 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.
WorldLifecycleWorkerService.runJob (cognitive 20) apps/cloud-api/src/orchestration/world-lifecycle-worker.service.ts:118— WorldLifecycleWorkerService.runJob has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 1 (2 pts), error handling 1, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UsersService.listUsersAdmin (cognitive 20) apps/cloud-api/src/users/users.service.ts:432— UsersService.listUsersAdmin has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16 (19 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.
waiting-session-sync-copy.buildWaitingSessionSyncArtifactFilename (cognitive 20) apps/cloud-console/src/lib/waiting-session-sync-copy.ts:121— waiting-session-sync-copy.buildWaitingSessionSyncArtifactFilename has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 10 (19 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
conflict-resolver.ConflictResolver (cognitive 20) apps/wiki/src/components/conflict-resolver.tsx:40— conflict-resolver.ConflictResolver has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 8 (10 pts), if/else 4 (5 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 4). None of this is in the body itself: all 20 points belong to 4 function items inside it that branch (commit, a function literal at line 94, 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.
talk-panel.ThreadDetail (cognitive 20) apps/wiki/src/components/talk-panel.tsx:192— talk-panel.ThreadDetail has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, if/else 5 (6 pts), loops 1, ternaries 1 (nesting depth added 1). Of this number, 10 points are the body's own statements and 10 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
AiUsageLedgerService.parseUsageAuditPayload (cognitive 19) api/src/modules/analytics/ai-usage-ledger.service.ts:1905— AiUsageLedgerService.parseUsageAuditPayload has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 7, ternaries 7, if/else 4, error handling 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
InferenceService.runAudioInputDiagnostic (cognitive 19) api/src/modules/inference/inference.service.ts:1708— InferenceService.runAudioInputDiagnostic has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, ternaries 1 (3 pts), error handling 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InferenceService.installModelPersonas (cognitive 19) api/src/modules/inference/inference.service.ts:2492— InferenceService.installModelPersonas has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 5 (7 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReminderRuntimeService.handleConversationTurn (cognitive 19) REDACTED:843— ReminderRuntimeService.handleConversationTurn has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ActionRuntimeService.buildTicketPlan (cognitive 19) REDACTED:1496— ActionRuntimeService.buildTicketPlan has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (13 pts), boolean chains 3, if/else 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ActionRuntimeService.discoverHomeAssistantConnector (cognitive 19) REDACTED:2653— ActionRuntimeService.discoverHomeAssistantConnector has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8, boolean chains 4, ternaries 3 (4 pts), error handling 2 (3 pts) (nesting depth added 2). Of this number, 13 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ChatService.ensureConversationHistory (cognitive 19) api/src/modules/chat/chat.service.ts:1908— ChatService.ensureConversationHistory has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 3 (5 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SocialService.bulkFriendshipAction (cognitive 19) api/src/modules/social/social.service.ts:1526— SocialService.bulkFriendshipAction has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (12 pts), boolean chains 2, error handling 1 (2 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MomentsService.generateMomentForCharacter (cognitive 19) api/src/modules/moments/moments.service.ts:850— MomentsService.generateMomentForCharacter has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 8, boolean chains 2, 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.
FollowupRuntimeService.normalizeExtractedLoops (cognitive 19) api/src/modules/followup-runtime/followup-runtime.service.ts:886— FollowupRuntimeService.normalizeExtractedLoops has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 2 (5 pts), boolean chains 3, 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.
SchedulerService.handleCheckMomentSchedule (cognitive 19) api/src/modules/scheduler/scheduler.service.ts:1102— SchedulerService.handleCheckMomentSchedule has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 3, 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.
WikiPageService.getPageView (cognitive 19) api/src/modules/wiki/services/wiki-page.service.ts:144— WikiPageService.getPageView has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (7 pts), boolean chains 6, if/else 6 (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.
WikiWatchlistService.feed (cognitive 19) api/src/modules/wiki/services/wiki-watchlist.service.ts:135— WikiWatchlistService.feed has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 5, loops 2 (4 pts), boolean chains 3 (nesting depth added 4). Of this number, 16 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: 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.
runtime-config-store.hydrateDesktopRuntimeConfigFromNative (cognitive 19) apps/app/src/runtime/runtime-config-store.ts:151— runtime-config-store.hydrateDesktopRuntimeConfigFromNative has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 6 (8 pts), boolean chains 1, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
chat-composer.resolveNativeCameraCaptureNotice (cognitive 19) apps/app/src/components/chat-composer.tsx:6477— chat-composer.resolveNativeCameraCaptureNotice has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (13 pts), boolean chains 4, if/else 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.
chat-message-delivery.buildDirectRetryPayload (cognitive 19) apps/app/src/features/chat/chat-message-delivery.ts:270— chat-message-delivery.buildDirectRetryPayload has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 8 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
chat-message-list.RedPacketMessage (cognitive 19) apps/app/src/components/chat-message-list.tsx:6787— chat-message-list.RedPacketMessage has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 9 (15 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.
chat-message-list.DirectCallInviteMessage (cognitive 19) apps/app/src/components/chat-message-list.tsx:7633— chat-message-list.DirectCallInviteMessage has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 14 (17 pts), if/else 2 (nesting depth added 3). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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.
chat-call-fallback-section.ChatCallFallbackSection (cognitive 19) apps/app/src/features/chat-details/chat-call-fallback-section.tsx:23— chat-call-fallback-section.ChatCallFallbackSection has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 8 (18 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
chat-compose-shortcut-route.toSearchParams (cognitive 19) apps/app/src/features/chat/chat-compose-shortcut-route.ts:142— chat-compose-shortcut-route.toSearchParams has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tank-war-engine.processInputForPlayer (cognitive 19) apps/app/src/features/games/tank-war/tank-war-engine.ts:430— tank-war-engine.processInputForPlayer has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (12 pts), ternaries 5, boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
neighbor-farm-modal.NeighborFarmModal (cognitive 19) apps/app/src/features/games/farm/components/neighbor-farm-modal.tsx:33— neighbor-farm-modal.NeighborFarmModal has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 13, if/else 6. Of this number, 14 points are the body's own statements and 5 belong to 5 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
world-page.CyberAvatarStatusHero (cognitive 19) apps/app/src/features/world/world-page.tsx:607— world-page.CyberAvatarStatusHero has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 10 (15 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
search-page.SearchPage::applySearchNavigationContext (cognitive 19) apps/app/src/routes/search-page.tsx:296— search-page.SearchPage::applySearchNavigationContext has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 9. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
mobile-add-friend-page.MobileAddFriendSendSheet (cognitive 19) apps/app/src/routes/mobile-add-friend-page.tsx:1136— mobile-add-friend-page.MobileAddFriendSendSheet has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9, boolean chains 7, ternaries 3. Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 1162, 1209, 1223, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
desktop-mobile-page.resolveMobileHandoffCategory (cognitive 19) apps/app/src/routes/desktop-mobile-page.tsx:1982— desktop-mobile-page.resolveMobileHandoffCategory has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, if/else 7, ternaries 4. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
group-announcement-page.MobileGroupAnnouncementPage::handleShareAnnouncement (cognitive 19) apps/app/src/routes/group-announcement-page.tsx:224— group-announcement-page.MobileGroupAnnouncementPage::handleShareAnnouncement has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 5 (6 pts), boolean chains 3, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (group-announcement-page.MobileGroupAnnouncementPage) 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.
world-telemetry-section.WorldTelemetrySection (cognitive 19) apps/cloud-console/src/components/telemetry/world-telemetry-section.tsx:18— world-telemetry-section.WorldTelemetrySection has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 10 (19 pts) (nesting depth added 9). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
admin-protection-page.AdminProtectionPage (cognitive 19) apps/wiki/src/routes/admin-protection-page.tsx:22— admin-protection-page.AdminProtectionPage has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 12, if/else 3 (4 pts), ternaries 3 (nesting depth added 1). Of this number, 10 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
client.normalizeFeedPost (cognitive 19) REDACTED:1022— client.normalizeFeedPost has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 8 (10 pts), boolean chains 9 (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.
2026-mt-step1b-composite-pk.migrate (cognitive 18) REDACTED:138— 2026-mt-step1b-composite-pk.migrate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WorldService.lookupLocationByIp (cognitive 18) api/src/modules/world/world.service.ts:973— WorldService.lookupLocationByIp has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 5, error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ActionRuntimeService.handleConversationTurn (cognitive 18) REDACTED:154— ActionRuntimeService.handleConversationTurn has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 3 (4 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
FeedService.viewOwnerPost (cognitive 18) api/src/modules/feed/feed.service.ts:1759— FeedService.viewOwnerPost has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 6, 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.
FeedService.isPostMediaPlayable (cognitive 18) api/src/modules/feed/feed.service.ts:3865— FeedService.isPostMediaPlayable has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 3, error handling 2, ternaries 1 (2 pts), loops 1 (nesting depth added 3). Of this number, 11 points are the body's own statements and 7 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.
FarmStateService.getOrCreatePlayerState (cognitive 18) api/src/modules/games/farm/farm-state.service.ts:90— FarmStateService.getOrCreatePlayerState has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (18 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.
FarmNpcTickService.maybeMaintainPlots (cognitive 18) api/src/modules/games/farm/farm-npc-tick.service.ts:476— FarmNpcTickService.maybeMaintainPlots has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReplyLogicAdminService.buildGroupReplyActorDriftSummary (cognitive 18) api/src/modules/admin/reply-logic-admin.service.ts:1523— ReplyLogicAdminService.buildGroupReplyActorDriftSummary has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 5, boolean chains 4, loops 2 (3 pts) (nesting depth added 3). 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: 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.
wechat-sync-admin.service.inferImportedPlatform (cognitive 18) api/src/modules/admin/wechat-sync-admin.service.ts:1629— wechat-sync-admin.service.inferImportedPlatform has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, 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.
SystemService.buildEvalTaskPrompt (cognitive 18) api/src/modules/system/system.service.ts:966— SystemService.buildEvalTaskPrompt has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 8 (12 pts), if/else 6 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
SystemService.runEvalExperimentPreset (cognitive 18) api/src/modules/system/system.service.ts:3464— SystemService.runEvalExperimentPreset has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WikiPrivateCharacterController.aiGenerate (cognitive 18) api/src/modules/wiki/controllers/wiki-private-character.controller.ts:142— WikiPrivateCharacterController.aiGenerate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 4 (6 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
android-back-button.handleBackPressed (cognitive 18) apps/app/src/runtime/android-back-button.ts:191— android-back-button.handleBackPressed has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), error handling 2 (4 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
chat-composer.resolveMimeTypeFromFileName (cognitive 18) apps/app/src/components/chat-composer.tsx:6356— chat-composer.resolveMimeTypeFromFileName has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, boolean chains 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
chat-message-delivery.buildGroupRetryPayload (cognitive 18) apps/app/src/features/chat/chat-message-delivery.ts:376— chat-message-delivery.buildGroupRetryPayload has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 8 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
chat-message-list.ContactCardMessage (cognitive 18) apps/app/src/components/chat-message-list.tsx:6172— chat-message-list.ContactCardMessage has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 11 (13 pts), if/else 2 (3 pts), boolean chains 2 (nesting depth added 3). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: 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.
official-account-list-item.OfficialAccountListItem (cognitive 18) apps/app/src/components/official-account-list-item.tsx:11— official-account-list-item.OfficialAccountListItem has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 14 (18 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
search-navigation.resolveDesktopOfficialNavigationTarget (cognitive 18) REDACTED:461— search-navigation.resolveDesktopOfficialNavigationTarget has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (10 pts), boolean chains 4, if/else 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
use-self-camera-preview.useSelfCameraPreview (cognitive 18) apps/app/src/features/chat/use-self-camera-preview.ts:19— use-self-camera-preview.useSelfCameraPreview has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 5, error handling 1 (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 62, 116, 32, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
group-chat-thread-panel.GroupChatThreadPanel::sendAttachmentMessage (cognitive 18) apps/app/src/features/chat/group-chat-thread-panel.tsx:938— group-chat-thread-panel.GroupChatThreadPanel::sendAttachmentMessage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (group-chat-thread-panel.GroupChatThreadPanel) 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.
desktop-chat-text-edit-dialog.DesktopChatTextEditDialog (cognitive 18) apps/app/src/features/desktop/chat/desktop-chat-text-edit-dialog.tsx:22— desktop-chat-text-edit-dialog.DesktopChatTextEditDialog has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, ternaries 5, boolean chains 3. Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 89, a function literal at line 57, handleConfirm, …). 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.
management-permissions-screen.ManagementPermissionsScreen (cognitive 18) apps/app/src/features/contacts/management/management-permissions-screen.tsx:25— management-permissions-screen.ManagementPermissionsScreen has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 7 (16 pts), boolean chains 2 (nesting depth added 9). Of this number, 13 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
night-market-game.NightMarketGame (cognitive 18) apps/app/src/features/games/night-market/night-market-game.tsx:53— night-market-game.NightMarketGame has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 12 (14 pts), boolean chains 3, if/else 1 (nesting depth added 2). Of this number, 13 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
sky-rally-engine.finishRace (cognitive 18) apps/app/src/features/games/sky-rally/sky-rally-engine.ts:253— sky-rally-engine.finishRace has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tank-war-renderer.drawTerrain (cognitive 18) apps/app/src/features/games/tank-war/tank-war-renderer.ts:51— tank-war-renderer.drawTerrain has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 2, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dog-house.DogHouse (cognitive 18) apps/app/src/features/games/farm/components/dog-house.tsx:21— dog-house.DogHouse has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 12, ternaries 5 (6 pts) (nesting depth added 1). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
farm-mascot.buildMessages (cognitive 18) apps/app/src/features/games/farm/components/farm-mascot.tsx:66— farm-mascot.buildMessages has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, boolean chains 6. Of this number, 13 points are the body's own statements and 5 belong to 5 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.
farm-notification-banner.FarmNotificationBanner (cognitive 18) apps/app/src/features/games/farm/components/farm-notification-banner.tsx:21— farm-notification-banner.FarmNotificationBanner has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9, boolean chains 6, ternaries 2 (3 pts) (nesting depth added 1). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 29, 126, 34, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
desktop-search-workspace.DesktopSearchFeatureCard (cognitive 18) apps/app/src/features/search/desktop-search-workspace.tsx:2245— desktop-search-workspace.DesktopSearchFeatureCard has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 13 (18 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.
contacts-page.FriendListRow (cognitive 18) apps/app/src/routes/contacts-page.tsx:3034— contacts-page.FriendListRow has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 12 (17 pts), boolean chains 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.
official-account-detail-page.MobileOfficialAccountDetailPage::handleShareAccount (cognitive 18) apps/app/src/routes/official-account-detail-page.tsx:200— official-account-detail-page.MobileOfficialAccountDetailPage::handleShareAccount has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (10 pts), if/else 5 (6 pts), boolean chains 1, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (official-account-detail-page.MobileOfficialAccountDetailPage) 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.
character-detail-page.CharacterDetailPage::handleShareCharacterCard (cognitive 18) apps/app/src/routes/character-detail-page.tsx:1018— character-detail-page.CharacterDetailPage::handleShareCharacterCard has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 4 (5 pts), boolean chains 3, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (character-detail-page.CharacterDetailPage) 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.
character-detail-page.ProfileRow (cognitive 18) apps/app/src/routes/character-detail-page.tsx:2659— character-detail-page.ProfileRow has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 11 (17 pts), 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.
TelemetryService.funnel (cognitive 18) apps/cloud-api/src/telemetry/telemetry.service.ts:385— TelemetryService.funnel has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WorldApiProxyService.proxyHttp (cognitive 18) apps/cloud-api/src/world-api-proxy/world-api-proxy.service.ts:83— WorldApiProxyService.proxyHttp has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2, ternaries 2 (nesting depth added 6). Of this number, 9 points are the body's own statements and 9 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
invite-audit-page.InviteAuditPage (cognitive 18) apps/cloud-console/src/routes/invite-audit-page.tsx:16— invite-audit-page.InviteAuditPage has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, ternaries 6 (8 pts), if/else 1 (2 pts) (nesting depth added 3). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 80, 115, 24). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
audit-desktop-text.findArrowAfter (cognitive 18) REDACTED:222— audit-desktop-text.findArrowAfter has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
root-layout.UserMenu (cognitive 18) apps/wiki/src/components/root-layout.tsx:543— root-layout.UserMenu has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, boolean chains 5. Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 5 function items inside it that branch (onMenuKeyDown, a function literal at line 580, a function literal at line 560, …). 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.
contracts-bridge.attachContractsBridge (cognitive 18) packages/analytics/src/contracts-bridge.ts:19— contracts-bridge.attachContractsBridge has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 5, error handling 2 (nesting depth added 2). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 35). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
AiOrchestratorService.requestChatTaskWithFallback (cognitive 17) api/src/modules/ai/ai-orchestrator.service.ts:1463— AiOrchestratorService.requestChatTaskWithFallback has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CyberAvatarService.collectInterestTags (cognitive 17) api/src/modules/cyber-avatar/cyber-avatar.service.ts:350— CyberAvatarService.collectInterestTags has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2, boolean chains 1 (nesting depth added 6). None of this is in the body itself: all 17 points belong to 2 function items inside it that branch (collect, mentionsPerson). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
WorldContextHubService.renderRecentEpisodes (cognitive 17) api/src/modules/cyber-avatar/world-context-hub.service.ts:264— WorldContextHubService.renderRecentEpisodes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WorldContextHubService.renderRelevantEpisodes (cognitive 17) api/src/modules/cyber-avatar/world-context-hub.service.ts:314— WorldContextHubService.renderRelevantEpisodes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 5). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatService.buildAiParts (cognitive 17) api/src/modules/chat/chat.service.ts:2687— ChatService.buildAiParts has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14 (17 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.
VoiceCallsService.resolveTranscriptState (cognitive 17) api/src/modules/chat/voice-calls.service.ts:301— VoiceCallsService.resolveTranscriptState has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7 (12 pts), if/else 3, boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FeedService.assertFeedMediaMatchesMediaType (cognitive 17) api/src/modules/feed/feed.service.ts:4607— FeedService.assertFeedMediaMatchesMediaType has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MomentsService.scheduleAiCommentReplies (cognitive 17) api/src/modules/moments/moments.service.ts:1302— MomentsService.scheduleAiCommentReplies has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, error handling 1 (nesting depth added 2). Of this number, 13 points are the body's own statements and 4 belong to 2 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.
MomentsService.assertMomentMediaMatchesContentType (cognitive 17) api/src/modules/moments/moments.service.ts:2189— MomentsService.assertMomentMediaMatchesContentType has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CharacterVideoPullClient.backfillOnce (cognitive 17) REDACTED:38— CharacterVideoPullClient.backfillOnce has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), error handling 2 (3 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
parking-war-neighbor.service.seedInitialNpcState (cognitive 17) api/src/modules/games/parking-war/parking-war-neighbor.service.ts:407— parking-war-neighbor.service.seedInitialNpcState has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 8 (16 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SchedulerService.handleUpdateRecentMemoryDaily (cognitive 17) api/src/modules/scheduler/scheduler.service.ts:2178— SchedulerService.handleUpdateRecentMemoryDaily has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 3 (7 pts), error handling 1 (2 pts), loops 1 (nesting depth added 8). Of this number, 13 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.
ReplyLogicAdminService.resolveProviderSummary (cognitive 17) api/src/modules/admin/reply-logic-admin.service.ts:765— ReplyLogicAdminService.resolveProviderSummary has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 8 (12 pts), boolean chains 3, if/else 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WikiPageService.search (cognitive 17) api/src/modules/wiki/services/wiki-page.service.ts:581— WikiPageService.search has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 6). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 661, 733). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
WikiAiGenerateController.generate (cognitive 17) api/src/modules/wiki/controllers/wiki-ai-generate.controller.ts:42— WikiAiGenerateController.generate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 3 (5 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WikiSyncAdminService.preview (cognitive 17) api/src/modules/admin/wiki-sync-admin.service.ts:60— WikiSyncAdminService.preview has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (5 pts), ternaries 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
media-url.resolveAppMediaUrl (cognitive 17) apps/app/src/lib/media-url.ts:38— media-url.resolveAppMediaUrl has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), ternaries 2 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
avatar-encounter-decision-bar.AvatarEncounterDecisionBar (cognitive 17) apps/app/src/components/avatar-encounter-decision-bar.tsx:22— avatar-encounter-decision-bar.AvatarEncounterDecisionBar has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (12 pts), boolean chains 4, if/else 1 (nesting depth added 7). 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.
desktop-chat-confirm-dialog.DesktopChatConfirmDialog (cognitive 17) apps/app/src/features/desktop/chat/desktop-chat-confirm-dialog.tsx:19— desktop-chat-confirm-dialog.DesktopChatConfirmDialog has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, ternaries 3, boolean chains 2, error handling 1 (2 pts) (nesting depth added 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 83, 119, 248, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
desktop-chat-workspace.DesktopMessageEntryCard (cognitive 17) apps/app/src/features/desktop/chat/desktop-chat-workspace.tsx:2842— desktop-chat-workspace.DesktopMessageEntryCard has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (10 pts), boolean chains 4, if/else 3 (nesting depth added 5). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 2899, 2935, 2965). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
tank-war-engine.resolveTankPickup (cognitive 17) apps/app/src/features/games/tank-war/tank-war-engine.ts:761— tank-war-engine.resolveTankPickup has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
quest-sheet.QuestSheet (cognitive 17) apps/app/src/features/games/farm/components/quest-sheet.tsx:13— quest-sheet.QuestSheet has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7 (9 pts), boolean chains 5, if/else 3 (nesting depth added 2). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 95, 19, 22). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
farm-page.FarmPageInner (cognitive 17) apps/app/src/features/games/farm/farm-page.tsx:44— farm-page.FarmPageInner has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6, ternaries 6, boolean chains 5. Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 55, 85, 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.
mobile-favorites-page.FavoriteRow (cognitive 17) apps/app/src/routes/mobile-favorites-page.tsx:520— mobile-favorites-page.FavoriteRow has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6, ternaries 5 (6 pts), boolean chains 5 (nesting depth added 1). Of this number, 9 points are the body's own statements and 8 belong to 4 function items inside it that branch. To reduce it, 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.
discover-feed-page.DiscoverFeedPage::handleSharePostInner (cognitive 17) apps/app/src/routes/discover-feed-page.tsx:1781— discover-feed-page.DiscoverFeedPage::handleSharePostInner has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (10 pts), if/else 3 (4 pts), boolean chains 2, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (discover-feed-page.DiscoverFeedPage) 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.
games-page.GamesPage::handleCopyGameToMobile (cognitive 17) apps/app/src/routes/games-page.tsx:426— games-page.GamesPage::handleCopyGameToMobile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), error handling 3 (5 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (games-page.GamesPage) 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.
create-group-page.FriendSelectionRow (cognitive 17) apps/app/src/routes/create-group-page.tsx:806— create-group-page.FriendSelectionRow has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 11 (14 pts), boolean chains 3 (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.
profile-character-import-page.ProfileCharacterImportPage::readFile (cognitive 17) apps/app/src/routes/profile-character-import-page.tsx:86— profile-character-import-page.ProfileCharacterImportPage::readFile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 3, error handling 2, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
chat-details-page.MobileChatDetailsPage::handleShareContact (cognitive 17) apps/app/src/routes/chat-details-page.tsx:515— chat-details-page.MobileChatDetailsPage::handleShareContact has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 4 (5 pts), boolean chains 2, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (chat-details-page.MobileChatDetailsPage) 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.
admin-bootstrap-resolver.resolveWorldAdminSecret (cognitive 17) apps/cloud-api/src/admin/admin-bootstrap-resolver.ts:61— admin-bootstrap-resolver.resolveWorldAdminSecret has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 2 (5 pts), boolean chains 3, error handling 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.
PhoneAuthService.verifyCode (cognitive 17) apps/cloud-api/src/auth/phone-auth.service.ts:70— PhoneAuthService.verifyCode has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), error handling 1 (2 pts), ternaries 1 (2 pts), boolean chains 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.
CloudService.updateWorld (cognitive 17) apps/cloud-api/src/cloud/cloud.service.ts:647— CloudService.updateWorld has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 6, ternaries 4 (5 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
EmailAuthService.verifyCode (cognitive 17) apps/cloud-api/src/auth/email-auth.service.ts:100— EmailAuthService.verifyCode has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), error handling 1 (2 pts), ternaries 1 (2 pts), boolean chains 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.
InviteService.assessAndRecordRedemption (cognitive 17) apps/cloud-api/src/invite/invite.service.ts:131— InviteService.assessAndRecordRedemption has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 2, error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
MinimaxUsageService.ingestHourly (cognitive 17) apps/cloud-api/src/telemetry/minimax-usage.service.ts:34— MinimaxUsageService.ingestHourly has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
N1nPricingSyncService.recomputeHistoricalCosts (cognitive 17) apps/cloud-api/src/token-usage/n1n-pricing-sync.service.ts:150— N1nPricingSyncService.recomputeHistoricalCosts has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (6 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.
world-api-ws-proxy.setupWorldApiWsProxy (cognitive 17) apps/cloud-api/src/world-api-proxy/world-api-ws-proxy.ts:73— world-api-ws-proxy.setupWorldApiWsProxy has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6, boolean chains 4, ternaries 3 (4 pts), error handling 3 (nesting depth added 1). None of this is in the body itself: all 17 points belong to 6 function literals inside it that branch (lines 88, 128, 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.
admin-sessions-route-search.buildAdminSessionsPermalink (cognitive 17) apps/cloud-console/src/lib/admin-sessions-route-search.ts:311— admin-sessions-route-search.buildAdminSessionsPermalink has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, ternaries 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ip-region.classifyLocalIp (cognitive 17) apps/cloud-console/src/lib/ip-region.ts:14— ip-region.classifyLocalIp has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
revenue-sharing-page.RevenueSharingPage (cognitive 17) apps/cloud-console/src/routes/revenue-sharing-page.tsx:120— revenue-sharing-page.RevenueSharingPage has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 13 (14 pts), if/else 2, boolean chains 1 (nesting depth added 1). Of this number, 10 points are the body's own statements and 7 belong to 4 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
wiki-user-detail-page.CharacterCard (cognitive 17) apps/cloud-console/src/routes/wiki-user-detail-page.tsx:18— wiki-user-detail-page.CharacterCard has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 10 (14 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
configure-ios-project.ensurePluginTargetMembership (cognitive 17) apps/ios-shell/scripts/configure-ios-project.mjs:996— configure-ios-project.ensurePluginTargetMembership has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, loops 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.
weflow-http-provider.fetchMessageCorpus (cognitive 17) apps/wechat-connector/src/weflow-http-provider.ts:255— weflow-http-provider.fetchMessageCorpus has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 4 (5 pts), boolean chains 3, 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.
weflow-http-provider.describeMomentMedia (cognitive 17) apps/wechat-connector/src/weflow-http-provider.ts:875— weflow-http-provider.describeMomentMedia has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 3 (6 pts), 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.
character-page.RevisionCard (cognitive 17) apps/wiki/src/routes/character-page.tsx:1017— character-page.RevisionCard has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 16, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
my-drafts-page.MyDraftsPage (cognitive 17) apps/wiki/src/routes/my-drafts-page.tsx:28— my-drafts-page.MyDraftsPage has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 7, ternaries 2. 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 items inside it that branch (a function literal at line 55, handleRestore, handleDelete, …). 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.
WorldService.resolveSeasonLabel (cognitive 16) api/src/modules/world/world.service.ts:774— WorldService.resolveSeasonLabel has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6 (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.
InferenceService.runImageGenerationDiagnostic (cognitive 16) api/src/modules/inference/inference.service.ts:2075— InferenceService.runImageGenerationDiagnostic 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.
AiOrchestratorService.loadAssetFromUrl (cognitive 16) api/src/modules/ai/ai-orchestrator.service.ts:556— AiOrchestratorService.loadAssetFromUrl has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, error handling 2 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RealWorldSyncService.buildScenePatch (cognitive 16) REDACTED:2186— RealWorldSyncService.buildScenePatch has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 11 (15 pts), if/else 1 (nesting depth added 4). 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.
CharacterBehaviorBlueprintService.applyBlueprintBehavior (cognitive 16) api/src/modules/characters/character-behavior-blueprint.service.ts:122— CharacterBehaviorBlueprintService.applyBlueprintBehavior has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ReminderRuntimeService.parseCreateIntent (cognitive 16) REDACTED:2479— ReminderRuntimeService.parseCreateIntent has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6, boolean chains 5, ternaries 4 (5 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CharacterFriendshipService.seedFromAiRelationships (cognitive 16) api/src/modules/social/character-friendship.service.ts:64— CharacterFriendshipService.seedFromAiRelationships has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 2 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FeedService.getChannelAuthorProfile (cognitive 16) api/src/modules/feed/feed.service.ts:651— FeedService.getChannelAuthorProfile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 2, ternaries 2 (nesting depth added 4). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 702). 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.
FeedService.normalizeCreatePostInput (cognitive 16) api/src/modules/feed/feed.service.ts:4419— FeedService.normalizeCreatePostInput has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8 (9 pts), boolean chains 4, if/else 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
chat-composer.drawScreenshotAnnotations (cognitive 16) apps/app/src/components/chat-composer.tsx:6887— chat-composer.drawScreenshotAnnotations has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
share-card-modal.ShareCardModal::handleSaveOrShare (cognitive 16) apps/app/src/components/share-card-modal.tsx:297— share-card-modal.ShareCardModal::handleSaveOrShare has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 2 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
search-navigation.resolveDesktopConversationNavigationTarget (cognitive 16) REDACTED:343— search-navigation.resolveDesktopConversationNavigationTarget has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 3 (6 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.
use-voice-call-session.useVoiceCallSession (cognitive 16) apps/app/src/features/chat/use-voice-call-session.ts:29— use-voice-call-session.useVoiceCallSession has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 4, ternaries 2. 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 267, 156, 175, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
desktop-chat-history-panel.resolveSearchPreviewText (cognitive 16) apps/app/src/features/desktop/chat/desktop-chat-history-panel.tsx:1447— desktop-chat-history-panel.resolveSearchPreviewText has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, ternaries 2 (4 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
use-group-voice-call-session.useGroupVoiceCallSession (cognitive 16) apps/app/src/features/chat/use-group-voice-call-session.ts:40— use-group-voice-call-session.useGroupVoiceCallSession has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 4, ternaries 2. 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 268, 172, 192, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
desktop-notes-workspace.DesktopNotesWorkspace::handleAttachmentSelection (cognitive 16) REDACTED:675— desktop-notes-workspace.DesktopNotesWorkspace::handleAttachmentSelection has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 2 (3 pts), boolean chains 2, error handling 1, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (desktop-notes-workspace.DesktopNotesWorkspace) 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.
parking-war-game.ParkingWarGame (cognitive 16) apps/app/src/features/games/parking-war/parking-war-game.tsx:85— parking-war-game.ParkingWarGame has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 6, error handling 1, loops 1. Of this number, 10 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
pixel-arena-data.resolveMoves (cognitive 16) apps/app/src/features/games/pixel-arena/pixel-arena-data.ts:98— pixel-arena-data.resolveMoves has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 8. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
desktop-search-workspace.DesktopSearchStatusCard (cognitive 16) apps/app/src/features/search/desktop-search-workspace.tsx:1691— desktop-search-workspace.DesktopSearchStatusCard has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 9 (16 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.
checkout-contact-dialog.CheckoutContactDialog (cognitive 16) apps/app/src/features/subscription/checkout-contact-dialog.tsx:83— checkout-contact-dialog.CheckoutContactDialog has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 9 (10 pts), if/else 6 (nesting depth added 1). Of this number, 9 points are the body's own statements and 7 belong to 5 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.
channels-page.MobileChannelMediaSurface (cognitive 16) apps/app/src/routes/channels-page.tsx:2930— channels-page.MobileChannelMediaSurface has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 4, ternaries 2 (4 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
contacts-page.buildDesktopSelectionFromRouteState (cognitive 16) apps/app/src/routes/contacts-page.tsx:197— contacts-page.buildDesktopSelectionFromRouteState has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 7, boolean chains 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.
native-share.shareTextOrUrl (cognitive 16) apps/app/src/runtime/native-share.ts:18— native-share.shareTextOrUrl has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 5 (7 pts), error handling 1 (2 pts) (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.
group-member-picker-page.CandidateRow (cognitive 16) apps/app/src/routes/group-member-picker-page.tsx:902— group-member-picker-page.CandidateRow has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 11 (14 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.
AdminAuthService.buildSessionSourceGroupSnapshotSummary (cognitive 16) apps/cloud-api/src/auth/admin-auth.service.ts:830— AdminAuthService.buildSessionSourceGroupSnapshotSummary has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SubscriptionService.grantSubscriptionImpl (cognitive 16) apps/cloud-api/src/subscription/subscription.service.ts:199— SubscriptionService.grantSubscriptionImpl has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TelemetryService.apiHealth (cognitive 16) apps/cloud-api/src/telemetry/telemetry.service.ts:447— TelemetryService.apiHealth has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 1 (2 pts), loops 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.
admin-sessions-route-search.buildCompactAdminSessionsRouteSearch (cognitive 16) apps/cloud-console/src/lib/admin-sessions-route-search.ts:237— admin-sessions-route-search.buildCompactAdminSessionsRouteSearch has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
top-worlds-table.TelemetryTopWorldsTable (cognitive 16) apps/cloud-console/src/components/telemetry/top-worlds-table.tsx:49— top-worlds-table.TelemetryTopWorldsTable has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8 (9 pts), if/else 5, boolean chains 2 (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 items inside it that branch (handleSort, a function literal at line 177, a function literal at line 187, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
feedbacks-page.FeedbackDetailPanel (cognitive 16) apps/cloud-console/src/routes/feedbacks-page.tsx:440— feedbacks-page.FeedbackDetailPanel has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 12, ternaries 4. Of this number, 14 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
locales.resolveLocaleFromAcceptLanguage (cognitive 16) apps/site/src/lib/locales.ts:28— locales.resolveLocaleFromAcceptLanguage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
draft-snapshot-utils.hasMeaningfulDraftSnapshot (cognitive 16) apps/wiki/src/lib/draft-snapshot-utils.ts:10— draft-snapshot-utils.hasMeaningfulDraftSnapshot has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, loops 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
Change coupling clique: en-US.ts, ja-JP.ts, ko-KR.ts, zh-CN.ts packages/i18n/catalogs/wiki/en-US.ts— 4 files — `packages/i18n/catalogs/wiki/en-US.ts`, `packages/i18n/catalogs/wiki/ja-JP.ts`, `packages/i18n/catalogs/wiki/ko-KR.ts`, `packages/i18n/catalogs/wiki/zh-CN.ts` — all change together with no explicit dependency: a fully-connected co-change clique, not 6 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
D4 · Code Duplication· Edited copy of a member (60 corresponding lines) · ×1
Edited copy of a member (60 corresponding lines) apps/ios-shell/ios/App/App/AppDelegate.swift:198— apps/ios-shell/ios/App/App/AppDelegate.swift:198-266 | apps/ios-shell/xcode-template/AppDelegatePush.example.swift:150-209 — These two members are one piece of code written twice and then edited apart: 60 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (29 corresponding lines) · ×1
Edited copy of a member (29 corresponding lines) apps/ios-shell/plugins/swift-stub/YinjieMobileBridgePlugin.swift:269— apps/ios-shell/plugins/swift-stub/YinjieMobileBridgePlugin.swift:269-315 | apps/ios-shell/plugins/swift-stub/YinjieMobileBridgePlugin.swift:317-373 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (45 corresponding lines) · ×1
Edited copy of a member (45 corresponding lines) apps/android-shell/android/app/src/main/java/com/yinjie/mobile/YinjieMobileBridgePlugin.java:168— apps/android-shell/android/app/src/main/java/com/yinjie/mobile/YinjieMobileBridgePlugin.java:168-215 | apps/android-shell/android/app/src/main/java/com/yinjie/mobile/YinjieMobileBridgePlugin.java:218-262 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (49 corresponding lines) · ×1
Edited copy of a member (49 corresponding lines) apps/ios-shell/ios/App/App/AppDelegate.swift:198— apps/ios-shell/ios/App/App/AppDelegate.swift:198-266 | apps/ios-shell/ios/App/App/AppDelegatePush.example.swift:95-143 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×1
Edited copy of a member (21 corresponding lines) apps/ios-shell/plugins/swift-stub/YinjieMobileBridgePlugin.swift:1034— apps/ios-shell/plugins/swift-stub/YinjieMobileBridgePlugin.swift:1034-1054 | apps/ios-shell/plugins/swift-stub/YinjieMobileBridgePlugin.swift:1056-1105 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (39 corresponding lines) · ×1
Edited copy of a member (39 corresponding lines) apps/ios-shell/plugins/swift-stub/YinjieMobileBridgePlugin.swift:844— apps/ios-shell/plugins/swift-stub/YinjieMobileBridgePlugin.swift:844-882 | apps/ios-shell/plugins/swift-stub/YinjieMobileBridgePlugin.swift:985-1032 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×1
Edited copy of a member (15 corresponding lines) apps/desktop/src-tauri/src/main.rs:1071— apps/desktop/src-tauri/src/main.rs:1071-1085 | apps/desktop/src-tauri/src/main.rs:1091-1105 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×1
Edited copy of a member (25 corresponding lines) apps/ios-shell/ios/App/App/AppDelegate.swift:82— apps/ios-shell/ios/App/App/AppDelegate.swift:82-153 | apps/ios-shell/xcode-template/AppDelegatePush.example.swift:92-116 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×1
Edited copy of a member (12 corresponding lines) apps/desktop/src-tauri/src/main.rs:227— apps/desktop/src-tauri/src/main.rs:227-238 | apps/desktop/src-tauri/src/main.rs:250-263 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 13+ corresponding lines) · ×1
Edited copies of one member (3 members, 13+ corresponding lines) apps/ios-shell/plugins/swift-stub/YinjieSecureStoragePlugin.swift:31— apps/ios-shell/plugins/swift-stub/YinjieSecureStoragePlugin.swift:31-45 | apps/ios-shell/plugins/swift-stub/YinjieSecureStoragePlugin.swift:47-59 | apps/ios-shell/plugins/swift-stub/YinjieSecureStoragePlugin.swift:61-73 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×1
Edited copy of a member (8 corresponding lines) apps/desktop/src-tauri/src/main.rs:240— apps/desktop/src-tauri/src/main.rs:240-247 | apps/desktop/src-tauri/src/main.rs:266-273 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 7+ corresponding lines) · ×1
Edited copies of one member (3 members, 7+ corresponding lines) apps/ios-shell/plugins/swift-stub/YinjieMobileBridgePlugin.swift:674— apps/ios-shell/plugins/swift-stub/YinjieMobileBridgePlugin.swift:674-680 | apps/ios-shell/plugins/swift-stub/YinjieRuntimePlugin.swift:116-122 | apps/ios-shell/plugins/swift-stub/YinjieSecureStoragePlugin.swift:75-81 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Duplicated block (22 lines × 2) apps/android-shell/android/app/src/main/java/com/yinjie/mobile/YinjieMobileBridgePlugin.java:170— apps/android-shell/android/app/src/main/java/com/yinjie/mobile/YinjieMobileBridgePlugin.java:170-191 | apps/android-shell/android/app/src/main/java/com/yinjie/mobile/YinjieMobileBridgePlugin.java:220-241 — both copies are in the same file, so extract the 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 (14 lines × 2) apps/android-shell/android/app/src/main/java/com/yinjie/mobile/YinjieFirebaseMessagingService.java:151— apps/android-shell/android/app/src/main/java/com/yinjie/mobile/YinjieFirebaseMessagingService.java:151-164 | apps/android-shell/android/app/src/main/java/com/yinjie/mobile/YinjieMobileBridgePlugin.java:818-831 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `apps/android-shell/android/app/src/main/java/com/yinjie/mobile/YinjieFirebaseMessagingService.java:151` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) apps/android-shell/android/app/src/main/java/com/yinjie/mobile/YinjieMobileBridgePlugin.java:147— apps/android-shell/android/app/src/main/java/com/yinjie/mobile/YinjieMobileBridgePlugin.java:147-157 | apps/android-shell/android/app/src/main/java/com/yinjie/mobile/YinjieMobileBridgePlugin.java:198-206 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `apps/android-shell/android/app/src/main/java/com/yinjie/mobile/YinjieMobileBridgePlugin.java:207` calls `addFlags` and `apps/android-shell/android/app/src/main/java/com/yinjie/mobile/YinjieMobileBridgePlugin.java:159` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 4) apps/android-shell/android/app/src/main/java/com/yinjie/mobile/YinjieFirebaseMessagingService.java:166— apps/android-shell/android/app/src/main/java/com/yinjie/mobile/YinjieFirebaseMessagingService.java:166-173 | apps/android-shell/android/app/src/main/java/com/yinjie/mobile/YinjieMobileBridgePlugin.java:786-793 | apps/android-shell/android/app/src/main/java/com/yinjie/mobile/YinjieMobileBridgePlugin.java:903-910 | apps/android-shell/android/app/src/main/java/com/yinjie/mobile/YinjieSecureStoragePlugin.java:81-88 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12–13 lines × 2) download/_shared/marketing/jike-assets/_build.py:91— download/_shared/marketing/jike-assets/_build.py:91-103 | download/_shared/marketing/jike-assets/_build.py:137-148 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `download/_shared/marketing/jike-assets/_build.py:91` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `download/_shared/marketing/jike-assets/_build.py:149` calls `font` and `download/_shared/marketing/jike-assets/_build.py:105` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (48 lines × 3) apps/ios-shell/ios/App/App/AppDelegate.swift:198— apps/ios-shell/ios/App/App/AppDelegate.swift:198-245 | apps/ios-shell/ios/App/App/AppDelegatePush.example.swift:95-142 | apps/ios-shell/xcode-template/AppDelegatePush.example.swift:150-197 — before extracting anything, compare `apps/ios-shell/ios/App/App/AppDelegate.swift` and `apps/ios-shell/ios/App/App/AppDelegatePush.example.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `apps/ios-shell/ios/App/App/AppDelegate.swift:198` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (27–32 lines × 2) apps/ios-shell/plugins/swift-stub/YinjieMobileBridgePlugin.swift:270— apps/ios-shell/plugins/swift-stub/YinjieMobileBridgePlugin.swift:270-301 | apps/ios-shell/plugins/swift-stub/YinjieMobileBridgePlugin.swift:318-344 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `apps/ios-shell/plugins/swift-stub/YinjieMobileBridgePlugin.swift:270` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (24–30 lines × 2) apps/ios-shell/ios/App/App/AppDelegate.swift:17— apps/ios-shell/ios/App/App/AppDelegate.swift:17-46 | apps/ios-shell/xcode-template/AppDelegatePush.example.swift:40-63 — before extracting anything, compare `apps/ios-shell/ios/App/App/AppDelegate.swift` and `apps/ios-shell/xcode-template/AppDelegatePush.example.swift` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `apps/ios-shell/xcode-template/AppDelegatePush.example.swift:40` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10–23 lines × 2) apps/ios-shell/ios/App/App/AppDelegate.swift:82— apps/ios-shell/ios/App/App/AppDelegate.swift:82-104 | apps/ios-shell/xcode-template/AppDelegatePush.example.swift:92-101 — before extracting anything, compare `apps/ios-shell/ios/App/App/AppDelegate.swift` and `apps/ios-shell/xcode-template/AppDelegatePush.example.swift` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `apps/ios-shell/xcode-template/AppDelegatePush.example.swift:92` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `apps/ios-shell/ios/App/App/AppDelegate.swift:132` calls `current` and `apps/ios-shell/xcode-template/AppDelegatePush.example.swift:101` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (22–23 lines × 2) apps/ios-shell/ios/App/App/AppDelegate.swift:132— apps/ios-shell/ios/App/App/AppDelegate.swift:132-153 | apps/ios-shell/xcode-template/AppDelegatePush.example.swift:94-116 — before extracting anything, compare `apps/ios-shell/ios/App/App/AppDelegate.swift` and `apps/ios-shell/xcode-template/AppDelegatePush.example.swift` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `apps/ios-shell/ios/App/App/AppDelegate.swift:132` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 3) apps/ios-shell/ios/App/App/AppDelegate.swift:186— apps/ios-shell/ios/App/App/AppDelegate.swift:186-196 | apps/ios-shell/ios/App/App/AppDelegatePush.example.swift:66-76 | apps/ios-shell/xcode-template/AppDelegatePush.example.swift:121-131 — before extracting anything, compare `apps/ios-shell/ios/App/App/AppDelegate.swift` and `apps/ios-shell/ios/App/App/AppDelegatePush.example.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `apps/ios-shell/ios/App/App/AppDelegate.swift:186` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21–22 lines × 14) apps/desktop/src-tauri/src/main.rs:1117— apps/desktop/src-tauri/src/main.rs:1117-1137 | apps/desktop/src-tauri/src/main.rs:1173-1194 | apps/desktop/src-tauri/src/main.rs:1230-1251 | apps/desktop/src-tauri/src/main.rs:1287-1308 | apps/desktop/src-tauri/src/main.rs:1344-1364 | apps/desktop/src-tauri/src/main.rs:1400-1420 | apps/desktop/src-tauri/src/main.rs:1456-1476 | apps/desktop/src-tauri/src/main.rs:1512-1532 | apps/desktop/src-tauri/src/main.rs:1565-1585 | apps/desktop/src-tauri/src/main.rs:1621-1641 | apps/desktop/src-tauri/src/main.rs:1677-1697 | apps/desktop/src-tauri/src/main.rs:1733-1753 | apps/desktop/src-tauri/src/main.rs:1789-1809 | apps/desktop/src-tauri/src/main.rs:1845-1865 — all 14 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `apps/desktop/src-tauri/src/main.rs:1117` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 14) apps/desktop/src-tauri/src/main.rs:1148— apps/desktop/src-tauri/src/main.rs:1148-1159 | apps/desktop/src-tauri/src/main.rs:1205-1216 | apps/desktop/src-tauri/src/main.rs:1262-1273 | apps/desktop/src-tauri/src/main.rs:1319-1330 | apps/desktop/src-tauri/src/main.rs:1375-1386 | apps/desktop/src-tauri/src/main.rs:1431-1442 | apps/desktop/src-tauri/src/main.rs:1487-1498 | apps/desktop/src-tauri/src/main.rs:1543-1551 | apps/desktop/src-tauri/src/main.rs:1596-1607 | apps/desktop/src-tauri/src/main.rs:1652-1663 | apps/desktop/src-tauri/src/main.rs:1708-1719 | apps/desktop/src-tauri/src/main.rs:1764-1775 | apps/desktop/src-tauri/src/main.rs:1820-1831 | apps/desktop/src-tauri/src/main.rs:1876-1887 — all 14 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `apps/desktop/src-tauri/src/main.rs:1148` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (6 lines × 2) apps/desktop/src-tauri/src/main.rs:228— apps/desktop/src-tauri/src/main.rs:228-233 | apps/desktop/src-tauri/src/main.rs:251-256 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Fake-async — async method never awaits api/src/modules/games/farm/farm-state.service.ts:507— `assertDailyStealQuota` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
IC1 · Incompleteness & stubs· Guard cannot change the result · ×1
Guard cannot change the result — returns what the code already falls through to apps/cloud-api/src/auth/device-type.ts:27— The guard above `return "desktop";` also returns `"desktop"`, so no input can make it matter. Implement the distinction that was intended, or delete the guard.
Hollow method — returns a constant without doing the work REDACTED:1870— `listPersonaAssets` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
P12 · CI test-gate honesty· Workspace package's tests never run by CI · ×1
Workspace package's tests never run by CI apps/app/package.json:1— `apps/app` is a workspace package with 23 test(s) in 4 file(s) (e.g. `apps/app/tests/cloud-auth-expired.test.ts`, `apps/app/tests/desktop-route-state.test.ts`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
Duplication concentrated across 33 sibling directories (306 clone groups) api/src/modules/cloud-runtime/cloud-token-usage-sync.service.ts:117— 306 duplicated blocks under api/src/modules/ have copies in at least two of the sibling directories action-runtime, admin, agent-delegation, ai, analytics, auth (+27 more sibling(s) not listed) — 173 of them are reported below, and 133 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 306 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 306 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 306 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 6 sibling directories (283 clone groups) REDACTED:111— 283 duplicated blocks under apps/app/src/ have copies in at least two of the sibling directories components, features, hooks, lib, routes, runtime — 167 of them are reported below, and 116 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 283 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 283 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 283 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 (155 clone groups) apps/wechat-connector/src/contact-import-parser.ts:1— 155 duplicated blocks under the repository root have copies in at least two of the sibling directories api, apps, packages, scripts — 64 of them are reported below, and 91 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 155 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 155 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 155 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 18 sibling directories (111 clone groups) apps/app/src/features/games/game-center-session-panel.tsx:37— 111 duplicated blocks under apps/app/src/features/ have copies in at least two of the sibling directories channels, chat, chat-details, contacts, cyber-avatar, desktop (+12 more sibling(s) not listed) — 75 of them are reported below, and 36 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 111 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 111 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 111 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 7 sibling directories (68 clone groups) apps/app/src/features/desktop/chat/desktop-chat-confirm-dialog.tsx:7— 68 duplicated blocks under apps/ have copies in at least two of the sibling directories android-shell, app, cloud-api, cloud-console, ios-shell, wechat-connector (+1 more sibling(s) not listed) — 30 of them are reported below, and 38 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 68 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 68 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 68 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 18 sibling directories (40 clone groups) apps/cloud-api/src/feedback/feedback.dto.ts:76— 40 duplicated blocks under apps/cloud-api/src/ have copies in at least two of the sibling directories alerts, auth, cloud, cloud-config, feedback, http-dto (+12 more sibling(s) not listed) — 22 of them are reported below, and 18 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 40 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 40 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 40 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 11 sibling directories (38 clone groups) apps/app/src/features/games/cloud-farm/cloud-farm-game.tsx:60— 38 duplicated blocks under apps/app/src/features/games/ have copies in at least two of the sibling directories cat-inn, cloud-farm, farm, forest-train, island-concert, night-market (+5 more sibling(s) not listed) — 30 of them are reported below, and 8 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 38 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 38 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 38 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 8 sibling directories (32 clone groups) apps/app/src/features/desktop/feed/desktop-feed-compose-panel.tsx:1— 32 duplicated blocks under apps/app/src/features/desktop/ have copies in at least two of the sibling directories channels, chat, contacts, feed, games, mini-programs (+2 more sibling(s) not listed) — 15 of them are reported below, and 17 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 32 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 32 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 32 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 2 sibling directories (11 clone groups) api/src/modules/games/farm/farm-event.service.ts:29— 11 duplicated blocks under api/src/modules/games/ have copies in at least two of the sibling directories farm, parking-war — 7 of them are reported below, and 4 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 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 (6 clone groups) apps/wiki/src/components/character-edit-form.tsx:2608— 6 duplicated blocks under apps/wiki/src/ have copies in at least two of the sibling directories components, lib, routes — 3 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication· Duplicated block with local edits (741 matched lines × 2 locations) · ×1
Duplicated block with local edits (741 matched lines × 2 locations) REDACTED:111— REDACTED:111 · REDACTED:155 — the two spans are one implementation copied and then locally edited — 3874 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Wholesale file copy (714 identical lines × 2 files) apps/wechat-connector/src/contact-import-parser.ts:1— apps/wechat-connector/src/contact-import-parser.ts:1 · packages/contracts/src/contact-import-parser.ts:1 — these 2 files are line-for-line copies of one another — 714 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 (704 matched lines × 2 locations) · ×1
Duplicated block with local edits (704 matched lines × 2 locations) apps/app/src/routes/chat-background-page.tsx:49— apps/app/src/routes/chat-background-page.tsx:49 · apps/app/src/routes/group-chat-background-page.tsx:48 — the two spans are one implementation copied and then locally edited — 3300 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 (525 matched lines × 2 locations) · ×1
Duplicated block with local edits (525 matched lines × 2 locations) apps/app/src/features/chat/mobile-ai-call-screen.tsx:72— apps/app/src/features/chat/mobile-ai-call-screen.tsx:72 · apps/app/src/features/chat/mobile-group-call-screen.tsx:63 — the two spans are one implementation copied and then locally edited — 2226 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 (508 matched lines × 2 locations) · ×1
Duplicated block with local edits (508 matched lines × 2 locations) apps/app/src/features/subscription/subscription-panel.tsx:34— apps/app/src/features/subscription/subscription-panel.tsx:34 · apps/app/src/routes/profile-subscription-page.tsx:37 — the two spans are one implementation copied and then locally edited — 2802 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Wholesale file copy (457 identical lines × 2 files) api/src/modules/admin/reply-logic-admin.types.ts:9— api/src/modules/admin/reply-logic-admin.types.ts:9 · packages/contracts/src/reply-logic.ts:5 — these 2 files are line-for-line copies of one another — 457 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 (317 matched lines × 2 locations) · ×1
Duplicated block with local edits (317 matched lines × 2 locations) apps/app/src/features/chat/conversation-thread-panel.tsx:756— apps/app/src/features/chat/conversation-thread-panel.tsx:756 · apps/app/src/features/chat/group-chat-thread-panel.tsx:1384 — the two spans are one implementation copied and then locally edited — 1305 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 (297 matched lines × 2 locations) · ×1
Duplicated block with local edits (297 matched lines × 2 locations) apps/app/src/routes/official-account-article-page.tsx:45— apps/app/src/routes/official-account-article-page.tsx:45 · apps/app/src/routes/official-account-detail-page.tsx:50 — the two spans are one implementation copied and then locally edited — 1344 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 (278 matched lines × 2 locations) · ×1
Duplicated block with local edits (278 matched lines × 2 locations) apps/app/src/routes/starred-friends-page.tsx:39— apps/app/src/routes/starred-friends-page.tsx:39 · apps/app/src/routes/tags-page.tsx:42 — the two spans are one implementation copied and then locally edited — 1324 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 (276 matched lines × 2 locations) · ×1
Duplicated block with local edits (276 matched lines × 2 locations) apps/app/src/routes/games-page.tsx:64— apps/app/src/routes/games-page.tsx:64 · apps/app/src/routes/mini-programs-page.tsx:54 — the two spans are one implementation copied and then locally edited — 1251 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 (216 matched lines × 2 locations) · ×1
Duplicated block with local edits (216 matched lines × 2 locations) apps/app/src/features/games/game-center-session-panel.tsx:37— apps/app/src/features/games/game-center-session-panel.tsx:37 · apps/app/src/features/mini-programs/mini-program-open-panel.tsx:58 — the two spans are one implementation copied and then locally edited — 914 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 (215 matched lines × 2 locations) · ×1
Duplicated block with local edits (215 matched lines × 2 locations) apps/app/src/features/channels/live-companion-storage.ts:45— apps/app/src/features/channels/live-companion-storage.ts:45 · apps/app/src/features/desktop/feedback/desktop-feedback-storage.ts:45 — the two spans are one implementation copied and then locally edited — 1080 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 (211 matched lines × 2 locations) · ×1
Duplicated block with local edits (211 matched lines × 2 locations) apps/app/src/routes/discover-encounter-page.tsx:83— apps/app/src/routes/discover-encounter-page.tsx:83 · apps/app/src/routes/discover-scene-page.tsx:172 — the two spans are one implementation copied and then locally edited — 1032 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 (189 matched lines × 2 locations) · ×1
Duplicated block with local edits (189 matched lines × 2 locations) apps/app/src/features/desktop/chat/desktop-group-member-picker.tsx:23— apps/app/src/features/desktop/chat/desktop-group-member-picker.tsx:23 · apps/app/src/features/desktop/chat/desktop-group-member-removal-picker.tsx:23 — the two spans are one implementation copied and then locally edited — 913 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 (187 matched lines × 2 locations) · ×1
Duplicated block with local edits (187 matched lines × 2 locations) apps/app/src/routes/desktop-chat-files-page.tsx:275— apps/app/src/routes/desktop-chat-files-page.tsx:275 · apps/app/src/routes/desktop-chat-history-page.tsx:127 — the two spans are one implementation copied and then locally edited — 841 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 (185 matched lines × 2 locations) · ×1
Duplicated block with local edits (185 matched lines × 2 locations) REDACTED:1276— REDACTED:1276 · REDACTED:1392 — the two spans are one implementation copied and then locally edited — 797 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (182 matched lines × 2 locations) · ×1
Duplicated block with local edits (182 matched lines × 2 locations) apps/app/src/features/desktop/chat/desktop-direct-call-panel.tsx:486— apps/app/src/features/desktop/chat/desktop-direct-call-panel.tsx:486 · apps/app/src/features/desktop/chat/desktop-group-call-panel.tsx:406 — the two spans are one implementation copied and then locally edited — 841 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 (178 matched lines × 2 locations) · ×1
Duplicated block with local edits (178 matched lines × 2 locations) apps/app/src/features/chat/use-group-voice-call-session.ts:169— apps/app/src/features/chat/use-group-voice-call-session.ts:169 · apps/app/src/features/chat/use-voice-call-session.ts:153 — the two spans are one implementation copied and then locally edited — 960 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 (170 matched lines × 2 locations) · ×1
Duplicated block with local edits (170 matched lines × 2 locations) apps/app/src/features/games/game-center-storage.ts:18— apps/app/src/features/games/game-center-storage.ts:18 · apps/app/src/features/mini-programs/mini-programs-storage.ts:10 — the two spans are one implementation copied and then locally edited — 886 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 (167 matched lines × 2 locations) · ×1
Duplicated block with local edits (167 matched lines × 2 locations) apps/app/src/routes/group-announcement-page.tsx:59— apps/app/src/routes/group-announcement-page.tsx:59 · apps/app/src/routes/group-chat-edit-page.tsx:82 — the two spans are one implementation copied and then locally edited — 785 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 (166 matched lines × 2 locations) · ×1
Duplicated block with local edits (166 matched lines × 2 locations) apps/app/src/routes/group-contacts-page.tsx:63— apps/app/src/routes/group-contacts-page.tsx:63 · apps/app/src/routes/official-accounts-page.tsx:55 — the two spans are one implementation copied and then locally edited — 789 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 (155 matched lines × 2 locations) · ×1
Duplicated block with local edits (155 matched lines × 2 locations) api/src/modules/chat/group-voice-calls.service.ts:99— api/src/modules/chat/group-voice-calls.service.ts:99 · api/src/modules/chat/voice-calls.service.ts:96 — the two spans are one implementation copied and then locally edited — 806 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Wholesale file copy (150 identical lines × 2 files) api/src/app.module.ts:1— api/src/app.module.ts:1 · api/src/wiki-app.module.ts:18 — these 2 files are line-for-line copies of one another — 150 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 (148 matched lines × 2 locations) · ×1
Duplicated block with local edits (148 matched lines × 2 locations) api/src/modules/chat/attachment-semantic-text.ts:28— api/src/modules/chat/attachment-semantic-text.ts:28 · apps/app/src/lib/message-attachment-semantic.ts:35 — the two spans are one implementation copied and then locally edited — 855 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 (146 matched lines × 2 locations) · ×1
Duplicated block with local edits (146 matched lines × 2 locations) apps/app/src/features/contacts/desktop-contact-text-edit-dialog.tsx:9— apps/app/src/features/contacts/desktop-contact-text-edit-dialog.tsx:9 · apps/app/src/features/desktop/chat/desktop-chat-text-edit-dialog.tsx:10 — the two spans are one implementation copied and then locally edited — 667 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (144 matched lines × 2 locations) · ×1
Duplicated block with local edits (144 matched lines × 2 locations) apps/app/src/features/desktop/moments/desktop-friend-moments-workspace.tsx:50— apps/app/src/features/desktop/moments/desktop-friend-moments-workspace.tsx:50 · apps/app/src/features/desktop/moments/desktop-profile-moments-workspace.tsx:47 — the two spans are one implementation copied and then locally edited — 756 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 (142 matched lines × 2 locations) · ×1
Duplicated block with local edits (142 matched lines × 2 locations) apps/cloud-api/src/auth/email-auth.service.ts:45— apps/cloud-api/src/auth/email-auth.service.ts:45 · apps/cloud-api/src/auth/phone-auth.service.ts:28 — the two spans are one implementation copied and then locally edited — 807 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Wholesale file copy (141 identical lines × 2 files) apps/app/src/features/desktop/feed/desktop-feed-compose-panel.tsx:1— apps/app/src/features/desktop/feed/desktop-feed-compose-panel.tsx:1 · apps/app/src/features/desktop/moments/desktop-moment-compose-panel.tsx:1 — these 2 files are line-for-line copies of one another — 141 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 (140 matched lines × 2 locations) · ×1
Duplicated block with local edits (140 matched lines × 2 locations) apps/app/src/features/desktop/chat/desktop-message-forward-dialog.tsx:204— apps/app/src/features/desktop/chat/desktop-message-forward-dialog.tsx:204 · apps/app/src/features/desktop/chat/desktop-note-send-dialog.tsx:133 — the two spans are one implementation copied and then locally edited — 656 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 (139 matched lines × 2 locations) · ×1
Duplicated block with local edits (139 matched lines × 2 locations) REDACTED:64— REDACTED:64 · apps/app/src/features/account-security/delete-account-panel.tsx:27 — the two spans are one implementation copied and then locally edited — 811 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.
Boundary violation [package:relative-cross-package] scripts/migrate-channels-to-global.mjs:21— scripts/migrate-channels-to-global.mjs:21 reaches into another package with a relative path (../api/package.json) — import the package by name instead.
Complex function translateKnownPattern (cyclomatic 366, cognitive 543) REDACTED:199— translateKnownPattern has cyclomatic complexity 366 and cognitive complexity 543; 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 translateAppErrorCode (cyclomatic 330, cognitive 66) apps/app/src/lib/error-translate.ts:22— translateAppErrorCode has cyclomatic complexity 330 and cognitive complexity 66; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 CharacterDetailPage (cyclomatic 218, cognitive 223) apps/app/src/routes/character-detail-page.tsx:134— CharacterDetailPage has cyclomatic complexity 218 and cognitive complexity 223; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 118, cognitive 149) apps/cloud-console/tests/test-helpers.tsx:1389— (anonymous) has cyclomatic complexity 118 and cognitive complexity 149; 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 ContactsPage (cyclomatic 117, cognitive 157) apps/app/src/routes/contacts-page.tsx:295— ContactsPage has cyclomatic complexity 117 and cognitive complexity 157; 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 ChatComposer (cyclomatic 110, cognitive 101) apps/app/src/components/chat-composer.tsx:304— ChatComposer has cyclomatic complexity 110 and cognitive complexity 101; 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 MobileChatDetailsPage (cyclomatic 109, cognitive 94) apps/app/src/routes/chat-details-page.tsx:92— MobileChatDetailsPage has cyclomatic complexity 109 and cognitive complexity 94; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 DesktopMessageAvatarPopover (cyclomatic 106, cognitive 90) apps/app/src/features/desktop/chat/desktop-message-avatar-popover.tsx:72— DesktopMessageAvatarPopover has cyclomatic complexity 106 and cognitive complexity 90; 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 ChannelsPage (cyclomatic 100, cognitive 94) apps/app/src/routes/channels-page.tsx:107— ChannelsPage has cyclomatic complexity 100 and cognitive complexity 94; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 DirectChatDetailsPanel (cyclomatic 99, cognitive 89) apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:177— DirectChatDetailsPanel has cyclomatic complexity 99 and cognitive complexity 89; 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 WorldDetailPage (cyclomatic 95, cognitive 94) apps/cloud-console/src/routes/world-detail-page.tsx:254— WorldDetailPage has cyclomatic complexity 95 and cognitive complexity 94; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 evaluateLegacyEvalOutput (cyclomatic 92, cognitive 112) api/src/modules/system/system.service.ts:1596— evaluateLegacyEvalOutput has cyclomatic complexity 92 and cognitive complexity 112; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity· Complex function main (cyclomatic 89, cognitive 186) · ×1
Complex function main (cyclomatic 89, cognitive 186) scripts/_tmp-discover-games-walk.mjs:313— main has cyclomatic complexity 89 and cognitive complexity 186; 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 AdminSessionsPage (cyclomatic 89, cognitive 73) apps/cloud-console/src/routes/admin-sessions-page.tsx:1110— AdminSessionsPage has cyclomatic complexity 89 and cognitive complexity 73; 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 sendMessageDetailed (cyclomatic 85, cognitive 89) api/src/modules/chat/chat.service.ts:1159— sendMessageDetailed has cyclomatic complexity 85 and cognitive complexity 89; 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 importPersonalCharacter (cyclomatic 84, cognitive 136) api/src/modules/characters/characters.service.ts:586— importPersonalCharacter has cyclomatic complexity 84 and cognitive complexity 136; 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 MobileFriendMomentsPage (cyclomatic 80, cognitive 70) apps/app/src/routes/mobile-friend-moments-page.tsx:61— MobileFriendMomentsPage has cyclomatic complexity 80 and cognitive complexity 70; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 DesktopMobilePage (cyclomatic 78, cognitive 72) apps/app/src/routes/desktop-mobile-page.tsx:184— DesktopMobilePage has cyclomatic complexity 78 and cognitive complexity 72; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function GroupChatThreadPanel (cyclomatic 75, cognitive 71) apps/app/src/features/chat/group-chat-thread-panel.tsx:118— GroupChatThreadPanel has cyclomatic complexity 75 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 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 74, cognitive 181) scripts/migrate-model-persona-merge.mjs:365— (anonymous) has cyclomatic complexity 74 and cognitive complexity 181; 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 MobileAiCallScreen (cyclomatic 74, cognitive 89) apps/app/src/features/chat/mobile-ai-call-screen.tsx:76— MobileAiCallScreen has cyclomatic complexity 74 and cognitive complexity 89; 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 ProfileSettingsDesktop (cyclomatic 74, cognitive 63) apps/app/src/routes/profile-settings-desktop.tsx:155— ProfileSettingsDesktop has cyclomatic complexity 74 and cognitive complexity 63; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 DesktopOfficialAccountsWorkspace (cyclomatic 73, cognitive 70) apps/app/src/features/desktop/official-accounts/desktop-official-accounts-workspace.tsx:56— DesktopOfficialAccountsWorkspace has cyclomatic complexity 73 and cognitive complexity 70; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 ContactDetailPane (cyclomatic 71, cognitive 68) apps/app/src/features/contacts/contact-detail-pane.tsx:84— ContactDetailPane has cyclomatic complexity 71 and cognitive complexity 68; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 GroupChatDetailsPanel (cyclomatic 71, cognitive 64) apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:1163— GroupChatDetailsPanel has cyclomatic complexity 71 and cognitive complexity 64; 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 ConversationThreadPanel (cyclomatic 70, cognitive 65) apps/app/src/features/chat/conversation-thread-panel.tsx:95— ConversationThreadPanel has cyclomatic complexity 70 and cognitive complexity 65; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 reconcileObservedWorld (cyclomatic 68, cognitive 114) apps/cloud-api/src/orchestration/world-lifecycle-worker.service.ts:827— reconcileObservedWorld has cyclomatic complexity 68 and cognitive complexity 114; 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 OfficialAccountServiceThread (cyclomatic 68, cognitive 88) apps/app/src/features/official-accounts/service/official-account-service-thread.tsx:37— OfficialAccountServiceThread has cyclomatic complexity 68 and cognitive complexity 88; 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 DesktopScreenshotEditor (cyclomatic 66, cognitive 63) apps/app/src/components/chat-composer.tsx:4506— DesktopScreenshotEditor has cyclomatic complexity 66 and cognitive complexity 63; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 DesktopDirectCallPanel (cyclomatic 66, cognitive 55) apps/app/src/features/desktop/chat/desktop-direct-call-panel.tsx:53— DesktopDirectCallPanel has cyclomatic complexity 66 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 MobileGroupCallScreen (cyclomatic 64, cognitive 75) apps/app/src/features/chat/mobile-group-call-screen.tsx:67— MobileGroupCallScreen has cyclomatic complexity 64 and cognitive complexity 75; 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 ChatBackgroundPage (cyclomatic 64, cognitive 61) apps/app/src/routes/chat-background-page.tsx:51— ChatBackgroundPage has cyclomatic complexity 64 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 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 CharacterEditForm (cyclomatic 64, cognitive 57) apps/wiki/src/components/character-edit-form.tsx:319— CharacterEditForm has cyclomatic complexity 64 and cognitive complexity 57; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function OfficialArticleViewer (cyclomatic 63, cognitive 62) REDACTED:19— OfficialArticleViewer has cyclomatic complexity 63 and cognitive complexity 62; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function GroupChatBackgroundPage (cyclomatic 61, cognitive 58) apps/app/src/routes/group-chat-background-page.tsx:50— GroupChatBackgroundPage has cyclomatic complexity 61 and cognitive complexity 58; 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 assertPrivateCharacterFieldLimits (cyclomatic 60, cognitive 77) api/src/modules/characters/characters.service.ts:1517— assertPrivateCharacterFieldLimits has cyclomatic complexity 60 and cognitive complexity 77; 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 resolveMobileHandoffCategory (cyclomatic 60, cognitive 21) apps/app/src/routes/desktop-mobile-page.tsx:1982— resolveMobileHandoffCategory has cyclomatic complexity 60 and cognitive complexity 21; 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 collectOwnerRecords (cyclomatic 55, cognitive 83) api/src/modules/admin/behavior-records-admin.service.ts:363— collectOwnerRecords has cyclomatic complexity 55 and cognitive complexity 83; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function MobileGroupChatDetailsPage (cyclomatic 55, cognitive 51) apps/app/src/routes/group-chat-details-page.tsx:63— MobileGroupChatDetailsPage has cyclomatic complexity 55 and cognitive complexity 51; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 updateOwner (cyclomatic 53, cognitive 54) api/src/modules/auth/world-owner.service.ts:689— updateOwner has cyclomatic complexity 53 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· apps/app/src/components/chat-message-list.tsx · ×1
apps/app/src/components/chat-message-list.tsx: 8445 lines of code apps/app/src/components/chat-message-list.tsx:1— apps/app/src/components/chat-message-list.tsx has 8445 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· apps/app/src/components/chat-composer.tsx · ×1
apps/app/src/components/chat-composer.tsx: 6930 lines of code apps/app/src/components/chat-composer.tsx:1— apps/app/src/components/chat-composer.tsx has 6930 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· apps/app/src/routes/channels-page.tsx · ×1
apps/app/src/routes/channels-page.tsx: 5626 lines of code apps/app/src/routes/channels-page.tsx:1— apps/app/src/routes/channels-page.tsx has 5626 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: 5229 lines of code REDACTED:1— REDACTED has 5229 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· api/src/modules/feed/feed.service.ts · ×1
api/src/modules/feed/feed.service.ts: 5042 lines of code api/src/modules/feed/feed.service.ts:1— api/src/modules/feed/feed.service.ts has 5042 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/i18n/src/runtime/surface-text-dictionaries-cloud-console.ts · ×1
packages/i18n/src/runtime/surface-text-dictionaries-cloud-console.ts: 5034 lines of code packages/i18n/src/runtime/surface-text-dictionaries-cloud-console.ts:1— packages/i18n/src/runtime/surface-text-dictionaries-cloud-console.ts has 5034 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· api/src/modules/characters/celebrity-character-presets.ts · ×1
api/src/modules/characters/celebrity-character-presets.ts: 4933 lines of code api/src/modules/characters/celebrity-character-presets.ts:1— api/src/modules/characters/celebrity-character-presets.ts has 4933 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· api/src/modules/ai/ai-orchestrator.service.ts · ×1
api/src/modules/ai/ai-orchestrator.service.ts: 4140 lines of code api/src/modules/ai/ai-orchestrator.service.ts:1— api/src/modules/ai/ai-orchestrator.service.ts has 4140 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx · ×1
apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx: 3961 lines of code apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx:1— apps/app/src/features/desktop/channels/desktop-channels-workspace.tsx has 3961 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: 3601 lines of code REDACTED:1— REDACTED has 3601 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· apps/app/src/features/chat/stickers/sticker-panel.tsx · ×1
apps/app/src/features/chat/stickers/sticker-panel.tsx: 3552 lines of code apps/app/src/features/chat/stickers/sticker-panel.tsx:1— apps/app/src/features/chat/stickers/sticker-panel.tsx has 3552 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· api/src/modules/system/system.service.ts · ×1
api/src/modules/system/system.service.ts: 3539 lines of code api/src/modules/system/system.service.ts:1— api/src/modules/system/system.service.ts has 3539 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· api/src/modules/moments/moments.service.ts · ×1
api/src/modules/moments/moments.service.ts: 3421 lines of code api/src/modules/moments/moments.service.ts:1— api/src/modules/moments/moments.service.ts has 3421 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· apps/app/src/features/desktop/chat/desktop-chat-workspace.tsx · ×1
apps/app/src/features/desktop/chat/desktop-chat-workspace.tsx: 3258 lines of code apps/app/src/features/desktop/chat/desktop-chat-workspace.tsx:1— apps/app/src/features/desktop/chat/desktop-chat-workspace.tsx has 3258 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: 3252 lines of code REDACTED:1— REDACTED has 3252 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· apps/app/src/routes/discover-feed-page.tsx · ×1
apps/app/src/routes/discover-feed-page.tsx: 3116 lines of code apps/app/src/routes/discover-feed-page.tsx:1— apps/app/src/routes/discover-feed-page.tsx has 3116 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· apps/app/src/routes/moments-page.tsx · ×1
apps/app/src/routes/moments-page.tsx: 3095 lines of code apps/app/src/routes/moments-page.tsx:1— apps/app/src/routes/moments-page.tsx has 3095 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· apps/cloud-console/src/routes/admin-sessions-page.tsx · ×1
apps/cloud-console/src/routes/admin-sessions-page.tsx: 3095 lines of code apps/cloud-console/src/routes/admin-sessions-page.tsx:1— apps/cloud-console/src/routes/admin-sessions-page.tsx has 3095 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· apps/app/src/routes/contacts-page.tsx · ×1
apps/app/src/routes/contacts-page.tsx: 3080 lines of code apps/app/src/routes/contacts-page.tsx:1— apps/app/src/routes/contacts-page.tsx has 3080 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx · ×1
apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx: 2888 lines of code apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx:1— apps/app/src/features/desktop/chat/desktop-chat-details-panel.tsx has 2888 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· api/src/modules/chat/chat.service.ts · ×1
api/src/modules/chat/chat.service.ts: 2817 lines of code api/src/modules/chat/chat.service.ts:1— api/src/modules/chat/chat.service.ts has 2817 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· api/src/modules/inference/inference.service.ts · ×1
api/src/modules/inference/inference.service.ts: 2803 lines of code api/src/modules/inference/inference.service.ts:1— api/src/modules/inference/inference.service.ts has 2803 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· apps/app/src/routes/character-detail-page.tsx · ×1
apps/app/src/routes/character-detail-page.tsx: 2794 lines of code apps/app/src/routes/character-detail-page.tsx:1— apps/app/src/routes/character-detail-page.tsx has 2794 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· apps/app/src/features/search/desktop-search-workspace.tsx · ×1
apps/app/src/features/search/desktop-search-workspace.tsx: 2728 lines of code apps/app/src/features/search/desktop-search-workspace.tsx:1— apps/app/src/features/search/desktop-search-workspace.tsx has 2728 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· apps/wiki/src/components/character-edit-form.tsx · ×1
apps/wiki/src/components/character-edit-form.tsx: 2565 lines of code apps/wiki/src/components/character-edit-form.tsx:1— apps/wiki/src/components/character-edit-form.tsx has 2565 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· api/src/modules/analytics/ai-usage-ledger.service.ts · ×1
api/src/modules/analytics/ai-usage-ledger.service.ts: 2426 lines of code api/src/modules/analytics/ai-usage-ledger.service.ts:1— api/src/modules/analytics/ai-usage-ledger.service.ts has 2426 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· apps/cloud-console/src/lib/cloud-console-i18n.ts · ×1
apps/cloud-console/src/lib/cloud-console-i18n.ts: 2395 lines of code apps/cloud-console/src/lib/cloud-console-i18n.ts:1— apps/cloud-console/src/lib/cloud-console-i18n.ts has 2395 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· apps/app/src/routes/chat-list-page.tsx · ×1
apps/app/src/routes/chat-list-page.tsx: 2392 lines of code apps/app/src/routes/chat-list-page.tsx:1— apps/app/src/routes/chat-list-page.tsx has 2392 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· apps/app/src/routes/welcome-page.tsx · ×1
apps/app/src/routes/welcome-page.tsx: 2358 lines of code apps/app/src/routes/welcome-page.tsx:1— apps/app/src/routes/welcome-page.tsx has 2358 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· api/src/modules/scheduler/scheduler.service.ts · ×1
api/src/modules/scheduler/scheduler.service.ts: 2240 lines of code api/src/modules/scheduler/scheduler.service.ts:1— api/src/modules/scheduler/scheduler.service.ts has 2240 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· apps/cloud-api/src/cloud/cloud.service.ts · ×1
apps/cloud-api/src/cloud/cloud.service.ts: 2235 lines of code apps/cloud-api/src/cloud/cloud.service.ts:1— apps/cloud-api/src/cloud/cloud.service.ts has 2235 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: 2158 lines of code REDACTED:1— REDACTED has 2158 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· api/src/modules/admin/wechat-sync-admin.service.ts · ×1
api/src/modules/admin/wechat-sync-admin.service.ts: 2113 lines of code api/src/modules/admin/wechat-sync-admin.service.ts:1— api/src/modules/admin/wechat-sync-admin.service.ts has 2113 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· apps/app/src/routes/desktop-mobile-page.tsx · ×1
apps/app/src/routes/desktop-mobile-page.tsx: 2044 lines of code apps/app/src/routes/desktop-mobile-page.tsx:1— apps/app/src/routes/desktop-mobile-page.tsx has 2044 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· apps/app/src/features/chat/group-chat-thread-panel.tsx · ×1
apps/app/src/features/chat/group-chat-thread-panel.tsx: 1996 lines of code apps/app/src/features/chat/group-chat-thread-panel.tsx:1— apps/app/src/features/chat/group-chat-thread-panel.tsx has 1996 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· api/src/modules/social/shake-discovery.service.ts · ×1
api/src/modules/social/shake-discovery.service.ts: 1967 lines of code api/src/modules/social/shake-discovery.service.ts:1— api/src/modules/social/shake-discovery.service.ts has 1967 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· api/src/modules/ai/reply-logic.constants.ts · ×1
api/src/modules/ai/reply-logic.constants.ts: 1902 lines of code api/src/modules/ai/reply-logic.constants.ts:1— api/src/modules/ai/reply-logic.constants.ts has 1902 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· api/src/modules/games/games.service.ts · ×1
api/src/modules/games/games.service.ts: 1886 lines of code api/src/modules/games/games.service.ts:1— api/src/modules/games/games.service.ts has 1886 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· apps/cloud-console/src/routes/waiting-session-sync-page.tsx · ×1
apps/cloud-console/src/routes/waiting-session-sync-page.tsx: 1805 lines of code apps/cloud-console/src/routes/waiting-session-sync-page.tsx:1— apps/cloud-console/src/routes/waiting-session-sync-page.tsx has 1805 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· api/src/modules/chat/group.service.ts · ×1
api/src/modules/chat/group.service.ts: 1790 lines of code api/src/modules/chat/group.service.ts:1— api/src/modules/chat/group.service.ts has 1790 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 (~1101 LoC) apps/app/src/i18n/static-dom-seed.ts— no import path from any entry point (268 application, 92 tooling, 83 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 (~332 LoC) apps/app/scripts/measure-public-load.mjs— no import path from any entry point (268 application, 92 tooling, 83 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 (~217 LoC) scripts/_tmp-voice-call-walk-r1.mjs— no import path from any entry point (268 application, 92 tooling, 83 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 (~195 LoC) apps/app/src/components/feature-coming-soon-dialog.tsx— no import path from any entry point (268 application, 92 tooling, 83 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~191 LoC) apps/app/src/features/games/embedded/embedded-game-host.tsx— no import path from any entry point (268 application, 92 tooling, 83 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~166 LoC) scripts/_tmp-voice-call-walk-r2.mjs— no import path from any entry point (268 application, 92 tooling, 83 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 (~165 LoC) scripts/_tmp-voice-call-walk-r4.mjs— no import path from any entry point (268 application, 92 tooling, 83 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 (~162 LoC) scripts/build-windows-installers.mjs— no import path from any entry point (268 application, 92 tooling, 83 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 (~156 LoC) apps/app/src/components/moment-post-card.tsx— no import path from any entry point (268 application, 92 tooling, 83 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 (~148 LoC) scripts/_tmp-voice-call-walk-r3.mjs— no import path from any entry point (268 application, 92 tooling, 83 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 (~135 LoC) REDACTED— no import path from any entry point (268 application, 92 tooling, 83 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/app/src/features/games/embedded/embedded-game-host.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 (~128 LoC) scripts/_tmp-voice-call-walk-r5.mjs— no import path from any entry point (268 application, 92 tooling, 83 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) apps/app/src/components/mobile-social-composer-card.tsx— no import path from any entry point (268 application, 92 tooling, 83 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 (~81 LoC) apps/app/src/features/chat-details/chat-detail-preferences.ts— no import path from any entry point (268 application, 92 tooling, 83 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 (~76 LoC) apps/cloud-console/src/lib/error-translate.ts— no import path from any entry point (268 application, 92 tooling, 83 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 (~75 LoC) apps/cloud-console/screenshot-console.mjs— no import path from any entry point (268 application, 92 tooling, 83 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) apps/app/src/lib/platform.ts— no import path from any entry point (268 application, 92 tooling, 83 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~52 LoC) apps/cloud-console/screenshot-viewport.mjs— no import path from any entry point (268 application, 92 tooling, 83 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~42 LoC) apps/cloud-console/screenshot-detail.mjs— no import path from any entry point (268 application, 92 tooling, 83 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 (~13 LoC) apps/app/src/lib/safety.ts— no import path from any entry point (268 application, 92 tooling, 83 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 (~11 LoC) api/src/modules/characters/characters.seed.ts— no import path from any entry point (268 application, 92 tooling, 83 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 (~7 LoC) apps/app/src/features/desktop/moments/desktop-friend-moments-route-state.ts— no import path from any entry point (268 application, 92 tooling, 83 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~1 LoC) packages/contracts/src/sticker-types.ts— no import path from any entry point (268 application, 92 tooling, 83 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 'esbuild' REDACTED:146— Declared in the root 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.
Unused dependency '@eslint/eslintrc' api/package.json:67— Declared in api/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency '@nestjs/mongoose' api/package.json:38— Declared in api/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'passport-jwt' api/package.json:55— Declared in api/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'source-map-support' api/package.json:84— Declared in api/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency '@capacitor/core' apps/android-shell/package.json:22— Declared in apps/android-shell/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency '@hookform/resolvers' apps/app/package.json:34— Declared in apps/app/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'react-hook-form' apps/app/package.json:53— Declared in apps/app/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'vite-plugin-pwa' apps/app/package.json:76— Declared in apps/app/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'workbox-window' apps/app/package.json:78— Declared in apps/app/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'bcryptjs' apps/cloud-api/package.json:37— Declared in apps/cloud-api/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency '@tauri-apps/cli' apps/desktop/package.json:19— Declared in apps/desktop/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency '@capacitor/app' apps/ios-shell/package.json:23— Declared in apps/ios-shell/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency '@lingui/macro' packages/ui/package.json:22— Declared in packages/ui/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
X14 · Bypassable address classification· IP classification is bypassable through an IPv4-in-IPv6 embedding · ×1
IP classification is bypassable through an IPv4-in-IPv6 embedding apps/cloud-console/src/lib/ip-region.ts:17— This function unwraps IPv4-MAPPED IPv6 (`::ffff:`, line 35) and then rejects `10.0.0.0/8` on its IPv4 path — but the IPv6 decision at line 17 classifies the address as written, and IPv4 reaches IPv6 through three MORE embeddings this function never mentions: IPv4-compatible (`::a.b.c.d`), 6to4 (`2002::/16`) and NAT64 (`64:ff9b::/96`). So `::10.0.0.1`, `2002:0a00:0001::` and `64:ff9b::10.0.0.0` all name a host inside `10.0.0.0/8` — the range this same function declares non-public — and all reach the IPv6 decision un-unwrapped, taking the opposite verdict. Unwrap every embedding to its IPv4 form before classifying, or reject any IPv6 address carrying an embedded IPv4 outright.
Duplicated predicate api/src/modules/feed/feed.service.ts:4504— `!Array.isArray(input) || input.length === 0` appears character-identically in 2 files — api/src/modules/feed/feed.service.ts, api/src/modules/moments/moments.service.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 api/src/modules/chat/chat.service.ts:3039— `!Number.isFinite(durationMs) || durationMs <= 0` appears character-identically in 2 files — api/src/modules/chat/chat.service.ts, api/src/modules/chat/group.service.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:387— `!Number.isFinite(n) || !Number.isInteger(n) || n < 0` 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 apps/app/src/routes/profile-info-field-page.tsx:123— `!Number.isInteger(n) || n < AGE_MIN || n > AGE_MAX` appears character-identically in 2 files — apps/app/src/routes/profile-info-field-page.tsx, apps/app/src/routes/profile-settings-desktop.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 api/src/modules/need-discovery/need-discovery.service.ts:783— `!Number.isNaN(item.timestamp.getTime()) && item.timestamp >= windowStartedAt && item.timestamp <= windowEndedAt` appears character-identically in 2 files — api/src/modules/need-discovery/need-discovery.service.ts, api/src/modules/social/shake-discovery.service.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 api/src/modules/need-discovery/need-discovery.service.ts:751— `!Number.isNaN(timestamp.getTime()) && timestamp >= windowStartedAt && timestamp <= windowEndedAt` appears character-identically in 2 files — api/src/modules/need-discovery/need-discovery.service.ts, api/src/modules/social/shake-discovery.service.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:111— `!accessToken || isCloudSessionExpired(expiresAt)` appears character-identically in 2 files — REDACTED, apps/app/src/features/account-security/delete-account-panel.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate apps/app/src/features/chat/use-digital-human-call-session.ts:251— `!autoSubmitRecordingRef.current || turnIsPending` appears character-identically in 3 files — apps/app/src/features/chat/use-digital-human-call-session.ts, apps/app/src/features/chat/use-group-voice-call-session.ts, apps/app/src/features/chat/use-voice-call-session.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate api/src/modules/analytics/n1n-pricing-sync.service.ts:160— `!body || body.success === false || !body.data` appears character-identically in 2 files — api/src/modules/analytics/n1n-pricing-sync.service.ts, apps/cloud-api/src/token-usage/n1n-pricing-sync.service.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 api/src/modules/characters/guards/private-character-rate-limit.guard.ts:46— `!bucket || now - bucket.windowStart >= WINDOW_MS` appears character-identically in 3 files — api/src/modules/characters/guards/private-character-rate-limit.guard.ts, api/src/modules/wiki/guards/wiki-ai-generate-rate-limit.guard.ts, api/src/modules/wiki/guards/wiki-rate-limit.guard.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate apps/app/src/routes/friend-moments-page.tsx:937— `!character && (characterQuery.isLoading || friendsQuery.isLoading)` appears character-identically in 2 files — apps/app/src/routes/friend-moments-page.tsx, apps/app/src/routes/mobile-friend-moments-page.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 api/src/modules/cloud-runtime/cloud-token-usage-sync.service.ts:381— `!cloudPlatformBaseUrl || !worldId || !callbackToken` appears character-identically in 3 files — api/src/modules/cloud-runtime/cloud-token-usage-sync.service.ts, api/src/modules/minimax/minimax-quota-cloud-sync.service.ts, api/src/modules/minimax/minimax-usage-reporter.service.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:42— `!configuredOrigins?.length || configuredOrigins.includes('*')` 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 api/src/modules/chat/favorites.service.ts:575— `!conversation || conversation.type !== 'direct'` appears character-identically in 2 files — api/src/modules/chat/favorites.service.ts, api/src/modules/chat/message-reminders.service.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate apps/app/src/routes/chat-background-page.tsx:575— `!conversationsQuery.isLoading && !conversation` appears character-identically in 2 files — apps/app/src/routes/chat-background-page.tsx, apps/app/src/routes/chat-details-page.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 api/src/modules/chat/favorites.service.ts:954— `!durationMs || !Number.isFinite(durationMs) || durationMs <= 0` appears character-identically in 4 files — api/src/modules/chat/favorites.service.ts, api/src/modules/chat/message-reminders.service.ts, apps/app/src/features/desktop/chat/desktop-chat-history-panel.tsx, apps/app/src/features/moments/moment-compose-media.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate apps/app/src/features/chat/use-digital-human-call-session.ts:362— `!enabled || typeof document === "undefined"` appears character-identically in 3 files — apps/app/src/features/chat/use-digital-human-call-session.ts, apps/app/src/features/chat/use-group-voice-call-session.ts, apps/app/src/features/chat/use-voice-call-session.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate api/src/modules/admin/chat-records-admin.service.ts:1425— `!entity.attachmentKind || !entity.attachmentPayload` appears character-identically in 5 files — api/src/modules/admin/chat-records-admin.service.ts, api/src/modules/chat/chat.service.ts, api/src/modules/chat/group-reply-task.service.ts, api/src/modules/chat/group.service.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate apps/app/src/features/desktop/chat/desktop-create-group-dialog.tsx:987— `!friendsQuery.isLoading && !friendsQuery.isError && !friendItems.length` appears character-identically in 2 files — apps/app/src/features/desktop/chat/desktop-create-group-dialog.tsx, apps/app/src/routes/create-group-page.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate apps/app/src/features/desktop/contacts/desktop-contacts-tags-pane.tsx:462— `!friendsQuery.isLoading && !friendsQuery.isError && !tagGroups.length` appears character-identically in 2 files — apps/app/src/features/desktop/contacts/desktop-contacts-tags-pane.tsx, apps/app/src/routes/tags-page.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate apps/app/src/features/desktop/chat/desktop-create-group-dialog.tsx:998— `!friendsQuery.isLoading && !friendsQuery.isError && friendItems.length > 0 && !filteredFriends.length` appears character-identically in 2 files — apps/app/src/features/desktop/chat/desktop-create-group-dialog.tsx, apps/app/src/routes/create-group-page.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate apps/app/src/routes/group-announcement-page.tsx:515— `!groupQuery.isLoading && !groupQuery.data` appears character-identically in 4 files — apps/app/src/routes/group-announcement-page.tsx, apps/app/src/routes/group-chat-background-page.tsx, apps/app/src/routes/group-chat-details-page.tsx, apps/app/src/routes/group-chat-edit-page.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate apps/app/src/features/desktop/chat/desktop-chat-workspace.tsx:463— `!hasNotifiedReminderGroup && isNotifiedReminderGroupExpanded` appears character-identically in 2 files — apps/app/src/features/desktop/chat/desktop-chat-workspace.tsx, apps/app/src/routes/chat-list-page.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate apps/wechat-connector/src/contact-import-parser.ts:379— `!header || !isRecord(header.chatlab) || !isRecord(header.meta)` appears character-identically in 2 files — apps/wechat-connector/src/contact-import-parser.ts, packages/contracts/src/contact-import-parser.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate apps/app/src/features/chat/conversation-thread-panel.tsx:390— `!highlightedMessageId || !hasHighlightedMessage` appears character-identically in 2 files — apps/app/src/features/chat/conversation-thread-panel.tsx, apps/app/src/features/chat/group-chat-thread-panel.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.
Silent fallback default in catch api/src/database/database-path.ts:117— `readDatabaseContentScore` 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 api/src/modules/cyber-avatar/cyber-avatar.service.ts:308— `buildPromptContext` 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 api/src/modules/characters/character-blueprint.service.ts:641— `summarizeValue` 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 REDACTED:1886— `fetchFeedEntries` 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 REDACTED:417— `extractUrlHost` 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 api/src/modules/chat/search-activity.service.ts:36— `listSearchHistory` 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 api/src/modules/chat/custom-stickers.service.ts:725— `parseStickerKeywords` 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 api/src/modules/chat/document-extraction.service.ts:1151— `safeFromCodePoint` 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 api/src/modules/need-discovery/need-discovery.service.ts:1148— `buildCyberAvatarSummary` 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 api/src/modules/need-discovery/need-discovery.service.ts:1294— `describeMomentContent` 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 REDACTED:920— `fetchFeedEntries` 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 api/src/modules/chat/group-reply-task.service.ts:589— `parseHistoryPayload` 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 api/src/modules/chat/group-reply-task.service.ts:602— `parsePartsPayload` 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 api/src/modules/chat/digital-human-provider.ts:226— `resolveTemplateParams` 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 api/src/modules/chat/message-reminders.service.ts:371— `readMessageReminders` 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 api/src/modules/social/shake-discovery.service.ts:762— `readSessions` 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 api/src/modules/social/shake-discovery.service.ts:2038— `describeMomentContent` 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 api/src/modules/feed/feed.service.ts:4679— `parseFeedMediaPayload` 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 api/src/modules/moments/moments.service.ts:2263— `parseMomentMediaPayload` 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 api/src/modules/moments/moments-minimax.callbacks.ts:240— `extractMusicSeedText` 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 api/src/modules/admin/reply-logic-admin.service.ts:1416— `parsePlannerCandidatesPayload` 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 api/src/modules/admin/chat-records-admin.service.ts:1364— `parseMediaInsightResultPayload` 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 api/src/modules/wiki/services/wiki-page.service.ts:68— `parseExpertDomains` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch apps/app/src/runtime/mobile-bridge.ts:315— `pickImagesWithNativeShell` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch apps/app/src/runtime/mobile-bridge.ts:421— `getNativeNotificationPermissionState` swallows every exception into `return "unknown"` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
+ 12 more in this group — see findings.md.
P2 · Observability· Console output used as the logging channel · ×16
Console output used as the logging channel api/inspect-db.js:29— `api/inspect-db.js` reports through `console.*` at line 29 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 api/inspect-db.js:30— `api/inspect-db.js` 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 api/inspect-db.js:34— `api/inspect-db.js` reports through `console.*` at line 34 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 api/inspect-db.js:38— `api/inspect-db.js` reports through `console.*` at line 38 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:85— `REDACTED` reports through `console.*` at line 85 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 REDACTED:88— `REDACTED` reports through `console.*` at line 88 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 REDACTED:139— `REDACTED` reports through `console.*` at line 139 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 REDACTED:128— `REDACTED` reports through `console.*` at line 128 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel api/src/proxy-bootstrap.ts:18— `api/src/proxy-bootstrap.ts` reports through `console.*` at line 18 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel api/src/proxy-bootstrap.ts:23— `api/src/proxy-bootstrap.ts` reports through `console.*` at line 23 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel api/src/modules/moderation/content-moderation.ts:154— `api/src/modules/moderation/content-moderation.ts` reports through `console.*` at line 154 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 api/src/database/database-path.ts:204— `api/src/database/database-path.ts` reports through `console.*` at line 204 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 api/src/database/database-path.ts:214— `api/src/database/database-path.ts` 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.
Console output used as the logging channel api/src/database/relationship-seed.ts:17— `api/src/database/relationship-seed.ts` reports through `console.*` at line 17 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 api/src/database/relationship-seed.ts:63— `api/src/database/relationship-seed.ts` reports through `console.*` at line 63 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel apps/cloud-api/src/auth/password-auth.service.ts:257— `apps/cloud-api/src/auth/password-auth.service.ts` reports through `console.*` at line 257 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Pass-through layer api/src/modules/admin/behavior-records-admin.controller.ts:7— BehaviorRecordsAdminController: all 3 public methods forward their arguments unchanged to behaviorRecordsAdminService and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call behaviorRecordsAdminService directly, or give the layer a job.
Pass-through layer REDACTED:28— ConversationBackgroundController: all 3 public methods forward their arguments unchanged to chatBackgroundsService and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call chatBackgroundsService directly, or give the layer a job.
Pass-through layer REDACTED:55— GroupBackgroundController: all 3 public methods forward their arguments unchanged to chatBackgroundsService and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call chatBackgroundsService directly, or give the layer a job.
Pass-through layer REDACTED:696— FavoritesController: all 8 public methods forward their arguments unchanged to favoritesService and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call favoritesService directly, or give the layer a job.
Pass-through layer REDACTED:744— MessageRemindersController: all 4 public methods forward their arguments unchanged to messageRemindersService and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call messageRemindersService directly, or give the layer a job.
Pass-through layer api/src/modules/games/admin-games.controller.ts:7— AdminGamesController: all 13 public methods forward their arguments unchanged to gamesService and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call gamesService directly, or give the layer a job.
Pass-through layer REDACTED:5— OfficialAccountsController: all 15 public methods forward their arguments unchanged to officialAccountsService and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call officialAccountsService directly, or give the layer a job.
Pass-through layer api/src/modules/wiki/controllers/wiki-stats.controller.ts:17— WikiStatsController: all 3 public methods forward their arguments unchanged to stats and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call stats directly, or give the layer a job.
Pass-through layer REDACTED:20— WikiTalkController: all 6 public methods forward their arguments unchanged to talk and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call talk directly, or give the layer a job.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×6
Projects may be oversized for their cohesion apps/app/package.json:1— `apps/app` (215273 LoC, 697 module-visible types across 62 directories) overshoots its size bounds. 6 of 20 build unit(s) (Cargo, Gradle, Xcode, npm) overshoot their size bounds, lowering Project Cohesion to 4.1/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
Projects may be oversized for their cohesion api/package.json:1— `api` (159321 LoC, 1060 module-visible types across 53 directories) overshoots its size bounds. 6 of 20 build unit(s) (Cargo, Gradle, Xcode, npm) overshoot their size bounds, lowering Project Cohesion to 4.1/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
Projects may be oversized for their cohesion packages/contracts/package.json:1— `packages/contracts` (16767 LoC, 1090 module-visible types across 1 directories) overshoots its size bounds. 6 of 20 build unit(s) (Cargo, Gradle, Xcode, npm) overshoot their size bounds, lowering Project Cohesion to 4.1/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
Projects may be oversized for their cohesion apps/cloud-api/package.json:1— `apps/cloud-api` (27129 LoC, 246 module-visible types across 25 directories) overshoots its size bounds. 6 of 20 build unit(s) (Cargo, Gradle, Xcode, npm) overshoot their size bounds, lowering Project Cohesion to 4.1/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
Projects may be oversized for their cohesion apps/cloud-console/package.json:1— `apps/cloud-console` (25989 LoC, 124 module-visible types across 8 directories) overshoots its size bounds. 6 of 20 build unit(s) (Cargo, Gradle, Xcode, npm) overshoot their size bounds, lowering Project Cohesion to 4.1/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
Projects may be oversized for their cohesion REDACTED:1— `apps/site` (6225 LoC, 70 module-visible types across 18 directories) overshoots its size bounds. 6 of 20 build unit(s) (Cargo, Gradle, Xcode, npm) overshoot their size bounds, lowering Project Cohesion to 4.1/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
No app-layer HTTPS enforcement detected REDACTED:138— `app.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:127— `app.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 apps/cloud-api/src/main.ts:99— `app.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 apps/cloud-api/src/orchestration/local-process-compute-provider.service.ts:514— `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.)
No app-layer HTTPS enforcement detected apps/wechat-connector/src/main.ts:9— `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.)
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 191 significant file(s) lose their only recent owner: api/src/modules/characters/celebrity-character-presets.ts, apps/app/src/features/chat/stickers/sticker-panel.tsx, REDACTED, apps/app/src/routes/desktop-mobile-page.tsx, apps/cloud-api/src/cloud/cloud.service.ts, REDACTED, api/src/modules/ai/reply-logic.constants.ts, api/src/modules/games/games.service.ts (+183 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 130 significant file(s) lose their only recent owner: apps/cloud-console/src/lib/cloud-console-i18n.ts, api/src/modules/games/farm/farm-state.service.ts, apps/app/src/features/games/parking-war/parking-war-game.tsx, REDACTED, apps/cloud-api/src/users/users.service.ts, api/src/modules/config/world-language.service.ts, apps/app/src/features/games/tank-war/tank-war-engine.ts, apps/app/src/components/channels-forward-picker.tsx (+122 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 10 significant file(s) lose their only recent owner: apps/wechat-connector/src/upstream-service-manager.ts, apps/wechat-connector/src/weflow-http-provider.ts, apps/wechat-connector/src/runtime.ts, apps/wechat-connector/src/wechat-decrypt-http-provider.ts, apps/cloud-api/src/alerts/cloud-alert-notifier.service.ts, apps/wechat-connector/src/manual-json-provider.ts, apps/wechat-connector/src/contracts.ts, apps/wechat-connector/src/config.ts (+2 more). Pair on, review, or document these before any departure.
X7 · Silent fallback defaults· Pending state with no failure state · ×2
Pending state with no failure state packages/i18n/src/runtime/language-switcher.tsx:87— The view draws `正在切换语言...` under `! compact && isSwitchingLocale`, but `isSwitchingLocale` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
Pending state with no failure state apps/app/src/routes/profile-settings-language-page.tsx:92— The view draws `正在切换语言...` under `isSwitchingLocale`, but `isSwitchingLocale` 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.
C5 · Data-Subject Rights· Partial data-subject-rights support · ×1
Partial data-subject-rights support — Corroborated rights: erasure ✓ · export ✗ · consent ✗. Each tick means this scan found code in the repository implementing that right — a deletion/anonymisation path for erasure, a data-export or portability path for export, and consent state recorded alongside the personal data it authorises. A ✗ therefore means no such code was recognised HERE, not that the right is unsupported: a capability provided by a platform, a manual runbook, or code spelled in a way this scan does not match is not visible to it. Confirm before treating a cross as a gap; where it is one, the right has to be fulfilled manually.
Mock-dominated test: does not re-seed an existing owner api/src/modules/tenancy/tenant.service.spec.ts:176— This test sets up 5 test doubles (for example `jest.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.
No ADRs found apps/wiki/package.json:7— No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `apps/wiki/package.json` makes this repository a deployable product (line 7).
D21 · Naming Consistency· `sinceISO` spells `ISO` where 22 names in the project spell it `Iso` · ×1
`sinceISO` spells `ISO` where 22 names in the project spell it `Iso` api/src/modules/wiki/services/wiki-watchlist.service.ts:135— 22 of 23 names in project yinjie-workspace spell the token `Iso` (22 of 23; unit: names in project yinjie-workspace containing `Iso`). Peers: BehaviorRecordsAdminService.toIso (api/src/modules/admin/behavior-records-admin.service.ts:934); ChatRecordsAdminService.compareIsoDate (api/src/modules/admin/chat-records-admin.service.ts:1555); runtime-activity-admin.service.toIso (api/src/modules/admin/runtime-activity-admin.service.ts:150); WikiSyncAdminService.toIsoMaybe (api/src/modules/admin/wiki-sync-admin.service.ts:272); message-reminders.service.normalizeIsoTimestamp (api/src/modules/chat/message-reminders.service.ts:406). Rename to `sinceIso`. [rule N6]
D21 · Naming Consistency· `blobToDataURL` spells `URL` where 671 names in the project spell it `Url` · ×1
`blobToDataURL` spells `URL` where 671 names in the project spell it `Url` apps/app/src/components/share-card-modal.tsx:74— 671 of 672 names in project yinjie-workspace spell the token `Url` (671 of 672; unit: names in project yinjie-workspace containing `Url`). Peers: ActionRuntimeService.fetchHomeAssistantRegistrySnapshot(baseUrl) (REDACTED:3042); ActionRuntimeService.resolveHomeAssistantWebsocketUrl (REDACTED:3185); ActionRuntimeService.resolveHomeAssistantWebsocketUrl(baseUrl) (REDACTED:3185); WechatSyncContactBundleValue.avatarUrl (api/src/modules/admin/wechat-sync-admin.types.ts:44); AiOrchestratorService.isReachableAssetUrl (api/src/modules/ai/ai-orchestrator.service.ts:396). Rename to `blobToDataUrl`. [rule N6]
D28 · Secrets (history)· Rotate the exposed credentials · ×1
DM9 · Scattered domain decisions· Rule about [messageCount, sampleMessages] decided in 2 places · ×1
Rule about [messageCount, sampleMessages] decided in 2 places — api.src.modules.admin.wechat-sync-admin_types.WechatSyncContactBundleValue's [messageCount, sampleMessages] are judged in api.src.modules.admin.wechat-sync-admin.service, api.src.modules.admin.wechat-sync-admin_service.WechatSyncAdminService — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions· Rule about [id, relationshipType, sourceKey] decided in 2 places · ×1
Rule about [id, relationshipType, sourceKey] decided in 2 places — api.src.modules.characters.character_entity.CharacterEntity's [id, relationshipType, sourceKey] are judged in api.src.modules.chat.chat_service.ChatService, api.src.modules.self-agent.self-agent_service.SelfAgentService — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions· Rule about [maturedAt, plantedAt] decided in 2 places · ×1
Rule about [maturedAt, plantedAt] decided in 2 places — api.src.modules.games.farm.farm_types.FarmPlot's [maturedAt, plantedAt] are judged in api.src.modules.games.farm.farm-state.service, api.src.modules.games.farm.farm-state_service.FarmStateService — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
GD1 · Unfinished & placeholder code· Placeholder literal left in code · ×1
Placeholder literal left in code apps/ios-shell/scripts/inject-runtime-config.mjs:60— A placeholder string ("看着像 ios-shell.config.local.example.json …") is still in shipped code — typical of generated boilerplate that was never filled in.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
Logging is not universal — Only 2/9 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `.`, `apps/app`, `apps/desktop/src-tauri`, `apps/ios-shell/ios/App` and 2 more.
No SAST REDACTED:6— No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 4 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
No dependency-update automation REDACTED:142— `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 '@lingui/core' in production deps · ×1
Type-only dependency '@lingui/core' in production deps apps/wiki/src/components/character-edit-form.tsx:20— 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 26/64 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
Null assertions (`!`) override strict null checking — ~0.5 `!` null assertions per 1k TypeScript source lines — 232 assertion(s) across the 506088 source line(s) of the 1614 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: api/src/modules/games/farm/farm-npc-tick.service.ts (16), apps/app/src/features/chat/mobile-message-action-sheet.tsx (15), api/src/modules/minimax/minimax-job.entity.ts (12). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
Silent fallback default on Err apps/desktop/src-tauri/src/main.rs:2036— `now_token` turns every `Err` into `"0".into()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Subsumed condition operand apps/app/src/features/shell/desktop-shell.tsx:918— `normalizedPathname.startsWith("/profile/settings")` can never decide this `||` — every value satisfying `normalizedPathname.startsWith("/profile/settings")` also satisfies `normalizedPathname.startsWith("/profile")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Off the main sequence: @yinjie/contracts — @yinjie/contracts: abstractness 0.00, instability 0.00, distance 1.00 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
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 01a1e8a4-21be-7b0e-9a72-05ad1971fde7 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 299 · Warnings: 3222 · Recommendations: 148 · Info: 1 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 17-11-2026 @ 08:33 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.