Repository navigation
Render bot HTML, images and stable scrolling in the PR reader - #1029
Conversation
PR Summary by QodoRender bot HTML and images with stable PR reader scrolling
AI Description
Diagram
High-Level Assessment
Files changed (42)
|
A press focuses the comment's viewer and the reader scrolled it into view on focus, so the release missed the header: the scroll no longer follows focus, and the row list is edited in place so a page load keeps opened sections and images.
A bare image is display-only so a divider does not open its CDN URL; a tagged width that exceeds the pane is dropped so Uniform can shrink it.
2844b31 to
cfe5aea
Compare
Code Review by Qodo
1.
|
A details body already insets; leaving each dl/dd adds another 14px per level and stacks with nested section margins until lists sit mid-pane.
Assessment items already lead with ➕/➖; a bullet beside them and the emoji on a dark canvas both fight the reader, so those lists become bold +/- paragraphs and nested bodies keep a lighter inset.
The CI linear-id sweep matches AI-<digits> in test sources; the link fixture was not ID data, only sample link text.
Closes #1007, #1008, #1011 — AI-2943, AI-2944, AI-2947
What & why
Bot comments on GitHub (Qodo, CodeRabbit, Copilot, Dependabot, Renovate) are mostly HTML: nested
details,dl/dd, tables,pre, badges and screenshots asimg. The reader showed literal tags, alt-text links and boxes in boxes. The GitHub-flavour pass now folds structural tags across blocks with a depth budget, converts tables and the common wrappers/headings/lists/picture, renders only the outermost section as a card and nested ones as an outline, drops wrappers that draw chrome around nothing (rules at an edge, quotes anddds holding only sections — and anyddinside a details body, which Qodo wraps every section in), and fetches images through one https-only, capped, cached loader — the chat flavour still renders none. A bare image is display-only; only an enclosing openable anchor is clickable. A tagged width that exceeds the pane is dropped so the picture shrinks to fit.Toggling a section jumped the view. The re-render is anchored to the pressed header, but the surviving jump was the reader's scroll bringing the focused viewer into view on press, which moved the header out from under the pointer so the release never toggled it. The reader's scroll no longer follows focus, and the row list is edited in place so a page load or refresh keeps opened sections and loaded images.
Where to look
HtmlBlockFolder(fold with rejection propagation),BlockTidy,MarkdownImages(the one fetch site),MarkdownImage(pane cap and click target), andReconcileRowsin the view model.KcapBorderStrongBrushis a new palette token for a rule that must read acrossKcapBorderBrush-coloured chrome.Verification
dotnet run --project test/Capacitor.App.Tests.Unit/Capacitor.App.Tests.Unit.csproj -- --treenode-filter "/*/*/HtmlStructureTests/*"— 23 passed.GitHubMarkdownViewTests— 32 passed.A_press_on_a_section_header_toggles_it_without_scrolling_the_readerreproduces the jump against the old reader (offset moved 93px on press, header stayed checked) and holds at the same offset now.Visuals
Follow-up
Mermaid fences in the Diagram section still render as code blocks — #1073 / AI-3032.