All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
-
LaTeX Export: Invalid TikZ Node Options
- Problem: AI generates
\node [italic] {...}which crashes pgfkeys:I do not know the key '/tikz/italic'. - Fix: Added step 14 to
sanitizeLatexForExportthat converts[italic]→[font=\itshape]and[bold]→[font=\bfseries]. Handles standalone, comma-prefixed, and comma-suffixed cases.
- Problem: AI generates
-
LaTeX Export: Duplicate Section Numbers
- Problem: AI hardcodes section numbers like
\section{6. Implications...}. Since LaTeX auto-numbers sections, the compiled output shows "6 6. Implications...". - Fix: Added step 15 to
sanitizeLatexForExportthat strips hardcoded number prefixes from\section{},\subsection{}, and\subsubsection{}titles. Matches patterns like6.,3.2.,1.2.3., andSection 6:.
- Problem: AI hardcodes section numbers like
-
LaTeX Export: Table Overspill Prevention
- Problem: AI-generated tables (especially with
\multirowand\parboxcombinations) exceeded page margins in compiled PDFs. - Fix: Injected
\usepackage{adjustbox}package and wrapped alltabular/tabularxenvironments with\begin{adjustbox}{max width=\textwidth}. This auto-scales only tables that would overspill; correctly-sized tables pass through unmodified. - Scope: Applied to both
sanitizeLatexForExport(retroactive fix for old exports) andlatexGenerator.ts(new documents).
- Problem: AI-generated tables (especially with
-
LaTeX Export: CJK Font Compatibility (Complete Fix)
- Problem: Previous fix (v1.0.14) only covered
{min}and{bsmi}fonts, but the AI also generates{bmin}which caused the samefont cyberb69 not founderror. - Fix: Broadened regex from
(?:min|bsmi)to(?!gbsn\})[a-zA-Z]+— now catches ANY non-standard CJK font family and normalizes to{gbsn}(Arphic Simplified). - Result: Future-proof against new AI-generated font variants.
- Problem: Previous fix (v1.0.14) only covered
-
LaTeX Export: TikZ "Extra }" Error (Root Cause Fix)
- Problem: TikZ diagrams with CJK content failed to compile with
Extra }, or forgotten \endgroupandDid you forget a semicolon?errors at lines containing\node{Face\\(面子)}. - Root Cause: The balance fixer (
fixLatexBalance) was running BEFORE the inline CJK stripper. It saw\begin{CJK}...\end{CJK}as environments and injected stray}to "fix" perceived brace imbalances. When the CJK stripper then removed the wrappers, those injected}were left behind as orphans. - Fix: Reordered sanitization steps — CJK font normalization (step 9) and inline CJK stripping (step 10) now run BEFORE the balance fixer (step 11). The balance fixer operates on clean LaTeX without CJK environments to misinterpret.
- Technical Detail: Inline
\begin{CJK}wrappers are redundant because the document-level\begin{CJK*}{UTF8}{gbsn}(fromlatexGenerator.ts) already wraps the entire body. Stripping them prevents structural conflicts with TikZ\node{}arguments, which cannot contain LaTeX environments.
- Problem: TikZ diagrams with CJK content failed to compile with
- System Integrity: Nested Block Prevention
- Problem: The
processBibliographyfix (v1.0.12) wrapped bibliography items in aLATEXPREVIEWBLOCK. If a citation contained Math or TikZ (which are processed earlier and already wrapped in blocks), this created a "Block inside a Block". The renderer often fails to resolve nested blocks, leaving raw placeholder strings in the output. - Fix: Modified
processBibliographyto return raw HTML string instead of a placeholder block. This ensures inner placeholders remain exposed for substitution.
- Problem: The
- Regression: Newline Rendering
- Problem: Newlines (
\\) rendered as literal double backslashes or failed to break lines. - Root Cause: A typo in the Phase 8 fix introduced a regex that matched triple backslashes (
\\\\\\) instead of double backslashes (\\\\). - Fix: Corrected the regex to
/\\\\/g.
- Problem: Newlines (
- Bibliography Rendering: Partial Backslash Fix
- Problem: Previous fix (v1.0.11) failed because the Bibliography was rendered as raw text, bypassing the processor entirely.
- Fix: Implemented a dedicated
processBibliographyparser inprocessor.tsthat manually parses\bibitementries and applies full LaTeX formatting (newlines, URLs, italics). - Result: References now render with full visual fidelity, matching the main document style.
- Bibliography Rendering: Visible Backslash in URLs
- Problem: References rendered as
2025.\ https://...instead of2025. <br/> https://.... - Root Cause: Regex collision in
processor.ts. The Control Space handler (\) consumed the second backslash of the Newline command (\\), breaking the newline replacement. - Fix: Reordered regex replacements.
\\(newline) is now processed before\(control space).
- Problem: References rendered as
- TikZ Rendering: CJK Crash Fix
- Problem: Diagrams containing
\begin{CJK}environments (often injected by the document-level exporter) crashed the TikZ engine with! LaTeX Error: Environment CJK undefined. - Fix: Added a dedicated stripper to
tikz-engine.tsthat removes CJK wrappers before the ASCII sanitization filter runs. - Result: ASCII content survives, CJK characters are filtered out (preventing encoding crashes), and the engine runs without error.
- Problem: Diagrams containing
- LaTeX Rendering: Literal Backslash Control Space
- Before:
vs.\ Traditionalrendered asvs.\ Traditional(literal backslash visible). - After:
\(backslash space) is correctly parsed as a standard space, renderingvs. Traditional. - Details: Added handler for TeX control space command.
- Before:
- LaTeX Rendering: Ghost Text "addlinespace"
- Before:
\addlinespacecommand rendered as literal text "addlinespace" in table cells. - After:
\addlinespaceis correctly recognized as a vertical spacer command and stripped (preserving table structure). - Details: Updated strict table parser to treat
booktabsspacing commands as valid non-content tokens.
- Before:
- LaTeX Rendering: Parbox inside Tables
\parboxinside\multirow(and other table cells) now renders correctly instead of appearing as literal text.- Details: Updated the table processing engine to handle parboxes within cell content using a wrapped callback approach.
- Impact: Complex tables (like the Taxonomy of GenAI Adoption Barriers) now display correctly wrapped text in the preview.
- Error Transparency: Swallowed Exception in 6 AI Adapters
extractJson()throws rich diagnostic errors (e.g., "No JSON object or array found", "AI_OUTPUT_TRUNCATED: Try reducing Enhancement Level"), but 6 of 7 adapters caught these and replaced them with a generic"AI response was not valid JSON"— destroying all context.- Fix: All adapters now append the inner exception message:
"AI response was not valid JSON: <original error>". - Impact: Users now see actionable error messages (e.g., truncation guidance) instead of opaque failures.
- Affected:
ollama.ts,openai.ts,grok.ts,gemini.ts,anthropic.ts,poe.ts(×2 code paths).
- CJK (Chinese/Japanese/Korean) LaTeX Support
- Auto-detects CJK characters (Unicode ranges
\u4e00-\u9fff,\u3040-\u309f,\u30a0-\u30ff) in document content and abstract. - Export: Injects
\usepackage{CJKutf8}into preamble and wraps document body with\begin{CJK*}{UTF8}{min}...\end{CJK*}for correct PDF rendering. - Preview: Two-site CJK stripping in
processor.ts:- Inline (in
parseLatexFormatting): Regex strips\begin{CJK*}{enc}{font}content\end{CJK*}→content. - Document-level (in command stripping section): Strips orphaned
\begin{CJK*}open/close tags that survive outside inline contexts.
- Inline (in
- Design Decision: Browsers render Unicode (including CJK) natively—the CJK wrapper is purely a LaTeX font selection mechanism. Stripping it for preview while preserving it for export ensures both paths work correctly.
- Auto-detects CJK characters (Unicode ranges
- LaTeX Export: Preamble-Safe Ampersand Sanitization
- The context-aware
&sanitizer now skips the preamble (everything before\begin{document}). - Root Cause:
\usepackage[sort&compress]{natbib}was being corrupted tosort\&compress, causing "Unknown option" errors. - Fix: Split document at
\begin{document}, sanitize only the body, leave preamble untouched.
- The context-aware
- LaTeX Export: Removed "Cascade Stopper" Regex
- Removed the regex that force-closed
\texttt{,\textbf{}etc. at paragraph breaks. - Root Cause: The regex created orphan closing braces that broke document structure. Example:
\texttt{code\n\nmore}became\texttt{code}\n\nmore}— the trailing}closed parent structures prematurely. - Lesson: Rely on
fixLatexBalance()at EOF instead of aggressive mid-document closure.
- Removed the regex that force-closed
- LaTeX Export: Line-Limited Backtick Regex
- Changed paired backtick matching from
/([^`]+)`/g` to `/`([^`\n]+)/g. - Root Cause: An orphan backtick (e.g.,
`moving target'') would match the NEXT backtick anywhere in the document (even 100+ lines later), corrupting all\cite{},\subsection{}commands in between by escaping their backslashes. - Fix: Backtick pairs now cannot span newlines, limiting damage to a single line.
- Changed paired backtick matching from
- LaTeX Export: URL/Verbatim Protection
- The ampersand sanitizer now skips
\url{},\href{}command arguments. - Reason: URLs like
example.com?a=1&b=2should not have their&escaped.
- The ampersand sanitizer now skips
- Ollama BYOK Support
- Added ability to configure a custom Base URL for the Ollama provider.
- Users can now connect to remote Ollama servers (e.g., local network GPU box) instead of being locked to
localhost. - Renamed "Ollama (Local)" to "Ollama" in the UI.
- Windows Startup Crash (
ENOTSUP)- Removed
reusePort: truefrom server configuration. - This option is Linux-only and caused the server to crash immediately on Windows.
- Removed
- Custom Provider Crash
- Fixed a critical bug where selecting the "Custom" provider would crash the backend.
- Wired "Custom" to the standard OpenAI-compatible adapter.
- Renamed UI label to "Custom (OpenAI Compatible)" for clarity.
- Librarian: Gemini 3 Flash Support
- Added native support for
Gemini3Flash-AAPcustom bot in the Librarian agent configuration.
- Added native support for
- README: Pre-Release Warning
- Added "Beta Preview" disclaimer to setting expectations for LLM reliability.
- Librarian: Enforced Custom Bot Search
- Removed standard Poe models (e.g.,
Gemini-2.5-Pro) from the Librarian whitelist. - Reasoning: Only Custom Bots (AAP series) are guaranteed to have Web Search enabled correctly. Standard models caused "Search not supported" confusion.
- Removed standard Poe models (e.g.,
- LaTeX Preview: Orphaned Backslashes
- Commands like
\textbf,\emphrendered with leading backslashes due to triple-escape artifacts. - Fix: Updated regexes in
processor.tsto use\\+(one or more backslashes).
- Commands like
- LaTeX Preview: Algorithm Rendering
- Added support for
\ForAll(→ "for all") and\hfill(→float: right).
- Added support for
- LaTeX Export: Backtick Escape
- Markdown-style
`code`caused "Missing { inserted" errors. - Fix: Convert
`code`to\texttt{code}with backslashes escaped inside.
- Markdown-style
- LaTeX Export: Orphan Backticks
- Unmatched backticks now escaped to
\textasciigrave{}.
- Unmatched backticks now escaped to
- Footer Disclaimer: AI-generated content warning added to exported LaTeX.
- README: Human in the Loop Section: Warns users to verify AI output.
- README: AI Agents & LLMs Keywords: SEO-optimized intro with prominent keywords.
- README: Screenshots: Interface and preview images embedded.
- Initial Release: Auto-Academic-Paper V1
- Core AI Pipeline (Strategist, Librarian, Thinker, Reviewer, Rewriter, Editor)
- Robust LaTeX rendering engine
- Anti-Hallucination verification protocols
- BYOK (Bring Your Own Keys) architecture