Skip to content

Show build progress, task text and continued numbered lists as people read them - #691

Merged
lavaman131 merged 1 commit into
mainfrom
build-display-polish
Oct 19, 2026
Merged

lavaman131 merged 1 commit into
mainfrom
build-display-polish

Conversation

@lavaman131

@lavaman131 lavaman131 commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Three display problems showed up in a real hosted build. This fixes each one where it starts.

Task text in Build shows raw Markdown

Task titles, goals, acceptance criteria, summaries and the "After …" line were plain text, so an agent's `code` and **bold** appeared with their backticks and asterisks. They now go through a new InlineMarkdown component in apps/web/src/chat/markdown.tsx. It uses the same renderer and allowlist as Chat, limited to inline elements: code spans, emphasis, strong text and links. Raw HTML and images are dropped, and a leading 1., -, # or > stays literal so one line stays one line. A task title sits inside its toggle button, so links in a title render as plain text. Inline code uses Chat's inset chip at the surrounding text size.

The progress line shows the agent's raw shell command

The connector sent the latest ACP tool-call title as build progress. For a shell tool that title is the command itself, for example sleep 900; git -C $CHOPIN_RUN_WORKTREES/… status --short. The new activityText in @chopin/protocol/activity now decides what the line says:

  • The connector remembers each tool call's kind. An execute call reads "Running a command" unless its title is already a sentence, such as "Running server tests".
  • The server applies the same rule to every renew_implementation_build heartbeat without the kind. Commands from connectors that are already installed stay off the line too.
  • Text that looks like a credential (known token prefixes, Bearer …, long key-like runs) becomes a generic label. Long text is cut to 80 characters.

The raw command is not shown anywhere, including on hover.

Chat flattened numbered items 3–5 of the task-graph message

The message used lead-in lines with no blank line before each list:

Needs task 1 first:
3. rewire-handler: …

CommonMark lets only a list that starts at 1 interrupt a paragraph. So items 3, 4 and 5 were lazy continuation text, and the list rendered as "Needs task 1 first: 3. rewire…". The renderer followed the spec, but Chat is Chopin's own small dialect, so the fix is on the renderer side. A small remark step (apps/web/src/chat/ordered-runs.ts) splits such a paragraph into its lead-in and an ordered list that keeps its starting number. It checks the source, so escaped markers (3\.) and code spans stay as written.

Before and after

Screenshots come from the new e2e tests: unfixed main first, then this branch. They show generic test data only.

Before: task text in Build shows raw backticks, asterisks and link syntax

After: task text renders inline code, emphasis and links

Before: the progress line shows the agent's raw shell command

After: the progress line says Running a command

Before: Chat flattens numbered items 3 to 5 into paragraphs

After: each continued run renders as a list that keeps its number

Tests

New tests failed first on unfixed code:

  • packages/protocol/activity.test.ts
  • apps/connector/src/run.test.ts: the connector reports "Running a command" and no heartbeat carries the command.
  • apps/server/src/tasks/routes.test.ts: a raw-command heartbeat from an older connector is stored as "Running a command".
  • apps/web/src/chat/markdown.test.ts: continued numbered lists, and inline Markdown.
  • e2e: Build shows an agent's inline Markdown in task text as formatting, a sent message keeps numbered items after a lead-in line as a list, and the build owner sees activity…, which now drives a raw-command tool call through the fake implementer.

Checks run on the rebased head:

  • bun test apps/web packages apps/server: 6015 tests, 0 fail.
  • bun test apps/connector/src/run.test.ts: 30 tests, 0 fail.
  • bun run types and bun run ci both pass.
  • implementation-launcher.e2e.ts and chat-composer.e2e.ts in Chromium: one test failed on the first full run because my own new test expected the wrong code spans. I fixed the test, and the new and changed tests then passed. I did not re-run both files in full afterwards.

The design-contract hash for chat/markdown.tsx is renewed. Its reviewed boundary, MessageMarkdown passing on className, is unchanged.

Experiment progress (renew_experiment) picks up the connector-side fix. The server-side check covers build heartbeats only.

… read them

The Build tab showed task titles, goals and criteria as plain text, so the
backticks and asterisks an agent writes appeared literally. They now render
Chat's inline Markdown (code spans, emphasis and links) through a shared
InlineMarkdown component. Text that would open a block stays one line of
text, and a task's title, which sits inside its toggle button, keeps links
as text.

The build's progress line showed the coding agent's latest tool title. A
shell tool is titled with its raw command, so it showed lines such as
"sleep 900; git -C $CHOPIN_RUN_WORKTREES/... status --short". The connector
now remembers each tool call's ACP kind and reports a shell command as
"Running a command" unless its title reads as a sentence. Chopin applies the
same rule to every heartbeat, without the kind, so older connectors' commands
stay out of view too. Secret-looking text never reaches the line, and long
text is cut at 80 characters.

Chat flattened a numbered list that continued after a lead-in line
("Needs task 1 first:" then "3. ..."). CommonMark lets only a list that
starts at 1 interrupt a paragraph, so items 3 to 5 became paragraph text.
A small remark step now splits such paragraphs into the lead-in and an
ordered list that keeps its starting number. Escaped markers and code are
left alone.

The design-contract hash for apps/web/src/chat/markdown.tsx is renewed: its
reviewed className boundary on MessageMarkdown is unchanged.

Assistant-model: Claude Opus 5.5 (fast)
Assistant-workflow: inline (fast subagents)
Assistant-verification: bun test apps/web packages apps/server passed
Assistant-verification: bun test apps/connector passed
Assistant-verification: bun run types and bun run ci passed
Assistant-verification: affected Chromium e2e passed; new tests failed on main first
Co-authored-by: Alex Lavaee <alexlavaee@microsoft.com>
@lavaman131 lavaman131 self-assigned this Oct 19, 2026
@lavaman131
lavaman131 merged commit 94ef22b into main Oct 19, 2026
24 checks passed
@lavaman131
lavaman131 deleted the build-display-polish branch October 19, 2026 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant