[PR #1833] [CLOSED] Add optional isolated full-TeX chat math rendering #3708

Closed
opened 2026-11-07 15:30:12 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1833
Author: @CC-David-CC
Created: 10/10/2026
Status: ❌ Closed

Base: main ← Head: feat/web-math-tex


📝 Commits (8)

  • 56063f3 web: isolate shared chat math foundation and adapter contract
  • ebc4a72 web: render chat math with an optional isolated full TeX worker
  • 276da31 docs: distinguish Docker installation from pending native TeX validation
  • 253ea8c Merge remote-tracking branch 'upstream/main' into HEAD
  • 7737627 Merge commit '61b3fb5dd3' into HEAD
  • 1606d9c Merge commit '253ea8cfe5' into HEAD
  • fba7967 Remove full TeX time budgets and validate current-main adapter
  • 1f075d0 Merge Strata v0.1.43 into feat/web-math-tex

📊 Changes

39 files changed (+2366 additions, -6 deletions)

View changed files

➕ docs/WEB_MATH.md (+94 -0)
➕ docs/WEB_MATH_COMPARISON.md (+99 -0)
➕ docs/WEB_MATH_INTERFACE.md (+22 -0)
➕ docs/web-math-results/katex-chromium.json (+81 -0)
➕ docs/web-math-results/katex-firefox.json (+81 -0)
➕ docs/web-math-results/katex-webkit.json (+81 -0)
➕ docs/web-math-results/mathjax-chromium.json (+81 -0)
➕ docs/web-math-results/mathjax-firefox.json (+81 -0)
➕ docs/web-math-results/mathjax-webkit.json (+81 -0)
➕ docs/web-math-results/tex-chromium.json (+82 -0)
➕ docs/web-math-results/tex-firefox.json (+82 -0)
➕ docs/web-math-results/tex-linux-chromium.json (+82 -0)
➕ docs/web-math-results/tex-runtime.json (+15 -0)
➕ docs/web-math-results/tex-webkit.json (+82 -0)
➕ docs/web-math-results/tex-worker.json (+86 -0)
➕ serve/fixtures/math.json (+12 -0)
📝 serve/server.py (+32 -2)
➕ serve/test_tex_math.py (+84 -0)
➕ serve/tex_math.py (+40 -0)
➕ serve/tex_worker/Dockerfile (+13 -0)

...and 19 more files

📄 Description

Adds optional XeLaTeX → PDF → filtered SVG rendering for assistant equations, with the shared parser, settings, queue and source-preserving chat integration. The shared core does not render. Rendering starts disabled; the compiler container is built and started explicitly, with no dependencies installed by normal Strata startup.

Refreshed to upstream main 61b3fb5d and shared math core 253ea8cf. Compilation has no fixed CPU/wall budget, host transport timeout or TeX browser conversion deadline. Browser-only adapters retain their default deadlines. Cancelled compiler RPCs keep their queue slot until completion and discard the cancelled result. Memory, process, filesystem, input/output and SVG limits remain enabled.

Fresh Windows/Docker Desktop validation: 41 endpoint/security tests, seven valid compiler cases, six malformed/restricted compiler cases, and the complete Chromium, Firefox and Playwright WebKit suites passed. The unbounded recursive TeX macro fixture is explicitly skipped and requires operator cancellation by restarting the worker. Source copy/export/history/model requests remain unchanged; the SVG uses source alt text rather than semantic MathML.

Current refresh evidence and reproduction, including exact image/worker identity, isolation, raw timings and screenshots. Single acceptance-run timings are descriptive; Chromium cold timing includes corpus contention. The archived image is 7.04 GB uncompressed, not an estimated download size.

Addresses #1769 and #1780. See setup and adapter contract.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/1833 **Author:** [@CC-David-CC](https://github.com/CC-David-CC) **Created:** 10/10/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/web-math-tex` --- ### 📝 Commits (8) - [`56063f3`](https://github.com/Niko1221/Strata/commit/56063f315e3975294e67ac4f9e40ef7cd5a6a5c4) web: isolate shared chat math foundation and adapter contract - [`ebc4a72`](https://github.com/Niko1221/Strata/commit/ebc4a721e41e831ef0652a0cf99c8258bdfa0cab) web: render chat math with an optional isolated full TeX worker - [`276da31`](https://github.com/Niko1221/Strata/commit/276da3141c390bcefaad638eb2dcdeba0905ff6f) docs: distinguish Docker installation from pending native TeX validation - [`253ea8c`](https://github.com/Niko1221/Strata/commit/253ea8cfe554f45f1a0ca287b9880363d3b16012) Merge remote-tracking branch 'upstream/main' into HEAD - [`7737627`](https://github.com/Niko1221/Strata/commit/77376270625efbf4c7b3bf2a9fc14df283a4bd15) Merge commit '61b3fb5dd3f1e8ec09cf7e4e05208bc6d3c46406' into HEAD - [`1606d9c`](https://github.com/Niko1221/Strata/commit/1606d9c18b4795e516196187ed365fe9b4d4928c) Merge commit '253ea8cfe554f45f1a0ca287b9880363d3b16012' into HEAD - [`fba7967`](https://github.com/Niko1221/Strata/commit/fba796708ed8f2953eff23eec550e4d094d0e83f) Remove full TeX time budgets and validate current-main adapter - [`1f075d0`](https://github.com/Niko1221/Strata/commit/1f075d0da67153dfa1ca5cf8432081ce47dddd78) Merge Strata v0.1.43 into feat/web-math-tex ### 📊 Changes **39 files changed** (+2366 additions, -6 deletions) <details> <summary>View changed files</summary> ➕ `docs/WEB_MATH.md` (+94 -0) ➕ `docs/WEB_MATH_COMPARISON.md` (+99 -0) ➕ `docs/WEB_MATH_INTERFACE.md` (+22 -0) ➕ `docs/web-math-results/katex-chromium.json` (+81 -0) ➕ `docs/web-math-results/katex-firefox.json` (+81 -0) ➕ `docs/web-math-results/katex-webkit.json` (+81 -0) ➕ `docs/web-math-results/mathjax-chromium.json` (+81 -0) ➕ `docs/web-math-results/mathjax-firefox.json` (+81 -0) ➕ `docs/web-math-results/mathjax-webkit.json` (+81 -0) ➕ `docs/web-math-results/tex-chromium.json` (+82 -0) ➕ `docs/web-math-results/tex-firefox.json` (+82 -0) ➕ `docs/web-math-results/tex-linux-chromium.json` (+82 -0) ➕ `docs/web-math-results/tex-runtime.json` (+15 -0) ➕ `docs/web-math-results/tex-webkit.json` (+82 -0) ➕ `docs/web-math-results/tex-worker.json` (+86 -0) ➕ `serve/fixtures/math.json` (+12 -0) 📝 `serve/server.py` (+32 -2) ➕ `serve/test_tex_math.py` (+84 -0) ➕ `serve/tex_math.py` (+40 -0) ➕ `serve/tex_worker/Dockerfile` (+13 -0) _...and 19 more files_ </details> ### 📄 Description Adds optional XeLaTeX → PDF → filtered SVG rendering for assistant equations, with the shared parser, settings, queue and source-preserving chat integration. The shared core does not render. Rendering starts disabled; the compiler container is built and started explicitly, with no dependencies installed by normal Strata startup. Refreshed to upstream main `61b3fb5d` and shared math core `253ea8cf`. Compilation has no fixed CPU/wall budget, host transport timeout or TeX browser conversion deadline. Browser-only adapters retain their default deadlines. Cancelled compiler RPCs keep their queue slot until completion and discard the cancelled result. Memory, process, filesystem, input/output and SVG limits remain enabled. Fresh Windows/Docker Desktop validation: 41 endpoint/security tests, seven valid compiler cases, six malformed/restricted compiler cases, and the complete Chromium, Firefox and Playwright WebKit suites passed. The unbounded recursive TeX macro fixture is explicitly skipped and requires operator cancellation by restarting the worker. Source copy/export/history/model requests remain unchanged; the SVG uses source alt text rather than semantic MathML. [Current refresh evidence and reproduction](https://github.com/CC-David-CC/Strata-a5500/tree/fba796708ed8f2953eff23eec550e4d094d0e83f/web-math-results/current-main-refresh), including exact image/worker identity, isolation, raw timings and screenshots. Single acceptance-run timings are descriptive; Chromium cold timing includes corpus contention. The archived image is 7.04 GB uncompressed, not an estimated download size. Addresses [#1769](https://github.com/Niko1221/Strata/issues/1769) and [#1780](https://github.com/Niko1221/Strata/issues/1780). See [setup and adapter contract](https://github.com/CC-David-CC/Strata-a5500/blob/fba796708ed8f2953eff23eec550e4d094d0e83f/docs/WEB_MATH.md). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:30:12 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3708
No description provided.