milestone 29: activity — history, live and policy simulation on one surface
Gates / test (push) Successful in 1m40s
Gates / package (push) Successful in 3m58s
Gates / container (push) Successful in 14s
CI / gates (push) Successful in 12m51s
Gates / frontend (push) Successful in 1m18s
Gates / test-aarch64 (push) Successful in 6m57s

query log, live and lookup merge into /activity. history filters live
in the url, so a pasted link or back/forward reproduces the exact
view; the result column separates servfail and nxdomain from success
in the list. live is follow-by-default with freeze, and a streamed
row opens its in-memory provenance detail — no correlation invented
for rows sqlite has not written. lookup survives as the current
policy simulation under /activity/test. investigation links carry
absolute bounds, and the diagnostics page now honors since/until
instead of ignoring them. the old routes are gone without aliases.
This commit is contained in:
2026-08-22 10:52:56 +02:00
parent 0fd6bbd312
commit fa323c7ed4
42 changed files with 3225 additions and 1426 deletions
@@ -337,3 +337,38 @@ test("an episode links to its own detail page", async () => {
const link = await screen.findByRole("link", { name: "Blocklist source failed to update" });
expect(link.getAttribute("href")).toBe("/diagnostics/42");
});
test("an absolute window reaches both requests and is stated on the page", async () => {
const bounded = "since=1699999700&until=1700000300";
responses[`/api/diagnostics?${bounded}&state=active`] = ACTIVE;
responses[`/api/diagnostics?${bounded}&state=resolved`] = RESOLVED;
renderRoute(`/diagnostics?${bounded}`);
await screen.findByRole("heading", { name: "Active" });
expect(requested).toContain(`/api/diagnostics?${bounded}&state=active`);
expect(requested).toContain(`/api/diagnostics?${bounded}&state=resolved`);
// An empty section inside a five-minute window means something different
// from an empty section over the whole history, so the page has to say so.
expect(screen.getByText(/Showing events that overlap/)).toBeTruthy();
});
test("clearing the range drops both bounds from the url", async () => {
const bounded = "since=1699999700&until=1700000300";
responses[`/api/diagnostics?${bounded}&state=active`] = ACTIVE;
responses[`/api/diagnostics?${bounded}&state=resolved`] = RESOLVED;
const router = renderRoute(`/diagnostics?${bounded}`);
fireEvent.click(await screen.findByRole("button", { name: "Clear the time range" }));
await waitFor(() => {
expect(router.state.location.search).not.toContain("since");
});
expect(router.state.location.search).not.toContain("until");
});
test("a bound that is not a whole second is dropped, leaving the page unbounded", async () => {
renderRoute("/diagnostics?since=1.5&until=Infinity");
await screen.findByRole("heading", { name: "Active" });
expect(requested).toContain("/api/diagnostics?state=active");
expect(screen.queryByText(/Showing events that overlap/)).toBeNull();
});