Watch
0
0
Fork
You've already forked hyperhive
0

swarm-ui: an agent's settings and AGENTS.md show placeholders while they load

BadgeSkeleton is the twin of Badge: the real Badge frame, as tall as an
interactive one (the settings values are buttons), with a placeholder for its
value. Permissions, resource caps, internet and allowed domains use it in place of
their "loading…" text, the details popover shows lines of text, and the
AGENTS.md editor a block, in place of theirs. SkeletonLines is a few stacked
lines for such blocks.
This commit is contained in:
iris 2026-11-06 17:27:55 +01:00
commit a9f0d61daa

View file

@ -27,6 +27,7 @@ import {
STALE_STATUS,
type Instructions,
} from "./instructions.js";
import { Skeleton, SkeletonRegion } from "../../ui/skeleton/Skeleton.js";
import "./AgentInstructions.css";
// An edit that was not saved: the text, and the version it was made on.
@ -218,14 +219,16 @@ function InstructionsForm({
role="status"
aria-live="polite"
>
{load.status === "loading"
? "loading…"
: busy
? "saving…"
: saved
? "saved"
: ""}
{busy ? "saving…" : saved ? "saved" : ""}
</p>
{load.status === "loading" ? (
<SkeletonRegion label="AGENTS.md">
<div class="ui-skeleton-lines">
<Skeleton width="6em" />
<Skeleton shape="block" width="100%" height="24em" />
</div>
</SkeletonRegion>
) : null}
{load.status === "error" ? (
<>
<ApiErrorPanel