Skip to content

Operation graph: input/output node colourisation does not run on initial load #1485

@aidemsined

Description

@aidemsined

Summary

When the operation graph loads, the initially-selected node is highlighted
(cyan fill + yellow border via vis-network's highlight styling), but its
input and output neighbours are not coloured with their relation colours.
Clicking any other node and clicking back restores the expected behaviour.

Steps to reproduce

  1. Open a profiler report.
  2. Navigate to the operation graph view.
  3. Observe the initially-selected operation node: it's highlighted in cyan,
    but neighbours render with the default lavender background instead of the
    input/output relation colours.
  4. Click any node — neighbours of the newly-focused node now show the
    correct input/output colours.

Expected

On initial load, neighbours of the focused node should be coloured with
GRAPH_COLORS.inputNode / GRAPH_COLORS.outputNode, matching the
post-click behaviour.

Actual

Neighbours render with the default node background until the first user
click.

Root cause

colorHighlightIO(nodeId) is the function that paints relation colours
for neighbours of a focused node. It is only invoked from the network's
click handler (src/components/OperationGraphComponent.tsx:501),
not from the initial afterDrawing callback (:489-495). On initial
load focusOnNode(focusNodeId) runs but colorHighlightIO(focusNodeId)
is never called, so neighbour colours stay at the network defaults.

Fix

Invoke colorHighlightIO(focusNodeId) from the afterDrawing once-callback
immediately after focusOnNode(focusNodeId).

Affected versions

Present in v0.85.0 and earlier (colorHighlightIO has always been
click-only).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions