Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V16/feature: get context resolves in undefined if not found #18611

Merged

implement preventTimeouts where it makes sense

4dce0db
Select commit
Loading
Failed to load commit list.
Merged

V16/feature: get context resolves in undefined if not found #18611

implement preventTimeouts where it makes sense
4dce0db
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (v16/dev) failed Mar 14, 2025 in 1m 13s

CodeScene PR Check

Quality Gate Failed

Code Health Improved (7 files improve in Code Health)

Gates Failed
Prevent hotspot decline (1 hotspot with Complex Method)
Enforce critical code health rules (3 files with Bumpy Road Ahead)
Enforce advisory code health rules (27 files with Complex Method, Overall Code Complexity, Complex Conditional)

Gates Passed
1 Quality Gates Passed

See analysis details in CodeScene

Reason for failure
Prevent hotspot decline Violations Code Health Impact
document-workspace.context.ts 1 rule in this hotspot 9.19 → 9.01 Suppress
Enforce critical code health rules Violations Code Health Impact
temporary-file-manager.class.ts 1 critical rule 9.24 → 8.55 Suppress
block-list-entries.context.ts 1 critical rule 8.66 → 8.48 Suppress
block-grid-entries.context.ts 1 critical rule 6.82 → 6.69 Suppress
Enforce advisory code health rules Violations Code Health Impact
external-login-modal.element.ts 2 advisory rules 9.69 → 8.90 Suppress
temporary-file-manager.class.ts 1 advisory rule 9.24 → 8.55 Suppress
block-list-entry.element.ts 2 advisory rules 9.38 → 8.81 Suppress
mfa-user.action.ts 1 advisory rule 10.00 → 9.69 Suppress
disable.action.ts 1 advisory rule 10.00 → 9.69 Suppress
enable.action.ts 1 advisory rule 10.00 → 9.69 Suppress
unlock.action.ts 1 advisory rule 10.00 → 9.69 Suppress
rename-server-file-repository-base.ts 1 advisory rule 10.00 → 9.69 Suppress
data-type-picker-flow-modal.element.ts 1 advisory rule 10.00 → 9.69 Suppress
anchor.tiptap-toolbar-api.ts 1 advisory rule 10.00 → 9.69 Suppress
document-unpublish-modal.element.ts 1 advisory rule 9.39 → 9.10 Suppress
block-manager.context.ts 1 advisory rule 9.07 → 8.80 Suppress
app-auth.controller.ts 1 advisory rule 9.64 → 9.37 Suppress
content-detail-workspace-base.ts 1 advisory rule 9.19 → 8.93 Suppress
entity-detail-workspace-base.ts 1 advisory rule 9.69 → 9.45 Suppress
publish.action.ts 1 advisory rule 9.25 → 9.04 Suppress
document-workspace.context.ts 1 advisory rule 9.19 → 9.01 Suppress
block-list-entries.context.ts 1 advisory rule 8.66 → 8.48 Suppress
unpublish.action.ts 1 advisory rule 9.45 → 9.29 Suppress
unpublish.bulk-action.ts 1 advisory rule 9.33 → 9.17 Suppress
block-grid-entries.context.ts 1 advisory rule 6.82 → 6.69 Suppress
publish.bulk-action.ts 1 advisory rule 8.65 → 8.52 Suppress
element.mixin.ts 1 advisory rule 9.69 → 9.58 Suppress
document-publishing.workspace-context.ts 1 advisory rule 7.96 → 7.87 Suppress
rollback-modal.element.ts 1 advisory rule 8.29 → 8.25 Suppress
block-grid-entry.context.ts 1 advisory rule 8.19 → 8.14 Suppress
class.mixin.ts 1 advisory rule 9.52 → 9.48 Suppress
View Improvements
File Code Health Impact Categories Improved
context-consumer.test.ts no change Code Duplication
duplicate-to.action.ts 9.53 → 9.55 Complex Method
move-to.action.ts 9.53 → 9.55 Complex Method
duplicate-to.action.ts no change Complex Method
embedded-media.tiptap-toolbar-api.ts 9.69 → 10.00 Complex Method
link.tiptap-toolbar-api.ts no change Complex Method, Overall Code Complexity
document-workspace-view-info.element.ts 9.69 → 10.00 Complex Method
input-markdown.element.ts 6.63 → 6.64 Complex Method, Overall Code Complexity
content-type-design-editor.element.ts 8.26 → 8.28 Complex Method, Overall Code Complexity
duplicate-document.action.ts 9.69 → 10.00 Complex Method

Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.

