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(web): follow Markdown heading links with a literal user-content prefix by jadelike-wine · Pull Request #44507 · pingdotgg/t3code Conversation
Contributor
ProblemOpen a rendered Markdown file with headings ChangePrefer the decoded fragment with one sanitizer prefix added. The full ID keeps any literal prefix in the authored heading slug and still matches generated footnote IDs. The existing fallback handles links whose targets use the older fragment forms. ScopeThis is a small, reproducible wrong-target bug in the web Markdown link handler. The two-heading fixture demonstrates it directly, so there is no separate issue. The web handler is also used by the desktop renderer. Verification
markdown-heading-head.webmUsed GPT-6 via Codex desktop.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
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 |
|---|---|
Fragment lookup and regression test apps/web/src/components/chat/markdownFragments.ts, apps/web/src/components/ChatMarkdown.browser.test.tsx |
Lookup checks the sanitizer-prefixed ID before normalized local matches and before the decoded document ID. The test checks that links using both authored fragment forms scroll to their matching headings. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers: juliusmarminge
53fb4This fixes Markdown links to #user-content-... headings so they reach the intended heading, and no merge-blocking risk was found. The change is small and easily reversible.
Explanation
The title names the main change: a fix in the web Markdown link handler so heading links such as #user-content-deployment land on the correct heading when a literal user-content prefix is present. It matches the changeset, which reorders fragment target lookup in markdownFragments.ts and adds a ChatMarkdown browser test. The title follows the conventional commit form and is specific.
Explanation
The description follows the repository template closely. It has Problem, Change, Scope, and Verification sections. The Problem section gives the reproduction steps and the expected behavior. The Change section explains the fix. The Scope section explains why no issue is linked and notes that the desktop renderer shares the handler. The Verification section lists focused tests, a Chromium check with observed results, before/after screenshots, and a recording. It also states what was not run (Electron and native mobile) and names the model used. The description does not link an issue, but it gives a reason for that, as the template allows.
e4ba2f6a-5c2a-443c-aad6-602b6052a44bapps/web/src/components/ChatMarkdown.browser.test.tsxapps/web/src/components/chat/markdownFragments.tsIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…l-fragment-prefix Co-Authored-By: Claude Opus 5.5 <[email protected]>
EvidenceReal web app, 1280×800 viewport, light theme, fresh isolated state on each commit. Created links.md containing both fragment links and both headings separated by 40 filler paragraphs. Opened its rendered Markdown Files preview and maximized the panel. Clicked the ordinary link, returned to the top, then clicked the literal-prefix link.
Scenario and synthetic seed data scenarios:prove exited 0: fails on base and passes on head. All captures and recording contact sheets were visually inspected. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
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.