Watch
0
0
Fork
You've already forked hyperhive
0

swarm-ui: preview a draft flow's hit counts in the editor with the dry-run route

The editor's preview button posts the draft to POST /api/notify/dry-run and
puts each box's hit count on the canvas; any edit hides the numbers. Boxes of
kind request_reviewer label themselves "reviewer", so the long kind name no
longer runs into the hit count shown beside it.
This commit is contained in:
iris 2026-10-25 01:57:29 +02:00 • committed by mara
commit 404d8334aa

View file

@ -10,6 +10,9 @@ import { NODE_HEIGHT, NODE_WIDTH } from "./FlowLayout.js";
const PAD = 10;
// The long kind name would run into the aside beside it.
const SHORT_KIND: Record<string, string> = { request_reviewer: "reviewer" };
export function BoxFace({
kind,
text,
@ -33,7 +36,7 @@ export function BoxFace({
<>
<rect width={NODE_WIDTH} height={NODE_HEIGHT} rx="6" />
<text class="notify-box-kind" x={PAD} y="17">
{kind}
{SHORT_KIND[kind] ?? kind}
</text>
{aside ? (
<text