From bc3e64b4f89b04adc285df48b97b36406609cc46 Mon Sep 17 00:00:00 2001 From: dev_agent <17+dev_agent@code.cubecraftcreations.com> Date: Wed, 23 Sep 2026 23:26:03 -0400 Subject: [PATCH] Task 9b9188b8: History tab - filters, rows, stats and footer (#208) --- admin/src/App.css | 11 -- admin/src/App.test.tsx | 5 +- admin/src/App.tsx | 15 +- admin/src/api/history.ts | 48 +++++ admin/src/history/HistoryTab.css | 265 +++++++++++++++++++++++++ admin/src/history/HistoryTab.test.tsx | 268 ++++++++++++++++++++++++++ admin/src/history/HistoryTab.tsx | 227 ++++++++++++++++++++++ admin/src/history/format.ts | 94 +++++++++ admin/src/history/glyphs.tsx | 41 ++++ admin/src/index.css | 1 + 10 files changed, 952 insertions(+), 23 deletions(-) create mode 100644 admin/src/api/history.ts create mode 100644 admin/src/history/HistoryTab.css create mode 100644 admin/src/history/HistoryTab.test.tsx create mode 100644 admin/src/history/HistoryTab.tsx create mode 100644 admin/src/history/format.ts create mode 100644 admin/src/history/glyphs.tsx diff --git a/admin/src/App.css b/admin/src/App.css index b38f991..4f8fbcc 100644 --- a/admin/src/App.css +++ b/admin/src/App.css @@ -48,17 +48,6 @@ border: 0; } -.admin-placeholder { - margin: 0; - padding: 13px; - background: var(--nq-a-surface); - border: 1px solid var(--nq-a-border); - border-radius: 8px; - font-size: 13.5px; - font-weight: 600; - color: var(--nq-a-ink-secondary); -} - .admin-tabbar { position: fixed; inset: auto 0 0; diff --git a/admin/src/App.test.tsx b/admin/src/App.test.tsx index f4a6c05..7a38e6a 100644 --- a/admin/src/App.test.tsx +++ b/admin/src/App.test.tsx @@ -29,9 +29,8 @@ describe("NestQuest Admin shell", () => { fireEvent.click(screen.getByRole("tab", { name: "History" })); - expect(screen.getByRole("tabpanel").textContent).toContain( - "History placeholder", - ); + expect(screen.getByRole("heading", { name: "History" })).toBeTruthy(); + expect(screen.getByRole("tabpanel").textContent).not.toContain("placeholder"); expect(screen.getByRole("tab", { name: "History" }).getAttribute("aria-selected")).toBe( "true", ); diff --git a/admin/src/App.tsx b/admin/src/App.tsx index 6891697..3e36c31 100644 --- a/admin/src/App.tsx +++ b/admin/src/App.tsx @@ -1,6 +1,7 @@ import { useState } from "react"; import "./App.css"; import DefinitionsTab from "./definitions/DefinitionsTab"; +import HistoryTab from "./history/HistoryTab"; import ScheduleTab from "./schedule/ScheduleTab"; import TodayTab from "./today/TodayTab"; @@ -15,18 +16,17 @@ type TabId = (typeof TABS)[number]["id"]; export default function App() { const [active, setActive] = useState("today"); - // Built screens own their header (ADMIN-SPEC §1); the generic shell header - // stays for placeholder tabs and is visually hidden otherwise. - const hasScreen = active === "today" || active === "tasks" || active === "schedule"; return (
-
+ {/* Every tab is a built screen that owns its header (ADMIN-SPEC §1); the + generic shell header stays only as a visually hidden page heading. */} +

NestQuest Admin

Admin console

@@ -37,10 +37,7 @@ export default function App() { ) : active === "schedule" ? ( ) : ( -

- {TABS.find((tab) => tab.id === active)?.label} placeholder — screens - arrive in later tasks. -

+ )}