ui: draw markdown tables with row rules instead of a grid #33195
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #33195"
general
weight: 0.35
Sumdiboii
Overview
A markdown table in a chat message sits on a hairline under each row now. It drew a rule around every cell, a band behind the header and a frame around its scroll wrapper, which read heavier than the prose around them.
Demo
<!-- demo:start -->
| Rows carry the table | And on a phone |
|---|---|
|  |  |
Recorded at ee0e03967d; click a preview for its full video.
<!-- demo:end -->
Additional information
<details>
<summary>What changed</summary>
.table-wrapperare gone, and the header is set heavier instead of filled. The line colour is one custom property, so the tinted user bubble retints it once rather than overriding four selectors. (The old band and zebra never painted:hsl(var(--surface-muted) / 0.3)is not valid CSS,--surface-mutedis a colour already.)0.875remwithtabular-nums, so a column of figures lines up on its digits, and the gutters are wider (1.25rem) with the outer columns flush, so a table's edges line up with the text above and below it.align="right", and an authoredtext-alignbeats a presentational attribute, so theth { text-align: left }that was there quietly dropped the right and centre columns of| :--- | ---: | :---: |. All three values are restated.<ul>or<br>thatrehypeRestoreTableHtmlputs in a cell no longer inherits the prose list margins, and a user message overrides the bubble'soverflow-wrap: anywhere, which pulled every column down to a few letters.min-width: 7rem) and scrolls in its wrapper, instead of crumbling every cell to three lines.transition: allontableand the shadow on its hover are gone. The row highlight stays, as one tint on the row under the pointer.</details>
<details>
<summary>Testing</summary>
In
ui/apps/chat,npm run check,npm run lint,npm run test:unit(940 tests) andnpm run test:client(409 tests) pass. Not run:npm run buildandnpm run test:e2e.A Tables story covers it (
tests/stories/content/MarkdownContent.stories.svelte, fixturemarkdown-tables.ts): column alignment, code and links in cells, a list and a line break in a cell, an escaped pipe, an empty cell, and a table wider than the message. Itsplaychecks that the wrapper draws no frame, the header carries no fill, the rows carry the hairline, the cells carry no vertical rule, and a right-aligned column computes totext-align: end:The assertions are load-bearing: against the previous CSS they fail on the wrapper's frame (
expected '1px' to be '0px').</details>
<details>
<summary>Demo script</summary>
``
ts demoQ4_K_M// one reply, three tables: right-aligned numbers, code in cells, and one wider than the message
const REPLY = [
'Here is what I would run:',
'',
'## Quantization',
'',
'| Type | Bits per weight | Size (7B) | Notes |',
'| :--- | ---: | ---: | :--- |',
'|
| 4.85 | 4.07 GB | A good default for most models |',Q5_K_M'|
| 5.69 | 4.78 GB | A little more quality for a little more memory |',Q8_0'|
| 8.50 | 7.16 GB | Close to the original weights |',--ctx-size'',
'## Flags worth setting',
'',
'| Flag | Default | Description |',
'| :--- | :---: | :--- |',
'|
| 4096 | Context size in tokens |',--parallel'|
| 1 | Slots that serve requests at once |',--jinja'|
| on | Use the model\'s own chat template |','',
'The run I measured, which is wider than the message:',
'',
'| Model | Family | Parameters | Context | Quantization | Prompt t/s | Generation t/s | Memory | Backend |',
'| :--- | :--- | ---: | ---: | :--- | ---: | ---: | ---: | :--- |',
'| gpt-oss-20b | GPT-OSS | 20.9B | 131072 | MXFP4 | 1890.4 | 74.2 | 12.1 GB | Metal |',
'| Qwen3-8B | Qwen3 | 8.2B | 40960 | Q4_K_M | 1312.7 | 58.9 | 5.0 GB | Metal |'
].join('\n');
test.use({ mockServer: { models: ['ggml-org/gemma-3-4b-it-GGUF:Q4_K_M'], reply: REPLY } });
async function askForTables(demo, page) {
const input = page.getByRole('textbox').first();
await demo.type(input, 'Compare the quantizations and the flags I need, in tables', 900);
await demo.click(page.getByRole('button', { exact: true, name: 'Send' }));
await page.locator('.markdown-content table').last().waitFor();
}
/* Scrolls the wrapper of the last table sideways, the way a wide table is read. /
async function scrollWideTable(page, left) {
const wrapper = page.locator('.table-wrapper').last();
await wrapper.scrollIntoViewIfNeeded();
await wrapper.evaluate((el, x) => el.scrollBy({ behavior: 'smooth', left: x }), left);
}
test('Rows carry the table', async ({ demo, page }) => {
const tables = page.locator('.markdown-content table');
await askForTables(demo, page);
await demo.caption('One hairline under each row: no grid, no header band, no frame');
await demo.pause(1200);
await tables.first().scrollIntoViewIfNeeded();
await demo.zoom(tables.first(), 1.8, 1600);
await demo.caption('A right-aligned column keeps its figures under the header');
await demo.caption('A table wider than the message scrolls inside it');
await scrollWideTable(page, 320);
await demo.pause(1200);
});
test.describe('phone', () => {
test.use({ hasTouch: true, isMobile: true, viewport: { height: 844, width: 390 } });
test('And on a phone', async ({ demo, page }) => {
await askForTables(demo, page);
await demo.caption('The same rows in a phone-width message');
await demo.pause(800);
await scrollWideTable(page, 240);
await demo.pause(1000);
});
});
`
</details>
Requirements
<!-- IMPORTANT: Please do NOT delete this section, otherwise your PR may be rejected -->
[^1]: https://huggingface.co/datasets/allozaur/llama-chat-traces/blob/main/2026-11-27_14-53-06_conv_dfa161d3_i_want_to_have_bette.jsonl