Part of the unification order in the UI sweep issue (step b). A badge named its tones positive/warning/negative, a hint muted/warn/error/ok, a banner info/warning/error and a toast info/ok/error. They now all take the shared Tone: neutral, info, ok, warn, error (a badge adds accent for a selected choice). Warn is amber everywhere (a hint used yellow), info is cyan everywhere (a toast used purple). A test pins the list against each component's CSS.
41 lines
1.5 KiB
TypeScript
41 lines
1.5 KiB
TypeScript
// <SwarmPage> — what belongs to the swarm as a whole rather than to one agent:
|
|
// the hive roster, the swarm-wide egress allow list, the notification router and
|
|
// the messages: the broadcast composer, the schedules and the message log. Each
|
|
// is a card that starts folded and reads nothing until it is opened.
|
|
//
|
|
// The notification router is marked beta: its card says so beside the title and
|
|
// carries a warning banner inside.
|
|
import { Badge } from "@hive/shared/badge.js";
|
|
import { LazyDisclosure } from "../../ui/disclosure/LazyDisclosure.js";
|
|
import { MessageCards } from "../messages/MessageCards.js";
|
|
import { NotificationRouter } from "../notifications/NotificationsPage.js";
|
|
import { EgressCard } from "./EgressCard.js";
|
|
import { HivesCard } from "./HivesCard.js";
|
|
import "./SwarmPage.css";
|
|
|
|
export function SwarmPage() {
|
|
return (
|
|
<div class="ui-swarm-page">
|
|
<HivesCard />
|
|
<EgressCard />
|
|
<LazyDisclosure
|
|
title="notification router"
|
|
icon="🔔"
|
|
hint={
|
|
<>
|
|
<Badge tone="warn" value="beta" /> forge events routed to agents, as
|
|
flows
|
|
</>
|
|
}
|
|
>
|
|
<p class="ui-swarm-beta" role="note">
|
|
<strong>beta:</strong> the notification router is still changing.
|
|
Flows, their wording and what they match may change, and a flow you
|
|
wrote may need rewriting after an update.
|
|
</p>
|
|
<NotificationRouter />
|
|
</LazyDisclosure>
|
|
<MessageCards />
|
|
</div>
|
|
);
|
|
}
|