Skip to content

Position diff misses w/h changes, preventing node highlighting #88

@andypalmi

Description

@andypalmi

Description

getTabChanges in diffProcessor only includes x and y in the position comparison object when positionChanged is set, but generateDiff correctly detects w/h changes as position changes too.

This means nodes that only changed width/height (e.g. resized group nodes) produce zero diff entries — and therefore have no highlight() function, so they cannot be highlighted in the compare viewer.

Root cause

In getTabChanges (line ~1488):

const v1Obj = { x: numberOrNull(v1node.x), y: numberOrNull(v1node.y) }
const v2Obj = { x: numberOrNull(v2node.x), y: numberOrNull(v2node.y) }

When only w or h changed, the {x, y} objects are identical → getItemDifferences produces nothing → node gets no entry in the change list.

Meanwhile generateDiff (line ~2194) correctly checks all four: x !== x || y !== y || w !== w || h !== h, and strips all four when determining if position is the only change.

Fix

Include w and h in the comparison objects:

const v1Obj = { x: numberOrNull(v1node.x), y: numberOrNull(v1node.y), w: numberOrNull(v1node.w), h: numberOrNull(v1node.h) }
const v2Obj = { x: numberOrNull(v2node.x), y: numberOrNull(v2node.y), w: numberOrNull(v2node.w), h: numberOrNull(v2node.h) }

Impact

Affects any node with w/h properties — primarily group nodes, but also UI nodes and subflows that can be resized.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Closed / Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions