From 7cf4e048f0ceed29a061b9337b72e60e7f07d773 Mon Sep 17 00:00:00 2001 From: <> Date: Sun, 8 Nov 2026 12:42:55 +0000 Subject: [PATCH] fix: webui(events): the capture/map/bind chain is navigable twice on one page (archie) Fixes #1664 --- ui/src/events/EventsPage.vue | 10 +++++----- ui/src/events/counts.ts | 6 +++--- ui/src/events/tab-selection.ts | 26 +++++++++++++------------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/ui/src/events/EventsPage.vue b/ui/src/events/EventsPage.vue index 5a577caf5..2810c0fab 100644 --- a/ui/src/events/EventsPage.vue +++ b/ui/src/events/EventsPage.vue @@ -32,7 +32,7 @@ import { loadEventCounts, type EventsCounts } from "./counts"; * because they are one chain read in order -- an event, the mapping that names * its fields, the binding that decides what runs. * - * The numbered strip is the page's only navigation. The open step is the query + * The tab list is the page's only navigation. The open step is the query * string's (`?tab=`), so a step is a link and survives a reload, and switching * is a `replace`: walking the chain adds no history to back out through. A * capture's own selection rides alongside it (`?capture=`), so returning to @@ -69,9 +69,9 @@ function show(id: unknown): void { // there. watch(active, (tab) => show(tab), { immediate: true }); -// One count per step of the chain, for the strip and the tab chips. The reads -// and the counting live in counts.ts, so the strip, the chips and the test all -// read one source rather than three. +// One count per step of the chain, for the step chips. The reads and the +// counting live in counts.ts, so the chips and the test both read one source +// rather than three. const counts = ref({}); // A counts read bumps the generation; one that settles after a newer read // started is dropped, so the previous workspace's counts never overwrite the @@ -156,7 +156,7 @@ const panel = computed(() => PANELS[active.value]); v-for="step in steps" :key="step.id" :value="step.id" - :title="`${counts[step.id] ?? 0} ${step.hint}`" + :title="`${counts[step.id] ?? ''} ${step.hint}`.trim()" class="flex-none px-3" >{{ step.label }}{{ counts[step.id] ?? "" }} diff --git a/ui/src/events/counts.ts b/ui/src/events/counts.ts index 067863a31..afc5f43c5 100644 --- a/ui/src/events/counts.ts +++ b/ui/src/events/counts.ts @@ -1,7 +1,7 @@ /** * The Events chain's counts. * - * The three-step strip shows one number per step, and reads this. The three + * The three step chips show one number per step, and read this. The three * lists arrive from three separate loaded stores, so counting them inside the * page would put a second, quietly divergent answer next to the first. A count * that could not be read at all is `undefined` -- @@ -23,7 +23,7 @@ export interface EventsCountReaders { /** One step's count: the read that answers it, and the list it counts. */ export interface EventsCountSource { - /** The tab whose chip and strip step show this count. */ + /** The tab whose step chip shows this count. */ tab: string; /** The list field of that read's response. */ key: string; @@ -35,7 +35,7 @@ export interface EventsCountSource { // operator cannot act on. const CAPTURE_PAGE = 100; -/** One source per step of the chain, in the order the strip reads them. */ +/** One source per step of the chain, in the order the tab list reads them. */ export const COUNT_SOURCES: EventsCountSource[] = [ { tab: "inspector", diff --git a/ui/src/events/tab-selection.ts b/ui/src/events/tab-selection.ts index 8a4e3837e..4500ec9fd 100644 --- a/ui/src/events/tab-selection.ts +++ b/ui/src/events/tab-selection.ts @@ -48,21 +48,21 @@ export function activeTab( return available[0]?.id ?? ""; } -/** One step of the chain strip. */ +/** One step of the chain, as the page's tab list draws it. */ export interface EventsStep { - /** The tab this step shows. The strip and the URL agree on it. */ + /** The tab this step shows. The tab list and the URL agree on it. */ id: string; - /** The strip's word for the step. */ + /** The chain's word for the step, which the tab list shows. */ label: string; /** What the count beside the label counts. */ hint: string; } /** - * The strip's own words for each surface. The URL names a panel for what it - * holds -- inspector, mappings, bindings; the strip names the same three panels - * for what the operator does to them. Only one vocabulary is on screen at a - * time now, so the two can differ without the operator reading both. + * The chain's own words for each surface. The URL names a panel for what it + * holds -- inspector, mappings, bindings; the tab list names the same three + * panels for what the operator does to them. Only one vocabulary is on screen, + * so the two can differ without the operator reading both. */ const STEP_COPY: Record = { inspector: { label: "Capture", hint: "webhooks received" }, @@ -71,14 +71,14 @@ const STEP_COPY: Record = { }; /** - * stepsFor is the strip the page draws: exactly the tabs this composition can - * back, in reading order, wearing the strip's words. + * stepsFor is what the page's tab list draws: exactly the tabs this composition + * can back, in reading order, wearing the chain's words. * * It is the page's ONLY navigation. Drawing the same three panels a second time - * as a tab list beneath it put two controls on one chain, which read as a - * duplicated wizard. Because there is no second control set to fall back on, a - * surface this composition cannot back is left out rather than drawn dead: a - * step that navigates nowhere is worse than an absent one. + * as a numbered strip above the tab list put two controls on one chain, which + * read as a duplicated wizard. Because there is no second control set to fall + * back on, a surface this composition cannot back is left out rather than drawn + * dead: a step that navigates nowhere is worse than an absent one. */ export function stepsFor(available: EventsTabSpec[]): EventsStep[] { return available.map((tab) => ({