Skip to content

Fix review provenance, formula fallbacks, and attachment publication - #17

Merged
yuema137 merged 1 commit into
mainfrom
fix/review-provenance-rendering
Sep 11, 2026
Merged

yuema137 merged 1 commit into
mainfrom
fix/review-provenance-rendering

Conversation

@yuema137

Copy link
Copy Markdown
Owner

PairTeX could reject valid conditional/BibTeX renders, silently lose formulas without MathJax, drop linked attachments, and label non-Git projects as version tracked. This change preserves a usable review surface and honest source provenance across those cases.

  • Keep formulas read-only and selectable when static source mapping is uncertain; preserve adapter-provided anchors and actual source line numbers. Unmapped comments locate unique matching formulas without inventing source locations.
  • Distinguish non-repository, unborn, clean, dirty, and unavailable Git states in the UI and saved feedback, with null values for unknown commit/status.
  • Publish declared local src/href dependencies with URL decoding, missing-file diagnostics, and traversal/symlink boundary checks.
  • Reject empty or structurally unusable MathML at publication, startup, and refresh; keep valid native fallbacks visible when MathJax is blocked and preserve custom-macro output when conversion fails.

Validation:

  • 16 Python unittest tests pass on Python 3.11, covering HTTP serving/refresh, Git metadata, mapper fallbacks, MathML validation, and attachment boundaries.
  • Both Playwright suites pass in Chromium: blocked/delayed/successful converter loading, native fractions, custom macros, unmapped comments and Locate, all five Git labels and persisted metadata, plus real-CDN editing/comment/refresh interactions.
  • Synthetic short/full manuscripts built through latexmk + make4ht + BibTeX retain 3/4 formulas respectively, including bibliography math; canonical source bytes remain unchanged.
  • JavaScript syntax, git diff whitespace checks, and uv lock check pass.

The generic mapper deliberately makes the entire document's formulas read-only for uncertain TeX expansion; an adapter with explicit anchors is required to enable direct formula edits there. MathML validation is structural, not a full browser layout guarantee. CSS url() dependencies and secondary HTML links are not recursively crawled.

Fixes #13
Fixes #14
Fixes #15
Fixes #16

@yuema137
yuema137 merged commit e5f895d into main Sep 11, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant