Skip to content

Deprecate and remove the legacy workflow editor #4850

Description

@theroinaochieng

Overview

The collaborative editor (WorkflowLive.Collaborate) has been the default since late 2025, and the legacy editor (WorkflowLive.Edit) has been showing a deprecation banner. This issue tracks the work to fully remove the legacy editor.

Background

  • The new collaborative editor lives at /w/:id and is backed by Yjs CRDTs for real-time multi-user editing.
  • The legacy editor lives at /w/:id/legacy and is only reached when a user has prefer_legacy_editor: true in their preferences.
  • A deprecation banner and "switch to new builder" button have been in place since v2.15.

Removal Checklist

1. Migrate remaining legacy-preference users

  • Write a migration to clear prefer_legacy_editor: true from all users (mirrors the earlier clear_prefer_collaborative_editor migration)

2. Remove the redirect hook

  • Delete the check_legacy_preference hook in lib/lightning_web/hooks.ex (lines 142–164) that reads prefer_legacy_editor and redirects to /legacy

3. Remove legacy routes

  • Drop /w/new/legacy and /w/:id/legacy from router.ex
  • Decide on handling for bookmarked URLs (redirect to new editor, or informative 404)

4. Remove WorkflowLive.Edit

  • Delete lib/lightning_web/live/workflow_live/edit.ex
  • Remove deprecated_warning/1 component from components.ex
  • Remove any helpers/components only used by the legacy LiveView

5. Remove the legacy frontend bundle

  • Delete /assets/js/workflow-editor/ (old React workflow editor)
  • Audit /assets/js/editor/ — if only used by legacy editor, delete it too
  • Remove CollaborativeEditorPromoBanner component and its tests (no longer needed once legacy is gone)

6. Remove the switch_to_legacy_editor channel handler

  • Drop the handle_in("switch_to_legacy_editor", ...) clause in workflow_channel.ex

7. Remove URL conversion helpers

  • Delete legacy_editor_url/2 and collaborative_editor_url/2 from lib/lightning_web/live/workflow_live/helpers.ex (only needed for cross-editor redirects)

8. Remove legacy editor tests

  • Delete test/lightning_web/live/workflow_live/editor_test.exs (~2,000 lines)
  • Remove all /legacy route references from other test files (e.g. new_workflow_component_test.exs, collaborate_test.exs)

Out of Scope

  • Changes to the collaborative editor itself
  • Worker or runtime changes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Epics In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions