From c8199f0bbfb6c777a8fad67ec3159d6cb33f2d89 Mon Sep 17 00:00:00 2001 From: yiekheng Date: Sun, 10 May 2026 09:22:30 +0800 Subject: [PATCH] fix(web): switch dialog cards to transparent nesting (the new static guard caught it). Replaced with a Card that's its own pressable region (onClick + onKeyDown + role=button on the
; no nested button). Test guards ----------- + src/test/no-render-warnings.test.tsx (6 tests) Renders AccountsListView, ThemeToggle, EditMessageForm via renderToString and asserts neither console.error nor console.warn was invoked. Also scans the produced HTML for any + > + +
+
+

+ {account.label} +

+

+ {account.phoneNumber ?? "Not paired"} +

+
+ {connected ? ( + + ) : ( + + )} + + ); })} diff --git a/apps/web/src/test/no-button-wrapping-card.test.ts b/apps/web/src/test/no-button-wrapping-card.test.ts new file mode 100644 index 0000000..eb48f83 --- /dev/null +++ b/apps/web/src/test/no-button-wrapping-card.test.ts @@ -0,0 +1,103 @@ +import { describe, it, expect } from "vitest"; +import { readdirSync, readFileSync, statSync } from "node:fs"; +import { join, relative } from "node:path"; + +/** + * Static guard: no `.tsx` file may contain a literal ``). + * + * That nesting is invalid HTML — `".length; + } + return hits; +} + +describe("static guard: no