Repository navigation
feat: the solve page shows the model as math beside its YAML, typeset by mathspec and following each edit - #12
Merged
Conversation
… by mathspec and following each edit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AAz2z9GVsHSQypiTUZyrY9
FBumann
added this pull request to stack #13
October 12, 2026 12:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
The following content was generated by AI.
Beside the YAML editor (#11), the Solve page now shows the model as math. mathspec's
to_markdowntypesets it in the worker, and KaTeX renders it. The preview follows each edit, and dims the last good math under mathspec's message when an edit breaks the spec.What it does, and how
Worker.
solve.pygainstypeset(spec), which returns{'markdown': to_markdown(spec)}or the refusal. The worker now takes{kind: 'solve'}or{kind: 'typeset'}messages.solver.tssends both through the same queue, assolve()andtypeset().Preview (
src/MathPreview.tsx). Typesetting needs Python, so the preview never loads it on a visit alone:Renderer (
src/renderMath.ts).markedrenders the Markdown.$`…`$and```mathgo through KaTeX. A spec's descriptions reach this text, and a published archive is someone else's file. So raw HTML shows as text, a link shows as its words, and an image shows as its alt text. The renderer is its own chunk, loaded with the first typeset.Layout. The editor and the preview sit side by side above 1000 px, and stack below that.
Sizes,
vite build, gzipped: the main bundle is 199.7 KB and the Solve page's chunk 215.8 KB, both unchanged from #11. The renderer chunk is 91.4 KB, and KaTeX's fonts load as the math needs them.What was verified, and how
Headless Chromium against a local build and a local publish of the showcase's scenarios in the live layout. specsolve 0.9.0 came from PyPI.
== loadedited to== 2 * loadbalancere-typeset with2⋅load== lodConstraint 'balance': 'lod' not found.above the earlier math, dimmed'<img src=x onerror=…>'imgelement; the tag shows as text; the handler never rannpm run buildpasses.Not done
typesettakes a symbol table, but the page passes none.🤖 Generated with Claude Code
https://claude.ai/code/session_01AAz2z9GVsHSQypiTUZyrY9
Generated by Claude Code