Workflow name migrated to document store
The workflow name field has been moved from the singleton workflowsStore to the per-instance workflowDocumentStore, making it the single source of truth with event-driven synchronization to caches.
When multiple workflows are open in separate tabs or instances, the old singleton store approach meant name changes could leak between workflows or display stale data. The workflow name is now scoped to its document store instance, ensuring isolation.
A new useWorkflowDocumentName composable encapsulates name state with a read-only name ref, setName mutator, and an onNameChange event hook. When the name changes, listeners sync it to the workflow object and list cache — keeping all layers consistent.
All nine production consumers have been migrated to read from workflowDocumentStore.name, using the computed pattern for stores and composables outside the provide tree. The initialization flow in useWorkflowInitialization sets up the name and its sync listeners during workspace setup.
This change is part of a broader initiative to migrate state from the singleton workflowsStore to per-instance document stores, enabling better isolation for multi-workflow scenarios.
View Original GitHub Description
Summary
Migrates the workflow name field from the singleton workflowsStore to the per-workflow-instance workflowDocumentStore, making it the single source of truth for the current workflow's name.
- Creates
useWorkflowDocumentNamecomposable following the apply/public split pattern with event hooks - Wires it into
workflowDocument.store.ts, exposingname,setName, andonNameChange - Removes the
workflowNamecomputed fromworkflows.store.ts - Migrates all production consumers (9 files) to read from
workflowDocumentStore.nameusing the computed pattern for stores/composables not in the provide tree - Updates
setWorkflowName()to write to the document store while keeping bridge writes toworkflow.nameandworkflowObject.name - Initializes the name during workspace setup in
initializeWorkspace()
Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/CAT-2654
Review / Merge checklist
- 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, orBackport to v1(if the PR is an urgent fix that needs to be backported)