Skip to content

fix(reporters): keep new-query bullets on separate lines#159

Merged
veksen merged 1 commit into
mainfrom
fix-new-queries-newline
Jun 30, 2026
Merged

fix(reporters): keep new-query bullets on separate lines#159
veksen merged 1 commit into
mainfrom
fix-new-queries-newline

Conversation

@veksen

@veksen veksen commented Jun 30, 2026

Copy link
Copy Markdown
Member

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:

… cost 1 · no index suggestion**- SELECT** "id", … FROM "item_watches" LIMIT 50;

Seen on https://github.com/veksen/d2armory-next/pull/836.

Root cause

github.ts configures nunjucks with trimBlocks: true, which strips the newline immediately after any %} block tag. The new-queries loop in success.md.j2 ended 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.ts case rendering two displayNewQueries and asserting the bullets stay on separate lines. Verified it fails on main (reproduces no index suggestion- <code>SELECT …) and passes with the fix.

Closes #158

🤖 Generated with Claude Code

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>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Query Doctor Analysis

3 queries analyzed

0 regressed · 0 improved · 0 new · 0 removed

2 pre-existing issues

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

@veksen veksen merged commit 887852e into main Jun 30, 2026
6 checks passed
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.

fix(reporters): new-queries list items run together (missing newline)

1 participant