tui3: a reply that is only a number and a full stop draws nothing
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 88/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- go, markdown
- 领域
- cli, testing-qa
调研方向
从 internal/tui2/prose/render.go 开始,尤其关注 list 方法,并使用 internal/tui2/prose/bare_number_test.go 中提出的测试复现该失败。运行 go test ./internal/tui2/prose -run TestABareNumberedReplyStillDraws。完成标准是:32. 和 1024. 绘制为字面文本,1. 仍然是列表,并且现有的 prose 测试套件保持通过。
由索引模型根据 Issue 内容生成。
描述
What happens
Ask the chat something whose whole answer is a number, and the model replies 1024. or 32.. The turn folds to ▸ worked 5.1s · thought 0.2s · ctrl+e and nothing stands under it. ctrl+e opens the fold and shows only the thought row. The transcript has the text ("role":"assistant","content":"1024."), and the store has the message row, so the model answered and the surface dropped it.
Paris, 32 (no full stop), a fifteen-word sentence and a three-sentence answer all draw. Only <number>. vanishes.
Why
internal/tui2/prose hands the reply to Markdown, and 32. on a line of its own is an ordered list with one empty item. renderer.list (internal/tui2/prose/render.go, the list method) pushes the marker column, renders the empty item, and pops it with len(r.out) > before false, so the marker is discarded too. The reply renders to zero rows and the deck skips it.
Replication a stranger can run
Unit level, no model:
// internal/tui2/prose/bare_number_test.go
func TestABareNumberedReplyStillDraws(t *testing.T) {
for _, in := range []string{"32.", "1024."} {
if got := strings.TrimSpace(strings.Join(Render(in, Options{Width: 80}), "\n")); got == "" {
t.Errorf("%q rendered to nothing", in)
}
}
}
Fails today on dev (80e985165) and on the shipped d8e9dd6b5: both "32." and "1024." render to "", while "32", "Paris" and "1. one" draw.
Live, any model: bin/codeaf in tmux, type what is 2 to the power 5? reply with only the number followed by a period, nothing else. The model says 32. (check the session's transcript.jsonl); the screen shows the worked chip and no answer.
Acceptance, end to end first
- Real binary in tmux, the ask above: the answer row under the chip reads
32.(or the number the model chose). go test ./internal/tui2/prose -run TestABareNumberedReplyStillDrawspasses: a Markdown ordered-list marker with no item body is drawn as the literal text, never as an empty list.1. onestill draws as a list, and the existinginternal/tui2/prosesuite stays green.
Found on 2026-09-16 while running the journey suite proposed in #1068 against dev; its first journey (what is 2 to the power 10?) timed out waiting for 1024 on screen.
- 主要语言
- Go
- 星标
- 115
- 派生
- 14
- 平均合并
- 9 小时 38 分钟
- 30 天内合并 PR
- 749
环境准备
我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Agent-Field/CodeAF 的其他 Issue
-
area:chat feature
难度 2/5 1-3 小时 新手友好度 88/100
Agent-Field/CodeAF#1510 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
Agent-Field/CodeAF#1489 ·
维护者通常 1 天内回复
-
area:chat bug good first issue sev:papercut
难度 2/5 1-3 小时 新手友好度 78/100
Agent-Field/CodeAF#1470 ·
维护者通常 1 天内回复
-
area:chat bug good first issue sev:papercut
难度 2/5 1-3 小时 新手友好度 85/100
Agent-Field/CodeAF#1469 ·
维护者通常 1 天内回复
-
area:chat bug sev:papercut
难度 2/5 1-3 小时 新手友好度 88/100
Agent-Field/CodeAF#1468 ·
维护者通常 1 天内回复
查看 Agent-Field/CodeAF 的全部 Issue
相似的 Issue
-
security
难度 2/5 1-3 小时 新手友好度 68/100
-
cvss-severity:high devguard l3montree-cybersecurity/...ard-k8s-image-inventory pkg:oci/devguard-k8s-ima...ch=amd64&tag=main-amd64 pkg:oci/devguard-k8s-ima...ch=arm64&tag=main-arm64 risk:low state:open
难度 1/5 1 小时以内 新手友好度 76/100
l3montree-dev/devguard#3094 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 84/100
JuliusBrussee/caveman#1127 · 1 条评论 ·
维护者通常 1 天内回复
-
enhancement low priority
难度 2/5 1-3 小时 新手友好度 85/100
eugenioenko/ttt#674 ·
维护者通常 1 天内回复
-
kind/bug
难度 2/5 1-3 小时 新手友好度 86/100
gpustack/gpustack-operator#640 ·
维护者通常 1 天内回复