Prerequisites
Install Method
Docker (docker compose up)
Operating System
Linux
Steps to Reproduce
-
docker compose up -d --build and open the chat in a browser.
-
Get the assistant to reply with an indented (nested) markdown list. A reliable prompt is "Reply with exactly this markdown and nothing else:" followed by:
- Backend
- API routes
- Database models
- Frontend
1. First
2. Second
1. Sub
- [ ] Parent task
- [ ] Child task
-
Look at how the reply renders in the chat bubble (and inspect the DOM in DevTools).
The renderer is mdToHtml in static/js/markdown.js; the markdown above is what triggers the bug, regardless of which model/backend produced the text.
Expected Behaviour
Indented items render as an indented nested sub-list inside their parent item, i.e. <li>...<ul>...</ul></li>. Ordered lists keep counting across the whole list, and nested checkboxes stay checkboxes.
Actual Behaviour
- Every indented item drops out of the list passes and renders as flat literal text — a literal
- API routes / - Database models line at the top-level indentation, and a nested - [ ] Child task shows the raw - [ ] ... checkbox syntax as text.
- An ordered list that has an indented sub-item restarts its numbering (the item after the sub-item shows
1. again instead of continuing).
- The ordered-nested case emits invalid HTML: an indented
1. Sub is wrapped as <ol> inside a <p> (<p><ol>...</ol></p>).
Root cause: the list passes in mdToHtml anchor each regex on the absolute start of the line (^(\d+)\. , ^(?:- |\* )...) and group only consecutive marker lines, with no notion of indentation/depth, so any indented item never matches a list pass and falls through to the paragraph pass.
Logs / Screenshots
Before/after screenshots (desktop and mobile) are attached to the PR that fixes this.
Model / Backend (if relevant)
Not relevant — client-side rendering.
Are you willing to submit a fix?
Yes — I can open a PR.
Additional Information
The fix replaces the flatten-and-group list passes with a small indentation-stack builder that opens a child list inside the still-open parent <li> when indentation increases and closes levels when it decreases. Indentation is compared relatively to the parent, so inconsistent 2-/3-/4-space and tab widths nest the same way and mixed ordered/unordered nesting produces valid HTML. PR to follow, targeting dev.
Prerequisites
devbranch (the default branch you get on clone, where fixes land first) and the bug still reproduces there. Pleasegit pullthe latestdevbefore filing.Install Method
Docker (docker compose up)
Operating System
Linux
Steps to Reproduce
docker compose up -d --buildand open the chat in a browser.Get the assistant to reply with an indented (nested) markdown list. A reliable prompt is "Reply with exactly this markdown and nothing else:" followed by:
Look at how the reply renders in the chat bubble (and inspect the DOM in DevTools).
The renderer is
mdToHtmlinstatic/js/markdown.js; the markdown above is what triggers the bug, regardless of which model/backend produced the text.Expected Behaviour
Indented items render as an indented nested sub-list inside their parent item, i.e.
<li>...<ul>...</ul></li>. Ordered lists keep counting across the whole list, and nested checkboxes stay checkboxes.Actual Behaviour
- API routes/- Database modelsline at the top-level indentation, and a nested- [ ] Child taskshows the raw- [ ] ...checkbox syntax as text.1.again instead of continuing).1. Subis wrapped as<ol>inside a<p>(<p><ol>...</ol></p>).Root cause: the list passes in
mdToHtmlanchor each regex on the absolute start of the line (^(\d+)\.,^(?:- |\* )...) and group only consecutive marker lines, with no notion of indentation/depth, so any indented item never matches a list pass and falls through to the paragraph pass.Logs / Screenshots
Before/after screenshots (desktop and mobile) are attached to the PR that fixes this.
Model / Backend (if relevant)
Not relevant — client-side rendering.
Are you willing to submit a fix?
Yes — I can open a PR.
Additional Information
The fix replaces the flatten-and-group list passes with a small indentation-stack builder that opens a child list inside the still-open parent
<li>when indentation increases and closes levels when it decreases. Indentation is compared relatively to the parent, so inconsistent 2-/3-/4-space and tab widths nest the same way and mixed ordered/unordered nesting produces valid HTML. PR to follow, targetingdev.