From b16155dcefce3012e53d5da42f6c6f2ecf767963 Mon Sep 17 00:00:00 2001 From: Bob Lee Date: Tue, 13 Oct 2026 11:26:02 +0800 Subject: [PATCH] fix(flowchat): preserve readable markdown table columns --- src/web-ui/src/infrastructure/markdown/Markdown.scss | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/web-ui/src/infrastructure/markdown/Markdown.scss b/src/web-ui/src/infrastructure/markdown/Markdown.scss index a930542b55..9cde68110f 100644 --- a/src/web-ui/src/infrastructure/markdown/Markdown.scss +++ b/src/web-ui/src/infrastructure/markdown/Markdown.scss @@ -457,6 +457,9 @@ margin: var(--markdown-block-gap) 0; overflow-x: auto; overflow-y: hidden; + // Keep words in intrinsic column sizing; the prose-level `anywhere` rule + // otherwise lets long descriptions squeeze names and numbers to a few glyphs. + overflow-wrap: normal; border: 0; border-radius: var(--openbitfun-radius-lg); background: color-mix(in srgb, var(--openbitfun-color-surface-tertiary) 50%, var(--openbitfun-color-surface-scene)); @@ -479,6 +482,8 @@ .markdown-renderer .table-wrapper th, .markdown-renderer .table-wrapper td { + // Leave room for short values (including units), with overflow in the scroller. + min-width: calc(8ch + 2 * var(--markdown-table-cell-pad-x)); padding: var(--markdown-table-cell-pad-y) var(--markdown-table-cell-pad-x); border: 0; background: transparent; @@ -487,6 +492,11 @@ vertical-align: top; } +.markdown-renderer .table-wrapper .inline-code { + // Inline code has its own prose wrapping rule; preserve its word widths too. + overflow-wrap: normal; +} + .markdown-renderer .table-wrapper th { // Reserve a complete column label; excess width belongs to the table scroller. white-space: nowrap;