From 64070f7f3ee0e005dec9b6661a30fd4b8b1e6362 Mon Sep 17 00:00:00 2001 From: brennanb2025 Date: Wed, 24 Jun 2026 14:10:17 -0700 Subject: [PATCH] Use secondary scale for PR comment bodies Co-authored-by: Orca --- .../right-sidebar/pr-comment-presentation.test.ts | 9 ++++++--- .../components/right-sidebar/pr-comment-presentation.ts | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/renderer/src/components/right-sidebar/pr-comment-presentation.test.ts b/src/renderer/src/components/right-sidebar/pr-comment-presentation.test.ts index 51ef5bc43be..b85c7085dd9 100644 --- a/src/renderer/src/components/right-sidebar/pr-comment-presentation.test.ts +++ b/src/renderer/src/components/right-sidebar/pr-comment-presentation.test.ts @@ -15,7 +15,8 @@ describe('pr-comment-presentation', () => { it('returns card layout tokens for cards and focus variants', () => { const cards = getPRCommentPresentationClasses('cards') expect(cards.useCardLayout).toBe(true) - expect(cards.commentBody).toContain('text-[13px]') + expect(cards.commentBody).toContain('text-xs') + expect(cards.commentBody).toContain('leading-5') expect(cards.commentBody).toContain('text-foreground') expect(cards.group).toContain('bg-secondary') expect(cards.group).toContain('shadow-xs') @@ -24,8 +25,10 @@ describe('pr-comment-presentation', () => { const focus = getPRCommentPresentationClasses('focus') expect(focus.useCardLayout).toBe(true) - expect(focus.commentBody).toContain('text-[13px]') - expect(focus.commentBodyReply).toContain('text-[13px]') + expect(focus.commentBody).toContain('text-xs') + expect(focus.commentBody).toContain('leading-5') + expect(focus.commentBodyReply).toContain('text-xs') + expect(focus.commentBodyReply).toContain('leading-5') expect(focus.author).toContain('text-[13px]') expect(focus.list).toContain('gap-2') expect(focus.commentBody).toContain('px-4 py-2.5') diff --git a/src/renderer/src/components/right-sidebar/pr-comment-presentation.ts b/src/renderer/src/components/right-sidebar/pr-comment-presentation.ts index 4b60a255f30..7d6ca93f2bb 100644 --- a/src/renderer/src/components/right-sidebar/pr-comment-presentation.ts +++ b/src/renderer/src/components/right-sidebar/pr-comment-presentation.ts @@ -96,8 +96,8 @@ const COMMENT_AVATAR = const RESOLVED_SECTION_LABEL = 'text-[11px] font-semibold uppercase tracking-wider text-muted-foreground' -// Why: cards and focus share dense sidebar scale so PR comments do not read oversized. -const CARD_COMMENT_BODY_SIZE = 'text-[13px] leading-relaxed' +// Why: markdown bodies need the secondary sidebar scale; 13px relaxed copy reads oversized in narrow comment cards. +const CARD_COMMENT_BODY_SIZE = 'text-xs leading-5' const CARD_COMMENT_AUTHOR_SIZE = 'text-[13px]' const CARD_COMMENT_LIST_GAP = 'gap-2' const CARD_COMMENT_BODY_PADDING = 'px-4 py-2.5'