From 77f1d2f93fa83f69bb895ba430603cf9b084746c Mon Sep 17 00:00:00 2001 From: Logan Cusano Date: Mon, 7 Sep 2026 18:52:39 -0400 Subject: [PATCH] =?UTF-8?q?frontend:=20#109=20punch-list=20P2=20=E2=80=94?= =?UTF-8?q?=20effect-guard=20RulesTab,=20pending=20node=20card=20modal,=20?= =?UTF-8?q?org=20save,=20node=20recent-calls=20filter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01Tbknwttzou4s46PAykmtix --- drb-frontend/app/alerts/page.tsx | 6 +++--- drb-frontend/app/nodes/[id]/page.tsx | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drb-frontend/app/alerts/page.tsx b/drb-frontend/app/alerts/page.tsx index c034f65..8d60319 100644 --- a/drb-frontend/app/alerts/page.tsx +++ b/drb-frontend/app/alerts/page.tsx @@ -1,6 +1,6 @@ "use client"; -import { useState } from "react"; +import { useEffect, useState } from "react"; import { useAuth } from "@/components/AuthProvider"; import { useAlerts } from "@/lib/useAlerts"; import { MachineOutputNotice } from "@/components/ui/MachineOutputNotice"; @@ -32,8 +32,8 @@ function RulesTab({ isAdmin }: { isAdmin: boolean }) { } } - // Load on first render of this tab - if (!loaded) { load(); } + // Load once when this tab mounts (load() self-guards on `loaded`). + useEffect(() => { load(); }, []); async function handleCreate(e: React.FormEvent) { e.preventDefault(); diff --git a/drb-frontend/app/nodes/[id]/page.tsx b/drb-frontend/app/nodes/[id]/page.tsx index 9d0796a..8476918 100644 --- a/drb-frontend/app/nodes/[id]/page.tsx +++ b/drb-frontend/app/nodes/[id]/page.tsx @@ -120,7 +120,10 @@ export default function NodeDetailPage() { const [approving, setApproving] = useState(false); const [deleting, setDeleting] = useState(false); const { systems } = useSystems(); - const { calls } = useCalls(20); + // TODO(server-26#109 item5): server-side node_id filter. A where("node_id","==",id) + // alongside the existing org_id equality + started_at orderBy needs a brand-new + // composite index, so for now pull a wider window and filter client-side. + const { calls } = useCalls(200); const { isAdmin } = useAuth(); const systemMap = Object.fromEntries(systems.map((s) => [s.system_id, s])); -- 2.54.0