From f644772944a67cbc2c2f15cd1f229629f0ef57a2 Mon Sep 17 00:00:00 2001 From: Benjamin Toby Date: Wed, 21 Oct 2026 19:03:24 +0100 Subject: [PATCH] Stop Tailwind scanning ref strings, colour links in the user bubble Tailwind read ref literals like [file:12] in prompts and docs as arbitrary-property utilities and emitted invalid CSS; those files hold no className, so they are excluded from the scan. Links in the user's ink bubble get a readable blue instead of the bubble's own ink, and the bubble no longer needs its own CSS class. --- .../bots/[bot_id]/(partials)/user-markdown-link.tsx | 2 +- src/server.ts | 8 ++++++-- src/styles/main.css | 13 +++++++++++++ 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/pages/admin/bots/[bot_id]/(partials)/user-markdown-link.tsx b/src/pages/admin/bots/[bot_id]/(partials)/user-markdown-link.tsx index 1863c6c..8e863f0 100644 --- a/src/pages/admin/bots/[bot_id]/(partials)/user-markdown-link.tsx +++ b/src/pages/admin/bots/[bot_id]/(partials)/user-markdown-link.tsx @@ -14,7 +14,7 @@ export default function UserMarkdownLink(props: ComponentProps<"a">) { href={props.href} target="_blank" rel="noopener noreferrer" - className="text-on-ink underline underline-offset-2 hover:opacity-80 break-words" + className="text-blue-400 dark:text-blue-600 underline underline-offset-2 hover:opacity-80 break-words" > {props.children} diff --git a/src/server.ts b/src/server.ts index 7b82f1f..c253b36 100644 --- a/src/server.ts +++ b/src/server.ts @@ -61,7 +61,9 @@ try { await ensureDockerNetwork(); } catch (error) { await logError({ title: "Docker isn't available", error }).catch(() => {}); - console.error(`Can't start without docker: ${error instanceof Error ? error.message : String(error)}`); + console.error( + `Can't start without docker: ${error instanceof Error ? error.message : String(error)}`, + ); process.exit(1); } @@ -122,7 +124,9 @@ const server = Bun.serve({ const response = await bunext.bunextRequestHandler({ req, server }); - return response ? await compressResponse({ req, response }) : response; + return response + ? await compressResponse({ req, response }) + : response; } catch (error: any) { await logError({ title: "Unhandled request error", diff --git a/src/styles/main.css b/src/styles/main.css index 9038602..147b775 100755 --- a/src/styles/main.css +++ b/src/styles/main.css @@ -1,5 +1,18 @@ @import "@moduletrace/twui/base.css"; +/* Doc and prompt strings mention refs like `[file:12]`, which Tailwind would + read as an arbitrary-property utility and emit as `file: 12` (esbuild then + warns it is not a CSS property). None of these files holds a className. */ +@source not "../../AGENTS.md"; +@source not "../../db/**"; +@source not "../**/*.test.ts"; +@source not "../**/*.test.tsx"; +@source not "../data/harness-prompts.ts"; +@source not "../utils/file-ref.ts"; +@source not "../utils/link-computer-refs.ts"; +@source not "../harness/tools/storage/list-files-tool.ts"; +@source not "../harness/tools/storage/storage-tool-context.ts"; + /* Cobble design tokens (handoff `tokens/tokens.css`). Light on `:root`, dark on `.dark` (twui's dark variant). Exposed to Tailwind in `@theme inline`. */ :root {