SIGN IN SIGN UP

fix(frontend): keep local edits over stale refresh (#14741)

* fix(frontend): keep tool edits over stale refresh

A custom_component/update response issued before the tool actions
editor closed was applied over the edits it predates, reverting the
action slug, description and approval_actions - and the debounced
autosave persisted the loss. The next request was then built from the
clobbered store, so the backend faithfully echoed the pre-edit
tools_metadata even though field_value carried the edits.

keepUserEdits now also preserves a field's value when the store
diverged from the values the last applied response wrote. Baselining
on the last applied response rather than on the request snapshot keeps
concurrent refreshes working: several mount refreshes share one
snapshot, so the first response to land would otherwise look like a
local edit and suppress the others.

Fixes LE-2272

* test(frontend): cover Human Input stale decisions revert

Second surface of the same race: the Human Input on-mount decisions
refresh reverted a User Action added while it was in flight, leaving
chips and branch outputs inconsistent and persisting the loss. The
keepUserEdits guard already fixes it; this pins the behaviour.

Fixes LE-2278
C
Cristhian Zanforlin Lousa committed
b6f22fc929e4ebf97f67c531fba56a939688608e
Parent: f1a6c31
Committed by GitHub <noreply@github.com> on 8/25/2026, 7:45:50 PM