summaryrefslogtreecommitdiff
path: root/scripts/afterPack.js
diff options
context:
space:
mode:
authorhaoyuren <13851610112@163.com>2026-03-13 18:46:46 -0500
committerhaoyuren <13851610112@163.com>2026-03-13 18:46:46 -0500
commit11166a63affc4e95450f677d860c8bfdb8211bd9 (patch)
tree2ad4b0c81cb4df6e982c0f88fa43b2ed65b972fc /scripts/afterPack.js
parentfa52c3c4d6c21a26c838fa33de2d7fa447f9499e (diff)
Fix Claude Code → Overleaf sync: remove hash from applyOtUpdate, fix OT bugs
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 <noreply@anthropic.com>
Diffstat (limited to 'scripts/afterPack.js')
0 files changed, 0 insertions, 0 deletions