-
Field mappings
-
+
+
diff --git a/ui/src/router/index.ts b/ui/src/router/index.ts
index b5a5dd59e..dc065d2bd 100644
--- a/ui/src/router/index.ts
+++ b/ui/src/router/index.ts
@@ -1,12 +1,10 @@
import { createRouter, createWebHistory } from "vue-router";
-import BindingsPage from "@/bindings/BindingsPage.vue";
-import CapturesPage from "@/captures/CapturesPage.vue";
import ChannelsPage from "@/channels/ChannelsPage.vue";
import CuratorsPage from "@/curators/CuratorsPage.vue";
import DashboardPage from "@/dashboard/DashboardPage.vue";
+import EventsPage from "@/events/EventsPage.vue";
import LogsPage from "@/logs/LogsPage.vue";
-import MappingsPage from "@/mappings/MappingsPage.vue";
import SystemAdvancedPage from "@/settings/SystemAdvancedPage.vue";
import SystemIdentitiesPage from "@/settings/SystemIdentitiesPage.vue";
import SystemAppearancePage from "@/settings/SystemAppearancePage.vue";
@@ -37,9 +35,14 @@ const routes = [
{ path: "/workflows", name: "workflows", component: WorkflowsPage, meta: { label: "Workflows", description: "The routed workflows and their run history.", section: "workflows" } },
{ path: "/skills", name: "skills", component: SkillsPage, meta: { label: "Skills", description: "The SKILL.md capabilities Archie can activate.", section: "skills" } },
{ path: "/curators", name: "curators", component: CuratorsPage, meta: { label: "Curators", description: "Scheduled passes that curate Archie's memory and captures.", section: "curators" } },
- { path: "/captures", name: "captures", component: CapturesPage, meta: { label: "Inspector", description: "Captured inbound events for inspection.", section: "captures" } },
- { path: "/mappings", name: "mappings", component: MappingsPage, meta: { label: "Mappings", description: "How inbound event fields map onto internal ones.", section: "mappings" } },
- { path: "/bindings", name: "bindings", component: BindingsPage, meta: { label: "Bindings", description: "Which workflow a captured event starts.", section: "bindings" } },
+ { path: "/events", name: "events", component: EventsPage, meta: { label: "Events", description: "Captured inbound events, how their fields map, and which workflow they start." } },
+ // The three former destinations, kept as bookmarks rather than removed: a
+ // link, a bookmark or an agent that learned these URLs still lands somewhere
+ // that works. `nav: false` is what the page registry's test reads to skip
+ // them -- they are addressed by URL, not offered as destinations.
+ { path: "/captures", name: "captures", redirect: "/events?tab=inspector", meta: { label: "Inspector", nav: false } },
+ { path: "/mappings", name: "mappings", redirect: "/events?tab=mappings", meta: { label: "Mappings", nav: false } },
+ { path: "/bindings", name: "bindings", redirect: "/events?tab=bindings", meta: { label: "Bindings", nav: false } },
{ path: "/system/status", name: "system-status", component: SystemStatusPage, meta: { label: "Status", description: "Update state, configuration sources, and the listen address.", section: "settings" } },
{ path: "/logs", name: "logs", component: LogsPage, meta: { label: "Logs", description: "The daemon log stream, filterable by level and component.", section: "logs" } },
{ path: "/system/appearance", name: "system-appearance", component: SystemAppearancePage, meta: { label: "Appearance", description: "Theme and display preferences." } },
diff --git a/ui/src/settings/SystemAdvancedPage.vue b/ui/src/settings/SystemAdvancedPage.vue
index e63a53cf1..ffb7dcb36 100644
--- a/ui/src/settings/SystemAdvancedPage.vue
+++ b/ui/src/settings/SystemAdvancedPage.vue
@@ -28,9 +28,9 @@ onMounted(load);
-
-
-
+
+
+
diff --git a/ui/test/events-page.test.ts b/ui/test/events-page.test.ts
new file mode 100644
index 000000000..ac440a2de
--- /dev/null
+++ b/ui/test/events-page.test.ts
@@ -0,0 +1,43 @@
+import assert from "node:assert/strict";
+import { readFile } from "node:fs/promises";
+import test from "node:test";
+
+/**
+ * The Events surfaces are one page with three tabs, and the navigation entry is
+ * always live (Sam's call): the tabs behind it prune themselves per capability,
+ * so an operator on a composition that can only back some of them still reaches
+ * the ones it can. What must not come back is three sibling destinations.
+ */
+const router = await readFile(new URL("../src/router/index.ts", import.meta.url), "utf8");
+const nav = await readFile(new URL("../src/lib/nav.ts", import.meta.url), "utf8");
+const page = await readFile(new URL("../src/events/EventsPage.vue", import.meta.url), "utf8");
+const registry = await readFile(new URL("../../internal/gateway/dashboard_tools.go", import.meta.url), "utf8");
+
+test("the Events page is the tab host, and the old paths only redirect", () => {
+ assert.match(page, /Tabs/, "the page composes tabs");
+ assert.match(page, /CapturesPage/, "the Inspector tab is the captures surface");
+ assert.match(page, /BindingsPage/, "the Bindings tab is the bindings surface");
+ assert.match(page, /MappingsPage/, "the Mappings tab is the mappings surface");
+
+ // Each former destination survives as a bookmark, never as a nav entry: the
+ // registry test parses this table and skips exactly the lines marked so.
+ for (const path of ["/captures", "/mappings", "/bindings"]) {
+ const line = router.split("\n").find((l) => l.includes(`path: "${path}"`));
+ assert.ok(line, `${path} is no longer routed at all, so its bookmarks break`);
+ assert.match(line, /nav: false/, `${path} is still a navigation entry`);
+ assert.match(line, /redirect/, `${path} does not redirect to the tab that replaced it`);
+ }
+});
+
+test("Events is one live navigation entry, not a group of three", () => {
+ const entry = nav.split("\n").find((l) => l.includes('"/events"'));
+ assert.ok(entry, "the navigation model does not reference /events");
+ assert.doesNotMatch(nav, /label:\s*"Events",\s*paths:/, "Events is still a three-item group");
+});
+
+test("the page registry and the route table still agree", () => {
+ assert.match(registry, /Path: "\/events"/, "the agent's page registry does not know /events");
+ for (const path of ["/captures", "/mappings", "/bindings"]) {
+ assert.doesNotMatch(registry, new RegExp(`Path: "${path}"`), `${path} is still a registered page`);
+ }
+});
diff --git a/ui/test/events-tabs.test.ts b/ui/test/events-tabs.test.ts
new file mode 100644
index 000000000..57fc3f127
--- /dev/null
+++ b/ui/test/events-tabs.test.ts
@@ -0,0 +1,43 @@
+import assert from "node:assert/strict";
+import test from "node:test";
+
+const { EVENTS_TABS, activeTab, availableTabs } = await import("../src/events/tab-selection.ts");
+
+test("every tab stays when the composition reports nothing", () => {
+ assert.deepEqual(availableTabs(null).map((t) => t.id), ["inspector", "bindings", "mappings"]);
+ assert.deepEqual(availableTabs(undefined).map((t) => t.id), ["inspector", "bindings", "mappings"]);
+});
+
+test("a tab is offered only when its own capability is backed", () => {
+ const ids = availableTabs({ captures: true, bindings: false, mappings: true }).map((t) => t.id);
+ assert.deepEqual(ids, ["inspector", "mappings"], "a capability the server refuses still shows its tab");
+});
+
+test("a section the server never mentioned stays visible", () => {
+ const ids = availableTabs({ captures: true }).map((t) => t.id);
+ assert.deepEqual(ids, ["inspector", "bindings", "mappings"], "an unreported section hid its tab");
+});
+
+test("the requested tab wins when it is available", () => {
+ const available = availableTabs({ captures: true, bindings: true, mappings: true });
+ assert.equal(activeTab("mappings", available), "mappings");
+});
+
+test("a tab this composition cannot back falls back to the first it can", () => {
+ const available = availableTabs({ captures: false, bindings: true, mappings: false });
+ assert.equal(activeTab("inspector", available), "bindings", "a bookmark from a fuller deployment showed nothing");
+ assert.equal(activeTab("", available), "bindings", "no tab named did not land on the first available one");
+});
+
+test("nothing backed reports no tab rather than guessing one", () => {
+ const available = availableTabs({ captures: false, bindings: false, mappings: false });
+ assert.equal(available.length, 0);
+ assert.equal(activeTab("bindings", available), "");
+});
+
+test("the tabs are the three Events surfaces, in reading order", () => {
+ assert.deepEqual(
+ EVENTS_TABS.map(({ id, section }) => [id, section]),
+ [["inspector", "captures"], ["bindings", "bindings"], ["mappings", "mappings"]],
+ );
+});