SIGN IN SIGN UP

fix(frontend): keep parameter visibility across a component refresh (#14736)

Adding a parameter to the canvas from the Parameters panel while a
component refresh is in flight silently reverts it: the field disappears
from the node with no feedback and the panel still shows it as added.

mutateTemplate captures the node when the request leaves and, on
response, replaces the whole template. isStaleForNode only guards the
component code, so per-field flags the user flipped meanwhile are lost.
The inspector writes exactly two such flags - advanced (canvas
visibility) and api_editable (API exposure) - and both are user-owned,
never decided by a refresh.

Preserve those two flags per field when they changed in the store while
the request was in flight, and take the backend value otherwise so a
refresh that legitimately shows or hides a field still applies.

This surfaced as the Windows nightly losing
agentDefaultToolsComponent.spec on retry with
toggle_bool_add_calculator_tool "element(s) not found": the aria
snapshot shows the Agent node rendered without the Calculator field
after the panel had flipped it on. Reproduced on macOS by holding the
Agent's mount-time POST /api/v1/custom_component/update until after the
toggle - the toggle renders, then vanishes when the response lands.
C
Cristhian Zanforlin Lousa committed
a4e794a8c58e4bd0e80e8b82ba3485b047b21b85
Parent: c683db7
Committed by GitHub <noreply@github.com> on 8/24/2026, 1:37:46 PM