From 4689ace7cb1602ca611aab4d64a7842d3f72c135 Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Tue, 28 Apr 2026 15:29:11 -0500 Subject: [PATCH] review(copilot): clarify table-rule rationale (UTF-16 code units, not graphemes) --- ui-tui/src/components/markdown.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ui-tui/src/components/markdown.tsx b/ui-tui/src/components/markdown.tsx index 7afae3beb6..e22eb5bb1d 100644 --- a/ui-tui/src/components/markdown.tsx +++ b/ui-tui/src/components/markdown.tsx @@ -99,10 +99,11 @@ const renderTable = (k: number, rows: string[][], t: Theme) => { // Thin divider under the header. Without it tables look like prose // with extra spacing because the header is just amber-coloured text - // (#15534). We avoid full borders on purpose — column widths are - // grapheme-approximate so a real outline often misaligns; one dim - // dashed rule under row 0 plus tab-style column gaps reads cleanly - // on every terminal we tested. + // (#15534). We avoid full borders on purpose — column widths come + // from `stripInlineMarkup(...).length` (UTF-16 code units, not + // display width), so a real outline often misaligns on emoji and + // East-Asian wide characters; one dim dashed rule under row 0 plus + // tab-style column gaps reads cleanly on every terminal we tested. const sep = widths.map(w => '─'.repeat(Math.max(1, w))).join(' ') return (