From fbd909b722b547c07cf1ed1822b48c26b0c4c5d4 Mon Sep 17 00:00:00 2001 From: Daniel Kantor Date: Tue, 2 Dec 2025 14:44:00 +0100 Subject: [PATCH 1/2] small changes in agents.md --- AGENTS.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 4716a98..f63d4e2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -366,6 +366,10 @@ describe("Component", () => { - Loading states - Accessibility +### Testing Best Practices + +- **Prefer `toBeVisible()` over `toBeInTheDocument()`** - `toBeVisible()` checks that an element is actually visible to the user (not hidden via CSS, `aria-hidden`, etc.), while `toBeInTheDocument()` only checks DOM presence. Use `toBeVisible()` for positive assertions and `.not.toBeInTheDocument()` for absence checks. + ## Common Mistakes ### 1. Client Components Everywhere From 1083214f40a96a1cc5829d02450381e7db37e551 Mon Sep 17 00:00:00 2001 From: Daniel Kantor Date: Tue, 2 Dec 2025 14:52:33 +0100 Subject: [PATCH 2/2] feat: add global error page --- src/app/global-error.tsx | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/app/global-error.tsx diff --git a/src/app/global-error.tsx b/src/app/global-error.tsx new file mode 100644 index 0000000..7100fd1 --- /dev/null +++ b/src/app/global-error.tsx @@ -0,0 +1,40 @@ +"use client"; + +import { Inter } from "next/font/google"; +import { ToolHiveIcon } from "@/components/icons"; +import { Button } from "@/components/ui/button"; +import "./globals.css"; + +const inter = Inter({ + variable: "--font-inter", + subsets: ["latin"], +}); + +interface GlobalErrorProps { + reset: () => void; +} + +export default function GlobalError({ reset }: GlobalErrorProps) { + return ( + + +
+
+ + ToolHive +
+ +

+ Something went wrong +

+ + +
+ + + ); +}