Skip to content

Cortex v0.1.1

Choose a tag to compare

@github-actions github-actions released this 13 Jun 08:05

What's Changed

  • feat: implement terminal pane management, port detection, and draggable UI by @icodecedd in #11
  • perf(rust): DashMap + OnceLock shell env cache + gate debug_env to dev builds:
    • Replace Arc<Mutex> PTY sessions with DashMap<String, Mutex>. Per-key sharding means write_pty/resize_pty to different panes no longer compete for a single global lock.
    • Cache get_shell_env() with std::sync::OnceLock: the first PTY spawn (or dev-mode startup) forks a login shell to load PATH; every subsequent call reads the cached HashMap with zero syscalls.
    • debug_env body is compiled only in debug builds; release binary returns empty string and the frontend call is gated with import.meta.env.DEV.
    • Remove once_cell dependency (replaced by std::sync::OnceLock, stable since Rust 1.70 / Tauri 2 min is 1.77).
  • perf(react): lazy-load heavy dialogs + LazyMotion for framer-motion
    • KeyboardShortcutsDialog, SettingsDialog, CortexLibraryDialog, and WorkspaceSwitcherDialog are now lazily imported via React.lazy(). They are never parsed on startup; code only loads when first opened.
    • Wrap root motion subtree in . Using 'm' (not 'motion') with LazyMotion reduces the framer-motion bundle from ~130KB to ~18KB minified for the initial chunk.
  • perf(react): simplify App.tsx — consume WorkspaceContext, gate debug_env
    • All workspace state and handlers moved to WorkspaceContext; App.tsx now only holds appState, dialog-open flags, and settings hooks.
    • debug_env invoke gated behind import.meta.env.DEV so it never fires in production builds (the Rust side is already a no-op in release).
    • Removes 15+ useCallback/useState declarations from the root component, reducing re-render surface area for theme/dialog changes.

Full Changelog: v0.1.0...v0.1.1