Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions packages/alert-dashboard/e2e/traces.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import AxeBuilder from "@axe-core/playwright";
import { expect, test } from "@playwright/test";
import { expect, test, type Locator, type Page } from "@playwright/test";

import { FIXTURE_TRACE_IDS } from "../src/modules/traces/fixtures-data.ts";
import {
Expand All @@ -10,6 +10,11 @@ import {
violations,
} from "./helpers.ts";

/** Each trajectory step is a labelled section inside the trace's tab panel. */
function steps(page: Page): Locator {
return page.getByRole("tabpanel").getByRole("region");
}

test("navigates to /traces from sidebar and AI page, filters traces, and reconstructs >30d archive-only trace", async ({
page,
}) => {
Expand Down Expand Up @@ -77,14 +82,10 @@ test("navigates to /traces from sidebar and AI page, filters traces, and reconst
await expect(
page.getByRole("region", { name: "Archived trace reconstruction" }),
).toContainText("Tempo's 30-day trace retention window has expired");
await expect(page.locator(".traces-step-card")).toHaveCount(2);
await expect(page.locator(".traces-step-card").first()).toContainText(
"Embeddings",
);
await expect(page.locator(".traces-step-card").first()).toContainText(
"4 dimensions",
);
await expect(page.locator(".traces-step-card").nth(1)).toContainText(
await expect(steps(page)).toHaveCount(2);
await expect(steps(page).first()).toContainText("Embeddings");
await expect(steps(page).first()).toContainText("4 dimensions");
await expect(steps(page).nth(1)).toContainText(
"Patch 16.18 shifts mid-lane priority",
);

Expand All @@ -100,7 +101,7 @@ test("renders specialized trajectory views for AI SDK chat, OpenAI decisions, Cl

// 1. AI SDK chat + Tool Call + Repair + Waterfall + Archive refs
await gotoLoadedPage(page, `/traces/${FIXTURE_TRACE_IDS.aiSdkChat}`);
await expect(page.locator(".traces-step-card")).toHaveCount(3);
await expect(steps(page)).toHaveCount(3);
await expect(page.getByText("Repair attempt")).toBeVisible();
await expect(page.getByText("Tool call · fetchMatchTimeline")).toBeVisible();
await expect(
Expand All @@ -112,13 +113,13 @@ test("renders specialized trajectory views for AI SDK chat, OpenAI decisions, Cl

await page.getByRole("tab", { name: "Waterfall" }).click();
await expect(page).toHaveURL(/tab=waterfall/u);
const wfRegion = page.getByRole("region", { name: "Span waterfall" });
const wfRegion = page.getByRole("region", { name: "Span timeline" });
await expect(wfRegion.locator("button.traces-wf-row")).toHaveCount(6);
await wfRegion
.getByRole("button", { name: /execute_tool fetchMatchTimeline/u })
.click();
await expect(
page.getByRole("region", { name: "Selected span inspector" }),
page.getByRole("region", { name: /^execute_tool fetchMatchTimeline$/u }),
).toContainText("call_timeline_1");

await page.getByRole("tab", { name: "Archive & attributes" }).click();
Expand Down
44 changes: 19 additions & 25 deletions packages/alert-dashboard/src/client/conformance-allowlist.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,120 +3,114 @@
"rule": "bare-element-selector",
"file": "src/client/promotion/promotion.css",
"count": 3,
"reason": "Scoped rules on the cells and children of tables and grids; in @layer ui.app the shared table and Hub's own classes would win and change the layout. They go as those pieces get classes in H3–H4."
"reason": "Scoped rules on the cells and children of tables and grids; in @layer ui.app the shared table and Hub's own classes would win and change the layout. They go as those pieces get classes in H3\u2013H4."
},
{
"rule": "shared-class-patch",
"file": "src/client/promotion/promotion.css",
"count": 15,
"reason": "Baseline at CU1. Hub moves onto the shared pieces in H3–H4."
"reason": "Baseline at CU1. Hub moves onto the shared pieces in H3\u2013H4."
},
{
"rule": "bare-element-selector",
"file": "src/modules/traces/traces.css",
"count": 6,
"reason": "Scoped rules on the cells and children of tables and grids; in @layer ui.app the shared table and Hub's own classes would win and change the layout. They go as those pieces get classes in H3–H4."
"reason": "Scoped rules on the cells and children of tables and grids; in @layer ui.app the shared table and Hub's own classes would win and change the layout. They go as those pieces get classes in H3\u2013H4."
},
{
"rule": "local-copy",
"file": "src/styles/engineering.css",
"count": 2,
"reason": "Baseline at CU1. Hub moves onto the shared pieces in H3–H4."
"reason": "Baseline at CU1. Hub moves onto the shared pieces in H3\u2013H4."
},
{
"rule": "bare-element-selector",
"file": "src/styles/globals.css",
"count": 17,
"reason": "Scoped rules on the cells and children of tables and grids; in @layer ui.app the shared table and Hub's own classes would win and change the layout. They go as those pieces get classes in H3–H4."
},
{
"rule": "local-copy",
"file": "src/styles/globals.css",
"count": 1,
"reason": "Baseline at CU1. Hub moves onto the shared pieces in H3–H4."
"reason": "Scoped rules on the cells and children of tables and grids; in @layer ui.app the shared table and Hub's own classes would win and change the layout. They go as those pieces get classes in H3\u2013H4."
},
{
"rule": "shared-class-patch",
"file": "src/styles/globals.css",
"count": 1,
"reason": "Baseline at CU1. Hub moves onto the shared pieces in H3–H4."
"reason": "Baseline at CU1. Hub moves onto the shared pieces in H3\u2013H4."
},
{
"rule": "bare-element-selector",
"file": "src/styles/ledger.css",
"count": 7,
"reason": "Scoped rules on the cells and children of tables and grids; in @layer ui.app the shared table and Hub's own classes would win and change the layout. They go as those pieces get classes in H3–H4."
"reason": "Scoped rules on the cells and children of tables and grids; in @layer ui.app the shared table and Hub's own classes would win and change the layout. They go as those pieces get classes in H3\u2013H4."
},
{
"rule": "shared-class-patch",
"file": "src/styles/ledger.css",
"count": 5,
"reason": "Baseline at CU1. Hub moves onto the shared pieces in H3–H4."
"reason": "Baseline at CU1. Hub moves onto the shared pieces in H3\u2013H4."
},
{
"rule": "bare-element-selector",
"file": "src/styles/platform.css",
"count": 2,
"reason": "Scoped rules on the cells and children of tables and grids; in @layer ui.app the shared table and Hub's own classes would win and change the layout. They go as those pieces get classes in H3–H4."
"reason": "Scoped rules on the cells and children of tables and grids; in @layer ui.app the shared table and Hub's own classes would win and change the layout. They go as those pieces get classes in H3\u2013H4."
},
{
"rule": "local-copy",
"file": "src/styles/platform.css",
"count": 2,
"reason": "Baseline at CU1. Hub moves onto the shared pieces in H3–H4."
"reason": "Baseline at CU1. Hub moves onto the shared pieces in H3\u2013H4."
},
{
"rule": "bare-element-selector",
"file": "src/styles/reports.css",
"count": 1,
"reason": "Scoped rules on the cells and children of tables and grids; in @layer ui.app the shared table and Hub's own classes would win and change the layout. They go as those pieces get classes in H3–H4."
"reason": "Scoped rules on the cells and children of tables and grids; in @layer ui.app the shared table and Hub's own classes would win and change the layout. They go as those pieces get classes in H3\u2013H4."
},
{
"rule": "colour-literal",
"file": "src/styles/reports.css",
"count": 2,
"reason": "Baseline at CU1. Hub moves onto the shared pieces in H3–H4."
"reason": "Baseline at CU1. Hub moves onto the shared pieces in H3\u2013H4."
},
{
"rule": "local-copy",
"file": "src/styles/reports.css",
"count": 2,
"reason": "Baseline at CU1. Hub moves onto the shared pieces in H3–H4."
"reason": "Baseline at CU1. Hub moves onto the shared pieces in H3\u2013H4."
},
{
"rule": "bare-element-selector",
"file": "src/styles/signals.css",
"count": 3,
"reason": "Scoped rules on the cells and children of tables and grids; in @layer ui.app the shared table and Hub's own classes would win and change the layout. They go as those pieces get classes in H3–H4."
"reason": "Scoped rules on the cells and children of tables and grids; in @layer ui.app the shared table and Hub's own classes would win and change the layout. They go as those pieces get classes in H3\u2013H4."
},
{
"rule": "shared-class-patch",
"file": "src/styles/signals.css",
"count": 3,
"reason": "Baseline at CU1. Hub moves onto the shared pieces in H3–H4."
"reason": "Baseline at CU1. Hub moves onto the shared pieces in H3\u2013H4."
},
{
"rule": "shared-class-patch",
"file": "src/styles/tables.css",
"count": 2,
"reason": "Baseline at CU1. Hub moves onto the shared pieces in H3–H4."
"reason": "Baseline at CU1. Hub moves onto the shared pieces in H3\u2013H4."
},
{
"rule": "bare-element-selector",
"file": "src/styles/visuals.css",
"count": 8,
"reason": "Scoped rules on the cells and children of tables and grids; in @layer ui.app the shared table and Hub's own classes would win and change the layout. They go as those pieces get classes in H3–H4."
"reason": "Scoped rules on the cells and children of tables and grids; in @layer ui.app the shared table and Hub's own classes would win and change the layout. They go as those pieces get classes in H3\u2013H4."
},
{
"rule": "colour-literal",
"file": "src/styles/visuals.css",
"count": 1,
"reason": "Baseline at CU1. Hub moves onto the shared pieces in H3–H4."
"reason": "Baseline at CU1. Hub moves onto the shared pieces in H3\u2013H4."
},
{
"rule": "shared-class-patch",
"file": "src/styles/visuals.css",
"count": 3,
"reason": "Baseline at CU1. Hub moves onto the shared pieces in H3–H4."
"reason": "Baseline at CU1. Hub moves onto the shared pieces in H3\u2013H4."
}
]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { StatusGlyph } from "@shepherdjerred/console-ui";
import { Section, StatusGlyph } from "@shepherdjerred/console-ui";
import type {
ClusterFacet,
ClusterNode,
Expand Down Expand Up @@ -140,7 +140,7 @@ function NodeCard({ node }: { readonly node: ClusterNode }): React.JSX.Element {
];
return (
<article
className="panel platform-node-card"
className="platform-node-card"
aria-labelledby={`node-${node.name}`}
>
<header className="platform-card-head">
Expand Down Expand Up @@ -186,7 +186,7 @@ function NvmeCard({
const wear =
drive.wearPercent === null ? "—" : `${String(drive.wearPercent)}% wear`;
return (
<article className="panel platform-meter-card">
<article className="platform-meter-card">
<div className="platform-card-head">
<h3 className="mono">{title}</h3>
<span className="mono muted">{`${wear} · ${formatValue(drive.tempCelsius, "celsius")}`}</span>
Expand Down Expand Up @@ -241,38 +241,36 @@ export function ClusterStorageSection(props: {
const { cluster, range, zpoolColumns } = props;
return (
<>
<section className="platform-section" aria-labelledby="nvme-heading">
<h2 className="block-heading" id="nvme-heading">
NVMe 5-year daily write budgets
</h2>
<div className="platform-two-col">
{cluster.nvmeDrives.map((d) => (
<NvmeCard key={`${d.node}/${d.device}`} drive={d} />
))}
</div>
<PresetChartGrid
range={range}
syncKey="cluster-storage"
charts={["nvme-writes-24h", "nvme-temp"]}
/>
</section>
<section className="platform-section" aria-labelledby="zfs-heading">
<h2 className="block-heading" id="zfs-heading">
ZFS storage pools
</h2>
<DataTable
caption="ZFS pools by node"
rows={cluster.zpools}
rowKey={(r) => `${r.node}/${r.pool}`}
columns={zpoolColumns}
exportFilename="cluster-zpools"
/>
<PresetChartGrid
range={range}
syncKey="cluster-storage"
charts={["zpool-usage-ratio", "zpool-arc-hit-ratio"]}
/>
</section>
<div className="platform-section">
<Section title="NVMe 5-year daily write budgets">
<div className="platform-two-col">
{cluster.nvmeDrives.map((d) => (
<NvmeCard key={`${d.node}/${d.device}`} drive={d} />
))}
</div>
<PresetChartGrid
range={range}
syncKey="cluster-storage"
charts={["nvme-writes-24h", "nvme-temp"]}
/>
</Section>
</div>
<div className="platform-section">
<Section title="ZFS storage pools">
<DataTable
caption="ZFS pools by node"
rows={cluster.zpools}
rowKey={(r) => `${r.node}/${r.pool}`}
columns={zpoolColumns}
exportFilename="cluster-zpools"
/>
<PresetChartGrid
range={range}
syncKey="cluster-storage"
charts={["zpool-usage-ratio", "zpool-arc-hit-ratio"]}
/>
</Section>
</div>
</>
);
}
Loading