#587

feat(messages): add optional LaTeX math rendering

Openmhuldenwants to merge intofrom

Closes #446

Summary

Add optional LaTeX math rendering to Codex chat messages.

What changed

  • Added a new setting: Enable math rendering (default: off) in Display & Sound > Chat.
  • Added markdown math support in chat rendering using:
    • remark-math
    • rehype-katex
    • katex
  • Added KaTeX styles to the app bundle.
  • Ensured file-link parsing does not interfere with math AST nodes.
  • Wired the setting through app state and message rendering paths (local + daemon-backed usage).

Supported syntax

  • Inline: $...$ and \(...\)
  • Block: $$...$$ and \[...\]

Safety behavior

  • Math is not rendered inside fenced code blocks.

Validation

  • npm run typecheck
  • npm run test -- src/features/messages/components/Markdown.test.tsx
  • npm run test -- src/features/messages/components/Messages.test.tsx
  • npm run test -- src/features/settings/components/sections/SettingsDisplaySection.test.tsx
  • cd src-tauri && cargo check

All passing.

Activity

29
chatgpt-codex-connector[bot]reviewed7mo ago
chatgpt-codex-connector[bot]7mo ago

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1db15a49be

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

mhuldenreviewed7mo ago
chatgpt-codex-connector[bot]reviewed7mo ago
chatgpt-codex-connector[bot]7mo ago

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d6339dd924

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

chatgpt-codex-connector[bot]reviewed7mo ago
chatgpt-codex-connector[bot]7mo ago

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9be38ee3fd

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

mhuldenreviewed7mo ago
mhuldenreviewed7mo ago
chatgpt-codex-connector[bot]reviewed7mo ago
chatgpt-codex-connector[bot]7mo ago

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a930fea28b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

chatgpt-codex-connector[bot]reviewed7mo ago
chatgpt-codex-connector[bot]7mo ago

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eb9be1270a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

xkonjinreviewed7mo ago
xkonjin7mo ago

Automated review, focused on bugs, security, and test coverage:\n\n- Potential secret-handling risk: the diff appears to touch credentials or token-like values. Please verify no secrets are committed, logged, or exposed in client-visible paths.\n\n- Auth-sensitive area: this PR touches authentication/authorization-related code. I\u2019d want explicit tests for privilege boundaries, expired/invalid session handling, and negative authorization cases before merging.\n\n- Test coverage gap: this PR adds non-trivial code, but the diff does not obviously include tests. Please add targeted coverage for the primary success path and at least one failure/edge case.

mhulden7mo ago

Automated review, focused on bugs, security, and test coverage:\n\n- Potential secret-handling risk: the diff appears to touch credentials or token-like values. Please verify no secrets are committed, logged, or exposed in client-visible paths.\n\n- Auth-sensitive area: this PR touches authentication/authorization-related code. I\u2019d want explicit tests for privilege boundaries, expired/invalid session handling, and negative authorization cases before merging.\n\n- Test coverage gap: this PR adds non-trivial code, but the diff does not obviously include tests. Please add targeted coverage for the primary success path and at least one failure/edge case.

  1. No auth/session/privilege code paths were touched in this PR update.
  2. No secrets or credentials were added/logged/exposed.
  3. Added explicit and broad tests for success + edge/failure-style cases in the math normalization path (new scanner test suite + existing markdown/message/settings tests still passing).
chatgpt-codex-connector[bot]reviewed7mo ago
chatgpt-codex-connector[bot]7mo ago

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ec7bd07092

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

chatgpt-codex-connector[bot]reviewed7mo ago
chatgpt-codex-connector[bot]7mo ago

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e2bb0384ab

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".