feat(editor): Surface used data tables and bound credentials in Artifacts panel#28762
feat(editor): Surface used data tables and bound credentials in Artifacts panel#28762
Conversation
…acts panel Existing data tables the agent reused inside a produced workflow and credentials bound via setup now appear in the Instance AI Artifacts panel alongside created resources. Tools (workflows setup State 4, build-workflow, submit-workflow) resolve a workflow's references through a new InstanceAiContext.getWorkflowReferences method implemented on the adapter, using the workflow's owning project via OwnershipService and access-aware service calls. The frontend registry keys references per workflowId so new emits replace prior ones, ordered globally by startedAt to stay correct across parent/child agent interleavings. Linear: https://linear.app/n8n/issue/AI-2399
Bundle ReportChanges will increase total bundle size by 2.88kB (0.01%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: editor-ui-esmAssets Changed:
Files in
Files in
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Instance AI Workflow Eval Results9/9 built | 3 run(s) | pass@3: 72% | pass^3: 31% | iterations: 48% / 45% / 55%
Failure detailsCreate a workflow that handles contact form submissions via a webhook. / happy-path — 2/3 passed
Create a workflow that handles contact form submissions via a webhook. / missing-fields — 2/3 passed
Create a workflow that handles contact form submissions via a webhook. / partial-action-failure — 0/3 passed
Create a workflow that handles contact form submissions via a webhook. / empty-message — 2/3 passed
Create a workflow that handles contact form submissions via a webhook. / invalid-email — 0/3 passed
Get all the Linear issues created in the last 2 weeks. Filter them for / happy-path — 0/3 passed
Get all the Linear issues created in the last 2 weeks. Filter them for / multi-team-creator — 0/3 passed
Get all the Linear issues created in the last 2 weeks. Filter them for / no-cross-team-issues — 1/3 passed
Get all the Linear issues created in the last 2 weeks. Filter them for / unknown-creator — 2/3 passed
Get all the Linear issues created in the last 2 weeks. Filter them for / api-error — 0/3 passed
Every day, get the posts made in the past day on 3 different Slack cha / happy-path — 2/3 passed
Every day, get the posts made in the past day on 3 different Slack cha / empty-channel — 1/3 passed
Every day, get the posts made in the past day on 3 different Slack cha / high-volume — 2/3 passed
Every day, get the posts made in the past day on 3 different Slack cha / channel-not-found — 0/3 passed
Every day, get the posts made in the past day on 3 different Slack cha / insufficient-permissions — 0/3 passed
Every day, fetch all open GitHub issues from repository 'acme-corp/bac / happy-path — 0/3 passed
Every day, fetch all open GitHub issues from repository 'acme-corp/bac / no-bugs — 2/3 passed
Create a workflow that receives webhook notifications with a JSON body / high-priority — 1/3 passed
Create a workflow that receives webhook notifications with a JSON body / medium-priority — 1/3 passed
Create a workflow that receives webhook notifications with a JSON body / low-priority — 1/3 passed
Fetch the latest posts from the JSONPlaceholder API (GET https://jsonp / empty-response — 2/3 passed
Fetch the latest posts from the JSONPlaceholder API (GET https://jsonp / all-filtered — 2/3 passed
Every hour, check the current weather for London, New York, and Tokyo / happy-path — 2/3 passed
|
Add `get` mock to `dataTableService` test stubs and supply the new `ownershipService` constructor arg in the adapter service tests so the suites match the updated interfaces.
Performance ComparisonComparing current → latest master → 14-day baseline docker-stats
Idle baseline with Instance AI module loaded
Memory consumption baseline with starter plan resources
How to read this table
|
…ot-created-tables-and
…ot-created-tables-and
…ot-created-tables-and
Aligns the name-based data-table fallback in resolveWorkflowReferences with the id-based path so a matched table is only surfaced when the user has dataTable:read on it, closing a gap where a user with workflow:read but no dataTable:read could see the table's id and name via the Artifacts panel. Adds security tests covering credential and data-table scope denial (both id and name paths), inaccessible-workflow short-circuit, and id/name dedup.
…anel-include-used-but-not-created-tables-and
…ter test helper Aligns createNodeAdapterForTests with the 30-parameter InstanceAiAdapterService constructor after the ownershipService dependency was added on this branch.
…ot-created-tables-and # Conflicts: # packages/@n8n/api-types/src/schemas/instance-ai.schema.ts # packages/@n8n/instance-ai/src/tools/workflows/build-workflow.tool.ts # packages/cli/src/modules/instance-ai/__tests__/instance-ai.adapter.service.security.test.ts # packages/cli/src/modules/instance-ai/__tests__/instance-ai.adapter.service.test.ts # packages/cli/src/modules/instance-ai/instance-ai.adapter.service.ts
There was a problem hiding this comment.
1 issue found across 4 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/cli/src/modules/instance-ai/instance-ai.adapter.service.ts">
<violation number="1" location="packages/cli/src/modules/instance-ai/instance-ai.adapter.service.ts:285">
P2: Name-based data table reference resolution now uses substring search (`LIKE %name%`) with `take: 1`, which can return the wrong table when names overlap.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
| await Promise.all( | ||
| dataTableNameRefs.map(async (name) => { | ||
| const { data: matches } = await this.dataTableService.getManyAndCount({ | ||
| filter: { projectId: project.id, name: name.toLowerCase() }, |
There was a problem hiding this comment.
P2: Name-based data table reference resolution now uses substring search (LIKE %name%) with take: 1, which can return the wrong table when names overlap.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/cli/src/modules/instance-ai/instance-ai.adapter.service.ts, line 285:
<comment>Name-based data table reference resolution now uses substring search (`LIKE %name%`) with `take: 1`, which can return the wrong table when names overlap.</comment>
<file context>
@@ -279,13 +279,13 @@ export class InstanceAiAdapterService {
dataTableNameRefs.map(async (name) => {
- const match = byName.get(name);
+ const { data: matches } = await this.dataTableService.getManyAndCount({
+ filter: { projectId: project.id, name: name.toLowerCase() },
+ take: 1,
+ });
</file context>
Summary
The Instance AI Artifacts panel now also surfaces:
References are resolved on the CLI adapter via a new
getWorkflowReferencescontext method and emitted fromworkflows(action="setup")State 4,build-workflow, andsubmit-workflow. The frontend registry keys references perworkflowId, orders tool calls globally bystartedAt, and rendersproduced ∪ referenced(produced wins on id collisions).Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/AI-2399
Review / Merge checklist