<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lattex.git/src, branch v0.3.6</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>Document S2 API key rate limit in CLAUDE.md template</title>
<updated>2026-03-16T02:35:01+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-03-16T02:35:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=a1ec56519fb078a31afb96e68cb7714be7899f8c'/>
<id>a1ec56519fb078a31afb96e68cb7714be7899f8c</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>Add API key management UI and wire S2 key to MCP</title>
<updated>2026-03-16T01:52:13+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-03-16T01:52:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=66a403488f3a7bc32a02bc9933c396dc4c4e031d'/>
<id>66a403488f3a7bc32a02bc9933c396dc4c4e031d</id>
<content type='text'>
- Settings modal on project list page for OpenAI, Anthropic, OpenRouter, Gemini, Semantic Scholar keys
- Keys stored in userData/api-keys.json, masked by default with show/hide toggle
- S2 API key passed to MCP server via .lattex-mcp.json to avoid rate limits

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>
- Settings modal on project list page for OpenAI, Anthropic, OpenRouter, Gemini, Semantic Scholar keys
- Keys stored in userData/api-keys.json, masked by default with show/hide toggle
- S2 API key passed to MCP server via .lattex-mcp.json to avoid rate limits

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add read_compiled_pdf and search_citation MCP tools</title>
<updated>2026-03-16T00:43:02+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-03-16T00:43:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=6d4ee5ccd5529d6d2764da73e73fac57d7bfb216'/>
<id>6d4ee5ccd5529d6d2764da73e73fac57d7bfb216</id>
<content type='text'>
- read_compiled_pdf: returns PDF path for Claude Code to visually inspect compiled output
- search_citation: search Semantic Scholar for papers, returns ready-to-use BibTeX entries
- Updated CLAUDE.md template with new tool docs, workflows, and permissions

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>
- read_compiled_pdf: returns PDF path for Claude Code to visually inspect compiled output
- search_citation: search Semantic Scholar for papers, returns ready-to-use BibTeX entries
- Updated CLAUDE.md template with new tool docs, workflows, and permissions

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix resolved comment highlights not disappearing immediately</title>
<updated>2026-03-16T00:16:42+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-03-16T00:16:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=533bcdd91ff143df46e92351b2fee90b1f221aaf'/>
<id>533bcdd91ff143df46e92351b2fee90b1f221aaf</id>
<content type='text'>
The resolve-thread socket event was only handled in ReviewPanel's
useEffect, but ReviewPanel is conditionally mounted (only when visible).
When Claude Code resolves a comment via MCP with the panel hidden, the
resolvedThreadIds store was never updated, so the editor highlight
persisted until the user opened the Review panel.

Fix: add a comments:event listener in App.tsx (always mounted) that
updates resolvedThreadIds for resolve/reopen/delete-thread events.

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>
The resolve-thread socket event was only handled in ReviewPanel's
useEffect, but ReviewPanel is conditionally mounted (only when visible).
When Claude Code resolves a comment via MCP with the panel hidden, the
resolvedThreadIds store was never updated, so the editor highlight
persisted until the user opened the Review panel.

Fix: add a comments:event listener in App.tsx (always mounted) that
updates resolvedThreadIds for resolve/reopen/delete-thread events.

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix OT ack/error swallowed when doc transitions to editor mode</title>
<updated>2026-03-16T00:13:57+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-03-16T00:13:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=c667ff6a58b36b67bb92ff5a20df646e0777c6d5'/>
<id>c667ff6a58b36b67bb92ff5a20df646e0777c6d5</id>
<content type='text'>
When addEditorDoc is called while the bridge has in-flight OT ops
(awaitingConfirm), the ack/error response was ignored because
handleOtUpdate/handleOtError skipped editor docs entirely. This left
the bridge's OtClient stuck and the edit appeared lost until
removeEditorDoc re-discovered the discrepancy.

Fix: always process acks regardless of editor doc status, and only
skip OT errors for editor docs when the bridge has no OtClient.

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>
When addEditorDoc is called while the bridge has in-flight OT ops
(awaitingConfirm), the ack/error response was ignored because
handleOtUpdate/handleOtError skipped editor docs entirely. This left
the bridge's OtClient stuck and the edit appeared lost until
removeEditorDoc re-discovered the discrepancy.

