[Bug]: html_render chart labels unreadable when agents use var(--muted) as text color
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 53/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- typescript
- Domínio
- developer-experience
Direção de pesquisa
Start by locating HTML_RENDER_THEME_GUIDE and the html_preview and html_render entry points under apps/web, then check how htmlRenderTheme maps --muted and --muted-foreground. Reproduce the chart example in dark mode and inspect the theme guide and preview behavior. Done means the guide steers chart text to a readable text token, or the preview flags the low contrast described in the issue.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/web (html_render / agent visuals)
Summary
Auto-generated html_render charts in dark mode often show near-black subtitle, axis, and legend text on a black canvas. Title (var(--foreground)) and bars (var(--chart-*)) stay readable; supporting text does not.
This is not the same as #26872 (dark custom --accent / --chart-1 marks). Here the agent correctly switched to theme CSS variables, but painted text with var(--muted), which is a dark surface token. Readable muted text is var(--muted-foreground).
Related but different: #26872 / #27346 (accent/chart mark contrast), #25907 (canvas vs chat background mismatch).
Steps to reproduce
- Use the default dark theme (true black chat canvas).
- Have an agent
html_rendera chart/diagram whose secondary text usescolor: var(--muted)(common when following the theme-variable guide without distinguishing surface vs text roles). Minimal excerpt from a real agent chart:
<style>
body { color: var(--foreground); margin: 0; font-family: var(--font-sans); }
h1 { font-size: 16px; margin: 0 0 4px; }
p { margin: 0 0 16px; color: var(--muted); font-size: 13px; }
.lbl { font-size: 10px; color: var(--muted); }
.leg { font-size: 12px; color: var(--muted); }
</style>
<body>
<h1>Spanish scraper — creates vs updates</h1>
<p>Loki · container spanish-tax-portal-scraper</p>
<div class="lbl">10-15</div>
<div class="leg">Created claim · Ayudas claim updated</div>
</body>
- View the rendered visual in the thread.
Expected behavior
Secondary chart text (subtitle, axis labels, legend) stays readable against --background in dark mode — either because agents are steered to var(--muted-foreground) / var(--foreground), or because tooling/preview catches the bad contrast.
Actual behavior
Subtitle, rotated x-axis labels, and legend copy render as dark-on-dark and are effectively illegible. Title remains white.
Suspected cause: htmlRenderTheme maps --muted to the theme muted surface color (near canvas on dark), while --muted-foreground is the muted text color. The html_render theme guide lists --muted among usable variables and only notes that “most have a matching -foreground”, which is easy for agents to miss when styling labels.
Impact
Major degradation for auto charts/tables in dark mode (common default). Trend visuals look broken even when the data bars are fine.
Version or commit
Seen 2026-11-12 in T3 Code (Cursor harness / auto-smart) on Linux (WSL2). Default dark appearance.
Environment
- Thread that produced the chart: agent used
html_previewthenhtml_render - Chart title: “Spanish scraper — creates vs updates”
- Agent first previewed with hardcoded dark colors, then “fixed” to theme vars and switched label color to
var(--muted)
Screenshots
See attached image: white title + bright bars; nearly invisible subtitle, date labels, and legend text.
Possible product fixes (non-prescriptive)
- Strengthen
HTML_RENDER_THEME_GUIDE/ tool description: never use--muted,--card,--secondary,--borderas text color; use*-foreground/--foreground. - Or have
html_previewwarn when computed text/background contrast is below ~4.5:1. - Optionally treat agent misuse of surface tokens as text as a known footgun in docs.
- Linguagem predominante
- TypeScript
- Estrelas
- 24.8k
- Forks
- 6.4k
- Merge médio
- 4h 16min
- PRs com merge (30d)
- 352
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de pingdotgg/t3code
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 67/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia
Todas as issues de pingdotgg/t3code
Issues semelhantes
-
idea-scout idea:453
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 83/100
jeanibarz/agent-notebook#453 ·
Mantenedores costumam responder em até 1 dia
-
level/task
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 95/100
wazuh/wazuh-dashboard-plugins#9642 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 91/100
unicef/adt-studio#1112 ·
Mantenedores costumam responder em até 2 dias
-
feature request good first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
TabularisDB/tabularis#1513 ·
Mantenedores costumam responder em até 2 dias
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 75/100