You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Markdown headings in Desktop chat render only as bold (no heading hierarchy) #16046
In OpenCode Desktop, Markdown headings inside chat messages render visually almost identical to bold text. There is no clear visual hierarchy between #, ##, ###, etc., which makes longer conversations hard to scan.
Expected behavior
Headings should have a clear visual hierarchy (font size, spacing, weight, etc.) so that h1/h2/h3 are distinguishable from each other and from normal bold text.
Actual behavior
All headings look like bold text with minimal or no difference between levels.
This issue might be a duplicate of existing issues. Please check:
Markdown rendering: H1-H6 headings have no visual hierarchy, tables render poorly #15141: Same symptom — H1–H6 headings render with no visual hierarchy (all appear as bold with no size/weight differentiation). That issue focuses on the TUI rendering path; this one is specific to the Desktop chat UI, so they may need separate fixes, but the root problem is the same.
If you believe your issue is distinct, please clarify the differences so we can track them separately.
I’d like to add some implementation detail and a concrete proposal that should make this easier to fix.
Current behavior & root cause
In the web/desktop UI, all markdown headings (h1–h6) rendered inside chat messages are effectively styled as body text. They share:
the same font size: 14px
the same color: var(--text-strong)
only a marginally heavier font weight: var(--font-weight-medium) (500 vs 400 for body)
From packages/ui/src/components/markdown.css:
/* Headings: Same size, distinguished by color and spacing */h1,h2,h3,h4,h5,h6{font-size:14px;color:var(--text-strong);font-weight:var(--font-weight-medium);margin-top:0px;margin-bottom:24px;line-height:var(--line-height-large);}
In practice:
There is almost no visual hierarchy between heading levels.
Headings are nearly indistinguishable from bold text inside messages.
Long, structured responses (plans, summaries, multi-step guides) are hard to scan, even when the model is instructed to use markdown headings.
The theme system already defines a dedicated heading color token, but it’s not used here:
The existing --markdown-heading token is defined but unused.
Proposed fix
Use the existing design tokens to create a clear but not overwhelming hierarchy for headings inside chat messages, and wire in --markdown-heading (with a safe fallback for custom themes).
Suggested change for packages/ui/src/components/markdown.css:
/* Headings: scaled sizes with distinct color */h1{font-size:20px;/* matches --font-size-x-large */font-weight:600;color:var(--markdown-heading,var(--text-strong));margin-top:16px;margin-bottom:8px;line-height:var(--line-height-large);}h2{font-size:16px;/* matches --font-size-large */font-weight:600;color:var(--markdown-heading,var(--text-strong));margin-top:16px;margin-bottom:8px;line-height:var(--line-height-large);}h3{font-size:14px;/* matches --font-size-base */font-weight:700;color:var(--markdown-heading,var(--text-strong));margin-top:12px;margin-bottom:6px;line-height:var(--line-height-large);}h4,h5,h6{font-size:14px;/* base size, used mainly for hierarchy via weight/spacing */font-weight:600;color:var(--markdown-heading,var(--text-strong));margin-top:8px;margin-bottom:4px;line-height:var(--line-height-large);}
Notes:
Font sizes map directly to existing tokens:
h1 → --font-size-x-large (20px)
h2 → --font-size-large (16px)
h3+ → --font-size-base (14px)
var(--markdown-heading, var(--text-strong)) keeps existing themes working and falls back cleanly for custom themes that don’t define --markdown-heading.
Spacing is reduced and differentiated by level to keep the chat layout compact while still making sections scannable.
Activity
github-actions commentedon Mar 4, 2026
This issue might be a duplicate of existing issues. Please check:
If you believe your issue is distinct, please clarify the differences so we can track them separately.
semidark commentedon Jun 3, 2026
I’d like to add some implementation detail and a concrete proposal that should make this easier to fix.
Current behavior & root cause
In the web/desktop UI, all markdown headings (
h1–h6) rendered inside chat messages are effectively styled as body text. They share:14pxvar(--text-strong)var(--font-weight-medium)(500 vs 400 for body)From
packages/ui/src/components/markdown.css:In practice:
The theme system already defines a dedicated heading color token, but it’s not used here:
So the root cause is:
--markdown-headingtoken is defined but unused.Proposed fix
Use the existing design tokens to create a clear but not overwhelming hierarchy for headings inside chat messages, and wire in
--markdown-heading(with a safe fallback for custom themes).Suggested change for
packages/ui/src/components/markdown.css:Notes:
h1→--font-size-x-large(20px)h2→--font-size-large(16px)h3+→--font-size-base(14px)var(--markdown-heading, var(--text-strong))keeps existing themes working and falls back cleanly for custom themes that don’t define--markdown-heading.semidark commentedon Jun 3, 2026
workaround
My current is to use the stylus browser extension and have it inject the following css to my opencode webui:
Before
After
github-actions commentedon Aug 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.