Skip to content

chat: a landed card quotes the report's first prose line, not its literal first line - #930

Merged
santoshkumarradha merged 3 commits into
devfrom
af/issue-889
Sep 11, 2026
Merged

santoshkumarradha merged 3 commits into
devfrom
af/issue-889

Conversation

@santoshkumarradha

Copy link
Copy Markdown
Member

Closes #889.

A report that opens with a code fence is the model spelling its answer correctly. The card read that literally and quoted the fence marker itself, so the one row that carries the work's own sentence drew "```".

firstProseLine skips leading blank lines and fence markers, with or without a language word after them, and quotes the first line beneath that says something. Two cases it handles on purpose:

  • A report that is nothing but a fenced block quotes its first line inside. The block is then the answer, and skipping the whole fence would quote nothing, which is the emptiness law doing the opposite of its job.
  • An unclosed fence is a fence still being written. Nothing inside one has said anything yet, so the reading continues below it rather than treating the rest of the report as inside a block whose end it cannot see.

A report with no prose at all returns nothing and the row falls back to the subtitle, then to the start stamp, which doneUnder already knew how to do.

Where this came from

This change was written by an aforge lane, not by hand. ~/af-lane.sh 889 ran aforge do on z-ai/glm-5.3 through OpenRouter, unattended on the Spark, and produced the fix, the test, the change entry and the manual pages in about ten minutes for $3.13. I read the diff, rebased it onto dev, and ran the suites. The runbook for that is spark:~/AFORGE-LANES-HOWTO.md.

Proof

Full internal/tui3 on the Spark, plus the untagged e2e words gate and the manual gates:

ok  github.com/Agent-Field/aforge-v2/internal/e2e     0.353s
ok  github.com/Agent-Field/aforge-v2/internal/manual  1.729s
ok  github.com/Agent-Field/aforge-v2/internal/tui3    305.800s

Re-run after the rebase onto eaa3d69de: build, vet, e2e and manual green; touched packages covers tui3 here.

🤖 Generated with Claude Code

santoshkumarradha and others added 2 commits September 11, 2026 16:03
…eral first line

A report that opens with a code fence is the model spelling its answer
correctly; the card reading it literally quoted the fence marker itself
and spent the one row that carries the work's own sentence on punctuation.

firstProseLine skips leading blanks and fence markers and quotes the
first line that says something; a fence-only report quotes its first line
inside, and a report with no prose keeps the emptiness law it already had.

Co-Authored-By: aforge <agentfield-bot@users.noreply.github.com>
…t on

The first-prose-line reader arrived as two functions and a fallthrough — a
walk that stepped into a fenced block, a second walk inside it, and a comment
about a fence still being written. Every answer it gave is the answer one
sentence gives: a blank line says nothing, a fence marker says nothing, and the
first line that is neither is what the work came to. So it is one loop now, and
[mdFenceOpen] is still the only opinion the surface has about what a fence is.

The manual page moved with it. The rule was a paragraph inside the section about
when a task started, which is not a heading anybody asking "why does my card
show three backticks" would ever reach — headings are the search index, and a
page that is correct and unreachable is a page the chat talks over. It has its
own heading now, in the asker's own words, with the card it draws and the row it
used to draw.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The lane numbered its entry 889, which is the issue. The number in the filename
and in `pr:` is what the released changelog links, so an entry filed under an
issue number points a reader at the report rather than at the change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@santoshkumarradha
santoshkumarradha merged commit fb3cd1d into dev Sep 11, 2026
3 checks passed
@santoshkumarradha
santoshkumarradha deleted the af/issue-889 branch September 11, 2026 20:19
@santoshkumarradha santoshkumarradha added the area:chat The v3 surface a person sits in front of (internal/tui3) label Oct 3, 2026
@santoshkumarradha santoshkumarradha added this to the Chat & connections milestone Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:chat The v3 surface a person sits in front of (internal/tui3)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chat: a task card quotes the report's first line literally, so a report that opens with a code fence draws "`" as its outcome

1 participant