Only call stat() for image/other file types during project scan to avoid
unnecessary I/O overhead on tex/bib/style/pdf files. Use convertFileSrc
(asset URL) as fallback in ImagePreview when dataUrl is not available,
so large images are viewable without loading them entirely into memory.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
On Windows, claude.cmd is an npm wrapper that breaks when arguments
contain special characters (quotes, &, |, etc.) because cmd.exe
interprets them. Instead, resolve the .cmd to the underlying
node_modules/@anthropic-ai/claude-code/cli.js and invoke node directly.
This fixes "batch file arguments are invalid" errors on Windows.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Skip auto-loading files > 1 MB during project open. Large non-essential
files (e.g., .jsonl training data) show a VS Code-style "Open Anyway"
prompt instead of being read into memory immediately.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
resolveCompileTarget now returns null when no .tex file exists in the
project, instead of falling back to a hardcoded "document.tex" path.
All 4 call sites (editor, pdf-preview, claude-events) check for null
and show a descriptive error. Rust backend also validates file existence
before attempting Tectonic compilation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add Page Up/Down buttons and editable page indicator to PDF preview toolbar
- Track current visible page via scroll with rAF throttling
- Implement proper recursive folder deletion in sidebar and document store
- Replace text asterisk with blue dot indicator for modified files in sidebar
- Extract shared scrollToPage helper to deduplicate scroll math in pdf-viewer
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
GITHUB_TOKEN tag pushes don't trigger other workflows (GitHub limitation).
Use gh workflow run to explicitly trigger Build Desktop after creating the
unified v* tag.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Covector creates per-package tags (e.g. claude-prism-desktop-v0.5.3) which
don't match the build workflow's v* trigger pattern. This adds a step to
create a unified vX.Y.Z tag after publish, bridging covector and the build.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove duplicated error-boundary.tsx in favor of upstream's
react-error-boundary library already in package.json.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Keep PdfViewer instances mounted (visibility:hidden) instead of
unmounting on file switch, so canvas/scroll state is preserved
instantly. Also cache editor cursor+scroll and PDF zoom per file.
- Keep-alive up to 5 PdfViewer instances with LRU eviction
- Save/restore scrollTop via isActive prop on visibility toggle
- Per-file editor cursor + scroll cache (editorStateCache)
- Per-root PDF zoom + fitMode cache (zoomCache)
- Gate IntersectionObserver on isActive to avoid work for hidden viewers
- Extract scrollToPageEl helper to deduplicate scroll-retry logic
- Deduplicate getOrOpenDocument to reuse getCachedDocument
- Clear all caches on project close
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix non-reactive getState() in render path → use activeFile?.id
- Replace linear cache scan with cache.get() O(1) lookup
- Remove redundant fingerprint field from CachedDoc
- Parallelize clearDocCache() with Promise.all
- Revert buffer.slice() optimization — always copy to avoid structured
clone errors from non-transferable Tauri buffers and prevent pdfCache
corruption from ArrayBuffer detachment
- Add clearScrollPositionCache() on project close to prevent memory leak
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add PDF document LRU cache (max 5 open docs) with fingerprint-based identity check
- Skip MuPDF close/reopen cycle when switching to already-cached PDF
- Remove lazy() import for PdfViewer to eliminate Suspense flash
- Cache scroll position per root file and restore on file switch
- Clear doc cache on project close
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add global ErrorBoundary with error details UI (stack trace, copy button)
- Wrap PdfViewer Suspense with ErrorBoundary for graceful PDF crash recovery
- Add 30s timeout to MuPDF worker calls to prevent infinite hangs
- Add unhandled promise rejection handler in main.tsx
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
setCompileError only updated compileErrorCache when setting an error,
but never cleared the cache entry when error was null. This caused stale
errors to resurface on tab switches via setActiveFile.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace 4 inline compile-target-resolution blocks with resolveCompileTarget()
- Replace 4 inline error formatting expressions with formatCompileError()
- Remove direct resolveTexRoot imports from consumer files
- Skip unnecessary Map copies in setPdfData when no rootFileId
- Eliminate double resolveTexRoot call in deleteFile
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>