Repository navigation
feat(desktop): add LaTeX paper writing and PDF preview - #3850
Conversation
|
Thanks for the LaTeX work. Reviewing it against 1. The new mode breaks the builtin agent catalog contract
2.
|
Keep PaperWriting in the built-in catalog contract and give it the standard thread-goal tools. Queue saves arriving during another write and retain the requesting document so switching files cannot send edits to the wrong path. Co-authored-by: Raing5Days <Raing5Days@users.noreply.github.com>
Summary
Add Paper Writing under Other agents. When a user opens the main
.texfile, the editor shows LaTeX source on the left and the typeset PDF on the right. Users can save and compile once or opt in to recompiling after edits. If a build fails, the last successful PDF stays visible and the compiler log is available beside it.Type and Areas
Feature. Desktop/Tauri, editor, built-in agents, remote capability contracts, and i18n.
Motivation / Impact
Paper authors can revise their source and check the result in the same workspace. Preview uses the workspace host's existing
latexmkand pdfLaTeX or XeLaTeX installation. Build output goes to a temporary directory, with shell escape andlatexmkconfiguration scripts disabled. Peer clients enable preview only when the host advertises support.Verification
AI-assisted; lightly tested (focused automated checks and a local preview exercise).
tsc --noEmit.pnpm run capabilities:check,capabilities:test,check:core-boundaries,i18n:audit,check:repo-hygiene, and the appearance and color audits.cargo test --locked -p openbitfun-desktop --no-default-features --lib latex_api::tests -- --include-ignoredpassed with real pdfLaTeX and XeLaTeX, covering a multi-file paper with BibTeX and compiler errors. The POSIX command was exercised in a local shell. In an isolated browser fixture backed by real TeX, changing source refreshed the PDF and a compile error preserved the last preview. The compiler and editor source files were carried over unchanged.pnpm run check:webstops at an existing typography violation in Dialog.module.css:77. The same violation reproduces against that file on upstreammain. The individual type and appearance checks above passed.Reviewer Notes
With
latexmkinstalled, choose Other agents → Paper Writing, open a valid.texfile, and select Save & compile. Enable Auto compile, edit the title, and check that it updates in the PDF. Introduce an undefined command to check that the error is shown and the previous PDF remains visible.Checklist