fix(editor): Resolve $vars by the workflow's project; close the remaining editor-ui gaps #5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/editor-vars-workflow-project"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The editor-ui unit suite was standing-red (18 files, 136 tests; see
docs/red-frontend-suite-triage.md). Every failure traced to clean-room code drifting from what the surviving upstream specs and the backend expect. The last three items were Greg's product calls.$varsused the wrong project (130 of 136). The rebuilt environments store scoped expression variables by the project in the URL, while execution resolves$varsagainst the workflow's owning project (getVariables). Previews could show another project's variables, and every NDV spec that auto-mocks the router crashed. Half-mounted components then leaked DOM, which explains the "found multiple elements" cluster. The testing-library dom@9/@10 split was a red herring. The store now scopes by the open workflow's home project.project:create), not instance-wide "Manage". This matches the upstream UI, tooltip and spec. Existing roles keep their stored scopes.$execution.customDatawas shown nowhere. The dropdown is rebuilt clean-room from the orphaned styles and strings plus the spec: an ellipsis button with a count badge.How to test
Verification
environments.store.test.ts: pins workflow-project scoping, global-only for a workflow without a home project, and explicit-project resolution.@n8n/permissions134/134;Review / Merge checklist
DEFORK_CHANGELOG.md, triage doc)🤖 Generated with Claude Code
Migrated from GitHub PR #63.
The rebuilt global custom-role groups offered project "Manage" (create, read, update, delete and list every project). The upstream editor config, its tooltip ("Create new projects") and its spec expect a single "Create" option; managing existing projects stays per project via project roles. The scope whitelist is unchanged, so existing custom roles keep their scopes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.