Skip to content

fix(web): render Markdown in pending question cards - #18460

Open
steventhanna wants to merge 9 commits into
pingdotgg:mainfrom
steventhanna:fix/question-card-markdown-v2
Open

steventhanna wants to merge 9 commits into
pingdotgg:mainfrom
steventhanna:fix/question-card-markdown-v2

Conversation

@steventhanna

@steventhanna steventhanna commented Oct 12, 2026 •

Copy link
Copy Markdown

Fixes #11132.

Pending question cards render Markdown as literal text, so a login prompt such as [Linear login link](URL) exposes the URL instead of a clickable label. This is a focused fix for that existing renderer defect on the V2 composer.

Use the existing ChatMarkdown renderer unchanged for questions and option content. Pass the workspace and scoped thread context through both composer entry points. Use the same renderer for the collapsed preview and clip it to one line, keep raw answer values unchanged, and place link/citation controls beside the selection button so a link cannot select or advance an answer.

The defect is a missing renderer boundary. Required context props enforce correct wiring at compile time; Markdown output and pointer behavior require runtime rendering and interaction checks.

Verification

  • vp test run --project unit for ComposerPendingUserInputPanel.{markdown,navigation,permissions}.test.tsx, ComposerPendingUserInputPanel.test.tsx, and ChatMarkdown{,.permissions}.test.tsx: 6 files, 118 tests passed.
  • Web typecheck (tsc-rs --noEmit): passed.
  • Targeted lint: passed; warnings remain in existing renderer and effect code.
  • Formatting and git diff --check: passed.
  • Disabled dismissal follow-up: real card browser fixture confirms pointer clicks on the disabled X do not collapse or expand the card. The enabled X invokes dismissal once without toggling. The shared Button disabled behavior stays unchanged.
  • Scroll follow-up: the real question card and renderer, mounted with a synthetic browser prompt, scrolled tables in both labels and descriptions. A scrollbar drag changed horizontal position from 150 to 261.5 pixels without selecting or advancing an answer. No native scroll verification is claimed.
  • vp run --filter @t3tools/desktop build: passed.
  • Independent Codex review of an earlier renderer revision found no remaining P1/P2 findings at that point. Later automated findings prompted the media and scroll follow-ups.

Integrated V2 checks

Used an isolated repository .t3 database with synthetic pending-question fixtures and harmless example links. No live user database was modified.

  • Native macOS Electron app: confirmed formatted question/option content; mouse and keyboard Enter open the in-app browser without changing answer state; citation clicks open the quote without selecting the option; a single-choice answer advances, while a multiple-choice answer stays on the same question.
  • Web client: confirmed the same link/answer behavior, readable collapsed text, and no horizontal overflow at a 520px viewport.
  • Native screenshots compare the original component with the restored fix in the same fixture. The native video shows an option link opening the in-app browser and a citation opening its quote while the selected answer and question remain unchanged.

These are UI fixture checks, not a provider-generated request/answer round trip. Unit tests cover scoped relative file-link destinations; integrated file-preview opening was not confirmed. Mobile uses a separate client and was not changed or tested.

Eight regression cases cover HTML breaks, block elements, inline tags, entities, and sanitized script content. The collapsed preview retains the exact expanded renderer output. It is inert and sits outside the disclosure button; the button references its text for screen readers. No custom parser, text extraction, or renderer mode remains. ChatMarkdown.tsx is unchanged from the base branch. A regression test also preserves separate option-description paragraphs.

Evidence

Native macOS: before

Raw Markdown in the original native question card

Native macOS: after

Rendered Markdown in the fixed native question card

Native mouse interactions (20 seconds)

The option help link opens the in-app browser. The citation opens its quote. The selected answer and question stay unchanged.

native-interactions-verified.mov

Web: before

Raw Markdown in the original web question card

Web: after

Rendered Markdown in the fixed web question card

Native macOS: collapsed preview

Collapsed question uses the same Markdown renderer

Web: narrow viewport

Question card at a 520px viewport

Web link interaction recording

