- 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>
Consolidate duplicated compile-target resolution and error formatting
logic into shared functions in latex-compiler.ts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Dropbox/iCloud can keep files as online-only placeholders with 0 bytes
on disk. When sync_source_files copies these, the build dir gets empty
files, causing 'Unable to load picture or PDF file' errors.
Force-read 0-byte files to trigger cloud download before copying.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update all compilation sites to resolve the root file before compiling
and check per-root generation instead of a single project-wide guard.
- latex-editor: read isCompiling from store to avoid stale closures
- pdf-preview: read all guard values from store, add Compile button
to empty placeholder view
- use-claude-events: resolve root for auto-compile after Claude edits
- All sites pass rootFileId to setPdfData/setCompileError for caching
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace single pdfData/lastCompiledGeneration with per-root-file Maps
so multiple .tex documents can each have their own cached PDF.
- Add pdfCache, compileErrorCache, lastCompiledGenerations Maps
- Add resolveTexRoot() to parse % !TEX root magic comments
- setActiveFile swaps displayed PDF from cache on file switch
- setPdfData/setCompileError update both cache and display
- Add migrateCacheKey helper for rename/move operations
- Cache cleanup on deleteFile, migration on renameFile/moveFile
- Reset all caches on openProject/closeProject
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add dynamic fit modes at the top of the zoom dropdown that auto-recalculate
scale on window/container resize and persist during scroll. Manual zoom
actions (buttons, wheel, keyboard, percentage select) clear fit mode.
Also fix bouncy scroll arrow by switching dropdown to popper positioning.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Added fuzzy search functionality to improve command matching and scoring.
- Introduced a new tab for skills in the slash command picker.
- Implemented a preview panel for skills, displaying detailed content.
- Updated command icons to include new skill-related icons.
- Refactored command filtering and sorting logic to accommodate new features.
- Created comprehensive tests for fuzzy search scoring and command ranking.
- Updated Tectonic build configuration for local macOS development.
- Modified git2 dependency to use vendored-libgit2 feature.
- Improved the `find_claude_binary` function to check for native installation paths first.
- Added functions to ensure required directories for Claude are created and writable, with elevation handling on macOS.
- Updated `install_claude_cli` to ensure necessary directories exist before installation.
- Refactored scientific skills installation to include directory permission checks and logging.
- Enhanced error handling and logging during installation processes.
- Improved UI components for displaying installation progress and logs.
- Added tests for new directory handling functions and installation logic.
- Updated LaTeX template for poster presentation with improved formatting and content.
- README: add CXXFLAGS=/std:c++17 env var for MSVC (ICU 78+ requires
C++17, but MSVC uses /std:c++17 instead of -std=c++17)
- README: fix vcpkg triplet to x64-windows-static-md (tectonic expects
static-md linkage, not dynamic x64-windows)
- .cargo/config.toml: clarify that macOS defaults are overridden by
user env vars on Windows/Linux (force=false)
- tool-widgets: fix TodoWrite widget crash when input.todos is not an
array (e.g. malformed session history), use Array.isArray guard
- chat-messages: add nullish coalescing fallback for messages store
selector to prevent crashes during session transitions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Implemented image cropping feature in ImagePreview component with interactive selection and resizing handles.
- Added crop mode toggle in EditorToolbar for image files.
- Enhanced PDF rendering by fetching all page sizes in one call instead of individually.
- Optimized image rendering using createImageBitmap to improve performance.
- Introduced content generation tracking in document store to prevent unnecessary recompiles.
- Updated various components to support new cropping functionality and improved user experience.
- Add covector config and CI workflow for automated versioning
- Bump all package versions to 0.4.0
- Add .changes/ directory with README for change management
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Implemented UvSetupDialog component for managing Python virtual environments.
- Added state management for uv installation status using zustand.
- Integrated event listeners for installation completion and status checking.
- Enhanced ImagePreview component with pinch-to-zoom and keyboard shortcuts for scaling.
- Updated LatexEditor to reset image scale when switching files.
- Created EnvironmentSection in Sidebar for displaying Python and skills status.
- Added scientific report template to template registry.
- Refactored PDF loading to improve performance and user experience.
- Added ChatTabBar component for managing multiple chat tabs.
- Integrated tab switching functionality with keyboard shortcuts (Ctrl+Tab, Ctrl+T, Ctrl+W).
- Enhanced ChatComposer to save and restore drafts based on active tab.
- Updated ClaudeChatDrawer to include ChatTabBar and manage streaming state across tabs.
- Refactored useClaudeEvents to handle events per tab, allowing concurrent streaming.
- Modified ClaudeChatStore to support tab-specific state management, including creating, closing, and switching tabs.
- Set CXXFLAGS=/std:c++17 on Windows CI (ICU 78+ requires C++17 features
like nested-namespace-definition and auto in non-type template params)
- Add Vitest tests validating tauri.conf.json CSP configuration to prevent
regressions (dangerousDisableAssetCspModification, style-src, connect-src,
font-src directives)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Use external-harfbuzz globally (vendored harfbuzz build.rs has a
header copy bug on Windows)
- Install harfbuzz[graphite2] via vcpkg on Windows instead of
standalone graphite2
- Clear CXXFLAGS/CFLAGS on Windows to prevent macOS-specific
.cargo/config.toml values from leaking
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Set up Vitest with jsdom environment and Tauri mocks for frontend testing.
Add 44 frontend tests covering Zustand stores (claude-chat, project, proposed-changes,
template) and lib utilities (template-registry, file type classification).
Add 48 Rust unit tests across zotero (OAuth helpers), slash_commands (markdown parsing),
latex (error extraction, SyncTeX parsing), and claude (session dir encoding, message
title cleaning). Update README with test commands.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use platform-specific tectonic features so Windows CI builds with
bundled HarfBuzz/Graphite2 instead of requiring pkg-config.
Rewrite README with updated feature list and install instructions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: enhance slash command picker with loading state and tab filtering
fix: improve PDF preview button styling and functionality
fix: update PDF viewer layout for better responsiveness
fix: handle user cancellation in Claude event processing
chore: add cancelledByUser state to Claude chat store
docs: update README with installation instructions for macOS
- Added Tectonic as a dependency for LaTeX compilation in Cargo.toml.
- Created Entitlements.plist for macOS app sandboxing and security permissions.
- Refactored latex.rs to utilize Tectonic for PDF generation, removing legacy compilation logic.
- Updated compile_latex function to handle Tectonic's processing and error handling.
- Enhanced synctex editing functionality to read and parse synctex data correctly.
- Modified project-wizard and template-preview components to improve project creation prompts.
- Adjusted tauri.conf.json to include entitlements for macOS and set minimum system version.
- Cleaned up unused code and improved overall code readability and maintainability.
- Add bundle.active=true (defaults to false, causing no artifacts)
- Revert tauri-action to @v0 as recommended by official Tauri docs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove OpenSSL dependency by disabling git2 default features (only local ops needed)
- Remove non-existent hidden_title() call from WebviewWindowBuilder
- Upgrade tauri-action v0 → v1 for artifact detection fixes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Removed onSelectTemplate prop from TemplateGallery, simplifying its interface.
- Updated TemplatePreview to handle template selection and project creation internally.
- Enhanced TemplatePreview with a new details step for project creation, including purpose input and file attachments.
- Implemented drag-and-drop functionality for adding reference files.
- Added project folder selection and dynamic project name generation.
- Improved modal layout and responsiveness based on the current step.