Skip to content

Conversation

scdekov
Copy link
Member

@scdekov scdekov commented Oct 13, 2025

Summary

This has been requested multiple time as it's confusing to change tab and still have the main resource creation cta to be "Create workflow"

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/ADO-4296/feature-make-the-top-right-create-button-contextual-to-the-page-it-is

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

@scdekov scdekov changed the title feat(editor): Make the main create resource button aware of the selec… feat(editor): Make the main create resource button aware of the selected tab Oct 13, 2025
@scdekov scdekov marked this pull request as ready for review October 13, 2025 15:39
@n8n-assistant n8n-assistant bot added the n8n team Authored by the n8n team label Oct 13, 2025
Copy link

bundlemon bot commented Oct 13, 2025

BundleMon

Files added (2)
Status Path Size Limits
WASM Dependencies
tree-sitter-bash.wasm
+181.26KB -
WASM Dependencies
tree-sitter.wasm
+74.47KB -

Total files change +255.73KB

Groups added (2)
Status Path Size Limits
**/*.js
+5.77MB -
**/*.css
+201.57KB -

Final result: ✅

View report in BundleMon website ➡️


Current branch size history

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 4 files

Prompt for AI agents (all 1 issues)

Understand the root cause of the following 1 issues and fix them.


<file name="packages/frontend/editor-ui/src/features/projects/components/ProjectHeader.vue">

<violation number="1" location="packages/frontend/editor-ui/src/features/projects/components/ProjectHeader.vue:134">
Rule violated: **Prefer Typeguards over Type casting**

Please remove the new `as IconName` cast here; the `&#39;lock&#39;` literal already satisfies the button icon type, so annotate or structure the value instead of asserting.

(Based on your team&#39;s feedback about verifying surrounding lines before flagging `as` usages.) [FEEDBACK_USED]</violation>
</file>

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

const createCredentialButton = computed(() => ({
value: ACTION_TYPES.CREDENTIAL,
label: i18n.baseText('projects.header.create.credential'),
icon: sourceControlStore.preferences.branchReadOnly ? ('lock' as IconName) : undefined,
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Oct 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rule violated: **Prefer Typeguards over Type casting** Please remove the new `as IconName` cast here; the `'lock'` literal already satisfies the button icon type, so annotate or structure the value instead of asserting. (Based on your team's feedback about verifying surrounding lines before flagging `as` usages.)
Prompt for AI agents ~~~ Address the following comment on packages/frontend/editor-ui/src/features/projects/components/ProjectHeader.vue at line 134: Please remove the new `as IconName` cast here; the `'lock'` literal already satisfies the button icon type, so annotate or structure the value instead of asserting. (Based on your team's feedback about verifying surrounding lines before flagging `as` usages.) @@ -127,16 +128,65 @@ const createWorkflowButton = computed(() => ({ +const createCredentialButton = computed(() => ({ + value: ACTION_TYPES.CREDENTIAL, + label: i18n.baseText('projects.header.create.credential'), + icon: sourceControlStore.preferences.branchReadOnly ? ('lock' as IconName) : undefined, + size: 'mini' as const, + disabled: ~~~
```suggestion icon: sourceControlStore.preferences.branchReadOnly ? 'lock' : undefined, ``` Fix with Cubic

Copy link

codecov bot commented Oct 13, 2025

Codecov Report

❌ Patch coverage is 96.22642% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...src/features/projects/components/ProjectHeader.vue 96.07% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

n8n team Authored by the n8n team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant