Repository navigation
fix(shared): Markdown previews show bracketed prose once - #43814
StiensWout wants to merge 10 commits into
Conversation
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
The label group always matches, and a label without tabs has the same width as its length, so the empty-label guard, the separate length check and the tab guard go. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
The heading, blockquote, fence and spaced blank-line rows reach the same interior-CR check as the continuation row. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…prose once Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1814d8f to
34624ae
Compare
EvidenceOpened a fresh synthetic project thread → right panel → Files → release.md → Show rendered markdown. The file contains the bracketed line once, a blank line, and “Publish the notes.” Both runs used the real web app, Replay dev provider, fresh databases, a 1280×800 viewport, and light theme.
Reproduction scenario. scenarios:prove exited 0: fails on base and passes on head. Not shown:
|
…prose once Main's remark-based definition reader (pingdotgg#43807) already rejects invalid labels, so it replaces this branch's one-line matcher. Kept the label tests, kept definition indentation so tabbed labels keep their width, and dropped the scenario that main now passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The automated pipeline ran the reported steps in the real app without this change, and the problem did not appear. So it cannot show that this change fixes anything. What was run on Created a project containing only release.md with exactly '[Release [candidate]: https://example.com/releases\n\nPublish the notes.\n'. Created and opened a Replay thread, opened the right panel, selected Files, clicked release.md, and clicked Show rendered markdown. Captured the preview and checked that the bracketed line appeared once. Both sides displayed it once, followed by Publish the notes. The final scenario comparison exited 1 because both sides passed. How: scenarios:prove drove the real web app with fresh isolated server state, a Replay thread, and identical 1280×800 light-theme browser views on both commits. Both final captures were opened and visually inspected. Closing this pull request. If you can share the exact steps, what you see, and the version and platform you are on, it can be reopened. |


Chunked Markdown previews could repeat ordinary text that resembled a link reference definition. The splitter now shares only single-line definitions whose labels meet the renderer’s bracket, whitespace, and length rules. Bare carriage returns inside a candidate keep it out of the shared prefix, while valid definitions with CRLF endings still resolve across chunks.
Related: #43647, #43654, #34144, #23503, #43673, #43709, #43711
Reproduction on main
Commit f08bafe07f (main), in the running web app:
The line [Release [candidate]: https://example.com/releases appears twice, followed by Publish the notes. Expected: The line [Release [candidate]: https://example.com/releases appears once, followed by Publish the notes.
The cause is at
packages/shared/src/markdownChunks.ts:103. Ranpnpm scenarios:prove scripts/scenarios/markdown-bracketed-label-renders-once.e2e.ts --target webwith the repro scenario added: it failed in 2 of 2 runs on a clean checkout, withexpect.toHaveCount failedin the output.Evidence
Environment: The web app in Chromium on Linux x64, a fresh checkout.
Proven: the repro fails at the test commit 6a27adafa1 and passes on the head 0ea50e2e98, both on main 43530f99e7.
Before the fix, recorded:
https://pub-b182a4071edc4521829926b34990540b.r2.dev/files/eb27ba64-ec37-43b6-9be1-d74101641490/before-recording.webm
After the fix, recorded:
https://pub-b182a4071edc4521829926b34990540b.r2.dev/files/c8fa29a9-5001-4649-be0f-7cfc2845ae80/after-recording.webm
Outside view: a person sees it in the running web app by following the steps under Reproduction on main.
Tests
pnpm exec vp run check:changed 43530f99e7ee875fc1eec09d3a6cb7ea34ce70bapassed on head.Not in this change
Who did the work
Made in T3 Code by GPT 6.2 Sol, Claude Opus 5.5, Grok 4.7 and Gemini 4 Neon