<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lattex.git/src, branch v0.2.5</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/'/>
<entry>
<title>Add new file sync to Overleaf, Copy Comments button with file filtering</title>
<updated>2026-03-15T03:26:36+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-03-15T03:26:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=c261b8c4a95a7af64e3cd95a65c50f4dcbbb802c'/>
<id>c261b8c4a95a7af64e3cd95a65c50f4dcbbb802c</id>
<content type='text'>
- Sync new local files (created by Claude Code etc.) to Overleaf via REST API
- Create intermediate folders as needed, handle both text docs and binaries
- Scan for orphaned files on startup that weren't synced previously
- Add "Copy Comments" quick action: copies unresolved comments for current file
  to clipboard with line numbers, context, author names, and timestamps
- Filter comments to active file only, exclude resolved threads

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Sync new local files (created by Claude Code etc.) to Overleaf via REST API
- Create intermediate folders as needed, handle both text docs and binaries
- Scan for orphaned files on startup that weren't synced previously
- Add "Copy Comments" quick action: copies unresolved comments for current file
  to clipboard with line numbers, context, author names, and timestamps
- Filter comments to active file only, exclude resolved threads

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix embedded terminal for Claude Code: PTY env, DEC 2026, xterm.js window queries</title>
<updated>2026-03-14T03:35:05+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-03-14T03:35:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=2ee6d867bd93bb955429a274865320dfa5bd0f69'/>
<id>2ee6d867bd93bb955429a274865320dfa5bd0f69</id>
<content type='text'>
- Add missing PTY environment variables (TERM, COLORTERM, LANG, TERM_PROGRAM)
- Strip DEC 2026 synchronized output sequences that cause xterm.js to buffer
  indefinitely when begin/end markers are split across PTY chunks
- Enable xterm.js windowOptions for terminal pixel/char size queries that
  Claude Code sends to determine rendering capabilities
- Launch Claude tab via login shell for full PATH inheritance

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Add missing PTY environment variables (TERM, COLORTERM, LANG, TERM_PROGRAM)
- Strip DEC 2026 synchronized output sequences that cause xterm.js to buffer
  indefinitely when begin/end markers are split across PTY chunks
- Enable xterm.js windowOptions for terminal pixel/char size queries that
  Claude Code sends to determine rendering capabilities
- Launch Claude tab via login shell for full PATH inheritance

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix Claude Code → Overleaf sync: remove hash from applyOtUpdate, fix OT bugs</title>
<updated>2026-03-13T23:46:46+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-03-13T23:46:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=11166a63affc4e95450f677d860c8bfdb8211bd9'/>
<id>11166a63affc4e95450f677d860c8bfdb8211bd9</id>
<content type='text'>
Root cause: SHA-1 hash sent with applyOtUpdate didn't match Overleaf's
server-side computation, causing "Invalid hash" error, disconnect, and
rollback of all synced changes.

- Remove hash field from applyOtUpdate to skip server-side hash check
- Switch applyOtUpdate from fire-and-forget to emitWithAck for reliable ack
- Fix getOldDoc bug: save base doc when changes start accumulating instead
  of incorrectly using current doc (caused wrong delete ops)
- Fix ack handler: only ack when no 'op' field (was acking remote ops too)
- Await fileSyncBridge.start() instead of fire-and-forget
- Add joinDoc retry logic for transient joinLeaveEpoch mismatch errors
- Clear pending ack callbacks on WebSocket close to prevent timeout errors
- Add otUpdateError logging for server-side rejections
- Add file-based bridge logging for debugging sync issues

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Root cause: SHA-1 hash sent with applyOtUpdate didn't match Overleaf's
server-side computation, causing "Invalid hash" error, disconnect, and
rollback of all synced changes.

- Remove hash field from applyOtUpdate to skip server-side hash check
- Switch applyOtUpdate from fire-and-forget to emitWithAck for reliable ack
- Fix getOldDoc bug: save base doc when changes start accumulating instead
  of incorrectly using current doc (caused wrong delete ops)
- Fix ack handler: only ack when no 'op' field (was acking remote ops too)
- Await fileSyncBridge.start() instead of fire-and-forget
- Add joinDoc retry logic for transient joinLeaveEpoch mismatch errors
- Clear pending ack callbacks on WebSocket close to prevent timeout errors
- Add otUpdateError logging for server-side rejections
- Add file-based bridge logging for debugging sync issues

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve editing experience: KaTeX math preview, syntax highlighting, symbol autocomplete</title>
<updated>2026-03-13T23:02:10+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-03-13T23:02:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=fa52c3c4d6c21a26c838fa33de2d7fa447f9499e'/>
<id>fa52c3c4d6c21a26c838fa33de2d7fa447f9499e</id>
<content type='text'>
- Replace broken MathML math preview with KaTeX for rendered formula tooltips
- Fix syntax highlighting by using proper HighlightStyle + syntaxHighlighting() instead of non-functional CSS class overrides
- Add math region background highlighting (subtle gold tint for $...$ and $$...$$ regions)
- Add Unicode symbol previews in autocomplete for Greek letters and math operators

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Replace broken MathML math preview with KaTeX for rendered formula tooltips
- Fix syntax highlighting by using proper HighlightStyle + syntaxHighlighting() instead of non-functional CSS class overrides
- Add math region background highlighting (subtle gold tint for $...$ and $$...$$ regions)
- Add Unicode symbol previews in autocomplete for Greek letters and math operators

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Use polling for file watcher to reliably detect external edits</title>
<updated>2026-03-13T22:28:32+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-03-13T22:28:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=56b216fdf73c166ead83231074e3573983b7de51'/>
<id>56b216fdf73c166ead83231074e3573983b7de51</id>
<content type='text'>
chokidar FSEvents is unreliable in macOS temp dirs and misses atomic
writes (write temp + rename) used by Claude Code and other editors.
Switch to usePolling with 500ms interval and atomic: true.

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
chokidar FSEvents is unreliable in macOS temp dirs and misses atomic
writes (write temp + rename) used by Claude Code and other editors.
Switch to usePolling with 500ms interval and atomic: true.

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Separate Terminal and Claude into independent pty instances</title>
<updated>2026-03-13T22:28:27+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-03-13T22:28:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=e377dabf99595a6783fd962a8765d2214a635ac2'/>
<id>e377dabf99595a6783fd962a8765d2214a635ac2</id>
<content type='text'>
- Support multiple named pty instances via ID-based IPC channels
- Terminal tab spawns a shell, Claude tab spawns `claude` CLI separately
- Fix pty race condition: old instance's onExit callback could delete
  the replacement instance from the Map during React StrictMode re-mount