Details

🚩 Declining Code Health (highest to lowest):

  • Complex Method publish.action.ts: UmbPublishDocumentEntityAction.execute
  • Complex Method publish.bulk-action.ts: UmbDocumentPublishEntityBulkAction.execute
  • Complex Method unpublish.action.ts: UmbUnpublishDocumentEntityAction.execute
  • Complex Method unpublish.bulk-action.ts: UmbDocumentUnpublishEntityBulkAction.execute
  • Complex Method document-publishing.workspace-context.ts: UmbDocumentPublishingWorkspaceContext.schedule
  • Overall Code Complexity temporary-file-manager.class.ts
  • Overall Code Complexity external-login-modal.element.ts
  • Complex Method block-list-entries.context.ts: UmbBlockListEntriesContext.constructor
  • Complex Method class.mixin.ts: UmbClassMixin
  • Complex Method block-grid-entries.context.ts: UmbBlockGridEntriesContext.constructor
  • Complex Method block-grid-entry.context.ts: UmbBlockGridEntryContext.copyToClipboard
  • Complex Method element.mixin.ts: UmbElementMixin
  • Complex Method document-publishing.workspace-context.ts: UmbDocumentPublishingWorkspaceContext.handleSaveAndPublish
  • Complex Method app-auth.controller.ts: UmbAppAuthController.makeAuthorizationRequest
  • Complex Method block-manager.context.ts: UmbBlockManagerContext._createBlockElementData
  • Complex Method block-list-entry.element.ts: UmbBlockListEntryElement.copyToClipboard
  • Complex Conditional block-list-entry.element.ts: UmbBlockListEntryElement.copyToClipboard
  • Complex Method rename-server-file-repository-base.ts: UmbRenameServerFileRepositoryBase.rename
  • Complex Method data-type-picker-flow-modal.element.ts: UmbDataTypePickerFlowModalElement.init
  • Complex Method document-unpublish-modal.element.ts: UmbDocumentUnpublishModalElement.getReferences
  • Complex Method anchor.tiptap-toolbar-api.ts: UmbTiptapToolbarAnchorExtensionApi.execute
  • Complex Method mfa-user.action.ts: UmbMfaUserEntityAction.execute
  • Complex Method disable.action.ts: UmbDisableUserEntityBulkAction.execute
  • Complex Method enable.action.ts: UmbEnableUserEntityBulkAction.execute
  • Complex Method unlock.action.ts: UmbUnlockUserEntityBulkAction.execute
  • Complex Method rollback-modal.element.ts: UmbRollbackModalElement.onRollback
  • Complex Method content-detail-workspace-base.ts: create
  • Complex Method external-login-modal.element.ts: UmbCurrentUserExternalLoginModalElement.onProviderDisable
  • Complex Method app-auth.controller.ts: UmbAppAuthController.showLoginModal
  • Complex Method block-manager.context.ts: UmbBlockManagerContext.setInitialBlockExpose
  • Complex Method entity-detail-workspace-base.ts: UmbEntityDetailWorkspaceContextBase._create
  • Complex Method document-workspace.context.ts: UmbDocumentWorkspaceContext.handleSaveAndPreview 🔥
  • Bumpy Road Ahead block-grid-entries.context.ts: UmbBlockGridEntriesContext.constructor
  • Bumpy Road Ahead block-list-entries.context.ts: UmbBlockListEntriesContext.constructor
  • Bumpy Road Ahead temporary-file-manager.class.ts: UmbTemporaryFileManager.validateItem

✅ Improving Code Health:

  • Overall Code Complexity content-type-design-editor.element.ts
  • Overall Code Complexity input-markdown.element.ts
  • Overall Code Complexity link.tiptap-toolbar-api.ts
  • Complex Method duplicate-to.action.ts: UmbMediaDuplicateEntityBulkAction.execute
  • Complex Method move-to.action.ts: UmbMediaMoveEntityBulkAction.execute
  • Code Duplication context-consumer.test.ts: 'disapproving discriminator does not fire callback'
  • Complex Method duplicate-to.action.ts: UmbDuplicateToEntityAction.execute
  • Complex Method link.tiptap-toolbar-api.ts: UmbTiptapToolbarLinkExtensionApi.execute
  • Complex Method input-markdown.element.ts: UmbInputMarkdownElement.insertMedia
  • Complex Method content-type-design-editor.element.ts: UmbContentTypeDesignEditorElement.openCompositionModal
  • Complex Method duplicate-document.action.ts: UmbDuplicateDocumentEntityAction.execute
  • Complex Method document-workspace-view-info.element.ts: UmbDocumentWorkspaceViewInfoElement.openTemplatePicker
  • Complex Method embedded-media.tiptap-toolbar-api.ts: UmbTiptapToolbarEmbeddedMediaExtensionApi.execute

Annotations

Check warning on line 114 in src/Umbraco.Web.UI.Client/src/libs/class-api/class.mixin.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)

❌ Getting worse: Complex Method

UmbClassMixin increases in cyclomatic complexity from 10 to 11, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check notice on line 1 in src/Umbraco.Web.UI.Client/src/libs/context-api/consume/context-consumer.test.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)

✅ Getting better: Code Duplication

reduced similar code in: 'disapproving discriminator does not fire callback'. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.

Check warning on line 93 in src/Umbraco.Web.UI.Client/src/libs/element-api/element.mixin.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)

❌ Getting worse: Complex Method

UmbElementMixin increases in cyclomatic complexity from 9 to 10, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 68 in src/Umbraco.Web.UI.Client/src/apps/app/app-auth.controller.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)

❌ Getting worse: Complex Method

UmbAppAuthController.makeAuthorizationRequest increases in cyclomatic complexity from 13 to 14, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 127 in src/Umbraco.Web.UI.Client/src/apps/app/app-auth.controller.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)

❌ New issue: Complex Method

UmbAppAuthController.showLoginModal has a cyclomatic complexity of 9, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check notice on line 25 in src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/common/duplicate-to/duplicate-to.action.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)

✅ Getting better: Complex Method

UmbMediaDuplicateEntityBulkAction.execute decreases in cyclomatic complexity from 17 to 16, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check notice on line 25 in src/Umbraco.Web.UI.Client/src/packages/core/entity-bulk-action/common/move-to/move-to.action.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)

✅ Getting better: Complex Method

UmbMediaMoveEntityBulkAction.execute decreases in cyclomatic complexity from 17 to 16, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check notice on line 37 in src/Umbraco.Web.UI.Client/src/packages/core/tree/entity-actions/duplicate-to/duplicate-to.action.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)

✅ Getting better: Complex Method

UmbDuplicateToEntityAction.execute decreases in cyclomatic complexity from 11 to 10, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 319 in src/Umbraco.Web.UI.Client/src/packages/core/workspace/entity-detail/entity-detail-workspace-base.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)

❌ New issue: Complex Method

UmbEntityDetailWorkspaceContextBase._create has a cyclomatic complexity of 9, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 129 in src/Umbraco.Web.UI.Client/src/packages/documents/documents/publishing/publish/entity-bulk-action/publish.bulk-action.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)

❌ Getting worse: Complex Method

UmbDocumentPublishEntityBulkAction.execute increases in cyclomatic complexity from 21 to 29, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 106 in src/Umbraco.Web.UI.Client/src/packages/documents/documents/publishing/unpublish/entity-bulk-action/unpublish.bulk-action.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)

