You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Closes cppmega-mlx-fhxg. Before this change, clicking Apply in the
Sidebar Loss tab silently mutated spec.loss with no visible canvas
change — the user had no signal that the click registered or that
the loss is anchored to a specific brick.
Now:
1. New LossGhostNode (NODE_TYPES "loss_ghost") renders a dashed-
border read-only canvas node showing the current loss kind and
params summary. App.tsx injects this node + a dashed yellow
animated edge from spec.loss.head_outputs[0] to the ghost into
the nodes/edges arrays passed to FlowCanvas. The ghost is
draggable=false/selectable=false so it doesn't pollute the user's
graph manipulations.
2. The Loss-tab Apply callback now also fires setLossToast — a 2.5 s
yellow chip above the canvas reading "Loss applied: <kind> →
<node>". useEffect timer clears it; no manual dismissal needed.
Tests: 2 vitest for LossGhostNode (renders kind+params chip,
without-params variant) + 1 integration test for App that verifies
the toast appears after clicking sidebar-tab-loss → loss-apply.
Regression: 482/482 vitest green.
0 commit comments