79ebd979-c1fe-446e-9eda-b2b29e2c99eb-d653d52f-4eba-403c-89aa-b88bf69dbca9-mp4.mp4

Model: GPT-6.1-Sol. Harness: Codex in T3 Code.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Oct 12, 2026

Copy link
Copy Markdown
Member

Note

This comment is posted by Julius' dot

The description says the native and web evidence is attached, but neither the body nor the conversation currently contains it. Please attach the before/after screenshots and the recording showing that option links and citations open without selecting or advancing an answer, as required by the verification guide. This can stay in draft while you add them.

@steventhanna
steventhanna marked this pull request as ready for review October 12, 2026 02:30
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T06:12:16.153291Z 1fcd046 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@juliusmarminge juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Oct 12, 2026 — with ChatGPT Codex Connector
@macroscopeapp

macroscopeapp Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This focused web fix changes pending-card rendering and hit-testing to enable Markdown links, media, and formatting, with meaningful production interaction impact. Unresolved comments identify concrete concerns around media clicks, disabled dismissal behavior, and mobile parity that require human review.

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

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Oct 12, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 284dfd753a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/web/src/components/chat/ComposerPendingUserInputPanel.tsx Outdated
@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 12f5242d-476b-40bc-9bf2-bca10f60d4df





📥 Commits

Reviewing files that changed from the base of the PR and between 9fb9bfa and c55eccf.






📒 Files selected for processing (1)
  • apps/web/src/components/chat/ComposerPendingUserInputPanel.tsx





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







📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

Pending question cards render Markdown in expanded questions, collapsed previews, option labels, and descriptions. The composer passes the working directory and routed thread reference to both panel layouts. The card separates its disclosure trigger and option controls from Markdown content.

Changes

Pending question Markdown

Layer / File(s) Summary
Markdown context propagation
apps/web/src/components/chat/ChatComposer.tsx, apps/web/src/components/chat/ComposerPendingUserInputPanel.tsx, apps/web/src/components/chat/ComposerPendingUserInputPanel.test.tsx, apps/web/src/components/chat/ComposerPendingUserInputPanel.navigation.test.tsx, apps/web/src/components/chat/ComposerPendingUserInputPanel.permissions.test.tsx
The panel and prompt card accept cwd and threadRef. ChatComposer passes them to the expanded and mobile-collapsed panels. Test fixtures supply the new props.
Question and option rendering
apps/web/src/components/chat/ComposerPendingUserInputPanel.tsx, apps/web/src/components/chat/ComposerPendingUserInputPanel.markdown.test.tsx, apps/web/src/components/chat/ComposerPendingUserInputPanel.navigation.test.tsx, apps/web/src/components/chat/ComposerPendingUserInputPanel.permissions.test.tsx
Questions, collapsed previews, option labels, and descriptions render through ChatMarkdown. The card separates the disclosure trigger and option controls from Markdown content. Tests cover formatting, links, option values, keyboard and multi-select behavior, navigation, permissions, and disabled responses.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix · Severity of issue fixed: Low

Suggested reviewers: juliusmarminge












Merge Risk: ⚪ Minimal · up to c55ec

Pending question cards now render Markdown with workspace and thread context while keeping answer controls separate. No material user-facing regression is established.

Security Architecture Review

Security architecture risk: 🔵 Low · up to c55ec

The change reuses existing rendering controls and separates links from answer selection. No authorization bypass or unintended answer submission was established. File and media access, cross-thread navigation, and some keyboard interactions were not fully verified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — Control over pending Markdown can now reach browser, file, media, citation, and thread-navigation presentation paths. Workspace media uses the caller's environment and thread identity; citations can carry destination identifiers. Effective downstream authorization remains only partially established.

Trust Boundaries and Controls

  • observed — The renderer derives environment authority from caller-supplied context and checks preview and host-operation capabilities for applicable actions. Context references remain labels without an explicit rendering callback; thread-link lookup is scoped to the current environment.
  • observed — Opening a file chip delegates to scoped right-panel state. The file-preview consumer uses filesystem-read access and a project-file query, but the complete server enforcement chain was not inspected. Citation destinations render through environment-scoped thread state; navigation alone does not establish authorization.

