Skip to content

Conversation

rguan72
Copy link
Contributor

@rguan72 rguan72 commented Aug 29, 2025

Description

Grant street issue: https://onyx-company.slack.com/archives/C05UR9DG5Q8/p1756315878608459
Wrap all code identifiers, variable names, and snippets in backticks. => might also be good for our system prompt in certain situations.

How Has This Been Tested?

[Describe the tests you ran to verify your changes]

Backporting (check the box to trigger backport action)

Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.

  • This PR should be backported (make sure to check that the backport attempt succeeds)
  • [Optional] Override Linear Check

@rguan72 rguan72 requested a review from a team as a code owner August 29, 2025 20:35
Copy link

vercel bot commented Aug 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
internal-search Ready Ready Preview Comment Aug 29, 2025 8:38pm

@rguan72 rguan72 requested a review from Weves August 29, 2025 20:36
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Summary

This PR implements stricter LaTeX math rendering by disabling single dollar sign text math parsing across three key markdown rendering components in the chat system. The change modifies the remarkMath plugin configuration by setting singleDollarTextMath: false in:

  • web/src/app/chat/message/messageComponents/markdownUtils.tsx (line 103)
  • web/src/components/chat/MinimalMarkdown.tsx (lines 49-52)
  • web/src/app/chat/message/thinkingBox/ThinkingBox.tsx (lines 297-300)

This configuration change prevents single dollar signs ($expression$) from being interpreted as LaTeX math delimiters, requiring double dollar signs ($$expression$$) or other explicit math notation instead. The modification addresses a common issue where dollar signs in regular text contexts—such as currency amounts ($100), shell variables ($PATH), or code discussions—were being incorrectly rendered as LaTeX math expressions.

The change aligns with the existing preprocessLaTeX function in codeUtils.ts which already handles dollar sign protection in code contexts, creating a more cohesive and predictable LaTeX rendering system throughout the application. By applying this configuration consistently across all three markdown components, the system ensures uniform math rendering behavior in chat messages, minimal markdown displays, and AI thinking boxes.

PR Description Notes:

  • The description and testing sections are placeholder templates and should be filled out with specific details about the changes and verification methods used.

Confidence score: 4/5

  • This PR is safe to merge with minimal risk as it's a conservative change that reduces unwanted LaTeX rendering
  • Score reflects the straightforward nature of the configuration change and consistent application across components, though testing details are missing from the PR description
  • Pay close attention to user-facing impact testing to ensure legitimate math expressions still render correctly with double dollar signs

3 files reviewed, no comments

Edit Code Review Bot Settings | Greptile

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 3 files

React with 👍 or 👎 to teach cubic. You can also tag @cubic-dev-ai to give feedback, ask questions, or re-run the review.

@rguan72 rguan72 added this pull request to the merge queue Aug 29, 2025
@wenxi-onyx wenxi-onyx removed this pull request from the merge queue due to a manual request Aug 30, 2025
@wenxi-onyx wenxi-onyx merged commit aa158ab into main Aug 30, 2025
21 of 22 checks passed
@wenxi-onyx wenxi-onyx deleted the richard/more-strict-latex-rendering branch August 30, 2025 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants