Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

tui3: a reply that is only a number and a full stop draws nothing

未关闭 适合新手
#1,072 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 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 内容生成。

描述

area:chat good first 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

  1. Real binary in tmux, the ask above: the answer row under the chip reads 32. (or the number the model chose).
  2. go test ./internal/tui2/prose -run TestABareNumberedReplyStillDraws passes: a Markdown ordered-list marker with no item body is drawn as the literal text, never as an empty list.
  3. 1. one still draws as a list, and the existing internal/tui2/prose suite 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,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Agent-Field/CodeAF 的其他 Issue

查看 Agent-Field/CodeAF 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。