diff --git a/src/app/(app)/issues/page.tsx b/src/app/(app)/issues/page.tsx index a705a90c..ea412dea 100644 --- a/src/app/(app)/issues/page.tsx +++ b/src/app/(app)/issues/page.tsx @@ -5,7 +5,7 @@ import { db } from "~/server/db"; import { issues } from "~/server/db/schema"; import { IssueFilters } from "~/components/issues/IssueFilters"; import { IssueRow } from "~/components/issues/IssueRow"; -import { AlertTriangle } from "lucide-react"; +import { CheckCircle2, Search } from "lucide-react"; import { createClient } from "~/lib/supabase/server"; import { redirect } from "next/navigation"; import type { @@ -143,6 +143,13 @@ export default async function IssuesPage({ invitedReporter: { name: string } | null; })[]; + const currentMachine = machine + ? allMachines.find((m) => m.initials === machine) + : null; + + // If status is not explicitly 'closed' (so it's open or default), treat empty state as success + const isLookingAtOpenIssues = status !== "closed"; + return (
@@ -169,15 +176,31 @@ export default async function IssuesPage({ ))}
) : ( -
-
- -
-

No issues found

-

- We couldn't find any issues matching your current filters. - Try adjusting or clearing them. -

+
+ {isLookingAtOpenIssues ? ( + <> +
+ +
+

All Clear!

+

+ {currentMachine + ? `${currentMachine.name} is ready to play.` + : "No open issues found. All systems operational."} +

+ + ) : ( + <> +
+ +
+

No matches found

+

+ We couldn't find any issues matching your current + filters. Try adjusting or clearing them. +

+ + )}
)}