summaryrefslogtreecommitdiff
path: root/src/main
AgeCommit message (Collapse)Author
4 hoursFix Claude Code → Overleaf sync: remove hash from applyOtUpdate, fix OT bugshaoyuren
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>
5 hoursUse polling for file watcher to reliably detect external editshaoyuren
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 <noreply@anthropic.com>
5 hoursSeparate Terminal and Claude into independent pty instanceshaoyuren
- 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 <noreply@anthropic.com>
6 hoursAdd bidirectional sync for binary files (PDF, images, etc.)haoyuren
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 <noreply@anthropic.com>
6 hoursAdd drag-and-drop file upload, fix project creation modal and API endpointshaoyuren
- 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 <noreply@anthropic.com>
20 hoursFix terminal cwd, selection highlight, comment range preservationhaoyuren
- 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 <noreply@anthropic.com>
21 hoursUpdate logo, app icon, fix shutdown crash, add READMEhaoyuren
- Simplified logo: cosmic latte cup on brown background with turquoise liquid and sparkle stars - Square app icon (.icns) for macOS dock - Fix crash on window close: guard all IPC sends against destroyed window - Include ws/chokidar/diff-match-patch in packaged app - Add README with features and install instructions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
21 hoursAdd AGPL-3.0 license and copyright headers to all source fileshaoyuren
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
22 hoursRename to LatteX, add LaTeX autocomplete, fix comment highlight positionsv0.1.0haoyuren
- 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 <noreply@anthropic.com>
28 hoursAdd collaborator cursors and project chathaoyuren
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 <noreply@anthropic.com>
29 hoursAdd bidirectional file sync, OT system, comments, and real-time collaborationhaoyuren
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 <noreply@anthropic.com>
2 daysInitial commit: ClaudeTeX - LaTeX editor with Overleaf synchaoyuren
Features: - Electron + React + TypeScript app with Cosmic Latte theme - CodeMirror 6 editor with LaTeX syntax highlighting - PDF preview with pdf.js, zoom controls, SyncTeX double-click jump - File tree with context menu (new/rename/delete/reveal) - Overleaf Git clone with token auth + macOS Keychain storage - Git pull/push sync for Overleaf projects - Embedded terminal (xterm.js + node-pty) with Claude CLI integration - LaTeX compilation via latexmk with auto package install detection - Structured compile log (errors/warnings) with click-to-navigate - Main document setting (auto-detect or right-click to set) - Custom modal system (input/confirm/alert) - Resizable panel layout (file tree | editor | PDF + terminal) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>