[Bug]: Sent prompts strike through text between two single tildes that the rich composer showed literally
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- react, typescript
- Área
- frontend
Línea de trabajo
Empieza con apps/web/src/components/ChatMarkdown.tsx y la llamada a ChatMarkdown en apps/web/src/components/chat/MessagesTimeline.tsx; compara los plugins remark de la cronología con el comportamiento de una sola tilde en apps/web/src/composer-rich-text.ts. La comprobación de restauración del issue define cuándo se considera terminado: las tildes individuales permanecen visibles sin tachado en los mensajes enviados por los usuarios, mientras que ~~struck~~ sigue mostrándose tachado.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
Steps to reproduce
Summary
With the rich text composer on (the default), a prompt containing two single ~ characters in one paragraph, for example two home-relative paths such as ~/folder-a/... and (~/folder-a/...), shows both tildes as literal text while composing. After sending, the user message in the chat timeline renders everything between them with strikethrough and drops both tildes. The rich composer's markdown dialect and the timeline's markdown dialect disagree on single tildes, so the sent message misrepresents what the user typed. The stored message text and the text the provider receives are unchanged; only the rendering is affected.
Steps
- On the build listed under Runtime or environment, with the rich text composer enabled (default), open any thread.
- Type this prompt exactly, without backticks:
Install the skill as ~/folder-a/skills/x, then follow the guide (~/folder-a/guide.md). - Observe the composer: both tildes are plain text, nothing is styled.
- Send the prompt and look at the user message in the timeline.
Steps 1–4 with this exact string were not run in the app by the investigator; the in-app symptom comes from the reporter's screenshot of a real prompt with the same shape (see Actual behavior). The renderer and composer behavior were reproduced headlessly with the parser versions apps/web locks ([email protected], [email protected], [email protected], [email protected]), using the remark plugins that apply to sent user messages (which render with parseRawHtml={false}, so no rehype plugins run):
import React from "react";
import { renderToStaticMarkup } from "react-dom/server";
import Markdown from "react-markdown";
import remarkGfm from "remark-gfm";
import remarkBreaks from "remark-breaks";
const text = "Install the skill as ~/folder-a/skills/x, then follow the guide (~/folder-a/guide.md).";
console.log(renderToStaticMarkup(React.createElement(Markdown, {
remarkPlugins: [remarkGfm, remarkBreaks],
}, text)));
Expected behavior
In rich text mode, the sent user message shows the tildes the composer showed: Install the skill as ~/folder-a/skills/x, then follow the guide (~/folder-a/guide.md). with both tildes visible and no strikethrough. The rich composer's inline-markdown parser (apps/web/src/composer-rich-text.ts) defines strikethrough as ~~ only and keeps a single ~ as literal text, stating that unmatched markers stay literal "so nothing the user typed is ever lost". That parser's guarantee is explicitly about the composer itself; applying it to the timeline rests on the inference that rich mode previews how the sent markdown will be formatted, since no code or test states that the composer and the timeline must render identically. Double-tilde strikethrough (~~struck~~) typed in the composer should keep rendering as strikethrough in the timeline. Plain-text composer mode, where every marker is shown literally by design, is out of scope.
Actual behavior
Supplied by the reporter: in T3 Code Nightly, a sent prompt containing ... as ~/[REDACTED]/gdp-ts, manifest-tracked, ... repo skill (~/[REDACTED]/SKILL.md) ... rendered in the timeline with roughly three lines, from just after the first tilde to just before the second, struck through and both tilde characters missing. By inference from that screenshot and the headless render below, the sample string in Steps to reproduce would render with /folder-a/skills/x, then follow the guide ( struck through and both tildes missing.
Headless run of the snippet above (local, locked versions) printed:
<p>Install the skill as <del>/folder-a/skills/x, then follow the guide (</del>/folder-a/guide.md).</p>
The composer's parser, run locally from main on the same string, returns a single unstyled span:
[{"text":"Install the skill as ~/folder-a/skills/x, then follow the guide (~/folder-a/guide.md).","marks":[]}]
Controls from the same local run: this is ~~struck~~ text renders <del>struck</del> in both the composer parser and the timeline renderer; files in ~/foo and ~/bar does not strike on web because the second tilde follows a space and cannot close; with remark-gfm configured as [remarkGfm, { singleTilde: false }] the report string renders literally while ~~struck~~ still renders <del>.
Evidence
- Expected source:
apps/web/src/composer-rich-text.tsonmain(header comment "Unmatched markers stay literal text so nothing the user typed is ever lost",RICH_TEXT_DELIMITERS.strike = "~~", and line 103 where a~run shorter than 2 cannot open a strike); rich mode is the default percomposerRichTextEnabledinpackages/contracts/src/settings.ts. - Failure source: reporter's desktop-app screenshot of the sent user message, plus the local headless render above; the user message path is
UserMessageBody→ChatMarkdowninapps/web/src/components/chat/MessagesTimeline.tsx(around line 4413), andChatMarkdownpasses bareremarkGfminCHAT_MARKDOWN_REMARK_PLUGINSandCHAT_MARKDOWN_REMARK_PLUGINS_WITH_BREAKS(apps/web/src/components/ChatMarkdown.tsxlines 495–506), whose strikethrough extension defaults tosingleTilde: true. - Evidence provenance: observed
- Local verification: reproduced
- Reproduction completeness: complete
The observed primary evidence is the local headless render with the locked parser versions and the local run of the composer parser; the in-app rendering is supplied by the reporter's screenshot. Local reproduction covers the third-party remark plugins on the user-message path (remark-gfm, remark-breaks; UserMessageBody passes parseRawHtml={false}, so ChatMarkdown applies no rehype plugins); T3 Code's own remark plugins in ChatMarkdown and the app itself were not exercised locally, so the in-app symptom rests on the supplied screenshot.
Note: GitHub's own Markdown API (POST /markdown, mode=gfm) also strikes single-tilde pairs for this string, so the expected behavior here rests on T3 Code's own rich composer dialect, not on GitHub rendering parity.
Restoration check
Failing: in rich text mode, sending Install the skill as ~/folder-a/skills/x, then follow the guide (~/folder-a/guide.md). produces a user message in the timeline with a struck-through span and missing tildes. Passing: the same sent message renders both tildes literally with no strikethrough, matching the composer. Controls: a prompt containing ~~struck~~ still renders strikethrough in both the composer and the sent message, so strikethrough is not simply disabled; and the stored and provider-bound prompt text stays byte-identical to what was typed (no escaping or rewriting of ~ on send).
Additional context
Open PR pingdotgg/t3code#9021 ("fix(web,mobile): match GitHub strikethrough parsing") changes ChatMarkdown to { singleTilde: false } and patches the mobile renderer; it has no linked issue. Its stated premise that github.com only strikes double tildes did not hold for the Markdown API check above, but its web change would satisfy this report's restoration check. That PR also reports the mobile renderer striking single-tilde pairs more often (for example files in ~/foo and ~/bar); mobile was not investigated here and this report is limited to the web/desktop timeline. Whether assistant messages should also stop striking single tildes is a separate product choice; this report covers text the user typed in the rich composer.
Triage assessment
- Impact level: P3
- Assessment status: supported
- Impact basis: Only the rendered timeline view is wrong (struck span, hidden tildes); the stored prompt, the copy-message text and the text sent to the provider keep the original characters, so no data or workflow result is lost, though the sent message misrepresents what the user typed.
- Workaround status: available
- Workaround basis: Wrapping paths in backticks (
`~/folder-a/guide.md`) renders them as inline code with tildes intact in the locally run renderer; it adds code-span markers to the sent text, and the path characters themselves are unchanged.
Impact
Cosmetic issue
Version or commit
T3 Code (Nightly) 0.0.46-nightly.20261005.2676; source inspected at main @ e22c8804346d4bd45a733803eda826e04e3bbd74
Environment
macOS 27.0, T3 Code (Nightly) desktop app, Claude provider
Logs or stack traces
No response
Screenshots, recordings, or supporting files
No response
Workaround
Wrapping paths in backticks (`~/folder-a/guide.md`) renders them as inline code with tildes intact in the locally run renderer; it adds code-span markers to the sent text, and the path characters themselves are unchanged.
- Lenguaje dominante
- TypeScript
- Estrellas
- 24.8k
- Forks
- 6.4k
- Merge medio
- 7 h 58 min
- PR fusionados (30 d)
- 258
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de pingdotgg/t3code
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
bug via-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
pingdotgg/t3code#16413 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
Todos los issues de pingdotgg/t3code
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
nats-io/nats.docs.v2#101 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
profullstack/ugig.net#601 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
github/codeql-action#4202 ·
Los mantenedores suelen responder en 1 día
-
agents: formatReport/reportOrigin only importable through an entry that loads every runtime (~1.5 s)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día