fix(ai): ordered lists split by prose no longer restart at "1." - #76
Merged
Conversation
The Markdown renderer broke a numbered list whenever prose appeared between items — e.g. the cross-host summary puts a "Reason: …" line between each step: 1. Host A — do this Reason: … 2. Host B — do that Reason: … Each numbered item ended up in its own <ol>, and a fresh <ol> restarts at 1, so every step rendered "1.". Capture the source number on each ordered-list block and emit <ol start=N> so the steps render 1., 2., 3., … (contiguous lists are unaffected). Adds parser regression tests for the split-by-prose case. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WDoCrduJx7h9Dv8XaTqrSr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a Markdown rendering bug in the AI panels: a numbered list interrupted by prose rendered every item as "1.".
The cross-host summary (and any "game plan") puts a
Reason:line between numbered steps:The interleaved prose ended each
<ol>, so every step became its own single-item<ol>— and a fresh<ol>restarts at 1, so the UI showed1.1.1.…Fix
Capture each ordered-list item's source number on the block and emit
<ol start={N}>, so steps render1.,2.,3., … even when split by prose. Contiguous lists are unaffected. Adds parser regression tests for the split-by-prose case.Testing
npm test→ 614 passing (adds 2 markdown-parse cases);npm run typecheck,npm run lint:kb,npm run build— all clean.🤖 Generated with Claude Code