Skip to content

fix(core): Hide pre-resolved setup requests from Instance AI wizard#28731

Merged
aalises merged 1 commit intomasterfrom
ai-2395-fix-setup-wizard-shows-steps-for-credentials-that-are
Apr 21, 2026
Merged

fix(core): Hide pre-resolved setup requests from Instance AI wizard#28731
aalises merged 1 commit intomasterfrom
ai-2395-fix-setup-wizard-shows-steps-for-credentials-that-are

Conversation

@aalises
Copy link
Copy Markdown
Contributor

@aalises aalises commented Apr 20, 2026

Summary

The Instance AI setup wizard rendered a step for every credential-bearing node in the generated workflow, including ones whose credential was already set on the node and had passed its test. Users saw "done" steps with nothing to do.

Filter the requests emitted by analyzeWorkflow so only those that still need user work survive:

  • needsAction === true → kept (credential missing/invalid, or parameter issues)
  • isTrigger && isTestable → kept (triggers always require user testing)
  • everything else (pre-valid credential-only cards) → hidden

Trigger steps with a pre-valid credential are preserved because the user still needs to test the trigger. Parameter-issue requests already flip needsAction=true, so they're unaffected.

Related Linear tickets, Github issues, and Community forum posts

Review / Merge checklist

  • I have seen this code, I have run this code, and I take responsibility for this code.
  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with `Backport to Beta`, `Backport to Stable`, or `Backport to v1` (if the PR is an urgent fix that needs to be backported)

analyzeWorkflow emitted a request for every credential-bearing node, including
ones whose credential was already set and had tested successfully. The wizard
rendered those as empty "done" steps with nothing for the user to do.

Filter the request list so only items that still need user work remain:
requests with needsAction set, or triggers that are still testable. Pre-valid
credential-only cards drop out; trigger steps survive regardless of credential
state, and parameter-issue requests (which always flip needsAction) are
unaffected.

Ref: https://linear.app/n8n/issue/AI-2395
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@aalises aalises requested a review from scdekov April 20, 2026 17:05
@aalises aalises marked this pull request as ready for review April 20, 2026 17:05
@github-actions
Copy link
Copy Markdown
Contributor

Instance AI Workflow Eval Results

7/8 built | 9/22 passed (40%)

