swarm ui: the messages cards move to the swarm page and the messages tab goes
The broadcast, schedules and message log cards now sit on the swarm page, after the notification router; the message log opens its stream on its first open instead of when the page loads, and its connection badge moves into its filter bar. The messages tab is removed from the header, and the old /messages address redirects to /swarm next to /schedules, which now does too. MessagesPage becomes MessageCards, and comments, tests and the swarm UI docs say the swarm page where they said the messages tab.
This commit is contained in:
parent
94969b552e
commit
797e6e3137
16 changed files with 120 additions and 116 deletions
|
|
@ -75,7 +75,7 @@ VictoriaLogs; read them in Grafana's **Explore**, as
|
|||
|
||||
**Set up a schedule.** Scheduled prompts are swarm-level: set them with
|
||||
`swarmctl schedule` ([`swarm/schedules.md`](../swarm/schedules.md)) or in the
|
||||
schedules card on the swarm UI's messages tab ([`swarm-ui.md`](../../4-implementation/web-ui/swarm-ui.md)).
|
||||
schedules card on the swarm UI's swarm page ([`swarm-ui.md`](../../4-implementation/web-ui/swarm-ui.md)).
|
||||
|
||||
## More depth
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Operators manage them with `swarmctl schedule` on the swarm controller's
|
|||
host. Agents can't create, change or remove one. For a one-off wake an agent
|
||||
sets itself, it uses `remind`, which stays inside its container.
|
||||
|
||||
The schedules card on the swarm UI's messages tab does the same, and adds **fire
|
||||
The schedules card on the swarm UI's swarm page does the same, and adds **fire
|
||||
now**, which fires a prompt at once by moving its start to this moment. A
|
||||
repeating prompt then carries on from now, at its interval, not at its old clock
|
||||
times. A paused prompt has no fire now; resume it first.
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ place, and every one reads from [`swarm-controller`](../../../swarm-controller/R
|
|||
| `/agents/<name>/subagents/<subagent>/terminal` | one of that agent's subagents' live terminal |
|
||||
| `/reports` | three folded cards, each read only once opened: the **alerts** the swarm's Grafana holds now, the firing ones, with a button for the pending, no-data and error ones and a link to Grafana's own alert list; read through the controller with a Viewer service-account token, and a cross-repo **issues** list, and a cross-repo **pull requests** list |
|
||||
| `/jobs` | the controller's job graph, where agent creation and credential mints show progress, and under it the swarm builder's recent builds (agent config PRs, and agents built from `internal/meta` before a deploy), with what nix printed when one failed, and the review classifier's recent runs, a try-out on a real PR, and its settings and keys |
|
||||
| `/messages` | the swarm-wide message feed: every message between agents, and to them from the operator, reminders and compaction, with a history window and a filter on sender or recipient; a folded **broadcast** card above the feed sends one message to more than one agent at once, and a folded **schedules** card holds the scheduled prompts: add, edit, pause, resume and remove |
|
||||
| `/messages` | redirects to `/swarm`, where the messages sit: a folded **message log** card with every message between agents, and to them from the operator, reminders and compaction, with a history window and a filter on sender or recipient; a folded **broadcast** card sends one message to more than one agent at once, and a folded **schedules** card holds the scheduled prompts: add, edit, pause, resume and remove |
|
||||
|
||||
An agent created here or with `swarmctl agent create` starts `paused`; set it
|
||||
`up` from its card. A card shows **login needed** when the agent's claude has no
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ picks its look, and `row-visibility.ts` decides which rows show given the "show
|
|||
thinking" and "hide developer details" preferences.
|
||||
|
||||
The consumers are the swarm UI's `AgentTermPreview` (the card preview and the full
|
||||
terminal tab) and `MessagesPage`. Each reads rows off a stream,
|
||||
terminal tab) and `MessageCards`. Each reads rows off a stream,
|
||||
keeps the scroll pinned to the newest row until the operator scrolls more than
|
||||
48 px up, and renders through `Row`.
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ asks from inside a handler with the `useConfirm` hook, with no dialog state of i
|
|||
| `/agents/<name>/subagents/<subagent>/terminal` | one of that agent's subagents' live terminal |
|
||||
| `/reports` | three folded cards, each read only once opened: the **alerts** the swarm's Grafana holds now, the firing ones, with a button for the pending, no-data and error ones and a link to Grafana's own alert list; read through the controller with a Viewer service-account token, and a cross-repo **issues** list, and a cross-repo **pull requests** list |
|
||||
| `/jobs` | the controller's job graph, where agent creation and credential mints show progress, and under it the swarm builder's recent builds (agent config PRs, and agents built from `internal/meta` before a deploy), with what nix printed when one failed, and the review classifier's recent runs, a try-out on a real PR, and its settings |
|
||||
| `/messages` | the swarm-wide message feed: every message between agents, and to them from the operator, reminders and compaction, with a history window and a filter on sender or recipient; a folded **broadcast** card above the feed sends one message to more than one agent at once, and a folded **schedules** card holds the scheduled prompts: add, edit, pause, resume and remove |
|
||||
| `/messages` | redirects to `/swarm`, where the messages sit: a folded **message log** card with every message between agents, and to them from the operator, reminders and compaction, with a history window and a filter on sender or recipient; a folded **broadcast** card sends one message to more than one agent at once, and a folded **schedules** card holds the scheduled prompts: add, edit, pause, resume and remove |
|
||||
|
||||
Everything it shows comes from [`swarm-controller`](../../../swarm-controller/README.md).
|
||||
Pages that refresh on a timer share one polling rule: the page sends no new
|
||||
|
|
@ -232,7 +232,7 @@ terminal does the same with that subagent's rows, and has no turn-state badges.
|
|||
The browser retries a dropped connection by itself. When the swarm answers the
|
||||
stream with an error status, the browser gives up and the badge reads
|
||||
**disconnected**. The **reconnect** button beside it opens the stream again, and
|
||||
the stream replays the rows. The messages page works the same way.
|
||||
the stream replays the rows. The message log card works the same way.
|
||||
|
||||
The settings menu in the header has a **hide developer details** toggle. It drops
|
||||
the muted debug rows (coalesced ticks, harness chatter) from every
|
||||
|
|
@ -418,9 +418,9 @@ typed for the other one.
|
|||
|
||||
### Scheduled prompts
|
||||
|
||||
The **schedules** card on the **messages** tab holds one card per scheduled
|
||||
The **schedules** card on the **swarm** page holds one card per scheduled
|
||||
prompt. It starts shut and reads nothing until you open it; the old `/schedules` address
|
||||
redirects to the messages tab. The **name** is the card's
|
||||
redirects to the swarm page. The **name** is the card's
|
||||
title, with the **agents** it fires for, the message, how often it repeats and
|
||||
when it fires next. **edit** turns the card into its own form; **fire now** sends
|
||||
`PATCH /api/schedules/{id}` with the current second as `anchor_unix`, so a start
|
||||
|
|
@ -617,15 +617,16 @@ since that agent's `send` row already did. The query `since_minutes` (default
|
|||
read from each agent's newest 100 rows. A message an agent drained with an
|
||||
in-turn `recv` starts no turn and so is missing.
|
||||
|
||||
The **messages** page (`/messages`) reads that feed. The feed is the **message
|
||||
log** card, folded like the broadcast and schedules cards above it; a badge in its
|
||||
header says whether the stream is live. Open it, and a **history** select picks the
|
||||
The **message log** card on the swarm page (`/swarm`) reads that feed. It starts
|
||||
shut, like the broadcast and schedules cards above it, and its stream opens on
|
||||
the first open; a badge in its filter bar says whether the stream is live. A
|
||||
**history** select picks the
|
||||
window, from live only up to 24 hours, and a filter keeps the messages whose
|
||||
sender or recipient contains the text you type. Each message is one row of the
|
||||
same list an agent's terminal uses, a summary line with the time, the two
|
||||
parties and the start of the body, and the whole body under it. The list
|
||||
follows the newest message unless you scroll up, and holds the last 2000. The
|
||||
feed has no event id, so a reconnect sends the history again, and the page
|
||||
feed has no event id, so a reconnect sends the history again, and the card
|
||||
empties its list each time the connection opens, then fills it from the replay.
|
||||
Changing the window opens a new stream.
|
||||
|
||||
|
|
@ -793,9 +794,9 @@ its newest 100 builds, so a link to an older one shows a note instead.
|
|||
|
||||
### Broadcasting a message
|
||||
|
||||
The messages page (`/messages`) has a **broadcast** card above the message list. It
|
||||
The swarm page (`/swarm`) has a **broadcast** card above the message log. It
|
||||
starts folded; select its header to open it. The card holds a composer that sends one message
|
||||
to more than one agent at once, and the messages show up in the list below as they
|
||||
to more than one agent at once, and the messages show up in the log below as they
|
||||
go. Folding it again keeps what you typed and ticked. Pick the
|
||||
agents from a grid of their icons. **running** shows the agents that report
|
||||
themselves running and **all** shows every agent; the browser keeps the choice.
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ import { useGuardedLocation } from "./shell/useGuardedLocation.js";
|
|||
import { AgentsPage } from "./pages/agents/AgentsPage.js";
|
||||
import { AgentGroupPage } from "./pages/agents/AgentGroupPage.js";
|
||||
import { AgentTerminalPage } from "./pages/agents/AgentTerminalPage.js";
|
||||
import { MessagesPage } from "./pages/messages/MessagesPage.js";
|
||||
import { NEW_FLOW_PATH } from "./pages/notifications/FlowDraft.js";
|
||||
import { FlowEditorPage } from "./pages/notifications/FlowEditorPage.js";
|
||||
import { SwarmPage } from "./pages/swarm/SwarmPage.js";
|
||||
|
|
@ -63,7 +62,6 @@ export function App() {
|
|||
component={AgentTerminalPage}
|
||||
/>
|
||||
<Route path="/jobs" component={JobsPage} />
|
||||
<Route path="/messages" component={MessagesPage} />
|
||||
<Route path="/swarm" component={SwarmPage} />
|
||||
<Route path={NEW_FLOW_PATH}>
|
||||
<FlowEditorPage params={{ flowId: "" }} isNew />
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
// `GET /api/agents/{name}/term/stream`, or for a subagent
|
||||
// `GET /api/agents/{name}/subagents/{subagent}/term/stream`, via
|
||||
// `useSwarmTermStream`, and renders each row through the `@hive/shared` `Row`
|
||||
// component, the same one `MessagesPage` uses.
|
||||
// component, the same one `MessageCards` uses.
|
||||
//
|
||||
// **Floating controls** — one row pinned over the terminal's top edge, so the
|
||||
// terminal keeps the whole box. On the left, the `leading` slot (the page's
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// <BroadcastComposer> — one message to several agents at once, in a panel on
|
||||
// the messages page above the stream that shows the messages arriving. Pick agents from a
|
||||
// the swarm page above the stream that shows the messages arriving. Pick agents from a
|
||||
// grid of their icons (every agent, or just the ones running), type the
|
||||
// message, send. The controller does the fan-out: `POST /api/agents/broadcast`
|
||||
// answers one outcome per agent, so one that is down does not stop the rest and
|
||||
|
|
|
|||
|
|
@ -1,12 +1,6 @@
|
|||
/* <MessagesPage>: the filter bar over the terminal-style message list. */
|
||||
/* <MessageCards>: the filter bar over the terminal-style message list. */
|
||||
@import "@hive/shared/terminal.css";
|
||||
|
||||
/* The broadcast and schedules cards, folded by default, over the message log. */
|
||||
.ui-messages-page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1em;
|
||||
}
|
||||
.ui-messages-bar {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
|
@ -1,13 +1,14 @@
|
|||
// <MessagesPage> — `/messages`: every message between agents, and from the
|
||||
// operator, reminders and compaction to an agent, as the swarm's controller
|
||||
// streams them (`GET /api/messages/stream`), across all hives. Above the
|
||||
// list, a folded **broadcast** card holds the composer that sends one message
|
||||
// to several agents, and a folded **schedules** card holds the scheduled prompts.
|
||||
// The list itself is the folded **message log** card.
|
||||
// <MessageCards> — the cards of the swarm page that hold the swarm's messages:
|
||||
// every message between agents, and from the operator, reminders and
|
||||
// compaction to an agent, as the swarm's controller streams them
|
||||
// (`GET /api/messages/stream`), across all hives. A folded **broadcast** card
|
||||
// holds the composer that sends one message to several agents, and a folded
|
||||
// **schedules** card holds the scheduled prompts. The list itself is the folded
|
||||
// **message log** card, which opens the stream on its first open.
|
||||
//
|
||||
// The stream sends the chosen window of history first, then the live tail. A
|
||||
// message an agent drained with an in-turn `recv` is missing, because it starts
|
||||
// no turn; the page says so under the list. Each message is a row of the same
|
||||
// no turn; the card says so under the list. Each message is a row of the same
|
||||
// terminal list an agent's own terminal uses, one summary line with the time,
|
||||
// the two parties and the start of the body, and the whole body under it.
|
||||
import { memo } from "preact/compat";
|
||||
|
|
@ -17,6 +18,7 @@ import { Row } from "@hive/shared/term-row.js";
|
|||
import { BroadcastComposer } from "../broadcast/BroadcastComposer.js";
|
||||
import { SchedulesCard } from "../schedules/SchedulesPage.js";
|
||||
import { Disclosure } from "../../ui/disclosure/Disclosure.js";
|
||||
import { LazyDisclosure } from "../../ui/disclosure/LazyDisclosure.js";
|
||||
import { Hint } from "../../ui/hint/Hint.js";
|
||||
import { SelectField } from "../../ui/select-field/SelectField.js";
|
||||
import { TextField } from "../../ui/text-field/TextField.js";
|
||||
|
|
@ -28,7 +30,7 @@ import {
|
|||
WINDOWS,
|
||||
} from "./messages.js";
|
||||
import { useMessageStream, type ConnectionState } from "./useMessageStream.js";
|
||||
import "./MessagesPage.css";
|
||||
import "./MessageCards.css";
|
||||
|
||||
const NEAR_BOTTOM_PX = 48;
|
||||
|
||||
|
|
@ -53,16 +55,11 @@ const MessageRow = memo(function MessageRow({ m }: { m: ArrivedMessage }) {
|
|||
return <Row row={messageRow(m, String(m.id))} />;
|
||||
});
|
||||
|
||||
export function MessagesPage() {
|
||||
// The body of the message log card: the filter bar over the list. It opens the
|
||||
// stream when it is built, which is the card's first open.
|
||||
function MessageLog() {
|
||||
const [sinceMinutes, setSinceMinutes] = useState(DEFAULT_WINDOW_MINUTES);
|
||||
const [query, setQuery] = useState("");
|
||||
const [composing, setComposing] = useState(false);
|
||||
// The log starts folded, as the cards above it do.
|
||||
const [logOpen, setLogOpen] = useState(false);
|
||||
// The composer is built on the first open and kept after, so what was typed
|
||||
// and ticked stays through a fold, and a page where it is never opened does
|
||||
// not poll the agent list.
|
||||
const [composerBuilt, setComposerBuilt] = useState(false);
|
||||
const { messages, connection, reconnect } = useMessageStream(sinceMinutes);
|
||||
const shown = filterMessages(messages, query);
|
||||
|
||||
|
|
@ -84,10 +81,80 @@ export function MessagesPage() {
|
|||
useLayoutEffect(() => {
|
||||
const el = logRef.current;
|
||||
if (el && stickToBottom) el.scrollTop = el.scrollHeight - el.clientHeight;
|
||||
}, [newestId, shown.length, stickToBottom, logOpen]);
|
||||
}, [newestId, shown.length, stickToBottom]);
|
||||
|
||||
return (
|
||||
<div class="ui-messages-page">
|
||||
<>
|
||||
<div class="ui-messages-bar">
|
||||
<Badge
|
||||
tone={CONNECTION_TONE[connection]}
|
||||
value={CONNECTION_LABEL[connection]}
|
||||
/>
|
||||
{connection === "closed" ? (
|
||||
<Badge
|
||||
variant="quiet"
|
||||
value="reconnect"
|
||||
title="open the message stream again"
|
||||
onClick={reconnect}
|
||||
/>
|
||||
) : null}
|
||||
<SelectField
|
||||
id="messages-window"
|
||||
label="history"
|
||||
value={String(sinceMinutes)}
|
||||
onChange={(v) => setSinceMinutes(Number(v))}
|
||||
options={WINDOWS.map((w) => ({
|
||||
value: String(w.minutes),
|
||||
label: w.label,
|
||||
}))}
|
||||
/>
|
||||
<TextField
|
||||
id="messages-filter"
|
||||
label="agent"
|
||||
value={query}
|
||||
placeholder="sender or recipient"
|
||||
onInput={setQuery}
|
||||
/>
|
||||
<Hint as="span" class="ui-messages-count">
|
||||
{query.trim() === ""
|
||||
? `${messages.length} messages`
|
||||
: `${shown.length} of ${messages.length} messages`}
|
||||
</Hint>
|
||||
</div>
|
||||
<div class="terminal-wrap ui-messages-wrap">
|
||||
<div class="live terminal" ref={logRef} onScroll={handleScroll}>
|
||||
{shown.length === 0 ? (
|
||||
<div class="row note">
|
||||
<span class="row-content">
|
||||
{connection === "open"
|
||||
? messages.length === 0
|
||||
? "(connected — no messages yet)"
|
||||
: "(no message matches the filter)"
|
||||
: CONNECTION_LABEL[connection]}
|
||||
</span>
|
||||
</div>
|
||||
) : (
|
||||
shown.map((m) => <MessageRow key={m.id} m={m} />)
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<Hint class="ui-messages-note">
|
||||
Shows what the agents sent each other. A message an agent drained with
|
||||
an in-turn <code>recv</code> is missing. The history is at most 100
|
||||
recent messages per agent.
|
||||
</Hint>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export function MessageCards() {
|
||||
const [composing, setComposing] = useState(false);
|
||||
// The composer is built on the first open and kept after, so what was typed
|
||||
// and ticked stays through a fold, and a page where it is never opened does
|
||||
// not poll the agent list.
|
||||
const [composerBuilt, setComposerBuilt] = useState(false);
|
||||
return (
|
||||
<>
|
||||
<Disclosure
|
||||
title="broadcast"
|
||||
icon="📣"
|
||||
|
|
@ -101,73 +168,13 @@ export function MessagesPage() {
|
|||
{composerBuilt ? <BroadcastComposer /> : null}
|
||||
</Disclosure>
|
||||
<SchedulesCard />
|
||||
<Disclosure
|
||||
<LazyDisclosure
|
||||
title="message log"
|
||||
icon="💬"
|
||||
hint={
|
||||
<Badge
|
||||
tone={CONNECTION_TONE[connection]}
|
||||
value={CONNECTION_LABEL[connection]}
|
||||
/>
|
||||
}
|
||||
open={logOpen}
|
||||
onToggle={setLogOpen}
|
||||
hint="what the agents sent each other"
|
||||
>
|
||||
<div class="ui-messages-bar">
|
||||
{connection === "closed" ? (
|
||||
<Badge
|
||||
variant="quiet"
|
||||
value="reconnect"
|
||||
title="open the message stream again"
|
||||
onClick={reconnect}
|
||||
/>
|
||||
) : null}
|
||||
<SelectField
|
||||
id="messages-window"
|
||||
label="history"
|
||||
value={String(sinceMinutes)}
|
||||
onChange={(v) => setSinceMinutes(Number(v))}
|
||||
options={WINDOWS.map((w) => ({
|
||||
value: String(w.minutes),
|
||||
label: w.label,
|
||||
}))}
|
||||
/>
|
||||
<TextField
|
||||
id="messages-filter"
|
||||
label="agent"
|
||||
value={query}
|
||||
placeholder="sender or recipient"
|
||||
onInput={setQuery}
|
||||
/>
|
||||
<Hint as="span" class="ui-messages-count">
|
||||
{query.trim() === ""
|
||||
? `${messages.length} messages`
|
||||
: `${shown.length} of ${messages.length} messages`}
|
||||
</Hint>
|
||||
</div>
|
||||
<div class="terminal-wrap ui-messages-wrap">
|
||||
<div class="live terminal" ref={logRef} onScroll={handleScroll}>
|
||||
{shown.length === 0 ? (
|
||||
<div class="row note">
|
||||
<span class="row-content">
|
||||
{connection === "open"
|
||||
? messages.length === 0
|
||||
? "(connected — no messages yet)"
|
||||
: "(no message matches the filter)"
|
||||
: CONNECTION_LABEL[connection]}
|
||||
</span>
|
||||
</div>
|
||||
) : (
|
||||
shown.map((m) => <MessageRow key={m.id} m={m} />)
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<Hint class="ui-messages-note">
|
||||
Shows what the agents sent each other. A message an agent drained with
|
||||
an in-turn <code>recv</code> is missing. The history is at most 100
|
||||
recent messages per agent.
|
||||
</Hint>
|
||||
</Disclosure>
|
||||
</div>
|
||||
<MessageLog />
|
||||
</LazyDisclosure>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
// The messages page's logic, kept out of the component so `npm test` can run
|
||||
// The message log's logic, kept out of the component so `npm test` can run
|
||||
// it: the stream URL, which messages a filter keeps, and how one message
|
||||
// becomes a terminal row.
|
||||
import type { TermRow } from "@hive/shared/term-msg.js";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// <SchedulesCard> — the swarm's scheduled prompts, one card per schedule, folded on the messages tab.
|
||||
// <SchedulesCard> — the swarm's scheduled prompts, one card per schedule, folded on the swarm page.
|
||||
// Backed by swarm-controller's `GET/POST /api/schedules` and
|
||||
// `PATCH/DELETE /api/schedules/{id}`; the controller is the only writer of
|
||||
// the schedule store and computes each schedule's `next_fire_unix`, so
|
||||
|
|
@ -267,7 +267,7 @@ function SchedulesBody() {
|
|||
);
|
||||
}
|
||||
|
||||
// A folded card on the messages tab: the scheduled prompts, read and polled
|
||||
// A folded card on the swarm page: the scheduled prompts, read and polled
|
||||
// only once it is opened.
|
||||
export function SchedulesCard() {
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
// <SwarmPage> — what belongs to the swarm as a whole rather than to one agent:
|
||||
// the hive roster, the swarm-wide egress allow list and the notification router.
|
||||
// Each is a card that starts folded and reads nothing until it is opened.
|
||||
// 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";
|
||||
|
|
@ -33,6 +35,7 @@ export function SwarmPage() {
|
|||
</p>
|
||||
<NotificationRouter />
|
||||
</LazyDisclosure>
|
||||
<MessageCards />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,7 +71,6 @@ const NAV_ITEMS: { href: string; label: string; accent: string }[] = [
|
|||
{ href: "/swarm", label: "swarm", accent: "var(--yellow)" },
|
||||
{ href: "/reports", label: "reports", accent: "var(--red)" },
|
||||
{ href: "/jobs", label: "jobs", accent: "var(--pink)" },
|
||||
{ href: "/messages", label: "messages", accent: "var(--purple)" },
|
||||
{ href: "/components", label: "components", accent: "var(--blue)" },
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,8 @@ export const MOVED_ROUTES: Readonly<Record<string, string>> = {
|
|||
"/issues": "/reports",
|
||||
"/builds": "/jobs",
|
||||
"/review": "/jobs",
|
||||
"/schedules": "/messages",
|
||||
"/schedules": "/swarm",
|
||||
"/messages": "/swarm",
|
||||
"/notifications": "/swarm",
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,8 @@ test("an old address goes to the tab that holds its page, query kept", () => {
|
|||
assert.equal(movedHref("/alerts", ""), "/reports");
|
||||
assert.equal(movedHref("/issues", ""), "/reports");
|
||||
assert.equal(movedHref("/review", ""), "/jobs");
|
||||
assert.equal(movedHref("/schedules", ""), "/messages");
|
||||
assert.equal(movedHref("/schedules", ""), "/swarm");
|
||||
assert.equal(movedHref("/messages", ""), "/swarm");
|
||||
assert.equal(
|
||||
movedHref("/builds", "run=atlas-abc-1"),
|
||||
"/jobs?run=atlas-abc-1",
|
||||
|
|
|
|||
Loading…
Reference in a new issue