Skip to content

Canvas Snapshots – View Version Chip & Switch to Latest Version #3819

@mercy-ship-it

Description

@mercy-ship-it

User Story

As a user, I want to see which version of the workflow I am viewing (latest or snapshot) and be able to toggle back to the latest version when new changes are made, so I can always view and work on the most up-to-date workflow.

Details

Add version visibility and switching capability to the Workflow Canvas.
This feature currently exists in the Live app on /live/workflow_live/edit_test.exs and /lightning_web/live/workflow_live/edit.ex

The functionality includes two main elements:

1. View Version Chip

  • Display a colored chip next to the workflow title to indicate version status.
  • Tooltip provides clear context about whether the user is on the latest version or a historical snapshot.

Expected behavior :

Image
  • Latest version
    • Chip label: latest
    • Tooltip: “This is the latest version of this workflow.”

2. Switch to Latest Version (Toggle Button)

  • When the user is viewing a snapshot (an older saved version), display a “Switch to Latest” toggle button beside the version chip.
  • The button should only appear when the workflow has a newer version available.
  • On click, the canvas reloads the latest version of the workflow and updates the version chip label to latest.

Error States / Edge Cases

  • The toggle button should not appear for users without edit permissions.
  • When multiple saves happen rapidly, ensure the toggle reflects the true latest version.

Acceptance Criteria

  • Verify the Version Chip appears next to the workflow title on the canvas.
  • Verify the blue chip (latest) display correctly.
  • Verify that when a newer version exists, a “Switch to Latest” toggle appears.
  • Verify clicking the toggle loads the latest workflow and updates the chip to “latest.”
  • Verify toggle disappears automatically once the latest version is loaded.
  • Verify the button does not appear when already viewing the latest version.
  • Verify no layout distortion occurs when both chip and toggle are visible.
  • Verify that in snapshot or read-only mode, the Switch to Latest toggle is disabled.

Metadata

Metadata

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions