Watch
0
0
Fork
You've already forked hyperhive
0

swarm UI: key LinkedAccounts by hive and agent

Selecting another agent kept the previous agent's rows on screen until
the new fetch landed. Keying both mounts by hive/agent remounts the
component on an agent change; a version bump still refetches in place.

Refs #4855
This commit is contained in:
atlas 2026-10-02 20:11:16 +02:00
commit 4fd1380a5f
2 changed files with 5 additions and 0 deletions

View file

@ -5,6 +5,9 @@
// Fetched on mount and again whenever `version` changes; `AgentsPage` bumps
// it when a link dialog closes, so an account linked there shows up without
// waiting for a reload.
//
// Its state belongs to one agent: callers key it by hive and agent, so
// switching agents remounts it instead of showing the previous agent's rows.
import { useEffect, useState } from "preact/hooks";
import { readApiError, type ProblemDetails } from "@hive/shared/api-error.js";
import { Badge } from "@hive/shared/badge.js";