From 589acfcb14fb4233bb72f2967bc89847661ebaa0 Mon Sep 17 00:00:00 2001 From: npub1223z34hd7vtwc6qj4s7flsxkj644nlre2nthu7lrrmkumhu3xddsrx9r6w <52a228d6edf316ec6812ac3c9fc0d696ab59fc7954d77e7be31eedcddf91335b@sprout-oss.stage.blox.sqprod.co> Date: Mon, 8 Jun 2026 17:05:24 -0700 Subject: [PATCH] =?UTF-8?q?fix(desktop):=20tighten=20composer=E2=86=94time?= =?UTF-8?q?line=20parity=20for=20pre=20code=20and=20anchor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Address Marge's review on PR #913: - pre code: add `block min-w-full whitespace-pre font-mono text-foreground` so pasted/markdown-rendered code blocks mirror CODE_BLOCK_CLASS in markdown.tsx token-for-token. Previously the composer's pre code only reset the inline-code styling; it inherited block layout by default, which is fine in practice but isn't true parity. - anchor: add `transition-colors hover:text-primary/80` so hover treatment matches the rendered timeline. Heading sizes, pre shadow (shadow-xs), and pre max-h ([400px]) were flagged in review but already match markdown.tsx exactly (h1=text-xl leading-8, h2=text-lg leading-7, h3=text-base leading-6 at line 791-806; pre uses shadow-xs and max-h-[400px] at line 436). No change needed there. Verified: pnpm typecheck, pnpm lint, pnpm build all green. --- desktop/src/shared/styles/globals.css | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/desktop/src/shared/styles/globals.css b/desktop/src/shared/styles/globals.css index 843a62014..fa186a2b4 100644 --- a/desktop/src/shared/styles/globals.css +++ b/desktop/src/shared/styles/globals.css @@ -316,7 +316,7 @@ text-decoration: line-through; } .rich-text-composer .tiptap a { - @apply font-medium text-primary underline underline-offset-4 cursor-pointer; + @apply font-medium text-primary underline underline-offset-4 transition-colors hover:text-primary/80 cursor-pointer; } /* Inline code. */ @@ -329,7 +329,9 @@ @apply max-h-[400px] overflow-x-auto overflow-y-auto rounded-xl border border-border/70 bg-muted/60 px-3 py-1.5 shadow-xs; } .rich-text-composer .tiptap pre code { - @apply bg-transparent p-0 rounded-none text-[13px] leading-6; + /* Mirrors CODE_BLOCK_CLASS in markdown.tsx so a pasted/markdown-rendered + * code block looks identical in the composer and in the timeline. */ + @apply block min-w-full whitespace-pre rounded-none bg-transparent p-0 font-mono text-[13px] leading-6 text-foreground; } /* Blockquote. */