fix(session-ui): reduce inline code height

This commit is contained in:
David Hill 2026-09-01 00:03:43 +00:00
parent 01eda4c178
commit f29bb4078b
2 changed files with 14 additions and 1 deletions

View file

@ -153,6 +153,19 @@ story("mounts cached completed Markdown with sanitized HTML and decorations", as
await expect(markdown).toHaveAttribute("data-markdown-ready", "")
})
story("keeps inline code backgrounds 18px tall", async ({ page }) => {
await page.evaluate(async (fixture) => {
const { mountMarkdown } = await import(fixture)
await mountMarkdown({ text: "`value` and `src/file.ts`" })
}, fixture)
const code = page.getByTestId("markdown-fixture").locator(":not(pre) > code")
await expect(code).toHaveCount(2)
await expect(code.nth(1)).toHaveAttribute("data-inline-code-kind", "path")
expect(
await code.evaluateAll((elements) => elements.map((element) => element.getBoundingClientRect().height)),
).toEqual([18, 18])
})
story("shares in-flight Markdown rendering without overwriting a reclaimed cache entry", async ({ page }) => {
const result = await page.evaluate(async (fixture) => {
const { getCachedMarkdown, renderCachedMarkdown } = await import(fixture)

View file

@ -283,7 +283,7 @@
font-feature-settings: var(--font-family-mono--font-feature-settings);
color: var(--v2-text-text-base);
font-weight: var(--font-weight-medium);
padding: 2px 4px;
padding: 0 4px;
border-radius: 4px;
background: color-mix(in oklch, var(--v2-text-text-base) var(--markdown-inline-code-bg-mix), transparent);
}