Skip to content

fix(mobile): render markdown in question cards - #11612

Open
Exotic209093 wants to merge 1 commit into
pingdotgg:mainfrom
Exotic209093:fix/mobile-question-card-markdown
Open

fix(mobile): render markdown in question cards#11612
Exotic209093 wants to merge 1 commit into
pingdotgg:mainfrom
Exotic209093:fix/mobile-question-card-markdown

Conversation

@Exotic209093

@Exotic209093 Exotic209093 commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Question text, option labels, and option descriptions in PendingUserInputCard were rendered as raw Text without any markdown processing. Wrapped all three with the Markdown component from react-native-nitro-markdown using a compact inline theme consistent with ThreadFeed patterns.

Fixes #11132

Summary by CodeRabbit

  • Enhancements
    • Pending questions, option labels, and descriptions now support Markdown formatting.
    • Markdown styling adapts to the app’s appearance preferences and theme colors.
    • Improved typography, spacing, font sizing, and readability for pending user input content.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 13, 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-09-13T18:22:17.834384Z 07dba53 PR opened
ℹ️ 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.

@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 Sep 13, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 07dba53

Macroscope's review found this PR approvable — This is a localized one-file mobile bug fix that applies the existing Markdown renderer to question-card content while preserving selection, submission, and data behavior. It does not modify product defaults, schemas, sensitive areas, deployment configuration, or static-analysis settings.

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

@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: 07dba53c34

ℹ️ 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 on lines +312 to +314
<Markdown theme={inlineMarkdownTheme}>
{question.question}
</Text>
</Markdown>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve angle-bracket placeholders when rendering Markdown

When a provider asks a question containing a placeholder such as Choose the <branch-name> to deploy, the Markdown parser classifies <branch-name> as html_inline, but the library's default renderer does not render HTML nodes. The placeholder therefore disappears from the question; the same regression affects the newly wrapped option labels and descriptions. Add HTML-node handling that preserves or normalizes their text instead of relying on the default renderer.

Useful? React with 👍 / 👎.

@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 0dd59ad1-0021-49d1-8da1-97423beaab9a

📥 Commits

Reviewing files that changed from the base of the PR and between 77bca8b and 07dba53.

📒 Files selected for processing (1)
  • apps/mobile/src/features/threads/PendingUserInputCard.tsx

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


📝 Walkthrough

Walkthrough

The mobile pending user input card now renders questions, option labels, and descriptions as Markdown. A memoized inline theme applies appearance preferences, theme colors, platform fonts, typography, spacing, and code styling.

Changes

Pending input Markdown rendering

Layer / File(s) Summary
Markdown theme configuration
apps/mobile/src/features/threads/PendingUserInputCard.tsx
The card adds Markdown dependencies and memoizes an inline theme using appearance preferences, theme colors, platform fonts, typography, spacing, heading weights, border radii, and code-label visibility.
Question and option rendering
apps/mobile/src/features/threads/PendingUserInputCard.tsx
Questions, option labels, and option descriptions now use Markdown rendering instead of plain Text elements.

Priority: ⬇️ Low

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

Change: Bug fix · Severity of issue fixed: Low

Suggested reviewers: juliusmarminge

Merge Risk: 🟡 Moderate · up to 07dba

Pending-input Markdown can handle links and images differently from existing thread content, including bypassing the established asset-safety policy. Reuse that policy before merging.

🚥 Pre-merge checks | ✅ 1 | ❌ 4

❌ Failed checks (4 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description clearly explains the Markdown rendering change and links it to issue #11132. It does not use the required template sections, checklist, or before/after screenshots for this UI change. Add the required What Changed, Why, UI Changes, and Checklist sections. Include before/after screenshots for the UI change and mark the applicable checklist items.
Linked Issues check ⚠️ Warning Issue #11132 targets the web/desktop pending question card and requires Markdown rendering for expanded questions, collapsed previews, and option labels/descriptions, with existing selection and link … Implement the #11132 requirements in the web pending user-input panel, including expanded content, collapsed previews, and option labels/descriptions. Add or update automated tests for Markdown rendering and link interaction without changin…
Out of Scope Changes check ⚠️ Warning The PR adds Markdown rendering to apps/mobile/src/features/threads/PendingUserInputCard.tsx. Issue #11132 explicitly states that mobile's separate question card is out of scope. The change therefore… Remove the mobile-only change from this PR, or link it to a separate mobile issue and keep this PR focused on the scoped web/desktop question-card implementation.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: rendering Markdown in mobile question cards.
Full details: Linked Issues check

Explanation

Issue #11132 targets the web/desktop pending question card and requires Markdown rendering for expanded questions, collapsed previews, and option labels/descriptions, with existing selection and link behavior preserved. The PR changes only apps/mobile/src/features/threads/PendingUserInputCard.tsx. The linked issue explicitly keeps mobile's separate question card out of scope. No change to apps/web/src/components/chat/ComposerPendingUserInputPanel.tsx is shown, so the linked web behavior remains unmet.

Resolution

Implement the #11132 requirements in the web pending user-input panel, including expanded content, collapsed previews, and option labels/descriptions. Add or update automated tests for Markdown rendering and link interaction without changing answer selection or submission behavior.

Full details: Out of Scope Changes check

Explanation

The PR adds Markdown rendering to apps/mobile/src/features/threads/PendingUserInputCard.tsx. Issue #11132 explicitly states that mobile's separate question card is out of scope. The change therefore does not stay within the linked issue scope.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch fix/mobile-question-card-markdown
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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

Labels

size:M 30-99 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

1 participant