import fs from "node:fs"; import path from "node:path"; import { fileURLToPath } from "node:url"; const webuiDir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), ".."); const source = fs.readFileSync(path.join(webuiDir, "src/features/mail/MailboxPage.tsx"), "utf8"); const styles = fs.readFileSync(path.join(webuiDir, "src/styles/mail-profiles.css"), "utf8"); function assert(condition, message) { if (!condition) throw new Error(message); } assert(source.includes("IconButton,"), "MailboxPage must import the central IconButton"); assert( source.includes(' setMessageQuery("")}'), "the raw clear-search button must not return" ); assert( !styles.includes(".mailbox-search-field button"), "Mail must not redefine the central icon-button appearance" );