Hide the code block header label when a fence has no language
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 82/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- frontend
调研方向
从 apps/web/src/components/chat/MarkdownCodeBlock.logic.ts 中的 extractFenceLanguage 开始,当不存在 language-* 类时它会回退为 "text"。然后检查 MarkdownCodeBlock.tsx 中的 MarkdownCodeBlockTitleContent,它将该值渲染为标题标签。完成标准是:无语言标记的代码块不显示标签,而显式标注 text 的代码块仍显示标签,并且高亮的默认设置保持不变。
由索引模型根据 Issue 内容生成。
描述
What happened
A fenced code block with no language (bare ```) renders with a header label reading "text". Seen in the PR overview in the desktop app.
Expected: no language label when the fence specifies none (plain-text highlighting can stay as the internal default).
I know, this is super minor 🫣, but I did a double take because I thought something in our CI pipeline that writes this block had changed.
Diagnosis
extractFenceLanguage (apps/web/src/components/chat/MarkdownCodeBlock.logic.ts) falls back to "text" when the fence has no language-* class. That value is used for highlighting and also passed on as the display language. MarkdownCodeBlockTitleContent (MarkdownCodeBlock.tsx) renders it as the header label; "text" has no specific icon, so it shows as the plain word. A bare fence is therefore indistinguishable from an explicit ```text. Same code on v0.1.10-nightly.20261113.4630. Suggested fix: hide the label when no language was given. No language guessing is needed.
Steps to reproduce
- Open a PR whose description contains a fence with no language, e.g. a bare ``` block containing an image tag like cognigydevelopment.azurecr.io/vg-connector:feature-...
- Open the PR overview in the desktop app.
- The code block header shows "text".
Version
0.1.9 (local server, tag v0.1.9). Appears unchanged on v0.1.10-nightly.20261113.4630. Earlier builds unknown. Triage CLI: 0.1.9.
Environment
macOS (Darwin 25.6.0) arm64, desktop app against a local server, Node v26.12.1.
Evidence
Code references in the diagnosis. Screenshot to be attached.
Related issues
No matching open or closed issue found.
Fix applied or workaround
None.
Filed by
Claude Code (Sonnet 5.5) via the t3 triage playbook.
- 主要语言
- TypeScript
- 星标
- 24.8k
- 派生
- 6.4k
- 平均合并
- 59 分钟
- 30 天内合并 PR
- 418
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pingdotgg/t3code 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
难度 2/5 半天 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
[Bug]: Settings inheritance popover shows raw slugs for branch naming, default permissions and response streaming可能已有人在做 @juliusmarminge 于 1 天前认领。 未关闭vouch:denounced
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
[Bug]: Message navigation minimap shows a visible vertical track line on custom themes with an opaque border color可能已有人在做 @ixmxvii-hash 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
相似的 Issue
-
Resources: Update work of urumqi可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 65/100
railmapgen/rmp-gallery#4176 ·
维护者通常 2 天内回复
-
GraphQL custom headers duplicate differently cased default headers可能已有人在做 @yxr-2025 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
enhancement sharing & sync
难度 1/5 1 小时以内 新手友好度 62/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
HelpCode-ai/anythingmcp#1659 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复