❌ Getting worse: Complex Method

UmbDocumentUnpublishEntityBulkAction.execute increases in cyclomatic complexity from 19 to 25, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check notice on line 25 in src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/toolbar/embedded-media.tiptap-toolbar-api.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)

✅ No longer an issue: Complex Method

UmbTiptapToolbarEmbeddedMediaExtensionApi.execute is no longer above the threshold for cyclomatic complexity

Check notice on line 20 in src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/toolbar/link.tiptap-toolbar-api.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)

✅ Getting better: Complex Method

UmbTiptapToolbarLinkExtensionApi.execute decreases in cyclomatic complexity from 11 to 10, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check notice on line 1 in src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/toolbar/link.tiptap-toolbar-api.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)

✅ Getting better: Overall Code Complexity

The mean cyclomatic complexity decreases from 5.38 to 5.25, threshold = 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.

Check warning on line 203 in src/Umbraco.Web.UI.Client/src/packages/user/current-user/external-login/modals/external-login-modal.element.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)

❌ New issue: Complex Method

UmbCurrentUserExternalLoginModalElement.onProviderDisable has a cyclomatic complexity of 10, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 1 in src/Umbraco.Web.UI.Client/src/packages/user/current-user/external-login/modals/external-login-modal.element.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)

❌ New issue: Overall Code Complexity

This module has a mean cyclomatic complexity of 4.57 across 7 functions. The mean complexity threshold is 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.

Check warning on line 34 in src/Umbraco.Web.UI.Client/src/packages/user/user/entity-actions/mfa/mfa-user.action.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)

❌ New issue: Complex Method

UmbMfaUserEntityAction.execute has a cyclomatic complexity of 10, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 21 in src/Umbraco.Web.UI.Client/src/packages/user/user/entity-bulk-actions/disable/disable.action.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)

❌ New issue: Complex Method

UmbDisableUserEntityBulkAction.execute has a cyclomatic complexity of 9, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 21 in src/Umbraco.Web.UI.Client/src/packages/user/user/entity-bulk-actions/enable/enable.action.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)

❌ New issue: Complex Method

UmbEnableUserEntityBulkAction.execute has a cyclomatic complexity of 9, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 21 in src/Umbraco.Web.UI.Client/src/packages/user/user/entity-bulk-actions/unlock/unlock.action.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)

❌ New issue: Complex Method

UmbUnlockUserEntityBulkAction.execute has a cyclomatic complexity of 9, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 97 in src/Umbraco.Web.UI.Client/src/packages/documents/documents/publishing/unpublish/entity-action/unpublish.action.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)

❌ Getting worse: Complex Method

UmbUnpublishDocumentEntityAction.execute increases in cyclomatic complexity from 20 to 26, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 125 in src/Umbraco.Web.UI.Client/src/packages/documents/documents/publishing/unpublish/modal/document-unpublish-modal.element.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)

❌ New issue: Complex Method

UmbDocumentUnpublishModalElement.getReferences has a cyclomatic complexity of 10, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 160 in src/Umbraco.Web.UI.Client/src/packages/documents/documents/publishing/workspace-context/document-publishing.workspace-context.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)

❌ Getting worse: Complex Method

UmbDocumentPublishingWorkspaceContext.schedule increases in cyclomatic complexity from 21 to 23, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 311 in src/Umbraco.Web.UI.Client/src/packages/documents/documents/publishing/workspace-context/document-publishing.workspace-context.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)

❌ Getting worse: Complex Method

UmbDocumentPublishingWorkspaceContext.handleSaveAndPublish increases in cyclomatic complexity from 13 to 15, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 221 in src/Umbraco.Web.UI.Client/src/packages/documents/documents/rollback/modal/rollback-modal.element.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)

❌ Getting worse: Complex Method

UmbRollbackModalElement.onRollback increases in cyclomatic complexity from 9 to 11, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.