GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fix(shared): Markdown previews keep first references with next-line destinations by StiensWout · Pull Request #43807 · pingdotgg/t3code Conversation
Contributor
Chunked Markdown previews could open a later URL when the first reference definition put its destination on the next line. The chunker now collects complete definitions in document order using bounded batches and preserves their labels, destinations, and titles. It distinguishes a separate quote-led paragraph from a continued title and keeps later duplicates from overriding a confirmed oversized title in its source chunk. Related: #43647, #43654, #23503, #43673, #43709, #43711 Reproduction on mainCommit f08bafe07f (main), in the running web app:
The link opens https://example.com/previous, the address from the later one-line reference. Expected: The link opens https://example.com/current, the address from the first reference. The cause is at EvidenceEnvironment: The web app in Chromium on Linux x64, a fresh checkout. Proven: the repro fails at the test commit 91523cf9fc and passes on the head 14abf45ce3, both on main 6252f1f203.
Before the fix, recorded: After the fix, recorded: Outside view: a person sees it in the running web app by following the steps under Reproduction on main. Tests
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
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsCo-authored-by: GPT 6.2 Sol <[email protected]> …estinations Co-authored-by: GPT 6.2 Sol <[email protected]> …a duplicate parameter Co-authored-by: Claude Opus 5.5 <[email protected]> …y passes Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: GPT 6.2 Sol <[email protected]> …otnote comment as it was Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: GPT 6.2 Sol <[email protected]> Co-authored-by: GPT 6.2 Sol <[email protected]> …at uses it Co-authored-by: Claude Opus 5.5 <[email protected]> …oving it Co-authored-by: Claude Opus 5.5 <[email protected]>
|
There was an error while loading. Please reload this page.
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
| Layer / File(s) | Summary |
|---|---|
Parse reference definition runs packages/shared/src/markdownChunks.ts |
Remark parsing identifies link definitions and their source spans. Run scanning recognizes definition boundaries, display-math openers, and the shared-definition size limit. |
Integrate definition spans and validate rendering packages/shared/src/markdownChunks.ts, packages/shared/src/markdownChunks.test.ts, scripts/scenarios/markdown-first-multiline-definition.e2e.ts |
splitMarkdown tracks parsed definition spans and omits definitions that exceed the shared limit. Unit and end-to-end tests cover multiline definitions, chunk boundaries, and rendered links. |
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Bug fix
Suggested reviewers: juliusmarminge, saphid
14abfMarkdown previews now resolve multiline link reference definitions to the first definition's destination. No concrete merge-blocking risk was identified, and the change is easy to revert if needed.
Explanation
The title names the fix and its scope: Markdown previews in the shared package now keep the first link reference when its destination is on the next line. The changeset adds multiline reference-definition parsing in markdownChunks.ts and a matching test, so the title covers the main change. It is 80 characters, slightly long but within a readable range, and it follows the conventional commit format.
Explanation
The description follows the template's sections (Problem, Change, Scope, Verification) and fills them with specific content. The Problem is covered by the reproduction steps and the expected behavior. The Change explains the bounded batch collection, label, destination, and title preservation, and the quote-led paragraph distinction. The Scope links related issues and the Verification section gives concrete commands, commit hashes, and before/after results. Minor gaps: the Problem section is not a separate heading with a one or two sentence statement, and the Scope section does not state explicitly why the change is a bug fix rather than a feature. The Verification section also lists tests run, and the 'Not in this change' section is an extra section not in the template. These gaps are non-critical, so the check passes.
f2716248-3f23-4009-8dad-65d407c102b0packages/shared/src/markdownChunks.test.tspackages/shared/src/markdownChunks.tsscripts/scenarios/markdown-first-multiline-definition.e2e.tsIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
EvidenceCreated the reported long Markdown document with a next-line first reference destination and a later one-line duplicate. Opened its rendered file preview and hovered Release notes. Environment on both sides: Chromium, 1280×800, light theme, fresh database, synthetic project and Replay thread. The scenario runner exited 0: base used https://example.com/previous; head used https://example.com/current. Both the app tooltip and anchor href confirmed the difference.
Not shown:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
…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 <[email protected]>
…estinations (pingdotgg#43807) Co-authored-by: Julius Marminge <[email protected]> (cherry picked from commit 3ebc46f)
…estinations (pingdotgg#43807) Co-authored-by: Julius Marminge <[email protected]> (cherry picked from commit 3ebc46f)
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.