Skip to content

Conversation

@sandra0503
Copy link
Contributor

Summary

Hide the 'Create Folder' button when viewing the 'Shared With You' or 'Overview' page, as folder creation is not supported on these pages.

Related Linear tickets, Github issues, and Community forum posts

fixes PAY-4362

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)

Hide the 'Create Folder' button when viewing the 'Shared With You' or 'Overview' page,
as folder creation is not supported on these pages.
@CLAassistant
Copy link

CLAassistant commented Jan 7, 2026

CLA assistant check
All committers have signed the CLA.

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 3 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="packages/frontend/editor-ui/src/app/views/WorkflowsView.test.ts">

<violation number="1" location="packages/frontend/editor-ui/src/app/views/WorkflowsView.test.ts:498">
P2: Test name says "overview or shared subpage" but only tests `isSharedSubPage: true`. Consider either adding a separate test for `isOverviewSubPage: true`, or rename this test to "should NOT show 'Create folder' button when in shared subpage".</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

expect(getByTestId('add-folder-button')).toBeInTheDocument();
});

it('should NOT show "Create folder" button when in overview or shared subpage', async () => {
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Jan 7, 2026

Choose a reason for hiding this comment

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

P2: Test name says "overview or shared subpage" but only tests isSharedSubPage: true. Consider either adding a separate test for isOverviewSubPage: true, or rename this test to "should NOT show 'Create folder' button when in shared subpage".

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/frontend/editor-ui/src/app/views/WorkflowsView.test.ts, line 498:

<comment>Test name says "overview or shared subpage" but only tests `isSharedSubPage: true`. Consider either adding a separate test for `isOverviewSubPage: true`, or rename this test to "should NOT show 'Create folder' button when in shared subpage".</comment>

<file context>
@@ -477,6 +481,32 @@ describe('Folders', () => {
+		expect(getByTestId('add-folder-button')).toBeInTheDocument();
+	});
+
+	it('should NOT show "Create folder" button when in overview or shared subpage', async () => {
+		vi.spyOn(projectPages, 'isOverviewSubPage', 'get').mockReturnValue(false);
+		vi.spyOn(projectPages, 'isSharedSubPage', 'get').mockReturnValue(true);
</file context>
Suggested change
it('should NOT show "Create folder" button when in overview or shared subpage', async () => {
it('should NOT show "Create folder" button when in shared subpage', async () => {

✅ Addressed in 53bfad1

Copy link
Contributor

Choose a reason for hiding this comment

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

^ I agree with this. Let's write 2 tests here to test both cases for both overview and shared pages.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the feedback! I've updated an existing learning with this new information.

@codecov
Copy link

codecov bot commented Jan 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@n8n-assistant n8n-assistant bot added the n8n team Authored by the n8n team label Jan 7, 2026
@currents-bot
Copy link

currents-bot bot commented Jan 7, 2026

E2E Tests: n8n tests passed after 9m 33.7s

🟢 609 · 🔴 0 · ⚪️ 38

View Run Details

Run Details

  • Project: n8n

  • Groups: 2

  • Framework: Playwright

  • Run Status: Passed

  • Commit: 120a50d

  • Spec files: 142

  • Overall tests: 647

  • Duration: 9m 33.7s

  • Parallelization: 16

Groups

GroupId Results Spec Files Progress
multi-main:e2e 🟢 552 · 🔴 0 · ⚪️ 38 133 / 133
multi-main:e2e:isolated 🟢 57 · 🔴 0 · ⚪️ 0 9 / 9


This message was posted automatically by currents.dev | Integration Settings

Copy link
Contributor

@MarcL MarcL left a comment

Choose a reason for hiding this comment

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

A couple of comments on the tests but good otherwise. 👍🏻

expect(getByTestId('folder-card-name')).toHaveTextContent(TEST_FOLDER_RESOURCE.name);
});

it('should show "Create folder" button', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe a clearer name here?

Suggested change
it('should show "Create folder" button', async () => {
it('should show "Create folder" button when not in the overview or sharing pages', async () => {

expect(getByTestId('add-folder-button')).toBeInTheDocument();
});

it('should NOT show "Create folder" button when in overview or shared subpage', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

^ I agree with this. Let's write 2 tests here to test both cases for both overview and shared pages.

@blacksmith-sh

This comment has been minimized.

@sandra0503
Copy link
Contributor Author

Thanks for reviewing, I added another test case

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.

4 issues found across 33 files (changes from recent commits).

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="packages/nodes-base/nodes/Box/BoxTrigger.node.ts">

<violation number="1">
P2: Rule violated: **Prefer Typeguards over Type casting**

Use a type guard instead of `as string` for type narrowing. The `webhook.id` from the API response should be validated with a type check before assignment.</violation>
</file>

<file name="packages/frontend/@n8n/design-system/src/components/AskAssistantChat/messages/ThinkingMessage.test.ts">

<violation number="1">
P2: This assertion could produce a false positive. If `statusText` is null (element not found), `statusText?.className` returns `undefined`, and `expect(undefined).not.toContain('shimmer')` passes silently. Add an existence check before the class assertion to ensure the test fails if the element is missing.</violation>
</file>

<file name="packages/nodes-base/nodes/Mailjet/test/Mailjet.node.test.ts">

<violation number="1">
P2: Same issue as above - `expect.not.objectContaining` with multiple properties passes if *either* is missing. Add explicit checks like:
```typescript
const lastCall = mailjetApiRequestSpy.mock.calls[mailjetApiRequestSpy.mock.calls.length - 1];
expect(lastCall[2].Messages[0]).not.toHaveProperty('CustomCampaign');
expect(lastCall[2].Messages[0]).not.toHaveProperty('DeduplicateCampaign');
```</violation>

<violation number="2">
P2: The `expect.not.objectContaining` assertion with multiple properties doesn't work as intended. It will pass if *either* property is missing, not if *both* are missing. Use separate `.not.toHaveProperty()` checks like you do at lines 369-380 for accurate verification.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link
Contributor

@konstantintieber konstantintieber left a comment

Choose a reason for hiding this comment

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

Nice UX improvement 👍

@sandra0503 sandra0503 merged commit 8824bea into master Jan 8, 2026
39 checks passed
@sandra0503 sandra0503 deleted the pay-4362-button-for-creating-folders-in-shared-with-you-section-is branch January 8, 2026 09:01
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.

5 participants