GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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

@jadelike-wine

@jadelike-wine jadelike-wine commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Problem

Open a rendered Markdown file with headings Deployment and User Content Deployment in that order. Clicking [Open user content deployment](#user-content-deployment) jumps to Deployment. Stripping every user-content- prefix makes the two heading IDs compare equal.

Change

Prefer 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.

Scope

This 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

  • In Chromium at 1280×800, opened the same deployment-guide.md in T3's rendered workspace file preview and clicked its table-of-contents link. vp run scenarios:prove showed Deployment on base b70db32d72 and User Content Deployment on head 53fb44de75.
  • The new ChatMarkdown browser test saw both clicks hit Deployment before the change and each click hit its own heading afterward. The ChatMarkdown, slug, and FilePreviewPanel suites passed all 92 tests, including cross-chunk footnote navigation.
  • vp run check:changed b70db32d72 passed formatting, lint, the selected 63 tests, two package typechecks, Knip, and the React Compiler check. The integrated run used the web client. Electron and native mobile were not run.
Before After
Wrong Deployment heading after clicking the link Correct User Content Deployment heading after clicking the link
markdown-heading-head.webm

Used GPT-6 via Codex desktop.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jadelike-wine
fix(web): follow Markdown heading links with a literal user-content p…
53fb44d
…refix
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 27, 2026
@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: main
  • File: .coderabbit.config.ts
  • Commit: 53845d9
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f3d336f4-a527-4412-8920-1708f5c693d7
Commits

Reviewing files that changed from the base of the PR and between 53fb44d and f130cc4.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

Fragment target lookup now checks sanitizer-prefixed IDs before other matches. A browser test verifies that links using both #deployment and #user-content-deployment scroll to their matching headings.

Changes: Markdown fragment navigation

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

Merge Risk: Minimal · previous review 53fb4

This 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.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed 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 …
Description check Passed 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 Chang…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

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.

Full details: Description check

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.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: main
  • File: .coderabbit.config.ts
  • Commit: ce56dfe
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e4ba2f6a-5c2a-443c-aad6-602b6052a44b
Commits

Reviewing files that changed from the base of the PR and between ce56dfe and 53fb44d.

Files selected for processing: 2

  • apps/web/src/components/ChatMarkdown.browser.test.tsx
  • apps/web/src/components/chat/markdownFragments.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 27, 2026
@juliusmarminge @claude
Merge remote-tracking branch 'origin/main' into codex/markdown-litera…
f130cc4
…l-fragment-prefix

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@juliusmarminge

juliusmarminge commented Nov 27, 2026

Copy link
Copy Markdown
Member

Evidence

Real 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.

Before After
Commit 53845d9e9a f130cc497d
Result Literal-prefix link incorrectly lands on Deployment Literal-prefix link correctly lands on User Content Deployment
Ordinary deployment link Before: ordinary link lands on Deployment After: ordinary link lands on Deployment
Literal-prefix link Before: wrong Deployment heading After: correct User Content Deployment heading
Failure capture Before: wrong heading remains visible at assertion failure Passed
Recording Before interaction After interaction

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge added takeover:ready Takeover done; auto-lands when gates pass and removed takeover:in-progress A takeover lead is working on this PR labels Nov 27, 2026
@juliusmarminge
juliusmarminge merged commit 2929c2c into pingdotgg:main Nov 27, 2026
57 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Nov 27, 2026
@omegent-app omegent-app Bot mentioned this pull request Nov 28, 2026
Merge upstream main through 0f78747290a1 patroza/t3code#688
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@jadelike-wine @juliusmarminge
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.