Resilience and Maintainability Implications

  • observed — The terminal answer path independently rechecks orchestration permission, exact pending-request identity, and resumability. It deduplicates in-flight responses by environment, thread, and request, reports failures, and clears responding state after completion so recovery can proceed.
  • inferred — Sibling selection and Markdown controls provide structural separation against link-driven answer changes. The inspected regression test checks bubbling link clicks for single- and multi-select without toggling or advancement; citation activation and focused-link Enter still lack independent runtime confirmation in this pass.







Pre-merge checks | Passed 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check Passed The changes satisfy the coding requirements in issue #11132. ComposerPendingUserInputPanel uses ChatMarkdown for expanded questions, collapsed previews, option labels, and descriptions. The previe…
Out of Scope Changes check Passed The changes stay within issue #11132. Context propagation, renderer integration, collapsible preview behavior, option interaction handling, and regression tests directly support the pending-question M…
Title check Passed The title clearly and concisely identifies the main change: rendering Markdown in pending question cards.
Description check Passed The description explains the problem, implementation, scope, verification results, limitations, and UI evidence. It does not use the template's exact Problem, Change, or Scope and approval headings, b…



✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR









  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@macroscopeapp
macroscopeapp Bot dismissed their stale review October 12, 2026 02:59

Dismissing prior approval to re-evaluate f9dea9f

@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Oct 12, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Oct 12, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2ea6134518

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/web/src/components/chat/ComposerPendingUserInputPanel.tsx Outdated
@macroscopeapp
macroscopeapp Bot dismissed their stale review October 12, 2026 03:44

Dismissing prior approval to re-evaluate 34b71e7

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 34b71e77ce

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/web/src/components/chat/ComposerPendingUserInputPanel.tsx Outdated
Comment thread apps/web/src/components/chat/ComposerPendingUserInputPanel.tsx Outdated
Cap collapsed Markdown at one line height and restore pointer events for native video controls in both option fields. Keep ChatMarkdown unchanged.

These layout and pointer-target invariants require browser CSS checks; TypeScript cannot enforce rendered geometry or hit testing. The existing issue pingdotgg#11132 and PR pingdotgg#18460 track the shared question-card boundary.

Validation: 118 focused tests passed; web typecheck, targeted lint, formatting, and diff checks passed. Browser CSS reproduction confirms one-line image/video previews and video hit targets. Native playback was not verified.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9fb9bfafc4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/web/src/components/chat/ComposerPendingUserInputPanel.tsx
Comment thread apps/web/src/components/chat/ComposerPendingUserInputPanel.tsx
Restore pointer events for ScrollArea parts, code blocks, and horizontal scroll containers at the shared option-content boundary. Both labels and descriptions inherit the fix; plain answer text still reaches the selection button.

Browser geometry and pointer targeting require runtime verification; TypeScript cannot enforce this CSS invariant. Related issue pingdotgg#11132 tracks the question-card boundary.

Validation: 118 focused tests, web typecheck, targeted lint and formatting passed. Real card browser fixture confirms table scroll and scrollbar drag without answer selection or advancement.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c55eccf099

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/web/src/components/chat/ComposerPendingUserInputPanel.tsx Outdated
Keep a pointer-active wrapper around the dismiss button so disabled pointer events stop at the action boundary instead of hitting the sibling disclosure overlay. Preserve the shared Button disabled behavior.

Pointer hit testing is a browser CSS invariant that TypeScript cannot enforce. Related issue pingdotgg#11132 tracks the question-card boundary.

Validation: real card browser fixture confirms disabled X clicks leave expanded and collapsed state unchanged, while enabled X fires dismissal once without toggling. All 118 focused tests, web typecheck, targeted lint, formatting and diff checks passed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Question cards show raw Markdown in expanded questions, collapsed previews, and answer options

2 participants