Registry Mirror
Skip to content

Conversation

@only21mil

Copy link
Copy Markdown
Contributor

Problem

When a user message contains angle-bracket text such as <Button> or Promise<string>, the timeline minimap tooltip and jump button aria-label strip those tags instead of matching the literal text rendered in the message bubble.

Change

UserMessageBody renders user messages with parseRawHtml={false} (escapeHtml: true), whereas markdownTree in apps/web/src/markdown/wordsHast.ts had no escapeHtml option, so markdownPlainText called it with raw-HTML parsing enabled. This adds optional escapeHtml?: boolean to markdownTree, threads it through markdownPlainText and markdownMinimapPreview, and passes { escapeHtml: true } for userText in resolveTimelineMinimapPreview. Autolinks like <t3-thread://...> still parse as links, and assistant previews and turnDetailAnnouncement.ts stay unchanged.

Scope

Small bug fix for dropped angle-bracket text in timeline minimap previews of user messages; no issue needed.

Verification

Setup: Ubuntu 26.04.1 LTS (Linux x86_64), dark theme, 1280x800 viewport, fresh isolated dev state on each commit.

Steps: Open pairing URL → window.t3dev.replay("multi-turn") → send Fix <Button> focus and Promise<string> handling → focus minimap jump button and press End.

Before (7b7ca65f9a02) After (7e3dfdab30ad)
Minimap tooltip strips <Button> and <string>, showing "Fix focus and Promise handling".
Minimap tooltip strips <Button> and <string>, showing "Fix focus and Promise handling".
Minimap tooltip keeps <Button> and Promise<string> literal, matching the user message bubble.
Minimap tooltip keeps <Button> and Promise<string> literal, matching the user message bubble.

Jump button aria-label: Jump to message: Fix focus and Promise handling on 7b7ca65f9a02 → Jump to message: Fix <Button> focus and Promise<string> handling on 7e3dfdab30ad.

Links: 7b7ca65f9a02, 7e3dfdab30ad, apps/web/src/components/chat/timelineMinimapItems.test.ts

Not shown:

  • Desktop Electron wrapper (renders the same apps/web bundle)
  • Mobile (no timeline minimap on main)
Automated checks
  • Fail-first (7b7ca65f9a02): vp test run apps/web/src/components/chat/timelineMinimapItems.test.ts failed with "Fix focus and Promise handling in a thread".
  • Focused tests (7e3dfdab30ad): timelineMinimapItems.test.ts + wordsHast.test.ts passed (2 files, 113 tests).
  • vp run check:changed 7b7ca65f9a02b63df912168cea04c5a5f4d055c1 (7e3dfdab30ad): passed (format, lint, knip, typecheck, test, react compiler).

Generated with Gemini 4 Neon in T3 Code Nightly

User messages render with parseRawHtml={false}, so angle-bracket text like <Button> and Promise<string> appears literally in the message bubble, but the timeline minimap parsed user text with raw HTML enabled and stripped those tags. Forward optional escapeHtml through markdownTree and pass { escapeHtml: true } when building user-message minimap previews while keeping autolinks intact and leaving assistant previews unchanged.
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Dec 3, 2026
@macroscopeapp

macroscopeapp Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 7e3dfda

Macroscope's review found this PR approvable — Preserves angle-bracket text in user-message minimap previews while leaving assistant previews and existing parser defaults unchanged. The change is limited to display text and carries no obvious material risk.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

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

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 7e3dfda and 1b2b682.

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

The Markdown preview helpers now accept and forward an HTML-escaping option. User-text minimap previews enable it. A test covers ordinary angle-bracket text and thread autolink rendering.

Changes: User-text minimap previews

Layer / File(s) Summary
Markdown parsing option propagation
apps/web/src/markdown/wordsHast.ts, apps/web/src/components/chat/timelineMinimapItems.ts
markdownTree accepts an escapeHtml option. The minimap preview helpers accept and forward this option.
User-text preview escaping
apps/web/src/components/chat/timelineMinimapItems.ts, apps/web/src/components/chat/timelineMinimapItems.test.ts
User-text previews enable HTML escaping. A test checks that angle-bracket text remains literal and a thread autolink renders as “a thread.”

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested reviewers: iamshadmantaqi, saphid

Merge Risk: Minimal · previous review 7e3df

User-message minimap previews and their accessibility labels now keep literal angle-bracket text, matching the message bubble. Assistant previews are unchanged. No merge-blocking risk is apparent.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the timeline minimap now keeps angle-bracket text in user messages. It follows the conventional commit form with a fix(web) scope. The changeset adds an escapeHtml opt…
Description check Passed The description follows the repository template. It has Problem, Change, Scope, and Verification sections. The Problem section explains the dropped angle-bracket text and expected behavior. The Change…
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: the timeline minimap now keeps angle-bracket text in user messages. It follows the conventional commit form with a fix(web) scope. The changeset adds an escapeHtml option to markdownTree, markdownPlainText, and markdownMinimapPreview, and enables it for user text previews, which matches the title.

Full details: Description check

Explanation

The description follows the repository template. It has Problem, Change, Scope, and Verification sections. The Problem section explains the dropped angle-bracket text and expected behavior. The Change section explains the escapeHtml threading and why it is needed. The Scope section says it is a small bug fix and that no issue is needed. The Verification section gives focused test results, before and after screenshots, and the commit links. It also states what was not shown (Desktop wrapper and mobile). The template asks for a model and harness line at the end, and the description includes a Generated with line, so the required information is present. The description includes a Linux-specific environment and a fork commit link (only21mil), which do not affect the check outcome.

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

Commits

Reviewing files that changed from the base of the PR and between 7b6a2c9 and 7e3dfda.

Files selected for processing: 3

  • apps/web/src/components/chat/timelineMinimapItems.test.ts
  • apps/web/src/components/chat/timelineMinimapItems.ts
  • apps/web/src/markdown/wordsHast.ts

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

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Dec 3, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

Evidence

Scenario: Timeline minimap preserves angle brackets in user messages

The same scenario ran against both commits with a fresh seeded database and the Replay (dev) provider.

Before bf0694e4c4 After 1b2b682dbe
Result ❌ The Jump to message aria-label is Jump to message: Fix focus and Promise handling in a thread; <Button> and <string> are missing. The tooltip also omits them. ✅ The Jump to message aria-label retains <Button> and Promise<string> and summarizes the thread link as a thread; the tooltip shows the same literal angle-bracket text.
Capture Before minimap angle brackets After minimap angle brackets

Driver: minimap-angle-brackets.e2e.ts

@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 Dec 3, 2026
@juliusmarminge
juliusmarminge merged commit 82eacef into pingdotgg:main Dec 3, 2026
57 checks passed
@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Dec 3, 2026
M-Agha added a commit to M-Agha/t3code that referenced this pull request Dec 4, 2026
…en, not as a tag

A question asked through t3_question read "feature/-web-quotes-only-batches" on the card: the
stored `feature/<key>-web-quotes-only-batches` went through ChatMarkdown with raw HTML parsed, and
`<key>` was taken for a tag and dropped.

- The card's and the Tracker's question, context, option details and reason, a reply's question
  and Pick reason, an answered row, Decided without asking and Parked rows render with
  parseRawHtml={false} (upstream's own switch, as user messages use): markdown stays, raw HTML
  shows as written.
- Every pin's line escapes raw HTML (markdownPlainText with escapeHtml, upstream's option since pingdotgg#48246).
- Show in the chat quotes the text as the chat renders it (replyQuote, markdownPlainText without
  escapeHtml) for reply questions, Decided rows, agent pins and unread label lines, so a quote
  with `<key>` still finds its line in the rendered reply.
- Key words, option labels, pick, Blocks and an answer were already plain text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants