Merged
Size
L
Change Breakdown
Refactor85%
Maintenance15%
#27343refactor(editor): Migrate workflow name to workflowDocument store

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 useWorkflowDocumentName composable following the apply/public split pattern with event hooks
  • Wires it into workflowDocument.store.ts, exposing name, setName, and onNameChange
  • Removes the workflowName computed from workflows.store.ts
  • Migrates all production consumers (9 files) to read from workflowDocumentStore.name using the computed pattern for stores/composables not in the provide tree
  • Updates setWorkflowName() to write to the document store while keeping bridge writes to workflow.name and workflowObject.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, or Backport to v1 (if the PR is an urgent fix that needs to be backported)
© 2026 · via Gitpulse