Workflow Build Passed
Create a workflow that handles contact form submissions via a webhook. 3/5
Get all the Linear issues created in the last 2 weeks. Filter them for 0/5
Every day, get the posts made in the past day on 3 different Slack cha 0/0
Create a form that collects: name, email, company, and interest level 2/2
Every day, fetch all open GitHub issues from repository 'acme-corp/bac 0/2
Create a workflow that receives webhook notifications with a JSON body 3/3
Fetch the latest posts from the JSONPlaceholder API (GET https://jsonp 1/3
Every hour, check the current weather for London, New York, and Tokyo 0/2
Failure details

partial-action-failure [builder_issue]

The workflow did not handle the Telegram failure gracefully. When the Telegram node failed with 'Bad request - please check your parameters' (triggered by the mock returning {ok: false, error_code: 40

invalid-email [builder_issue]

The workflow crashed at the 'Send Auto-Reply Email' node with 'Invalid email address (item 0)' because the Gmail node validated 'not-an-email' as an invalid recipient before making any HTTP request. T

happy-path [builder_issue]

The workflow errored at the 'Format Slack Message' node with 'Invalid or unexpected token'. The node code contains unescaped newlines inside string literals — specifically, the template literal / stri

multi-team-creator [builder_issue]

The workflow partially succeeds: the Filter Cross-Team Issues node correctly excludes Alice's AI issue (ISS-103, team Frontend, which is her homeTeam) — wait, actually the mock returned ISS-103 as tea

no-cross-team-issues [builder_issue]

The workflow crashes at the 'Format Slack Message' node with 'Invalid or unexpected token'. The root cause is a syntax error in the node's jsCode: the template string literals in the code use actual n

unknown-creator [builder_issue]

The workflow crashed at the 'Format Slack Message' node with 'Invalid or unexpected token'. The root cause is a syntax error in the jsCode of that node: the template literal strings in the edge-case h

api-error [builder_issue]

The workflow crashed with 'Authorization failed - please check your credentials' when the Linear API returned an authentication error. There is no error handling branch, no try/catch logic, no IF node

happy-path [builder_issue]

The workflow did not execute correctly for all 3 issues. The 'Fetch GitHub Bug Issues' node output a Buffer (binary data) instead of parsed JSON items — the raw bytes in the output represent the full

no-bugs [builder_issue]

The workflow was supposed to handle an empty GitHub response gracefully — no Notion pages should be created and the workflow should complete cleanly. However, the workflow failed. The root cause is th

happy-path [mock_issue]

The workflow executed without errors and posted to #api-digest. However, the Slack message contains 'iusto eius quod necessitatibusnon' as the 6th post, which was not in the Filter node's output (the

all-filtered [builder_issue]

The Filter Out qui Titles node was supposed to filter OUT all items with 'qui' in their titles, leaving zero items, and the workflow should handle that gracefully without crashing or sending an empty

happy-path [builder_issue]

The workflow failed to execute. The Airtable - Log Weather node has a config issue: 'Weather Logs' is not a valid Airtable Table ID (it should be a table ID like 'tblXXXXXX', not a human-readable name

no-alerts [builder_issue]

The workflow failed to execute due to a builder configuration issue. The Airtable - Log Weather node has an invalid Table ID ('Weather Logs' is a plain text name, not a valid Airtable Table ID which m

Copy link
Copy Markdown
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.

No issues found across 2 files

Architecture diagram
sequenceDiagram
    participant UI as AI Setup Wizard (UI)
    participant Setup as SetupWorkflowService
    participant Workflow as WorkflowService
    participant Node as NodeService
    participant Creds as CredentialService

    Note over UI,Creds: Instance AI Workflow Analysis Flow

    UI->>Setup: analyzeWorkflow(workflowId)
    Setup->>Workflow: getAsWorkflowJSON()
    Workflow-->>Setup: workflow definition

    loop For each Node in Workflow
        Setup->>Node: getDescription()
        
        opt Node has credentials
            Setup->>Creds: list() / test()
            Creds-->>Setup: credential status (valid/invalid)
        end

        Setup->>Node: getParameterIssues()
        Node-->>Setup: issues (if any)

        Setup->>Setup: Determine needsAction<br/>(missing creds OR failed test OR param issues)
        
        Note over Setup: NEW: Visibility Filtering Logic
        
        alt needsAction === true
            Setup->>Setup: Keep Request (Action required)
        else isTrigger AND isTestable
            Setup->>Setup: NEW: Keep Request (Manual trigger test required)
        else Default
            Setup->>Setup: CHANGED: Filter out (Hide from Wizard)
        end
    end

    Setup->>Setup: sortByExecutionOrder()
    Setup-->>UI: Array of filtered setup requests
Loading

@github-actions
Copy link
Copy Markdown
Contributor

Performance Comparison

Comparing currentlatest master14-day baseline

Idle baseline with Instance AI module loaded

Metric Current Latest Master Baseline (avg) vs Master vs Baseline Status
instance-ai-heap-used-baseline 187.10 MB 186.88 MB 186.42 MB (σ 0.27) +0.1% +0.4% 🔴
instance-ai-rss-baseline 337.79 MB 386.52 MB 364.63 MB (σ 22.57) -12.6% -7.4% ⚠️

Memory consumption baseline with starter plan resources

Metric Current Latest Master Baseline (avg) vs Master vs Baseline Status
memory-heap-used-baseline 114.80 MB 114.39 MB 114.37 MB (σ 0.40) +0.4% +0.4% ⚠️
memory-rss-baseline 284.17 MB 288.44 MB 290.51 MB (σ 41.09) -1.5% -2.2%

docker-stats

Metric Current Latest Master Baseline (avg) vs Master vs Baseline Status
docker-image-size-n8n 1269.76 MB 1300.48 MB 1273.86 MB (σ 10.81) -2.4% -0.3%
docker-image-size-runners 386.00 MB 412.00 MB 392.93 MB (σ 11.30) -6.3% -1.8%
How to read this table
  • Current: This PR's value (or latest master if PR perf tests haven't run)
  • Latest Master: Most recent nightly master measurement
  • Baseline: Rolling 14-day average from master
  • vs Master: PR impact (current vs latest master)
  • vs Baseline: Drift from baseline (current vs rolling avg)
  • Status: ✅ within 1σ | ⚠️ 1-2σ | 🔴 >2σ regression

@n8n-assistant n8n-assistant Bot added the n8n team Authored by the n8n team label Apr 20, 2026
@aalises aalises added this pull request to the merge queue Apr 21, 2026
Merged via the queue into master with commit 9ea2ef1 Apr 21, 2026
64 checks passed
@aalises aalises deleted the ai-2395-fix-setup-wizard-shows-steps-for-credentials-that-are branch April 21, 2026 08:47
@n8n-assistant n8n-assistant Bot mentioned this pull request Apr 28, 2026
@n8n-assistant
Copy link
Copy Markdown
Contributor

n8n-assistant Bot commented Apr 28, 2026

Got released with n8n@2.19.0

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 Released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants