OpenFn / OpenFn/lightning

Manual-Layout Snapshots not working. Always Auto-Layout

Open
#3,429 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Elixir
Stars
296
Forks
86
Avg merge
1d 13h
Merged PRs (30d)
50

Description

Describe the bug Whenever a snapshot is created from a workflow. we ignore the position values for the nodes. Hence all snapshots will be shown as auto-layout and never manual-layout even when they're supposed to be.

Version number Latest version
I have reproduced this locally on main:

  • Yes
  • No

To Reproduce Steps to reproduce the behavior:

  1. Go to a workflow
  2. Turn it to manual-layout. move nodes. save and run [run-1]
  3. come back to this workflow. move nodes once again. save and run [run-2]
  4. Go to the history page and view [run-1]
  5. You'll notice it's displayed without the snapshot being manually laid out as it was during your run. instead, it's auto laid out.

Expected behavior Show manually laid out snapshots when I view history

Screenshots If applicable, add screenshots to help explain your problem.

Additional context
Look here
https://github.com/OpenFn/lightning/blob/a53b139040cb342370015a508b9352d502a37b2a/lib/lightning/workflows/snapshot.ex#L19-L25

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with lib/lightning/workflows/snapshot.ex at lines 19-25, then trace how workflow snapshots are created and how node positions are stored. Reproduce the listed run-1 and run-2 steps and verify that the history view preserves the manual layout from run-1 instead of applying auto-layout.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.