- Guard against StrictMode double-initialization in TerminalInstance

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Support multiple named pty instances via ID-based IPC channels
- Terminal tab spawns a shell, Claude tab spawns `claude` CLI separately
- Fix pty race condition: old instance's onExit callback could delete
  the replacement instance from the Map during React StrictMode re-mount
- Guard against StrictMode double-initialization in TerminalInstance

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add bidirectional sync for binary files (PDF, images, etc.)</title>
<updated>2026-03-13T21:56:13+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-03-13T21:56:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=2d268365bc1f9f9b550812a8aa406b7abc005497'/>
<id>2d268365bc1f9f9b550812a8aa406b7abc005497</id>
<content type='text'>
FileSyncBridge now handles binary fileRefs in addition to text docs:
- Downloads all binary files to temp dir on project connect
- Watches for binary file changes on disk and uploads via REST API
- Listens for Overleaf socket events (reciveNewFile, reciveNewDoc,
  removeEntity, reciveEntityRename) to sync remote changes to disk
- Tracks binary files by SHA1 hash to avoid redundant uploads

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
FileSyncBridge now handles binary fileRefs in addition to text docs:
- Downloads all binary files to temp dir on project connect
- Watches for binary file changes on disk and uploads via REST API
- Listens for Overleaf socket events (reciveNewFile, reciveNewDoc,
  removeEntity, reciveEntityRename) to sync remote changes to disk
- Tracks binary files by SHA1 hash to avoid redundant uploads

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add drag-and-drop file upload, fix project creation modal and API endpoints</title>
<updated>2026-03-13T21:48:56+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-03-13T21:48:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=c309944494eb2de63bf9b35ea722d50b52e688a3'/>
<id>c309944494eb2de63bf9b35ea722d50b52e688a3</id>
<content type='text'>
- Add file upload to Overleaf projects via multipart POST with correct
  "name" text field (server reads filename from req.body.name, not from
  Content-Disposition filename)
- Add drag-and-drop support in file tree panel with visual feedback
- Replace window.prompt() with custom modal for new project creation
  (prompt() returns null in Electron)
- Fix API endpoints: /api/project/new → /project/new

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Add file upload to Overleaf projects via multipart POST with correct
  "name" text field (server reads filename from req.body.name, not from
  Content-Disposition filename)
- Add drag-and-drop support in file tree panel with visual feedback
- Replace window.prompt() with custom modal for new project creation
  (prompt() returns null in Electron)
- Fix API endpoints: /api/project/new → /project/new

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add code folding, outline view, smart closing, math preview, syntax improvements</title>
<updated>2026-03-13T20:50:40+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-03-13T20:50:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=dd2cd06d4e8b64d6e0b9488a1887b05ecdc7d533'/>
<id>dd2cd06d4e8b64d6e0b9488a1887b05ecdc7d533</id>
<content type='text'>
- LaTeX code folding: \begin/\end, sections, \if/\fi, comment blocks, braces
- Outline view: section hierarchy in sidebar with click-to-navigate
- Smart closing: auto-close \begin{env} with \end{env} on Enter, $...$ auto-pair, selection surround
- Math hover preview: tooltip when hovering over $...$ expressions
- Enhanced syntax highlighting: bolder commands, better color differentiation
- Fix compile error click: jump to line works for errors without explicit file path
- Semi-transparent active line + selection highlight layering

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- LaTeX code folding: \begin/\end, sections, \if/\fi, comment blocks, braces
- Outline view: section hierarchy in sidebar with click-to-navigate
- Smart closing: auto-close \begin{env} with \end{env} on Enter, $...$ auto-pair, selection surround
- Math hover preview: tooltip when hovering over $...$ expressions
- Enhanced syntax highlighting: bolder commands, better color differentiation
- Fix compile error click: jump to line works for errors without explicit file path
- Semi-transparent active line + selection highlight layering

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix terminal cwd, selection highlight, comment range preservation</title>
<updated>2026-03-13T07:15:10+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-03-13T07:15:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=82447ef3229336b914344f5671c4cb8bd589dcdc'/>
<id>82447ef3229336b914344f5671c4cb8bd589dcdc</id>
<content type='text'>
- Terminal now spawns in project sync directory so Claude Code can
  read/write .tex files
- Selection highlight uses semi-transparent color to layer above
  active line highlight
- External edits use diff-match-patch for minimal changes instead of
  full doc replace, preserving comment highlight positions
- Set connection state on project open so status bar shows Connected
- Remove cursor:pointer from comment highlights

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Terminal now spawns in project sync directory so Claude Code can
  read/write .tex files
- Selection highlight uses semi-transparent color to layer above
  active line highlight
- External edits use diff-match-patch for minimal changes instead of
  full doc replace, preserving comment highlight positions
- Set connection state on project open so status bar shows Connected
- Remove cursor:pointer from comment highlights

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
