<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lattex.git/src/main/overleafSocket.ts, branch v0.3.2</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>Real-time comment sync, MCP server expansion, multi-tab terminal, UI fixes</title>
<updated>2026-03-15T06:57:17+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-03-15T06:57:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=7748999a8b0c3ab5e7b107bf7c42f24580cb23aa'/>
<id>7748999a8b0c3ab5e7b107bf7c42f24580cb23aa</id>
<content type='text'>
- Fix Socket.IO v0.9 ack parser to handle acks without data (6:::N format),
  fixing comment creation stuck at "sending"
- Rewrite comment sync to use local state updates from socket events
  (new-comment, resolve-thread, reopen-thread, delete-thread, edit-message,
  delete-message) instead of REST re-fetches — instant UI updates
- Optimistic updates for all comment actions (resolve, reopen, delete, reply, edit)
- Fetch threads + contexts on project connect so editor highlights are correct
  from startup, not only when review panel is opened
- Add comment context to store immediately after creation for instant highlight
- Rename MCP server from overleaf-comments to lattex, add 6 new tools:
  reopen_comment, delete_comment, get_chat_messages, send_chat_message,
  list_project_files, compile_latex — all auto-granted permissions
- Refactor terminal from fixed Terminal/Claude tabs to dynamic multi-tab with
  bottom tab bar and unlimited new terminal creation
- Fix chat panel layout overflow pushing other components

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>
- Fix Socket.IO v0.9 ack parser to handle acks without data (6:::N format),
  fixing comment creation stuck at "sending"
- Rewrite comment sync to use local state updates from socket events
  (new-comment, resolve-thread, reopen-thread, delete-thread, edit-message,
  delete-message) instead of REST re-fetches — instant UI updates
- Optimistic updates for all comment actions (resolve, reopen, delete, reply, edit)
- Fetch threads + contexts on project connect so editor highlights are correct
  from startup, not only when review panel is opened
- Add comment context to store immediately after creation for instant highlight
- Rename MCP server from overleaf-comments to lattex, add 6 new tools:
  reopen_comment, delete_comment, get_chat_messages, send_chat_message,
  list_project_files, compile_latex — all auto-granted permissions
- Refactor terminal from fixed Terminal/Claude tabs to dynamic multi-tab with
  bottom tab bar and unlimited new terminal creation
- Fix chat panel layout overflow pushing other components

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>Add AGPL-3.0 license and copyright headers to all source files</title>
<updated>2026-03-13T06:15:01+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-03-13T06:15:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=8b3b3be550307598e84c59e3d708e6ee9a3e1beb'/>
<id>8b3b3be550307598e84c59e3d708e6ee9a3e1beb</id>
<content type='text'>
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>
Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename to LatteX, add LaTeX autocomplete, fix comment highlight positions</title>
<updated>2026-03-13T05:52:59+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-03-13T05:52:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=52a5c24f5e28a4b2ba8ffb006874cd7b552d60f7'/>
<id>52a5c24f5e28a4b2ba8ffb006874cd7b552d60f7</id>
<content type='text'>
- Rename project from ClaudeTeX to LatteX (Cosmic Latte theme pun)
- Add new coffee cup logo and branded welcome/project screens
- Add 5-source LaTeX autocomplete: commands, environments, \ref, \cite, file paths
- Fix comment highlight drift by decoding WebSocket-encoded UTF-8 lines and range
  text via decodeURIComponent(escape()), matching Overleaf's client implementation
- Remove hacky byte-offset position remapping from index.ts
- Add pinch-to-zoom on PDF viewer

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>
- Rename project from ClaudeTeX to LatteX (Cosmic Latte theme pun)
- Add new coffee cup logo and branded welcome/project screens
- Add 5-source LaTeX autocomplete: commands, environments, \ref, \cite, file paths
- Fix comment highlight drift by decoding WebSocket-encoded UTF-8 lines and range
  text via decodeURIComponent(escape()), matching Overleaf's client implementation
- Remove hacky byte-offset position remapping from index.ts
- Add pinch-to-zoom on PDF viewer

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add collaborator cursors and project chat</title>
<updated>2026-03-12T23:11:10+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-03-12T23:11:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=a0dd3d7ac642111faeaefd02c5a452898b9c6d49'/>
<id>a0dd3d7ac642111faeaefd02c5a452898b9c6d49</id>
<content type='text'>
Collaborator cursors:
- Real-time cursor positions via clientTracking Socket.IO events
- CM6 extension renders colored cursor widgets with name labels
- Throttled cursor position broadcasting (300ms)
- Connected users count in toolbar and status bar

Project chat:
- Chat panel in right sidebar (toggleable)
- Load message history via REST API
- Send messages with real-time delivery via Socket.IO new-chat-message
- Auto-scroll, avatars, timestamps

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>
Collaborator cursors:
- Real-time cursor positions via clientTracking Socket.IO events
- CM6 extension renders colored cursor widgets with name labels
- Throttled cursor position broadcasting (300ms)
- Connected users count in toolbar and status bar

Project chat:
- Chat panel in right sidebar (toggleable)
- Load message history via REST API
- Send messages with real-time delivery via Socket.IO new-chat-message
- Auto-scroll, avatars, timestamps

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add bidirectional file sync, OT system, comments, and real-time collaboration</title>
<updated>2026-03-12T22:52:53+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-03-12T22:52:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=b116335f9dbde4f483c0b2b8e7bfca5d321c5dfc'/>
<id>b116335f9dbde4f483c0b2b8e7bfca5d321c5dfc</id>
<content type='text'>
Implement full Overleaf integration with Socket.IO v0.9 real-time sync:
- FileSyncBridge for bidirectional temp dir ↔ Overleaf sync via chokidar + diff-match-patch
- OT state machine, transform functions, and CM6 adapter for collaborative editing
- Comment system with highlights, tooltips, and review panel
- Project list, file tree management, and socket-based compilation
- 3-layer loop prevention (write guards, content equality, debounce)

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>
Implement full Overleaf integration with Socket.IO v0.9 real-time sync:
- FileSyncBridge for bidirectional temp dir ↔ Overleaf sync via chokidar + diff-match-patch
- OT state machine, transform functions, and CM6 adapter for collaborative editing
- Comment system with highlights, tooltips, and review panel
- Project list, file tree management, and socket-based compilation
- 3-layer loop prevention (write guards, content equality, debounce)

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