hyperhive/frontend/packages/swarm-ui
Repository files (latest commit first)
Filename Latest commit message Latest commit date
iris 3b66f0c8d6 swarm-ui/agents: fix detail panel going stale after refresh or an action
argus, PR review: detailTarget stored the whole AgentRow object at
selection time, so it never picked up a later refresh() or a
declareState patch - the card list updated live, the panel next to it
kept showing whatever was true the moment it was opened. Concrete
repro: open an agent's detail panel, wait for the next refresh or
destroy it from inside the panel itself, watch the panel not update.

Fix: store only the selected agent's name (detailTargetName) and
re-derive the actual row from rows on every render
(rows?.find(r => r.name === detailTargetName)). The panel can't drift
from what the list is showing since it's reading the same array.

Verified with a real refresh cycle against a mock server that returns
different data on the second call: before, both card and panel show
"idle"; after a live refresh, both show the new value in sync.
2026-09-11 22:30:41 +02:00
..
src swarm-ui/agents: fix detail panel going stale after refresh or an action 2026-09-11 22:30:41 +02:00
build.mjs treefmt: apply prettier 2026-09-02 15:25:07 +02:00
package.json swarm-ui: bootstrap new swarm-level frontend (Preact + wouter + TS + JSX) 2026-08-11 21:31:44 +02:00
tsconfig.json swarm-ui: bootstrap new swarm-level frontend (Preact + wouter + TS + JSX) 2026-08-11 21:31:44 +02:00