Files
Pulse/internal/api/resourceapi
rcourtman 876ce14ab7 Keep action refusals current on websocket rows
A Docker page open while a host's agent disconnected kept Stop and Restart
enabled, and the click then failed at plan time. After the agent came back,
the old refusal stayed until the page remounted. Only a REST read carried
refusals, and a mounted Docker page reads REST once. The websocket merge
kept that REST answer, so nothing overwrote it; it just never changed.

Every broadcast now runs the same availability check, and a refused row
carries a ref into a new actionReadinessCatalog. A row with no ref refuses
nothing, so the store and the merge take the row's own answer and a refusal
ends with the frame that ends it. A first paint from the websocket is right
too, which closes the moment after in-app navigation when refused actions
looked enabled.

Broadcast rows keep capabilities whole. The drawer's operator policy form
needs what a disconnected host offers, and a stable set means a disconnect
moves one ref per row.

A check runs per capability per resource, host and token lookups scan every
session, and each session check takes config.Mu, so one pass now answers each
lookup once. Planning and dispatch still read live. Refusals leave Detail off
the wire: it names one host's identity and would give every host its own
catalog entry.
2026-11-04 21:22:02 +00:00
..