Fix: always process acks regardless of editor doc status, and only
skip OT errors for editor docs when the bridge has no OtClient.

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Strengthen CLAUDE.md: explicit step-by-step file reading instructions</title>
<updated>2026-03-16T00:07:40+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-03-16T00:07:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=250c3c6cebe68a8a7e37032b550f1bd1c378508d'/>
<id>250c3c6cebe68a8a7e37032b550f1bd1c378508d</id>
<content type='text'>
Split "read main.tex and all inputs" into two discrete steps:
1. Read main file to discover \input/\include references
2. Read EVERY referenced file one by one (no skipping, no skimming)

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>
Split "read main.tex and all inputs" into two discrete steps:
1. Read main file to discover \input/\include references
2. Read EVERY referenced file one by one (no skipping, no skimming)

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add online users popover, MCP get_online_users, claude-workspace, stronger CLAUDE.md</title>
<updated>2026-03-15T23:47:29+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-03-15T23:47:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=a36b73505754acab6872d23c9add58dfca3cecdd'/>
<id>a36b73505754acab6872d23c9add58dfca3cecdd</id>
<content type='text'>
- Online users: click "N online" badge to see user names with cursor colors
- MCP get_online_users tool: main process tracks users in .lattex-online-users.json
- CLAUDE.md: show current user's Overleaf name (fetched from /user/settings)
- CLAUDE.md: mandatory first steps with MUST/NEVER language at top of file
- claude-workspace/ directory: untracked scratch space for Claude Code experiments
- chokidar + bridge skip claude-workspace/ to prevent syncing to Overleaf

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>
- Online users: click "N online" badge to see user names with cursor colors
- MCP get_online_users tool: main process tracks users in .lattex-online-users.json
- CLAUDE.md: show current user's Overleaf name (fetched from /user/settings)
- CLAUDE.md: mandatory first steps with MUST/NEVER language at top of file
- claude-workspace/ directory: untracked scratch space for Claude Code experiments
- chokidar + bridge skip claude-workspace/ to prevent syncing to Overleaf

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix file sync for non-active tabs, MCP compile integration, OT resilience</title>
<updated>2026-03-15T23:21:06+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-03-15T23:21:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=c9d673d83037167553dcef3947065266743b2d5f'/>
<id>c9d673d83037167553dcef3947065266743b2d5f</id>
<content type='text'>
- Fix .bib (and other non-active tab) edits disappearing: call otLeaveDoc
  on tab switch so bridge takes back OT ownership; release .bib pre-loads
  immediately after reading content for citation autocomplete
- Always update lastKnownContent in processDocChange for editor docs to
  prevent stale state accumulation
- Flush pending OT ops in OverleafDocSync.destroy() before tab switch
- Add three-way merge in replaceContent to preserve concurrent remote edits
- Wire MCP compile to UI: file-based signal between MCP server and Electron
  main process, with compile animation and PDF refresh in renderer
- Add CLSI flush before compile to prevent stale cached results
- Add OT error recovery: re-join doc and re-apply disk changes on otUpdateError
- Add bridge reconnect handling: reset OtClient on docRejoined for non-editor docs
- Add compile concurrency lock to prevent duplicate compiles
- removeEditorDoc compares disk vs server content to catch in-flight ops

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 .bib (and other non-active tab) edits disappearing: call otLeaveDoc
  on tab switch so bridge takes back OT ownership; release .bib pre-loads
  immediately after reading content for citation autocomplete
- Always update lastKnownContent in processDocChange for editor docs to
  prevent stale state accumulation
- Flush pending OT ops in OverleafDocSync.destroy() before tab switch
- Add three-way merge in replaceContent to preserve concurrent remote edits
- Wire MCP compile to UI: file-based signal between MCP server and Electron
  main process, with compile animation and PDF refresh in renderer
- Add CLSI flush before compile to prevent stale cached results
- Add OT error recovery: re-join doc and re-apply disk changes on otUpdateError
- Add bridge reconnect handling: reset OtClient on docRejoined for non-editor docs
- Add compile concurrency lock to prevent duplicate compiles
- removeEditorDoc compares disk vs server content to catch in-flight ops

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix PDF not refreshing after recompile</title>
<updated>2026-03-15T20:52:07+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-03-15T20:52:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=90abc457f29f110dbf89f98efef5d9743efee963'/>
<id>90abc457f29f110dbf89f98efef5d9743efee963</id>
<content type='text'>
setPdfPath with the same path didn't trigger re-render. Added pdfVersion
counter that increments on every setPdfPath call, used as dependency in
PdfViewer's renderPdf to force reload regardless of path equality.

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>
setPdfPath with the same path didn't trigger re-render. Added pdfVersion
counter that increments on every setPdfPath call, used as dependency in
PdfViewer's renderPdf to force reload regardless of path equality.

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix sync race condition: external edits overwritten by remote ops</title>
<updated>2026-03-15T20:02:15+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-03-15T20:02:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=72b38fed1d75fcb3420beeeeefd3dc2fc442e64b'/>
<id>72b38fed1d75fcb3420beeeeefd3dc2fc442e64b</id>
<content type='text'>
When Claude Code writes to disk, a debounce timer is set. If a remote
Overleaf op arrives during the debounce, onEditorContentChanged would
write the remote content back to disk, overwriting Claude Code's edit.

Fix: skip disk write and lastKnownContent update in onEditorContentChanged
when a debounce is pending (external disk change waiting to be processed).
Also increase writesInProgress guard to 800ms to exceed chokidar's 500ms
polling interval.

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>
When Claude Code writes to disk, a debounce timer is set. If a remote
Overleaf op arrives during the debounce, onEditorContentChanged would
write the remote content back to disk, overwriting Claude Code's edit.

Fix: skip disk write and lastKnownContent update in onEditorContentChanged
when a debounce is pending (external disk change waiting to be processed).
Also increase writesInProgress guard to 800ms to exceed chokidar's 500ms
polling interval.

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