fix(reporters): keep new-query bullets on separate lines#159
Merged
Conversation
The new-queries loop in success.md.j2 ended each line on a `{% endif %}`
block tag. With nunjucks `trimBlocks: true`, the newline separating
iterations was stripped, gluing consecutive bullets together so Markdown
rendered them as one line (`… no index suggestion- SELECT …`).
End the line with `{{""}}` so the trailing newline survives, matching the
existing guard on the "improves queries" loop.
Fixes #158
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Query Doctor Analysis
3 queries analyzed
0 regressed · 0 improved · 0 new · 0 removed
2 pre-existing issues
SELECT "guests"."id", "guests"."session_id", "guests"."username", "guests"."avatar_path", "guests"."color", "guests"."side", "guests"."audio_recording_path", "guests"."audio_recording_public", "gue...
indexassets(event_id, inserted_at desc)
cost 31,003,449 → 1,498 (100% reduction)SELECT * FROM guest_ip_addresses WHERE ip_address = '127.0.0.1';
indexguest_ip_addresses(ip_address)
cost 154,402 → 8 (100% reduction)
Using assumed statistics (10000000 rows/table). For better results, sync production stats.
More detail → get_ci_run({ runId: "019f1980-303f-7c49-be24-e4c0691455a6" }) · view run · docs
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.
Problem
When the PR comment lists more than one entry under This PR introduces new queries, the bullets render glued onto one line instead of as a list:
Seen on https://github.com/veksen/d2armory-next/pull/836.
Root cause
github.tsconfigures nunjucks withtrimBlocks: true, which strips the newline immediately after any%}block tag. The new-queries loop insuccess.md.j2ended each line on{% endif %}, so the newline separating iterations was consumed and consecutive-bullets ran together — Markdown then can't parse them as a list.Every other loop avoids this: most end on literal text, and the improves queries loop deliberately ends with
{{""}}(an output tag, not a block tag) so the newline survives. The new-queries loop was the only one missing that guard.Fix
Append
{{""}}to the end of the new-queries line, matching the improves-queries loop.Test
Added a
github.test.tscase rendering twodisplayNewQueriesand asserting the bullets stay on separate lines. Verified it fails onmain(reproducesno index suggestion- <code>SELECT …) and passes with the fix.Closes #158
🤖 Generated with Claude Code